OSDN Git Service
Sujith Ramakrishnan [Thu, 7 Sep 2017 00:09:22 +0000 (00:09 +0000)]
Merge "Add a new keycode for TV (ALL_APPS)" into oc-dev
Sujith Ramakrishnan [Wed, 19 Jul 2017 01:54:15 +0000 (18:54 -0700)]
Add a new keycode for TV (ALL_APPS)
- KEYCODE_ALL_APPS: Launches all apps. For TV, this checks for
launcher package in system image.
Test: Manual: ALL_APPS: adb shell input keyevent 284
Test: also tested with --longpress for these keys
Bug:
38496261
Change-Id: I2e50a569533f01d93c020adde672c842540f0193
TreeHugger Robot [Thu, 17 Aug 2017 23:35:14 +0000 (23:35 +0000)]
Merge "surfaceflinger: fix a nullptr dereference" into oc-dev
Siarhei Vishniakou [Wed, 16 Aug 2017 21:51:09 +0000 (21:51 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours am:
27f3e039d8 -s ours am:
2f1a072f37 -s ours am:
f5b4455491 -s ours am:
4c0b934cca -s ours am:
56618d838c -s ours am:
fd78a0345a -s ours am:
693e897408 -s ours am:
2a46ddbd61 -s ours
am:
2566e4686a -s ours
Change-Id: Id8eaeb73beca2ed388f6446a2bca3048c65831fa
Siarhei Vishniakou [Wed, 16 Aug 2017 21:43:04 +0000 (21:43 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours am:
27f3e039d8 -s ours am:
2f1a072f37 -s ours am:
f5b4455491 -s ours am:
4c0b934cca -s ours am:
56618d838c -s ours am:
fd78a0345a -s ours am:
693e897408 -s ours
am:
2a46ddbd61 -s ours
Change-Id: I88bc5be0fb0672a9edd7d9571b8bcd7db938a6fc
Siarhei Vishniakou [Wed, 16 Aug 2017 21:33:01 +0000 (21:33 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours am:
27f3e039d8 -s ours am:
2f1a072f37 -s ours am:
f5b4455491 -s ours am:
4c0b934cca -s ours am:
56618d838c -s ours am:
fd78a0345a -s ours
am:
693e897408 -s ours
Change-Id: I1368abe1a36bfa8f32fc3d5c7e173e28a9d18ef9
Siarhei Vishniakou [Wed, 16 Aug 2017 21:26:02 +0000 (21:26 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours am:
27f3e039d8 -s ours am:
2f1a072f37 -s ours am:
f5b4455491 -s ours am:
4c0b934cca -s ours am:
56618d838c -s ours
am:
fd78a0345a -s ours
Change-Id: I04e14d78a5d0ced89b7ad6220c056efe51dbddc2
Siarhei Vishniakou [Wed, 16 Aug 2017 21:14:32 +0000 (21:14 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours am:
27f3e039d8 -s ours am:
2f1a072f37 -s ours am:
f5b4455491 -s ours am:
4c0b934cca -s ours
am:
56618d838c -s ours
Change-Id: Id92244f080cf20e87d76e0b8df1155b6a989cbc3
Siarhei Vishniakou [Wed, 16 Aug 2017 21:07:08 +0000 (21:07 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours am:
27f3e039d8 -s ours am:
2f1a072f37 -s ours am:
f5b4455491 -s ours
am:
4c0b934cca -s ours
Change-Id: I45a115d25132a6211c656def10417033ae22296b
Siarhei Vishniakou [Wed, 16 Aug 2017 20:59:30 +0000 (20:59 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours am:
27f3e039d8 -s ours am:
2f1a072f37 -s ours
am:
f5b4455491 -s ours
Change-Id: I20195d51ae2fcb2ddee1237d3f7d8013769cd1f2
Siarhei Vishniakou [Wed, 16 Aug 2017 20:51:58 +0000 (20:51 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours am:
27f3e039d8 -s ours
am:
2f1a072f37 -s ours
Change-Id: Ie134ebccadc7984c7c674f1515ba7b7b756213ce
Siarhei Vishniakou [Wed, 16 Aug 2017 20:46:40 +0000 (20:46 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8 am:
3cc2b38fe3 -s ours
am:
27f3e039d8 -s ours
Change-Id: I7b5770ee14516de87179470d398f33f34b36ad20
Siarhei Vishniakou [Wed, 16 Aug 2017 20:39:48 +0000 (20:39 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea am:
f431a7cbf8
am:
3cc2b38fe3 -s ours
Change-Id: Ia2b6838ce682d4e361c9cff9502d6ed6623704e0
Siarhei Vishniakou [Wed, 16 Aug 2017 20:32:41 +0000 (20:32 +0000)]
Remove window obscurement information. am:
ff7dd3b9ea
am:
f431a7cbf8
Change-Id: Ifdaed9e6e75c06fc89b042c37ded20b2b273531b
Siarhei Vishniakou [Wed, 16 Aug 2017 20:24:33 +0000 (20:24 +0000)]
Remove window obscurement information.
am:
ff7dd3b9ea
Change-Id: I3da41df019f3d660a5fd10d1f4239846158c62fe
Android Build Merger (Role) [Fri, 11 Aug 2017 00:24:46 +0000 (00:24 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737 am:
dda3bdf8a8 am:
3cd049ca28 skipped:
2564b9fdf5 am:
67c9dace8b am:
09c59e7f69 am:
a31fb53edd am:
b63caaf102 skipped:
c2116af15c
Change-Id: Ieec59681e3dc14340da368355ead622a7f0dcc1c
Android Build Merger (Role) [Fri, 11 Aug 2017 00:24:37 +0000 (00:24 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737 am:
dda3bdf8a8 am:
3cd049ca28 skipped:
2564b9fdf5 am:
67c9dace8b am:
09c59e7f69 am:
a31fb53edd am:
b63caaf102
Change-Id: I6a904953ea2d7f3943dd0daaf3f28efed121f15d
Siarhei Vishniakou [Fri, 11 Aug 2017 00:19:48 +0000 (00:19 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737 am:
dda3bdf8a8 am:
3cd049ca28 skipped:
2564b9fdf5 am:
67c9dace8b am:
09c59e7f69
am:
a31fb53edd
Change-Id: I28d7687ca2590be1e14a0113fdd5734c76310f9d
Chia-I Wu [Tue, 18 Jul 2017 18:30:05 +0000 (11:30 -0700)]
surfaceflinger: fix a nullptr dereference
When the child layer latched a buffer but the fixed-size parent
layer never did (for reasons such as no buffer queued or buffer got
rejected), we could end up with p->mActiveBuffer being nullptr.
Bug:
62996512
Test: manual (I could never repro anyway)
Change-Id: Id7e4c7037633b8a37039baa6e8a306e55170b894
(cherry picked from commit
0a68b461d382304ae438fa8b52920fa75d178a1c)
Siarhei Vishniakou [Thu, 10 Aug 2017 22:18:45 +0000 (22:18 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737 am:
dda3bdf8a8 am:
3cd049ca28 skipped:
2564b9fdf5 am:
67c9dace8b am:
09c59e7f69
Change-Id: Ieedde100761fe504f080fbc4d538353c3dbd59e8
Siarhei Vishniakou [Thu, 10 Aug 2017 22:18:41 +0000 (22:18 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737 am:
dda3bdf8a8 am:
3cd049ca28 skipped:
2564b9fdf5 am:
67c9dace8b
Change-Id: Iabd279c9b858e4117d3f37a2c9dc6b08d18e9b3f
Siarhei Vishniakou [Thu, 10 Aug 2017 22:18:37 +0000 (22:18 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737 am:
dda3bdf8a8 am:
3cd049ca28 skipped:
2564b9fdf5
Change-Id: I9340b61f66403d4a76aef61e8d5c523d46604f34
Siarhei Vishniakou [Thu, 10 Aug 2017 22:18:33 +0000 (22:18 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737 am:
dda3bdf8a8 am:
3cd049ca28
Change-Id: I75bc0db5679a6ae55c647b31f206755128fa47f7
Siarhei Vishniakou [Thu, 10 Aug 2017 22:18:29 +0000 (22:18 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737 am:
dda3bdf8a8
Change-Id: I313f92051e52e6b1b0f3d2f564781c66e6ad4918
Siarhei Vishniakou [Thu, 10 Aug 2017 22:18:25 +0000 (22:18 +0000)]
[automerger] DO NOT MERGE Remove window obscurement information. am:
edac95e737
Change-Id: I61e9a4e826ef2cafd73ad3591f3a3560a7002253
Siarhei Vishniakou [Thu, 10 Aug 2017 20:26:25 +0000 (20:26 +0000)]
DO NOT MERGE Remove window obscurement information. am:
5508ca2c19 am:
3847972ad2 am:
cd71708eca am:
88855f8de7
am:
41f75ecb79 -s ours
Change-Id: Id698475c3c67bbacecdb92b6d5de50e62ecd135c
Siarhei Vishniakou [Thu, 10 Aug 2017 19:46:58 +0000 (19:46 +0000)]
DO NOT MERGE Remove window obscurement information. am:
5508ca2c19 am:
3847972ad2 am:
cd71708eca
am:
88855f8de7
Change-Id: I29b20c983adb81d9a3669f3bae6b1cde4ccd37e0
Siarhei Vishniakou [Thu, 10 Aug 2017 19:40:02 +0000 (19:40 +0000)]
DO NOT MERGE Remove window obscurement information. am:
5508ca2c19 am:
3847972ad2
am:
cd71708eca
Change-Id: I7f55cd96dbf257b25e5b1c6d69d9ae65d0947598
Siarhei Vishniakou [Thu, 10 Aug 2017 19:33:00 +0000 (19:33 +0000)]
DO NOT MERGE Remove window obscurement information. am:
5508ca2c19
am:
3847972ad2
Change-Id: I0761c69032de13e471210a716ccca78e0cb2a36e
Siarhei Vishniakou [Thu, 10 Aug 2017 19:25:29 +0000 (19:25 +0000)]
DO NOT MERGE Remove window obscurement information.
am:
5508ca2c19
Change-Id: Ida11ec9828763593ec0ecceddd9f022ed691ecfa
Hsin-Yi Chen [Fri, 28 Jul 2017 03:28:52 +0000 (11:28 +0800)]
Cast binder data type to uint64_t in high bits test
1. Cast fb->binder to uint64_t before shifting by 32 bits. It avoids
undefined result when binder is 32-bit.
2. Swap EXPECT_EQ arguments. The first one is expected value and the
second is actual value.
Bug:
64118463
Test: ./binderLibTest on x86 emulator
Change-Id: I4f736bd5b55db5af8598db0d5cd5fbd9ef323448
Siarhei Vishniakou [Mon, 31 Jul 2017 21:25:02 +0000 (14:25 -0700)]
Remove window obscurement information.
If ACTION_OUTSIDE_EVENTS contain information about whether the touch is
obscured, then a pattern of invisible, untouchable, unfocusable
SYSTEM_ALERT_WINDOWS can be placed across the screen to determine
approximate locations of touch events without the user knowing.
Bug:
31097064
Test: cts-tradefed run cts --class android.security.cts.MotionEventTest
Merged-In: Ie30dcc2402d5422a19a43ffe7d1411d91681efc2
Change-Id: I1dc5f003ada7ad3c753e078a8c1fbe10a89fb42f
Siarhei Vishniakou [Fri, 4 Aug 2017 19:37:47 +0000 (12:37 -0700)]
DO NOT MERGE Remove window obscurement information.
If ACTION_OUTSIDE_EVENTS contain information about whether the touch is
obscured, then a pattern of invisible, untouchable, unfocusable
SYSTEM_ALERT_WINDOWS can be placed across the screen to determine
approximate locations of touch events without the user knowing.
Bug:
31097064
Test: cts-tradefed run cts --class android.security.cts.MotionEventTest
Change-Id: Iebbb68231cbb76f87241201e7640a1fe3e188625
Siarhei Vishniakou [Tue, 1 Aug 2017 03:33:41 +0000 (20:33 -0700)]
DO NOT MERGE Remove window obscurement information.
If ACTION_OUTSIDE_EVENTS contain information about whether the touch is
obscured, then a pattern of invisible, untouchable, unfocusable
SYSTEM_ALERT_WINDOWS can be placed across the screen to determine
approximate locations of touch events without the user knowing.
Bug:
31097064
Test: cts-tradefed run cts --class android.security.cts.MotionEventTest
Change-Id: Ie30dcc2402d5422a19a43ffe7d1411d91681efc2
Hsin-Yi Chen [Wed, 19 Jul 2017 03:51:43 +0000 (03:51 +0000)]
Merge "Add target binderDriverInterfaceTest_IPC_32" into oc-dev
Hsin-Yi Chen [Wed, 7 Jun 2017 10:05:05 +0000 (18:05 +0800)]
Add target binderDriverInterfaceTest_IPC_32
Add the target binderDriverInterfaceTest_IPC_32 which tests 32-bit
kernel and is independent from product_variables.
Bug:
62124459
Test: vts-tradefed run commandAndExit vts -m VtsKernelBinderTest
Change-Id: Ifad9ef24c35060179650955e24d1f046af7b7385
(cherry picked from commit
6929575affc7d0037c79a45b2cb0ef7c6020581a)
Hsin-Yi Chen [Thu, 6 Jul 2017 03:40:20 +0000 (11:40 +0800)]
Add binderLibTest_IPC_32
1) Add product_variables to binderLibTest because the test case
CheckHandleZeroBinderHighBitsZeroCookie uses binder data structure.
2) Add binderLibTest_IPC_32 which always compiles the test program for
32-bit binder.
Bug:
63307240
Bug:
62366937
Test: vts-tradefed run commandAndExit vts -m VtsKernelBinderTest
Change-Id: I40c738a039459fbfece9689012249ae7ea93df9d
(cherry picked from commit
f6edfc1b096cba544227d85b0ea3f38a4dd11af5)
TreeHugger Robot [Tue, 27 Jun 2017 23:59:16 +0000 (23:59 +0000)]
Merge "SurfaceFlinger: Last minute log removal." into oc-dev
TreeHugger Robot [Tue, 27 Jun 2017 22:54:05 +0000 (22:54 +0000)]
Merge "libgui: New mutex for ConsumerBase frame callbacks" into oc-dev
Robert Carr [Tue, 27 Jun 2017 20:51:07 +0000 (13:51 -0700)]
SurfaceFlinger: Last minute log removal.
Whoops.
Test: Log removed!
Change-Id: I4593352cf565603a4507c6ef13504b167d882eec
Dan Stoza [Mon, 26 Jun 2017 21:27:18 +0000 (14:27 -0700)]
libgui: New mutex for ConsumerBase frame callbacks
Adds a new mutex to protect ConsumerBase's mFrameAvailableListener
separately from the main mMutex. This prevents deadlocks when trying
to perform callbacks in response to other calls that come through
ConsumerBase.
Bug:
62915791
Test: EncodeVirtualDisplayWithCompositionTest#
testRenderingMaxResolutionRemotely
Change-Id: I244dc2d83488e452d9690c0d7847c9ff15a95dbb
John Reck [Fri, 23 Jun 2017 16:44:08 +0000 (09:44 -0700)]
Disable setting saved_cmdline_size
Minimal revert of the addition of increasing
the saved_cmdline_size. This change
exposed kernel bugs that prevented
atrace from working.
Bug:
62375794
Test: manual
Change-Id: Ie946b9246ce9ba22af59dbf0b9fe8a59a5fa1f3f
Chia-I Wu [Thu, 22 Jun 2017 19:59:35 +0000 (19:59 +0000)]
Merge "surfaceflinger: discard stale commands" into oc-dev
Fabien Sanglard [Thu, 22 Jun 2017 19:56:29 +0000 (19:56 +0000)]
Merge "LibGUI remove DEBUG" into oc-dev
Fabien Sanglard [Thu, 22 Jun 2017 18:35:16 +0000 (11:35 -0700)]
Disable skip Validate on client composition
SurfaceFlinger should not skip validate when GLComposition is
needed. This can happen when SF decides to force GLComposition
(like when a screen rotation occurs).
Bug:
62906801
Test: Manual
Change-Id: I248146eade395a124cb149773287abd88ae36511
Chia-I Wu [Thu, 22 Jun 2017 17:48:28 +0000 (10:48 -0700)]
surfaceflinger: discard stale commands
When we skip validate, we may have stale commands on the command
buffer. They should be discarded.
Bug:
62906801
Test: manual
Change-Id: Ie7921ba75ab2252b834cda6924e1fcfdf236f759
Fabien Sanglard [Thu, 22 Jun 2017 18:13:49 +0000 (11:13 -0700)]
LibGUI remove DEBUG
DEBUG_ONLY_CODE flag enables expensive checks such as
BufferQueueCore::validateConsistencyLocked() which when running
represents 15.1% of SurfaceFlinger total runtime. Enabling these
check for "eng" build only make "userdebug" build closer to "user".
Test: Manual
Bug:
62905241
Change-Id: I77065ecf4e62261c3f02b1cad9966d5c4845c639
Fabien Sanglard [Tue, 20 Jun 2017 02:22:36 +0000 (19:22 -0700)]
Skip Validate
b/
37474580
b/
62806392
Test: marlin, ryu
Change-Id: I09e0c52cb7c914dcd883dc771d97a365c89f7037
TreeHugger Robot [Tue, 20 Jun 2017 20:15:29 +0000 (20:15 +0000)]
Merge "surfaceflinger: fix a potential child layer leak" into oc-dev
TreeHugger Robot [Sat, 17 Jun 2017 01:51:06 +0000 (01:51 +0000)]
Merge changes from topic 'layer-wp-race' into oc-dev
* changes:
surfaceflinger: Layer::getParent requires state lock held
surfaceflinger: distinguish mCurrentParent/mDrawingParent
surfaceflinger: protect Client::mParentLayer with a lock
Chia-I Wu [Thu, 15 Jun 2017 19:53:59 +0000 (12:53 -0700)]
surfaceflinger: fix a potential child layer leak
We should not remove a child layer from its already removed parent.
Call p->removeChild only after we've checked that the ancestor is
alive.
Apply
e6b63e1ae12692327f7e46d5f10d6ade5a7bf192 and this fix to
SurfaceFlinger_hwc1.cpp as well.
Bug:
37121786
Test: manual stress test
Change-Id: I7b811450a998acc4ad9690bd4eda058ce6588e14
Chia-I Wu [Thu, 15 Jun 2017 19:53:59 +0000 (12:53 -0700)]
surfaceflinger: Layer::getParent requires state lock held
We rely on mStateLock to synchronize accesses to
Layer::mCurrentParent.
Bug:
38505866
Test: manual stress test
Change-Id: I5f8ec358ed7e35df28f8c6aec31ae6ee51cb5b93
Bryce Lee [Fri, 16 Jun 2017 14:06:17 +0000 (07:06 -0700)]
Add method to explicitly create Surface.
It is sometimes necessary for a SurfaceControl client to request the
associated Surface object be created rather than reuse the cached
value. This changelist adds an additional method that performs the
same creation operations as if the Surface object was created for the
first time.
Bug:
62108743
Test: go/wm-smoke
Change-Id: I2f460f20b2d16ed9ff81cb36842bcd2f8641e03c
Chia-I Wu [Tue, 13 Jun 2017 21:10:56 +0000 (14:10 -0700)]
surfaceflinger: distinguish mCurrentParent/mDrawingParent
Updates to wp<> is not atomic. We cannot use/update it at the same
time from the main thread and a binder thread. With this change,
binder threads use mCurrentParent with the external state lock held.
The main thread uses mDrawingParent.
This is also an alternative fix to bug
62099658 and allows us to
revert "SurfaceFlinger: Update parent pointer while performing
transaction."
Bug:
38505866
Bug:
62099658
Test: boots and no repro (but I can never repro)
Change-Id: Id286a437537daaeec5eee5de62b1d9df245ece53
Chia-I Wu [Thu, 15 Jun 2017 21:01:18 +0000 (14:01 -0700)]
surfaceflinger: protect Client::mParentLayer with a lock
Updates to wp<> is not atomic. Use Client::mLock to protect
mParentLayer.
Bug:
38505866
Test: camera and youtube work
Change-Id: I2739382d5bb99961a47c1011963b6f676d34eec6
Alistair Strachan [Wed, 7 Jun 2017 23:34:44 +0000 (16:34 -0700)]
Fix getDisplayInfo() for SurfaceFlinger in HWC2 mode.
When HWC2 mode is enabled in SurfaceFlinger, the getDisplayInfo()
function would fail to return the correct active mode in some cases.
This bug was only noticable if you had more than one mode registered
by the HWC2 backend.
The SurfaceComposerClient::getDisplayInfo() function works by calling
getDisplayConfigs(), and de-referencing the config at the index
returned by getActiveConfig(). The active config returned was correct,
but the getDisplayConfigs() array was not properly sorted.
Tracing this back, this problem occurs because the configId is stored
alongside the config in an unordered_map, so when this is converted
to a vector and the configId is discarded, the conversion must be
sorted correctly; it can't just be the hash order returned from
the unordered_map.
There are a few ways to fix this problem, but the easiest was to nip
the problem in the bud by not allowing an unsorted list of configs
to exist on the base HWC2 class. It may be better still to just get
rid of the map and go back to a vector, as this data is more often
used as an array than it is indexed by configId, so the use of an
unordered_map was probably overkill.
Change-Id: Ibfb015a6d9b49c870f37a1c892f15f90abbd1e2c
Bug:
62617569
Test: ./cts-tradefed run cts -m CtsViewTestCases -t android.view.cts.DisplayRefreshRateTest#testRefreshRate
Eino-Ville Talvala [Wed, 14 Jun 2017 08:09:40 +0000 (08:09 +0000)]
Merge changes Ibc1444b8,I14c200d1 into oc-dev
* changes:
ConsumerBase: discardFreeBuffers() also needs to dump its own cache
BufferQueueProducer: Call onBuffersReleased() in detachNextBuffer
Peng Xu [Wed, 14 Jun 2017 06:12:37 +0000 (06:12 +0000)]
Merge changes from topic 'sensor_looper_crash' into oc-dev
* changes:
Fix race condition for SensorManager looper.
SensorManager: attach background thread to JavaVM
Framework sensor manager init not depends on ::android::SensorManager.
Yifan Hong [Wed, 14 Jun 2017 01:04:25 +0000 (18:04 -0700)]
Fix race condition for SensorManager looper.
Before the fix there could be two background threads started for two
loopers. Add a guard to prevent this from happening.
Test: pass
Bug:
62404135
Change-Id: I8230addaaa6b83670d7b83c96809b00fca95d352
Yifan Hong [Wed, 14 Jun 2017 00:51:13 +0000 (17:51 -0700)]
SensorManager: attach background thread to JavaVM
Test: pass
Bug:
62404135
Change-Id: I63a128c3c933904211f5ff2483492674eaba93ed
Yifan Hong [Tue, 9 May 2017 22:18:02 +0000 (15:18 -0700)]
Framework sensor manager init not depends on ::android::SensorManager.
Test: photo sphere
Change-Id: Ice37a758421827757226a9898bcf3e00857443ff
Merged-In: Ice37a758421827757226a9898bcf3e00857443ff
Fixes:
36448245
Eino-Ville Talvala [Wed, 14 Jun 2017 00:09:11 +0000 (17:09 -0700)]
ConsumerBase: discardFreeBuffers() also needs to dump its own cache
ConsumerBase has its own cached slots with graphic buffer references,
so it's not enough to just ask the buffer queue consumer to free
buffers.
Add code equivalent to what happens in the onBuffersReleased callback.
Test:
Bug:
62593139
Change-Id: Ibc1444b868c6150aa2da1c209e06bdba42f1595d
Eino-Ville Talvala [Tue, 13 Jun 2017 23:39:11 +0000 (16:39 -0700)]
BufferQueueProducer: Call onBuffersReleased() in detachNextBuffer
Like detachBuffer(), detachNextBuffer() needs to inform the consumer,
who generally has a cache of buffer items, that a buffer is no longer
owned by the buffer queue.
Otherwise the consumer layer can leak the buffer reference until
consumer teardown/disconnect.
Test: Camera CTS is fine, using a camera app shows correct memory
behavior
Bug:
62591036
Change-Id: I14c200d13e60dbbe21261343941f84fb786db117
Joel Fernandes [Tue, 13 Jun 2017 03:47:27 +0000 (20:47 -0700)]
atrace.rc: Correct path to saved_cmdlines_size when setting permission
Bug:
62375794
Test: CTS test
Change-Id: Ie252be152ba26aced63af55734d3155ad93f2919
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit
0094a2d5962ed81c6c624c900450d84f1967ba49)
Mathias Agopian [Fri, 9 Jun 2017 19:02:45 +0000 (19:02 +0000)]
Merge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev
Jorim Jaggi [Fri, 9 Jun 2017 06:55:29 +0000 (23:55 -0700)]
Fix build
Test: builds
Bug:
36631902
Change-Id: Iec23f8ab2b16c923f07d1857aa3471cfefc057dd
Mathias Agopian [Fri, 9 Jun 2017 02:44:17 +0000 (19:44 -0700)]
Add missing VNDK pixel formats to AHardwareBuffer
AHardwareBuffer is now the only API available to
vendors to create graphic buffers in their HAL
implementations, unfortunately AHardwareBuffer
was designed for NDK use and was missing all
HAL specific pixel formats.
This CL adds these missing format to the VNDK-only
header.
The implementation is changed to accept all formats
which means, VNDK formats are indirectly exposed
to the NDK.
Bug:
38466076
Test: manual
Change-Id: I1e752cd33641aa861d9d15432cde6bec5a682e9a
Jorim Jaggi [Thu, 8 Jun 2017 22:43:59 +0000 (15:43 -0700)]
Properly run window animations at vsync-sf (2/2)
- Add new Choreographer instance that runs on vsync-sf
- Use this new Choreographer for WindowAnimator, and remove all
the hacks around it
Test: Open apps and close apps, notice no stutter
Test: Screen zoom animations
Test: go/wm-smoke
Bug:
36631902
Change-Id: I72a8b39709303a38fc077100229b8a81a153ba3e
Jeff Sharkey [Thu, 8 Jun 2017 15:27:07 +0000 (15:27 +0000)]
Merge "Don't double-count external cached app data." into oc-dev
TreeHugger Robot [Thu, 8 Jun 2017 10:16:09 +0000 (10:16 +0000)]
Merge "No more ashmem equivalent checker false alarm" into oc-dev
Matthew Bouyack [Wed, 7 Jun 2017 22:59:18 +0000 (22:59 +0000)]
Merge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw-f-dev am:
9e5585930a
am:
f613f073b2 -s ours
Change-Id: I8a6e0a9b7e7810cfc33db9de074c2cdac139d233
Matthew Bouyack [Wed, 7 Jun 2017 22:53:37 +0000 (22:53 +0000)]
Merge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw-f-dev
am:
9e5585930a
Change-Id: I3b534f26c60bd8d6cf0736da7de807cf339a1cdd
Matthew Bouyack [Wed, 7 Jun 2017 22:46:08 +0000 (22:46 +0000)]
Merge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw-f-dev
Matthew Bouyack [Thu, 1 Jun 2017 21:37:29 +0000 (14:37 -0700)]
DO NOT MERGE: Eliminate redundant changes to hardware vsync state.
When transitioning between NORMAL and DOZE power modes
we were redundantly calling resyncHardwareVsync.
Similarly, when transitioning from DOZE_SUSPEND to OFF
we were redundantly calling disableHardwareVsync.
This change eliminates those redundant calls.
Fixes bug
62235417
Change-Id: I513bbf94a7ab973ab258efe16436441ac2379b70
Jeff Sharkey [Wed, 7 Jun 2017 21:59:03 +0000 (15:59 -0600)]
Don't double-count external cached app data.
Cached app data is already counted in extStats.dataSize, so we don't
need to count it twice.
Test: builds, boots, verified Settings UI before/after
Bug:
62343684
Change-Id: Ic02cbe3f5938949730f9bc8d911ed398436f84d7
Jiwen 'Steve' Cai [Fri, 2 Jun 2017 22:23:26 +0000 (15:23 -0700)]
No crash from AHardwareBuffer_unlock on NULL fence
The API document states: "If fence is not NULL then it will be set to a
file descriptor that is signaled when all pending work on the buffer is
completed." As it's too late to change the document, we should probably
update the implement and use GraphicsBuffer::unlock under the hood.
Bug:
62302267
Test: Build, AHardware CTS
Change-Id: Ic0fac5d7addfba67baaa1b5d7c221fc25d02df56
(cherry picked from commit
6cdbb537105b663572e71afe06bde1164fc215f3)
Joel Fernandes [Tue, 6 Jun 2017 19:20:29 +0000 (12:20 -0700)]
atrace: setup saved_cmdlines_size and write only if available
Older kernels (bullhead etc) don't have saved_cmdlines_size, check and
write only if available. Also make work on non-root by setting
permissions in rc file (thanks John Reck for suggestion).
Bug:
62375794
Change-Id: Iefffc3203afd092ffb6cf420a144b38844aaee39
Signed-off-by: Joel Fernandes <joelaf@google.com>
Nicolas Geoffray [Tue, 6 Jun 2017 20:20:33 +0000 (20:20 +0000)]
Merge "Revert "Disable in-place vdex update"" into oc-dev
Mathias Agopian [Tue, 6 Jun 2017 17:59:02 +0000 (17:59 +0000)]
fix race condition that can cause a use after free am:
59485525a6 am:
5da64c91d0 am:
46361c6c2b am:
ee464e00d3
am:
21e9397776 -s ours
Change-Id: If0f229ba54f2c9978ba83beca331896d1d303db4
Mathias Agopian [Tue, 6 Jun 2017 17:46:30 +0000 (17:46 +0000)]
fix race condition that can cause a use after free am:
59485525a6 am:
5da64c91d0 am:
46361c6c2b
am:
ee464e00d3
Change-Id: Ifb22956eadae06f2ff6b0445d5e92e450c947942
Mathias Agopian [Tue, 6 Jun 2017 17:40:00 +0000 (17:40 +0000)]
fix race condition that can cause a use after free am:
59485525a6 am:
5da64c91d0
am:
46361c6c2b
Change-Id: I33758163baac3c96525751d313091a5bce0d5377
Mathias Agopian [Tue, 6 Jun 2017 17:33:59 +0000 (17:33 +0000)]
fix race condition that can cause a use after free am:
59485525a6
am:
5da64c91d0
Change-Id: I6358492afbd410f20a96ceccc7957a67112c58bc
Mathias Agopian [Tue, 6 Jun 2017 17:27:59 +0000 (17:27 +0000)]
fix race condition that can cause a use after free
am:
59485525a6
Change-Id: I42d7ee49dc3dcbd9d5d4a86fc9d018ff6c29534d
Chia-I Wu [Tue, 6 Jun 2017 15:32:08 +0000 (15:32 +0000)]
Merge "surfaceflinger: fix layer count" into oc-dev
Nicolas Geoffray [Mon, 5 Jun 2017 12:38:10 +0000 (12:38 +0000)]
Revert "Disable in-place vdex update"
Reverting to only apply this when doing dexlayout.
PS1 is a pure revert. PS2 contains the fix.
This reverts commit
e446fede9258359b61d4c8753d7e96477fa29388.
Bug:
38113240
Test: OTA and dexopt
(cherry picked from commit
b03814f39559c824e097bf2d869c7a56d8b41b67)
Change-Id: Ibabb1ec3af1101c6c44fbea498f8625c9515af8f
Mathias Agopian [Tue, 4 Apr 2017 00:14:31 +0000 (17:14 -0700)]
fix race condition that can cause a use after free
Backported from
12a0ccd6f7201bac706d903ac3f436c4358fe203.
Bug:
33004354
Test: manual
Change-Id: I9b38ee644b02268c9b995a330db758aa2e568399
Mark Renouf [Mon, 5 Jun 2017 21:42:59 +0000 (21:42 +0000)]
Merge "Clockwork: add feature android.software.input_methods" into oc-dev
Joel Fernandes [Mon, 5 Jun 2017 20:41:07 +0000 (20:41 +0000)]
Merge "atrace: Enable sched_waking if available" into oc-dev
Joel Fernandes [Fri, 2 Jun 2017 17:19:28 +0000 (10:19 -0700)]
atrace: Set saved_cmdline_size to 8192
This increases the size of the table tracking comms and pids and
prevents overwriting them easily.
Bug:
38167231
Change-Id: I69b9000e4f9d0c2c7969efd38e02d8c1bffdad5c
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit
ed80bd04cc3bf80082b1d733ef06d90a29c6270a)
Joel Fernandes [Sun, 4 Jun 2017 20:05:59 +0000 (13:05 -0700)]
atrace: Enable sched_waking if available
sched_waking helps to know when a wakeup happens at the earliest.
wakeups can originate on different CPUs which makes it impossible to
know just from sched_wakeup what the source was. Thankfully sched_waking
is just for that, enable it if its available.
Bug:
36415990
Change-Id: I489ca0112d5e0ed781888866a9efa57f17ca8a53
Signed-off-by: Joel Fernandes <joelaf@google.com>
Chia-I Wu [Tue, 30 May 2017 21:54:08 +0000 (14:54 -0700)]
surfaceflinger: fix layer count
When a layer is removed, mLayerCount is always decremented by 1 even
though the layer has children. This commit fixes that by making
sure mLayerCount is properly decremented, and makes sure that a
parent layer must be a valid layer in mCurrentState.
Bug:
37121786
Test: manually open and close Camera app
Change-Id: I5a3e18be41646b167b4d361dfe08db4d06e1c2d0
(cherry picked from commit
98f1c108b016dda77c808f3d099e7a45bdd70768)
TreeHugger Robot [Sat, 3 Jun 2017 02:19:50 +0000 (02:19 +0000)]
Merge "Add media.codec process to native stack dump list" into oc-dev
Chong Zhang [Fri, 2 Jun 2017 23:13:16 +0000 (16:13 -0700)]
Add media.codec process to native stack dump list
This is needed for non-treble devices.
Test: do 'adb shell bugreport' on angler, and check that
'Cmd line: media.codec' section is present and stacks are there.
bug:
62297059
Change-Id: I2573bb48d021e7750adf44eb00f06f5b9efb3a85
TreeHugger Robot [Fri, 2 Jun 2017 20:33:50 +0000 (20:33 +0000)]
Merge changes I87a57825,I3721d163 into oc-dev
* changes:
SurfaceFlinger: Fix final cropping of child layers.
SurfaceFlinger: Update parent pointer while performing transaction.
Robert Carr [Thu, 1 Jun 2017 23:11:34 +0000 (16:11 -0700)]
SurfaceFlinger: Fix final cropping of child layers.
Straightforward mistake documented by the test case. Not sure how it
made it this long.
Test: Included in Transaction_test.cpp. Manual from bug. go/wm-smoke.
Bug:
37511473
Change-Id: I87a57825cca879c5519fe72fef199168f7c23479
Robert Carr [Thu, 1 Jun 2017 21:59:25 +0000 (14:59 -0700)]
SurfaceFlinger: Update parent pointer while performing transaction.
To understand the change at a high level, notice that all the usage
of getParent() is assosciated with the drawing state. We see in this way
that the parent is a part of the drawing state and should only be updated
when transactions occurs.
More specifically we can consider the following scenario:
1. Imagine that we have a visible surface, with a visible child surface
2. Now imagine we create a new surface, which is hidden, and post a buffer to it.
It is configured such that it would be visible if it were not hidden.
3. We open a transaction
4. We reparent the child from the old surface to the new one
5. We show the new surface
6. We close the transaction
At this point we would expect the child to remain visible, as it is atomically
reparented with the visibility change of the parent. However prior to this CL
we see a flash, as the sequence can continue as follows:
7. Closing the transaction triggers setClientState, causing Layer::reparentChildren
which would call setParent updating the parent pointer.
8. setClientState updates the current but not drawing visibility of the new parent and marks
a transaction to occur.
9. We return to the main thread, MESSAGE_REFRESH occurs before MESSAGE_TRANSACTION
and we render a frame
10. We observe the child window as invisible, as it has the new parent
but it's new parent is not yet visible.
We simply have to ensure the parent pointer is updated at transaction time.
I chose a location in commitChildList where mDrawingChildren was copied
from mCurrentChildren as it seemed to express the intent well.
Test: Difficult to automatically test. Manually try resizing Chrome/Youtube/etc in docked stack before flicker should be ~1/10 after flicker should be <1/100 (I haven't seen one yet)
Bug:
62099658
Change-Id: I3721d16361b53128146510d3fda43e1c12f93223
TreeHugger Robot [Fri, 2 Jun 2017 00:42:59 +0000 (00:42 +0000)]
Merge "egl: handle failed eglMakeCurrent EGL_NO_CONTEXT" into oc-dev
Mike Stroyan [Thu, 1 Jun 2017 19:56:18 +0000 (13:56 -0600)]
egl: handle failed eglMakeCurrent EGL_NO_CONTEXT
The recovery code for failed eglMakeCurrent didn't correctly
handle the case when the previous context was EGL_NO_CONTEXT.
Leave the original EGL context unrestored in that case.
The driver should be able to handle that case without help.
Bug:
38341617,
37244059
Change-Id: I38f3450005a4eec5f1a684ee7d66363e88f6d92f
Fixes:
38341617
Test: android.server.cts.ActivityManagerDisplayTests, Run Minions Rush app.
David Sehr [Fri, 26 May 2017 23:32:55 +0000 (16:32 -0700)]
Disable in-place vdex update
Vdex files can be corrupted by dexlayout or by previously dexlayout-ed
files being recompiled if they are used as both input and output.
Disable this feature.
Bug:
38113240
Test: OTA and dexopt
Change-Id: Iee2d9a6c1ba8cddda25290f68f50649d5288d588
(cherry picked from commit
e446fede9258359b61d4c8753d7e96477fa29388)
Mark Renouf [Thu, 1 Jun 2017 18:43:41 +0000 (14:43 -0400)]
Clockwork: add feature android.software.input_methods
BUG:
38123013
Change-Id: I4532cefda9c24541450f5e0e739ab5d44c1111fd