OSDN Git Service

android-x86/frameworks-native.git
7 years agoFramework sensor manager init not depends on ::android::SensorManager.
Yifan Hong [Wed, 14 Jun 2017 06:20:31 +0000 (06:20 +0000)]
Framework sensor manager init not depends on ::android::SensorManager.
am: 542eace6bf

Change-Id: I8228b3afec41260135c4123fe8cd9e9dc99f46e5

7 years agoFramework sensor manager init not depends on ::android::SensorManager.
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

7 years agoatrace.rc: Correct path to saved_cmdlines_size when setting permission
Joel Fernandes [Tue, 13 Jun 2017 20:18:14 +0000 (20:18 +0000)]
atrace.rc: Correct path to saved_cmdlines_size when setting permission
am: 922e418f45

Change-Id: I99862d8e16d1c10405a696b89553a855881c967a

7 years agoatrace.rc: Correct path to saved_cmdlines_size when setting permission
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)

7 years agoMerge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev
Mathias Agopian [Fri, 9 Jun 2017 19:39:25 +0000 (19:39 +0000)]
Merge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev
am: 2563c0f3b0

Change-Id: Iba3dfbfcbaa778da25de68a16beee024ac1b6efe

7 years agoMerge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev
Mathias Agopian [Fri, 9 Jun 2017 19:02:45 +0000 (19:02 +0000)]
Merge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev

7 years agoFix build
Jorim Jaggi [Fri, 9 Jun 2017 07:59:34 +0000 (07:59 +0000)]
Fix build
am: aaef0983ba

Change-Id: I087952f069da1ba624bef32d1ac913a242533321

7 years agoFix build
Jorim Jaggi [Fri, 9 Jun 2017 06:55:29 +0000 (23:55 -0700)]
Fix build

Test: builds
Bug: 36631902
Change-Id: Iec23f8ab2b16c923f07d1857aa3471cfefc057dd

7 years agoProperly run window animations at vsync-sf (2/2)
Jorim Jaggi [Fri, 9 Jun 2017 04:16:44 +0000 (04:16 +0000)]
Properly run window animations at vsync-sf (2/2)
am: b1e2f8deb3

Change-Id: I2cf08e016fcd177117d7135d211e2676a1945eba

7 years agoAdd missing VNDK pixel formats to AHardwareBuffer
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

7 years agoProperly run window animations at vsync-sf (2/2)
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

7 years agoMerge "Don't double-count external cached app data." into oc-dev
Jeff Sharkey [Thu, 8 Jun 2017 15:34:49 +0000 (15:34 +0000)]
Merge "Don't double-count external cached app data." into oc-dev
am: b5a1f50f5e

Change-Id: Ia991cb98e842a9a9f64e669435c860611e79ff72

7 years agoMerge "Don't double-count external cached app data." into oc-dev
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

7 years agoMerge "No more ashmem equivalent checker false alarm" into oc-dev
Peng Xu [Thu, 8 Jun 2017 10:23:02 +0000 (10:23 +0000)]
Merge "No more ashmem equivalent checker false alarm" into oc-dev
am: d6d91e5833

Change-Id: I754b5d0d1e9426efa07821eba8a6ca6c826914cf

7 years agoMerge "No more ashmem equivalent checker false alarm" 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

7 years agoMerge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw...
Matthew Bouyack [Wed, 7 Jun 2017 23:05:31 +0000 (23:05 +0000)]
Merge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw-f-dev am: 9e5585930a am: f613f073b2  -s ours
am: 4c0bb0a09a

Change-Id: I7872b8894502b9286206f7d73563634a3ac34c3b

7 years agoMerge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw...
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

7 years agoMerge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw...
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

7 years agoMerge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw...
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

7 years agoDO NOT MERGE: Eliminate redundant changes to hardware vsync state.
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

7 years agoDon't double-count external cached app data.
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

7 years agoNo crash from AHardwareBuffer_unlock on NULL fence
Jiwen 'Steve' Cai [Wed, 7 Jun 2017 19:30:46 +0000 (19:30 +0000)]
No crash from AHardwareBuffer_unlock on NULL fence
am: ae6955fda8

Change-Id: Iaedc2bbf55cf369b9c273678a0787572826b8f72

7 years agoNo crash from AHardwareBuffer_unlock on NULL fence
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)

7 years agoDo not use default initializer for union
Yi Kong [Thu, 11 May 2017 18:51:08 +0000 (11:51 -0700)]
Do not use default initializer for union

The next Clang update complains about this code pattern. Rewrite default
constructor to explicitly initialize the union field instead of using
the default initializer.

Test: Build
Bug: 37752547
Change-Id: I22a2aa392d7f4803282baed832b0fa2f852016ac
(cherry picked from commit 4fdbdd1692a549a31382f33f5d529fd141453ea1)

7 years agoatrace: setup saved_cmdlines_size and write only if available
Joel Fernandes [Tue, 6 Jun 2017 20:54:50 +0000 (20:54 +0000)]
atrace: setup saved_cmdlines_size and write only if available
am: 9351f72049

Change-Id: I6ac54d96cda205bc5d4e4d569b03b2064140e310

7 years agoatrace: setup saved_cmdlines_size and write only if available
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>
7 years agoMerge "Revert "Disable in-place vdex update"" into oc-dev
Nicolas Geoffray [Tue, 6 Jun 2017 20:38:42 +0000 (20:38 +0000)]
Merge "Revert "Disable in-place vdex update"" into oc-dev
am: 7258088ea5

Change-Id: I3e36f53541ccac1cccd2361d4d6b752e8e881668

7 years agoMerge "Revert "Disable in-place vdex update"" into oc-dev
Nicolas Geoffray [Tue, 6 Jun 2017 20:20:33 +0000 (20:20 +0000)]
Merge "Revert "Disable in-place vdex update"" into oc-dev

7 years agofix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0...
Mathias Agopian [Tue, 6 Jun 2017 18:06:07 +0000 (18:06 +0000)]
fix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0 am: 46361c6c2b am: ee464e00d3 am: 21e9397776
am: 7b8472157a  -s ours

Change-Id: I5289fea87abce43cb9fa7cf4cb11041b5201800d

7 years agofix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0...
Mathias Agopian [Tue, 6 Jun 2017 18:05:04 +0000 (18:05 +0000)]
fix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0 am: 46361c6c2b am: ee464e00d3 am: 21e9397776  -s ours
am: 1b81145396

Change-Id: I3038e41c1e4b64e397162fea3ddb80eab6374614

7 years agofix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0...
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

7 years agofix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0...
Mathias Agopian [Tue, 6 Jun 2017 17:53:01 +0000 (17:53 +0000)]
fix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0 am: 46361c6c2b am: ee464e00d3
am: 21e9397776

Change-Id: Ifffa0ed1d960232754976ebb29b891ec99d62b75

7 years agofix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0...
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

7 years agofix race condition that can cause a use after free am: 59485525a6 am: 5da64c91d0
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

7 years agofix race condition that can cause a use after free am: 59485525a6
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

7 years agofix race condition that can cause a use after free
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

7 years agoMerge "surfaceflinger: fix layer count" into oc-dev
Chia-I Wu [Tue, 6 Jun 2017 15:42:52 +0000 (15:42 +0000)]
Merge "surfaceflinger: fix layer count" into oc-dev
am: 39cf8b4944

Change-Id: I6a7c3ebc27831792be6329ac6083c86c61f01499

7 years agoMerge "surfaceflinger: fix layer count" into oc-dev
Chia-I Wu [Tue, 6 Jun 2017 15:32:08 +0000 (15:32 +0000)]
Merge "surfaceflinger: fix layer count" into oc-dev

7 years agoRevert "Disable in-place vdex update"
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

7 years agoMerge "Revert "Disable in-place vdex update"" am: 52ca987db6 am: deb23917a9
Nicolas Geoffray [Tue, 6 Jun 2017 08:35:54 +0000 (08:35 +0000)]
Merge "Revert "Disable in-place vdex update"" am: 52ca987db6 am: deb23917a9
am: 3470e3e3f7

Change-Id: I9b6b0b3fecb25e01b10d126e9d236658acd1e99c

7 years agoMerge "Revert "Disable in-place vdex update"" am: 52ca987db6
Nicolas Geoffray [Tue, 6 Jun 2017 08:29:54 +0000 (08:29 +0000)]
Merge "Revert "Disable in-place vdex update"" am: 52ca987db6
am: deb23917a9

Change-Id: I194665350fb6416acc1158fdfc125d6867cbf588

7 years agoMerge "Revert "Disable in-place vdex update""
Nicolas Geoffray [Tue, 6 Jun 2017 08:23:23 +0000 (08:23 +0000)]
Merge "Revert "Disable in-place vdex update""
am: 52ca987db6

Change-Id: Id4060442d160fb91b8245388c1a45f442ac20a89

7 years agoMerge "Revert "Disable in-place vdex update""
Nicolas Geoffray [Tue, 6 Jun 2017 08:13:27 +0000 (08:13 +0000)]
Merge "Revert "Disable in-place vdex update""

7 years agoRevert "Disable in-place vdex update"
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.

Change-Id: I04a7dbde142d59e8dcdf4e93ab0456c4aa3d02ab

7 years agofix race condition that can cause a use after free
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

7 years agoMerge "Clockwork: add feature android.software.input_methods" into oc-dev
Mark Renouf [Mon, 5 Jun 2017 21:50:40 +0000 (21:50 +0000)]
Merge "Clockwork: add feature android.software.input_methods" into oc-dev
am: eed865e61b

Change-Id: I8698f6f42fcbe2239493c6e03d8f850687c1de8c

7 years agoMerge "Clockwork: add feature android.software.input_methods" into oc-dev
Mark Renouf [Mon, 5 Jun 2017 21:42:59 +0000 (21:42 +0000)]
Merge "Clockwork: add feature android.software.input_methods" into oc-dev

7 years agoMerge "atrace: Enable sched_waking if available" into oc-dev
Joel Fernandes [Mon, 5 Jun 2017 20:46:31 +0000 (20:46 +0000)]
Merge "atrace: Enable sched_waking if available" into oc-dev
am: 4b37107002

Change-Id: I961c608a96040cfd87bd55249617c715cb6d6488

7 years agoatrace: Set saved_cmdline_size to 8192
Joel Fernandes [Mon, 5 Jun 2017 20:46:07 +0000 (20:46 +0000)]
atrace: Set saved_cmdline_size to 8192
am: efb73a96b5

Change-Id: I96758a6d56d5478b3287ead6c3d4e43fb7e61524

7 years agoMerge "atrace: Enable sched_waking if available" 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

7 years agoatrace: Set saved_cmdline_size to 8192
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)

7 years agoatrace: Enable sched_waking if available
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>
7 years agosurfaceflinger: fix layer count
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)

7 years agoMerge "Add media.codec process to native stack dump list" into oc-dev
Chong Zhang [Sat, 3 Jun 2017 02:29:45 +0000 (02:29 +0000)]
Merge "Add media.codec process to native stack dump list" into oc-dev
am: eb30998a33

Change-Id: I8de97da46705f876848bfa939f05dc31f82389f2

7 years agoMerge "Add media.codec process to native stack dump list" into oc-dev
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

7 years agoAdd media.codec process to native stack dump list
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

7 years agoMerge changes I87a57825,I3721d163 into oc-dev
Robert Carr [Fri, 2 Jun 2017 20:44:36 +0000 (20:44 +0000)]
Merge changes I87a57825,I3721d163 into oc-dev
am: e44ea13766

Change-Id: I258fd8dd5fd03975a28c606dcd022ef506554fb6

7 years agoMerge changes I87a57825,I3721d163 into oc-dev
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.

7 years agoMerge "correct value of TYPE_MAGNIFICATION_OVERLAY" am: 9e94328e22 am: ce9203d628
kenzyun_chen [Fri, 2 Jun 2017 19:54:33 +0000 (19:54 +0000)]
Merge "correct value of TYPE_MAGNIFICATION_OVERLAY" am: 9e94328e22 am: ce9203d628
am: d396aa6869

Change-Id: Ibffb945b0db31ac1a2ff053595e82476cc8a3fa4

7 years agoMerge "correct value of TYPE_MAGNIFICATION_OVERLAY" am: 9e94328e22
kenzyun_chen [Fri, 2 Jun 2017 19:51:31 +0000 (19:51 +0000)]
Merge "correct value of TYPE_MAGNIFICATION_OVERLAY" am: 9e94328e22
am: ce9203d628

Change-Id: I51e54f6e11287c98ff684616be91efcbfc7b2e1e

7 years agoMerge "correct value of TYPE_MAGNIFICATION_OVERLAY"
kenzyun_chen [Fri, 2 Jun 2017 19:48:02 +0000 (19:48 +0000)]
Merge "correct value of TYPE_MAGNIFICATION_OVERLAY"
am: 9e94328e22

Change-Id: I993c5680157f45e1912e7a24ae5ee1d6cd652f92

7 years agoMerge "correct value of TYPE_MAGNIFICATION_OVERLAY"
Treehugger Robot [Fri, 2 Jun 2017 19:40:44 +0000 (19:40 +0000)]
Merge "correct value of TYPE_MAGNIFICATION_OVERLAY"

7 years agoSurfaceFlinger: Fix final cropping of child layers.
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

7 years agoSurfaceFlinger: Update parent pointer while performing transaction.
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

7 years agocorrect value of TYPE_MAGNIFICATION_OVERLAY
kenzyun_chen [Fri, 2 Jun 2017 05:36:21 +0000 (13:36 +0800)]
correct value of TYPE_MAGNIFICATION_OVERLAY

It should be sync to the same value in WindowManager.java
or the InputWindowInfo::isTrustedOverlay() function will fail

Change-Id: I11bb518049724252f2795a6400efc17ddd545fbb

7 years agoMerge "egl: handle failed eglMakeCurrent EGL_NO_CONTEXT" into oc-dev
Mike Stroyan [Fri, 2 Jun 2017 00:48:35 +0000 (00:48 +0000)]
Merge "egl: handle failed eglMakeCurrent EGL_NO_CONTEXT" into oc-dev
am: 2153f5e317

Change-Id: I6c36e59dc595bd6a494561a49b98b0f2d479ecfe

7 years agoMerge "egl: handle failed eglMakeCurrent EGL_NO_CONTEXT" into oc-dev
TreeHugger Robot [Fri, 2 Jun 2017 00:42:59 +0000 (00:42 +0000)]
Merge "egl: handle failed eglMakeCurrent EGL_NO_CONTEXT" into oc-dev

7 years agoDisable in-place vdex update
David Sehr [Thu, 1 Jun 2017 22:21:02 +0000 (22:21 +0000)]
Disable in-place vdex update
am: 3291cd9eaa

Change-Id: I9289c4cd1dea5299c842a935943101370ca609e4

7 years agoMerge "Installd: deleteOdex's outputPath can be null" am: 0c189de962 am: 6f0d10dbde
Andreas Gampe [Thu, 1 Jun 2017 21:58:32 +0000 (21:58 +0000)]
Merge "Installd: deleteOdex's outputPath can be null" am: 0c189de962 am: 6f0d10dbde
am: 084434a475

Change-Id: I50dc3cfa3f19ae0bc45269b1f15a45a6328106b9

7 years agoMerge "Installd: deleteOdex's outputPath can be null" am: 0c189de962
Andreas Gampe [Thu, 1 Jun 2017 21:56:00 +0000 (21:56 +0000)]
Merge "Installd: deleteOdex's outputPath can be null" am: 0c189de962
am: 6f0d10dbde

Change-Id: Id73731fd8d7e2e67d17f9ac3599d27520849ac2c

7 years agoMerge "Installd: deleteOdex's outputPath can be null"
Andreas Gampe [Thu, 1 Jun 2017 21:52:59 +0000 (21:52 +0000)]
Merge "Installd: deleteOdex's outputPath can be null"
am: 0c189de962

Change-Id: I2220e465027a31b84a9bb473e18e4cfd4fdb0dc7

7 years agoMerge "Installd: deleteOdex's outputPath can be null"
Treehugger Robot [Thu, 1 Jun 2017 21:49:25 +0000 (21:49 +0000)]
Merge "Installd: deleteOdex's outputPath can be null"

7 years agoegl: handle failed eglMakeCurrent EGL_NO_CONTEXT
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: 3834161737244059
Change-Id: I38f3450005a4eec5f1a684ee7d66363e88f6d92f
Fixes: 38341617
Test: android.server.cts.ActivityManagerDisplayTests, Run Minions Rush app.

7 years agoDisable in-place vdex update
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)

7 years agoClockwork: add feature android.software.input_methods
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

7 years agoInstalld: deleteOdex's outputPath can be null
Andreas Gampe [Thu, 1 Jun 2017 17:59:50 +0000 (17:59 +0000)]
Installd: deleteOdex's outputPath can be null
am: c523409f0f

Change-Id: I36aa3e4c04967567e1f1cfa5f967be416bdeca8e

7 years agoInstalld: deleteOdex's outputPath can be null
Andreas Gampe [Wed, 31 May 2017 23:39:58 +0000 (16:39 -0700)]
Installd: deleteOdex's outputPath can be null

Add @nullable, as the outputPath can be null for system apps.

(cherry picked from commit c523409f0fd03aa498cedc486f85e9a4b7257f3a)

Bug: 62236497
Test: m
Test: Fill up /data, apply OTA
Change-Id: I61d86721b485f85195b153d76ce25412dcb68be6

7 years agoDelete vdex file in delete_odex.
Nicolas Geoffray [Thu, 1 Jun 2017 15:53:10 +0000 (15:53 +0000)]
Delete vdex file in delete_odex.
am: 3040d9db98

Change-Id: I5382e82ebf64bf8fc409cb3ba4cb1481cdca0e58

7 years agoInstalld: deleteOdex's outputPath can be null
Andreas Gampe [Wed, 31 May 2017 23:39:58 +0000 (16:39 -0700)]
Installd: deleteOdex's outputPath can be null

Add @nullable, as the outputPath can be null for system apps.

Bug: 62236497
Test: m
Test: Fill up /data, apply OTA
Change-Id: I61d86721b485f85195b153d76ce25412dcb68be6

7 years agoDelete vdex file in delete_odex.
Nicolas Geoffray [Thu, 25 May 2017 12:58:06 +0000 (13:58 +0100)]
Delete vdex file in delete_odex.

(cherry picked from commit 192fb9662ce8b2a60da2b280d8000283fb3b6f6b)

bug: 38513395
Test: unfortunately no unit test here, so after discussing
      with agampe@ just relied on build.

Change-Id: I305ddaadc813673fb55473f5e8ca357f39cf98f3

7 years agolibgui: Add Surface::getLastDequeueStartTime
Dan Stoza [Thu, 1 Jun 2017 06:16:33 +0000 (06:16 +0000)]
libgui: Add Surface::getLastDequeueStartTime
am: 932f008485

Change-Id: I77404c1b97cb997a057558362b9bfdf9df65c8da

7 years agoMerge "Disable in-place vdex update" am: d9917d78a0 am: 2521871a1f
David Sehr [Wed, 31 May 2017 22:15:04 +0000 (22:15 +0000)]
Merge "Disable in-place vdex update" am: d9917d78a0 am: 2521871a1f
am: b8e9326fd8

Change-Id: Ia2297f8cc31830e4e3909580f3af45dfb96e5901

7 years agoMerge "Disable in-place vdex update" am: d9917d78a0
David Sehr [Wed, 31 May 2017 22:10:23 +0000 (22:10 +0000)]
Merge "Disable in-place vdex update" am: d9917d78a0
am: 2521871a1f

Change-Id: I9c4d606bcb054ad96b28a4da76a7ddf241d8687b

7 years agoMerge "Disable in-place vdex update"
David Sehr [Wed, 31 May 2017 22:08:21 +0000 (22:08 +0000)]
Merge "Disable in-place vdex update"
am: d9917d78a0

Change-Id: Ieb4a1235dc99cac32b6fb441ee98e0cbdf4b7661

7 years agoMerge "Disable in-place vdex update"
Treehugger Robot [Wed, 31 May 2017 22:00:43 +0000 (22:00 +0000)]
Merge "Disable in-place vdex update"

7 years agolibgui: Add Surface::getLastDequeueStartTime
Dan Stoza [Wed, 31 May 2017 20:50:16 +0000 (13:50 -0700)]
libgui: Add Surface::getLastDequeueStartTime

Adds the getLastDequeueStartTime method, which allows the caller to
determine whether the last dequeueBuffer call fell into a given time
window.

Bug: 62213889
Test: SurfaceTest.TestGetLastDequeueStartTime in libgui_test
Change-Id: I1684deb09273745a3adc751554624d2257fa890e

7 years agoMerge "Consistent "low storage" behavior." into oc-dev
Jeff Sharkey [Wed, 31 May 2017 14:49:31 +0000 (14:49 +0000)]
Merge "Consistent "low storage" behavior." into oc-dev
am: 1e4088fc68

Change-Id: I8a2328710d4bc770badfcc9778534fccaaf91405

7 years agoMerge "Consistent "low storage" behavior." into oc-dev
Jeff Sharkey [Wed, 31 May 2017 14:18:24 +0000 (14:18 +0000)]
Merge "Consistent "low storage" behavior." into oc-dev

7 years agoMerge "dumpstate: Track debuggerd API changes." am: ccc5db441b am: 62b9a75c4c
Narayan Kamath [Wed, 31 May 2017 12:29:12 +0000 (12:29 +0000)]
Merge "dumpstate: Track debuggerd API changes." am: ccc5db441b am: 62b9a75c4c
am: ea3784b686

Change-Id: I82e5974f96a2a617d31a63813dac22035532c59b

7 years agoMerge "dumpstate: Track debuggerd API changes." am: ccc5db441b
Narayan Kamath [Wed, 31 May 2017 12:16:32 +0000 (12:16 +0000)]
Merge "dumpstate: Track debuggerd API changes." am: ccc5db441b
am: 62b9a75c4c

Change-Id: Id1320f3373a4bbcdcfd945ea9299bd8a805adc12

7 years agoMerge "dumpstate: Track debuggerd API changes."
Narayan Kamath [Wed, 31 May 2017 12:06:51 +0000 (12:06 +0000)]
Merge "dumpstate: Track debuggerd API changes."
am: ccc5db441b

Change-Id: I05214262704a572a4645df427a76227f8d9eeac4

7 years agoMerge "dumpstate: Track debuggerd API changes."
Narayan Kamath [Wed, 31 May 2017 11:55:47 +0000 (11:55 +0000)]
Merge "dumpstate: Track debuggerd API changes."

7 years agodumpstate: Track debuggerd API changes.
Narayan Kamath [Wed, 31 May 2017 09:33:28 +0000 (10:33 +0100)]
dumpstate: Track debuggerd API changes.

dump_backtrace_to_file_timeout now needs an additional argument
that specifies the dump type.

Bug: 36024548
Test: make; manual bug report capture
Change-Id: I6ce3c172dd571e296d9ced9c576b88ea487b2fbb

7 years agoMerge "EGL: Do not look up default namespace when sphal is defined" into oc-dev
Justin Yun [Wed, 31 May 2017 07:09:16 +0000 (07:09 +0000)]
Merge "EGL: Do not look up default namespace when sphal is defined" into oc-dev
am: 74a4049e5a

Change-Id: I34fa6f48116712bb44db77923fcedcd4f93b3781

7 years agoMerge "EGL: Do not look up default namespace when sphal is defined" into oc-dev
TreeHugger Robot [Wed, 31 May 2017 07:01:38 +0000 (07:01 +0000)]
Merge "EGL: Do not look up default namespace when sphal is defined" into oc-dev

7 years agoMerge "Mark libui as vendor_available" into oc-dev
Jayant Chowdhary [Wed, 31 May 2017 04:05:02 +0000 (04:05 +0000)]
Merge "Mark libui as vendor_available" into oc-dev
am: 375a5b563c

Change-Id: I170d012b8b13b914c2d228dfa3255b23cd5d0900

7 years agoMerge "Mark libui as vendor_available" into oc-dev
Jayant Chowdhary [Wed, 31 May 2017 03:59:44 +0000 (03:59 +0000)]
Merge "Mark libui as vendor_available" into oc-dev

7 years agoMerge "add missing lib dependency to libvndksupport" into oc-dev
Jiyong Park [Wed, 31 May 2017 00:36:08 +0000 (00:36 +0000)]
Merge "add missing lib dependency to libvndksupport" into oc-dev
am: 09e388ffeb

Change-Id: I2030be9640c8fc01416208f1e114719b8784c6ad

7 years agoMerge "add missing lib dependency to libvndksupport" into oc-dev
TreeHugger Robot [Wed, 31 May 2017 00:26:11 +0000 (00:26 +0000)]
Merge "add missing lib dependency to libvndksupport" into oc-dev

7 years agoConsistent "low storage" behavior.
Jeff Sharkey [Tue, 30 May 2017 20:38:42 +0000 (14:38 -0600)]
Consistent "low storage" behavior.

When freeing cached data, the caller can now provide a "reserved"
size which we won't clear cached data from.

Bug: 38008706
Test: cts-tradefed run commandAndExit cts-dev -m CtsJobSchedulerTestCases -t android.jobscheduler.cts.StorageConstraintTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Change-Id: Ieb91b3e5345a950d4785fd7915f520f0a68a567a