2252 Commits

Author SHA1 Message Date
Bruce Beare
d625127db9 jni: remove obsolete flag from makefile
Change-Id: Ia7e67694a736745333e9d36396b8cb6194fd26ec
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2013-03-05 14:29:46 -08:00
Nick Kralevich
b3c4a0bb5c ZygoteInit: use correct header files.
Don't define capget / capset when we already have definitions
of it in our header files.

Change-Id: Ia2d7e408879bd09019f99aef52acb63a7a243d48
2013-02-28 16:56:16 -08:00
Ian Rogers
7c9f30bfb3 Track stack memory in MemoryInfo.
In /proc/pid/maps the main stack is identified as "[stack]". In Linux 3.4
thread stacks are identified as "[stack:<tid>]" where <tid> is the thread ID of
the thread using that stack. Add support in MemInfo's otherStats to track
memory being used by the stack.

Add sanity check on the length of the otherStats array.
Add detail messages to two null pointer exceptions.

Bug: 8265251

Change-Id: I2b228b147da9bdc5c7a4d825dfc628fcc7923927
2013-02-27 11:34:42 -08:00
Ian Rogers
9f8589c31f Recognize odex files in memory accounting.
Give odex files the same heap category as dex files.

Change-Id: I82539e20ac20a2b80c63c0cfceb266d9c59e22b7
2013-02-22 20:35:56 -08:00
Ian Rogers
afc10e174d Account malloc mmaped pages as native heap.
Currently when malloc uses a page rather than brk the heap gets accounted as
ashmem memory. Previously the memory would be accounted as unknown but since
[1] it gets accounted as ashmem. This change makes the accounting see this
memory as being native, ie the same kind of memory we associate with brk.

[1] https://android-review.googlesource.com/#/c/49583/3

Change-Id: I6f496cfeb590268d41d8e047b12cd5c90359e2b0
2013-02-22 09:40:58 -08:00
Jesse Hall
62af9551c9 Process all display events in order
Display events in each batch received from IPC were being processed in
reverse order, and stopped after the first vsync event (latest
chronologically) was handled. This makes perfect sense for vsync
events, but is broken for hotplug events.

Now we process them all in order, handling all except vsync as we see
them. For vsync events, only the last is reported.

Bug: 7491120
Change-Id: I448d139d21dc27128d75ca1d661de666fff51bcb
2013-02-07 22:01:19 +00:00
Jeffrey Brown
af595a0f37 Merge "Fix bugs regarding IllegalStateException during moving position in cursorwindow." 2013-02-07 03:48:23 +00:00
You Kim
218a313bb0 StringBlock_nativeCreate: Possible Leak
osb can be leaked when osb->getError() != NO_ERROR

Change-Id: Icbeb8eb3fb78849c043fe032cc8f7050da041042
2012-12-21 06:19:38 +09:00
Victoria Lease
fc56015bd3 Merge "Possible leak in android_emoji_EmojiFactory_newInstance" 2012-12-20 12:09:48 -08:00
Jangwon Lee
2a3b91846e Fix bugs regarding IllegalStateException during moving position in cursorwindow.
"startPos + addedRows < requiredPos" could miss a row in boundary position.
Because of the fluctuating row size, "startPos + addedRows < requiredPos" expression could miss a row in boundary position.
For example, simply speaking,
if window capacity = 120 and requiredPos = 120,
"fillWindow" needs to be newly called and "starPos" is 80 for the window.
Unfortunately 120th row is bigger than the rest size of the window,
the row for requiredPos is not in the window.
Then, startPos has to be newly set and the 120th row has to be included in the window.
But by the expression above "startPos + addedRows < requiredPos",
the row for requiredPos is regarded as included in the window.
In that case, by "mCurrentRowID = Long.valueOf(getLong(mRowIdColumnIndex));" statment in AbstractCursor,
IllegalStateException is thrown.

This patch contains modification of the expression as "startPos + addedRows <= requiredPos".

Change-Id: Iaee75241e495949b0a624b836843da18d0bcb98d
2012-12-20 13:59:52 +09:00
Glenn Kasten
ba97ad2a67 Merge "Leak in ToneGenerator_native_setup" 2012-12-19 08:47:20 -08:00
You Kim
8f5691fd92 Add return after NULL check in JetPlayer
When pointer lpJet is NULL, it should return.

Change-Id: Ia0471173b57da8f9bf22b3a19479aa5b3c4a5acb
2012-12-12 05:34:21 +09:00
You Kim
b6ac9e50cf Possible leak in android_emoji_EmojiFactory_newInstance
jchars is not released correctly if factory is NULL.
In addition, unnecessary string conversion removed.

Change-Id: I3ea58391dfe7a96ea6d6ae61bb0867a2d8d49fb0
2012-12-12 00:57:57 +09:00
Nick Kralevich
7353cf305e convert jint to uint32_t.
This works around a compiler bug, and is probably more
correct anyway.

Change-Id: I1c49064bd64c31dafae560e416c665de0449f245
2012-12-07 16:56:47 -08:00
You Kim
8a5f9c19b6 Leak in ToneGenerator_native_setup
Failure in ToneGenerator::isInit causes a leak.
lpToneGen should be deleted.

Change-Id: I48df7a328fed01be8412d5449ee0753dad3c101f
2012-12-07 04:58:28 +09:00
Irfan Sheriff
37794c200f am f264e8e3: am 567a2919: Merge "Stop supplicant and dhcp before start" into jb-mr1.1-dev
* commit 'f264e8e34e32bfb8e7e75b61b9da9b6f219690b0':
  Stop supplicant and dhcp before start
2012-11-08 06:14:33 -08:00
Elliott Hughes
9197d170b7 am fec5f611: Merge "It\'s 2012. We\'re always WITH_JIT."
* commit 'fec5f611fef4fc3b7afa5d7194f4f40d156157ac':
  It's 2012. We're always WITH_JIT.
2012-11-07 10:48:26 -08:00
Irfan Sheriff
f264e8e34e am 567a2919: Merge "Stop supplicant and dhcp before start" into jb-mr1.1-dev
* commit '567a2919f3ad66dcb972e45411d18a4515d9f0b1':
  Stop supplicant and dhcp before start
2012-11-06 17:43:05 -08:00
Elliott Hughes
be8b47f6ce It's 2012. We're always WITH_JIT.
Change-Id: Ia3d1a1b1df06816f2cfa3879ec669b34c62cf9b9
2012-11-06 17:16:21 -08:00
Irfan Sheriff
511d5346ce Stop supplicant and dhcp before start
Bug: 7227463
Change-Id: Iaa0df7522edc38d25fae2bbda8d24490e997e733
2012-11-06 15:53:32 -08:00
Jamie Gennis
fec93f6719 am 39c68da5: am cd79b35c: Merge "Surface: add the PhysicalDisplayInfo#secure field" into jb-mr1-dev
* commit '39c68da57b443c869378263b8063da6e821a1b6d':
  Surface: add the PhysicalDisplayInfo#secure field
2012-10-23 15:27:10 -07:00
Jamie Gennis
39c68da57b am cd79b35c: Merge "Surface: add the PhysicalDisplayInfo#secure field" into jb-mr1-dev
* commit 'cd79b35c3828e0ebf4c9e68da75f9d857ccf01db':
  Surface: add the PhysicalDisplayInfo#secure field
2012-10-23 15:24:29 -07:00
Jamie Gennis
cd79b35c38 Merge "Surface: add the PhysicalDisplayInfo#secure field" into jb-mr1-dev 2012-10-23 15:22:37 -07:00
Jamie Gennis
95429c3d1b Surface: add the PhysicalDisplayInfo#secure field
Bug: 7368436
Change-Id: I38bf7bbfca354380c30da7516f628cf40416d350
2012-10-23 15:07:22 -07:00
Chet Haase
85c1aef929 am 6534dd02: am 74261d84: Merge "Don\'t null the reference to Bitmap pixels until we\'re really ready" into jb-mr1-dev
* commit '6534dd0275c8d01de7e7400ba239d203c37c8164':
  Don't null the reference to Bitmap pixels until we're really ready
2012-10-22 15:52:20 -07:00
Chet Haase
6534dd0275 am 74261d84: Merge "Don\'t null the reference to Bitmap pixels until we\'re really ready" into jb-mr1-dev
* commit '74261d847f64ccfeba0a7f08f6c59473a3b6647d':
  Don't null the reference to Bitmap pixels until we're really ready
2012-10-22 15:49:22 -07:00
Chet Haase
74261d847f Merge "Don't null the reference to Bitmap pixels until we're really ready" into jb-mr1-dev 2012-10-22 15:46:43 -07:00
Chet Haase
547e66531d Don't null the reference to Bitmap pixels until we're really ready
A change in the VM triggers a native memory error more aggressively than before,
showing that there's a bug in the logic of recycling bitmaps. Since the pixel
memory is allocated on the Java heap, nulling out the reference to that memory
in the Java level Bitmap object can cause that memory to get collected at any time.
Meanwhile, we may have a reference to that memory at the native level for rendering
purposes, causing an error if/when we access that memory after it has been collected
by the VM.

The fix is to avoid setting the reference to the pixels to null unless we are
not referring to it in native code. This is determined at the time we call
recycle() - we return a boolean to indicate whether the native code is still
using the memory. if not, the Java code can null out the reference and allow the
VM to collect it. Otherwise, it will get collected later when the encompassing
Bitmap object is collected.

Issue #7339156 HTML5 tests crash the app (Vellamo)

Change-Id: I3a0d6b9a6c5dd3b86cc2b0ff7719007e774b5e3c
2012-10-22 15:25:19 -07:00
Jamie Gennis
5bbfcd3e15 am 9fee7bd7: am 23d62241: Merge "Set the secureness when creating displays" into jb-mr1-dev
* commit '9fee7bd73d1231172267cde99d2374cf072c2dca':
  Set the secureness when creating displays
2012-10-22 13:54:53 -07:00
Jamie Gennis
9fee7bd73d am 23d62241: Merge "Set the secureness when creating displays" into jb-mr1-dev
* commit '23d622418b5c67dc43faabd930d1c59c5ce34f6a':
  Set the secureness when creating displays
2012-10-22 13:52:12 -07:00
Jamie Gennis
7bbf8163fb Set the secureness when creating displays
This change makes use of the new 'secure' argument to the
ISurfaceComposer::createDisplay method.  In this change both the overlay and
wifi displays are hard-coded to be non-secure displays.

Bug: 7368436
Change-Id: Ib65312f2adab5104d8deefbfc32af9dc106a9129
2012-10-19 18:34:35 -07:00
Romain Guy
3786a9b97a am 07a9ebd1: am b8460d15: Merge "Take into account the texture layer\'s transform for clipping Bug #7370212" into jb-mr1-dev
* commit '07a9ebd1a01bc2819a90ddc98263a24bd6459768':
  Take into account the texture layer's transform for clipping Bug #7370212
2012-10-17 19:21:20 -07:00
Romain Guy
07a9ebd1a0 am b8460d15: Merge "Take into account the texture layer\'s transform for clipping Bug #7370212" into jb-mr1-dev
* commit 'b8460d153a1e6dfc6a02ab127d4b5b5e82386137':
  Take into account the texture layer's transform for clipping Bug #7370212
2012-10-17 19:18:24 -07:00
Romain Guy
b2e2f24706 Take into account the texture layer's transform for clipping
Bug #7370212

Change-Id: Ibdc3161306f54a1cfe66e08458f05ee01a13b1df
2012-10-17 18:18:35 -07:00
Bart Sears
ae232842c8 am b112bb66: am 0ee71add: Merge "Fix native crash while saving a panorama." into jb-mr1-dev
* commit 'b112bb6684b336dc4f3287af65708e0934933d3d':
  Fix native crash while saving a panorama.
2012-10-17 10:26:22 -07:00
Bart Sears
b112bb6684 am 0ee71add: Merge "Fix native crash while saving a panorama." into jb-mr1-dev
* commit '0ee71adde01298784a2cbb667c4c1570bdbf0af0':
  Fix native crash while saving a panorama.
2012-10-17 10:23:42 -07:00
Bart Sears
0ee71adde0 Merge "Fix native crash while saving a panorama." into jb-mr1-dev 2012-10-17 10:20:50 -07:00
Kenny Root
ad0090e7b8 resolved conflicts for merge of 85f9ba9e to jb-mr1-dev-plus-aosp
Change-Id: I9ae49075935f0e9ec432ce9d828ee26a4fcdb44c
2012-10-17 10:02:22 -07:00
Wu-cheng Li
4b63f14c96 Fix native crash while saving a panorama.
YuvToJpegEncoder should handle the case when the height is not
multiples of 16.

bug:7165606

Change-Id: I02f142b233c4f5c0cd8df5e3d1eaebbf62d28052
2012-10-17 18:06:59 +08:00
Kenny Root
c9a1aabc49 Remove HAVE_SELINUX guards
Change-Id: I6c2161471f657aa1645695ffd56ff434b0c2b426
2012-10-16 23:32:31 -07:00
Romain Guy
b7b30eb057 am fa71ba2c: am 1b85122b: Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-dev
* commit 'fa71ba2c847622c0b23321477b3914f4a4cdd536':
  Add API to enable mipmaps on Bitmap Bug #7353771
2012-10-16 19:11:13 -07:00
Romain Guy
fa71ba2c84 am 1b85122b: Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-dev
* commit '1b85122bd22c4528679ae8bd67077dfc2fdf1847':
  Add API to enable mipmaps on Bitmap Bug #7353771
2012-10-16 19:08:48 -07:00
Romain Guy
713e1bb9df Add API to enable mipmaps on Bitmap
Bug #7353771

This API can be used when scaling large images down to a small size
to get nicer looking results.

Change-Id: If09087eed36077eee5355f6047a3ca67747d7d9e
2012-10-16 18:44:09 -07:00
Jamie Gennis
b312f1155c am 38041d6b: am 809bb404: Merge "Flag window animation transactions as animations." into jb-mr1-dev
* commit '38041d6b3c3d838d99f70f9b1195d69487edf689':
  Flag window animation transactions as animations.
2012-10-15 20:19:40 -07:00
Jamie Gennis
38041d6b3c am 809bb404: Merge "Flag window animation transactions as animations." into jb-mr1-dev
* commit '809bb404da66498f1723279542d2a7d1f4512052':
  Flag window animation transactions as animations.
2012-10-15 19:54:18 -07:00
Jamie Gennis
b6ce6e42cc Flag window animation transactions as animations.
This change makes WindowManager use the new eAnimation flag when animating
windows.  This prevents some of the window updates from being combined with
updates from prior animation frames.

Bug: 7353840
Change-Id: I5a9f8fa2c1a2f5f08363a45cd9f28bb97cd77080
2012-10-15 19:19:50 -07:00
Keun young Park
09ff8a6f43 am 27665148: am c378656d: Merge "fix wrong read size in ToColor_S4444_Opaque" into jb-mr1-dev
* commit '27665148cb72cbc7d4d5941f97ae54a73fa58d3c':
  fix wrong read size in ToColor_S4444_Opaque
2012-10-12 13:45:46 -07:00
Keun young Park
27665148cb am c378656d: Merge "fix wrong read size in ToColor_S4444_Opaque" into jb-mr1-dev
* commit 'c378656d5e0e686d806661bc271de3c7b1726430':
  fix wrong read size in ToColor_S4444_Opaque
2012-10-12 13:44:08 -07:00
Keun young Park
c378656d5e Merge "fix wrong read size in ToColor_S4444_Opaque" into jb-mr1-dev 2012-10-12 13:41:19 -07:00
Keun young Park
038953da05 fix wrong read size in ToColor_S4444_Opaque
- S4444 takes 16bits, not 32bits
- This caused sporadic failure in CTS BitmapFactoryTest#testDecodeStream4

Bug: 7179389
Change-Id: Ib36a3a569b3149d74f36ae67a069a7b65a72e895
2012-10-12 11:36:13 -07:00