4024 Commits

Author SHA1 Message Date
Leon Scroggins III
a730ef3f77 Handle bad ninepatch data.
Changes proposed by Ben Hawkes of Google Project Zero.

NinePatchPeeker.cpp:
Instead of asserting, return false for bad data.

ResourceTypes.h:
Store ninepatch values as unsigned.

BUG:19151999
Change-Id: Ibe35e7569f632c6bb8a34a7701e26bb6ed547ec2
2015-01-27 16:41:16 +00:00
Chris Craik
112e35b464 Merge "Update generationId on bitmaps when decoded into by BitmapRegionDecoder" into lmp-mr1-dev 2015-01-15 23:04:15 +00:00
Chris Craik
3b47713b26 Update generationId on bitmaps when decoded into by BitmapRegionDecoder
bug:18921087

This fixes issues where bitmaps are cached as textures, and not
reuploaded when reused by BitmapRegionDecoder, showing stale content.

Change-Id: I7626fd6acd36d8e38723689734855ce9154eb8c8
2015-01-14 16:55:34 -08:00
Eino-Ville Talvala
f913334749 Camera: Clarify JNI exception message
This exception may be generated through MediaRecorder method calls
as well, so clarify that the issue is an invalid camera object.

Bug: 18414095
Change-Id: I189ab1a71ab0d6a432b87c45a82c90fe11d22ef8
2015-01-12 17:02:03 -08:00
Ruben Brunk
8c52d9a092 Merge "Camera2: Fix early EOF in DngCreator#writeByteBuffer." into lmp-mr1-dev 2015-01-09 23:33:49 +00:00
Ruben Brunk
a3fdec8dac Camera2: Fix early EOF in DngCreator#writeByteBuffer.
Bug: 18962278
Change-Id: I8641a03d866930c86bdd2db0a29ccd5560712c90
2015-01-09 13:48:31 -08:00
Vladimir Marko
152d7282a4 Check for OOM in BitmapFactory's getMimeTypeString().
Bug: 18909596

(cherry picked from commit 7ab249a18e08bfefb8c2d60af1fb668c67ba4368)

Change-Id: Ie7be228442876d47faf37e3f664e378253dab6e3
2015-01-07 11:50:04 +00:00
Iliyan Malchev
45838de942 fix Uss accounting in getPssPid()
Change-Id: I0d1dc81d127afbf3a7d7b4b86865ccb0e8bd7d4c
Signed-off-by: Iliyan Malchev <malchev@google.com>
2014-12-12 00:20:24 +00:00
Ruben Brunk
433e715cc0 camera2: Fix LEGACY YUV production and orientation.
Bug: 18486140
Change-Id: I119e57315b67d1f485bea7f1682bfc261ae0f934
2014-12-11 11:35:46 -08:00
Eric Laurent
65bc1125b4 Merge "AudioSystem JNI: Add audio policy custom mixes registration" into lmp-mr1-dev 2014-12-10 01:33:09 +00:00
Ruben Brunk
3ef5033cda Merge "Camera2: Allow rendering to arbitrary surface sizes in LEGACY mode." into lmp-mr1-dev 2014-12-09 23:09:52 +00:00
John Reck
c47c98be04 Fix issue with RNA destruction mid-animation
Bug: 18521508

Fix an issue where an RNA's native object was destroyed
before the java-side object was started

Change-Id: I487fb476e0ecdf7000515f4f7320e8cfbc50a52b
2014-12-09 12:35:12 -08:00
Ruben Brunk
f4a637d0be Camera2: Allow rendering to arbitrary surface sizes in LEGACY mode.
Bug: 16030677
Change-Id: Ida04e04f41983b9126609522dd12064a7bf9645f
2014-12-09 11:56:22 -08:00
Dianne Hackborn
8b33cf4d34 Merge "Work on issue #18640385: Add procstats test mode" into lmp-mr1-dev 2014-12-09 01:53:37 +00:00
Dianne Hackborn
1a4b5a4f02 Work on issue #18640385: Add procstats test mode
You can now do "adb shell dumpsys procstats --start-testing" to
enable high frequency pss sampling.

Also improved the low on RAM mem reporting to separate out RAM
from memtrack, in case the data we are getting from that is bad.

And fixed meminfo --oom to work correctly again.

Change-Id: I7af17eab110a82298bd7b0ce381f8fa5c96c1f6a
2014-12-08 17:43:31 -08:00
Mathieu Chartier
25c5e2b12d Add more -d dalvik details to dumpsys
Added .NonMoving for the non moving space.
Added .Zygote for the zygote.
Added .IndirectRef for indirect reference tables (jobjects).

Example:
 Dalvik Details
        .Heap     2264     2264        0        0
         .LOS       80       80        0        0
          .GC      144      144        0        0
      .Zygote      331      196        0     2428
   .NonMoving      540      540        0        0
 .IndirectRef       20       20        0        0

Bug: 18672069
Change-Id: Id14e5bc92ceb15fe7a17d9fb035f18aa2925e50c
2014-12-08 16:38:20 -08:00
Eric Laurent
7f5eb9fe3c AudioSystem JNI: Add audio policy custom mixes registration
Bug: 16009464.

Change-Id: I3763e79f4fa0331acb56d1d6f575c7a36e0bebd5
2014-12-08 09:37:30 -08:00
Derek Sollenberger
4d9da135ca Merge "Update AndroidPixelRef to prevent VM from cleaning up memory prematurely." into lmp-mr1-dev 2014-12-04 13:04:52 +00:00
John Reck
01a5ea35fb Resume RT-animations after a pauseSurface
Bug: 18203577

The issue occurs as a result of performTraversals() both doing
a window relayout call *and* early-returning because it's not dirty.

To fix this pauseSurface() returns whether or not the RT-side is
"dirty" to force ViewRootImpl to do a draw even if mDirty is
otherwise empty.

Change-Id: I534f367e75d18d273ebf14df3927f5c464ef6bef
2014-12-03 13:03:59 -08:00
Derek Sollenberger
f29d5a5b21 Update AndroidPixelRef to prevent VM from cleaning up memory prematurely.
bug:18306529
Change-Id: I1ea94df1dcaf4fcf248b63dc8b0a13f36412570a
2014-12-03 13:43:30 -05:00
Eric Laurent
4c3fc59b4d AudioRecord JNI: pass attributes to native AudioRecord.
Bug: 16006090.
Change-Id: Ic6448dda0de65dada3a195cfc2ec73698b04b7b2
2014-11-26 09:46:44 -08:00
Bo Liu
de92f4c72b Fix crash in getNativeCanvas when canvasHandle is NULL
BUG: 18261928
Change-Id: I01a5af201fe829d5752433e1bb0db7edc01733d4
2014-11-24 11:25:45 -08:00
John Reck
418c8549dc Merge "It's super critical to call nStart" into lmp-mr1-dev 2014-11-21 23:32:08 +00:00
John Reck
72d6e4facb It's super critical to call nStart
Bug: 18204974

Even if we are canceling or ending an animation
nStart() *must* be called, otherwise the native-side listener
is not attached (lazy-attached for JNI cyclic reference reasons),
and then Animator::callOnFinishedListener() no-ops as there's
no listener set

Add a lifecycle verifier to ensure that nStart is always
called on animators that are attached and get finished

Change-Id: Ibc345b5be97b6d3f95a11c361ebe020d030fd3b6
2014-11-21 14:27:21 -08:00
Chris Craik
29dc496a42 Merge "Revert "Add a way to override Xfermode DO NOT MERGE"" into lmp-mr1-dev 2014-11-21 22:11:13 +00:00
Chris Craik
69e65019b0 Revert "Add a way to override Xfermode DO NOT MERGE"
Feature no longer needed.

bug:18448377

This reverts commit 4678dcc5524258908eadc5fe1e5e1874768967eb.

Change-Id: Ib0a19946e966a54857165555827b5fa7b34b6bea
2014-11-21 22:05:33 +00:00
Eric Laurent
a582bd4b42 Merge "AudioSystem JNI: fix AudioPortConfig mask usage" into lmp-mr1-dev 2014-11-19 23:55:52 +00:00
Mathieu Chartier
7fc9176c8a Add zygote space to Dalvik Heap
Broken by
https://googleplex-android-review.git.corp.google.com/#/c/590612/

This change fixes it by correctly putting the zygote in Dalvik Heap
instead of Dalvik Other.

Bug: 18447855

Change-Id: I4a58480f1ef1eb17e760245d8690ce92e28ebea3
2014-11-19 13:43:40 -08:00
Eric Laurent
6368a7df18 AudioSystem JNI: fix AudioPortConfig mask usage
Bug: 18444838.
Change-Id: I9151538399001c719b9e0681c00d47a26928896c
2014-11-19 12:18:32 -08:00
Andreas Gampe
ca775941f3 Frameworks/base: Compiled-classes support
Let AndroidRuntime check for /system/etc/compiled-classes and push
it to the runtime for boot image creation.

Bug: 18410571
Change-Id: I2510316381f2661166af24d7e14b013f4e045556
2014-11-18 11:48:22 -08:00
Adam Lesinski
cd6f00c3a0 Merge "Implement back-tracking when searching for attributes in XML or resource bag" into lmp-mr1-dev 2014-11-17 19:39:17 +00:00
Ying Wang
7f5fbe9e11 Merge "Frameworks/base: AndroidRuntime standalone preloaded-classes" into lmp-mr1-dev 2014-11-17 18:14:25 +00:00
John Reck
b3ec64e100 Merge "Wire up surface width/height to lockHardwareCanvas" into lmp-mr1-dev 2014-11-17 15:19:23 +00:00
Andreas Gampe
995c62d6ab Frameworks/base: AndroidRuntime standalone preloaded-classes
Change AndroidRuntime::startVM to give the new standalone
preloaded-classes file to the runtime for compilation of images.

Bug: 18305157
Change-Id: I32a13357893222b25fbce60bf2367c23fb36ab22
2014-11-14 16:15:17 -08:00
John Reck
b35c9602cf Wire up surface width/height to lockHardwareCanvas
Bug: 18338026
Change-Id: I6c37774ef1312278ae81280561060662fef923fb
2014-11-13 16:15:08 -08:00
Jon Eklund
283a9d9e15 AudioRecorder read buffer overflow
Since function was changed from byte-native to short-native,
it's no longer necessary to multiply offset by sizeof(short).

Bug 18367580

Change-Id: I669d860334ba40e46c04e534d7008b9e2401d8cd
2014-11-13 10:15:58 -08:00
Dianne Hackborn
fabb70b2ef Add reporting of Parcel memory/count.
Also fix issue #18340771: Dumpsys Procstats missing a newline

Change-Id: I0c612187a3fb4d7eeafbf97d373efdef732c477e
2014-11-12 21:56:30 +00:00
Rob Tsuk
41a8043b30 Merge "Add a way to override Xfermode DO NOT MERGE" into lmp-mr1-dev 2014-11-12 21:42:00 +00:00
Rob Tsuk
4678dcc552 Add a way to override Xfermode DO NOT MERGE
Add a non-public API to Canvas/GLES20Canvas to provide a way to draw
the touch ripple animation without using a save layer.

Change-Id: I6e2095adffe515194f669fb75bb67abf813bd518
2014-11-12 12:25:24 -08:00
Eric Laurent
edd4a227e5 Merge "audiosystem JNI: check env pointer before use." into lmp-mr1-dev 2014-11-12 20:19:52 +00:00
Eric Laurent
449c588710 audiosystem JNI: check env pointer before use.
Bug: 18332935.
Change-Id: I1ec820f0282833e13444ec05d50da3ce70d19d8d
2014-11-12 11:07:48 -08:00
Andreas Gampe
9592b0136a Frameworks/base: Right transform in DngCreator
Use the right calibrationTransform.

Change-Id: Ibc633ff1e02d1e48a27ae2a72585d3de2222a2c1
2014-11-12 05:27:22 +00:00
Dan Stoza
d17793ea2a Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev 2014-11-07 19:44:34 +00:00
John Reck
4b19b7aaff Merge "Fix wrong-thread issue" into lmp-mr1-dev 2014-11-07 18:34:55 +00:00
John Reck
12f5e34332 Fix wrong-thread issue
Bug: 18259560

Change-Id: Ic63a86efba9c86f21defac0695a73db8b09ae284
2014-11-07 10:31:53 -08:00
John Reck
a35778c799 Yank ResourceCache out of Caches
Bug: 17947547

Pull the ResourceCache (aka, ref-counting side channel) out of
Caches so that DisplayListRenderer doesn't use Caches, avoiding
the risk of instantiating Caches on the wrong thread or
without a GL context

Change-Id: I7d63b70b3b0a0163308c5dedd6ef255eadebe8fd
2014-11-06 09:45:10 -08:00
Adam Lesinski
a7d1d73a47 Implement back-tracking when searching for attributes in XML or resource bag
Shared libraries have their package ID assigned at run-time, so some
of the guarantees we used to have about sort order of attributes in
bags or XML elements no longer hold.

This CL adds back-tracking and can jump to the nearest attribute with the
same package ID and continue searching.

This means that attributes with the same package ID must be sorted by increasing
resource ID, as was the case before.

Attributes with the same package ID must be grouped together, but the groups can
be in any order. Ex: 0x02010001, 0x02010002, 0x01010000, 0x01010010, 0x7f010032

Bug:17666947
Change-Id: I9c198bbb6ca788849aac85b6323606ea5d9550d6
2014-11-04 16:34:34 -08:00
Dan Stoza
2c34b5e813 Add a BufferItem parameter to onFrameAvailable
Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents.

Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
2014-11-04 11:36:33 -08:00
Dianne Hackborn
1842930762 Few more small meminfo improvements.
- Add in category for graphics driver, and knowledge about it
  for N5 (more devices will be added later).
- Renaming the labels for the .oat and .art files to be just
  that, so it is clear what they are talking about.

Change-Id: I663ca8bd2febce41fcdde74b0d3a96ef9325edf1
2014-11-03 13:58:11 -08:00
Svet Ganov
182f0a136f Merge "Crash apps that print malformed or password protected PDFs." into lmp-mr1-dev 2014-11-01 00:22:08 +00:00