OSDN Git Service

android-x86/frameworks-native.git
7 years agoMerge "Fix security vulneratibly 31960359" into nyc-dev am: fefc4f4e94 am: afee0c9de4
Fabien Sanglard [Tue, 6 Dec 2016 19:34:10 +0000 (19:34 +0000)]
Merge "Fix security vulneratibly 31960359" into nyc-dev am: fefc4f4e94 am: afee0c9de4
am: 68fcdf6a93

Change-Id: I438cd8b4b922d9a76fda92d1e24a4a02c2e0f0c5

7 years agoFix security vulneratibly 31960359 am: dffa078205 am: b8b076e553
Fabien Sanglard [Tue, 6 Dec 2016 19:33:58 +0000 (19:33 +0000)]
Fix security vulneratibly 31960359 am: dffa078205 am: b8b076e553
am: 46dd3c89e5

Change-Id: I7664021716dc9f1a1e09afdbeb04a02f84195354

7 years agoMerge "Fix security vulneratibly 31960359" into nyc-dev am: fefc4f4e94
Fabien Sanglard [Tue, 6 Dec 2016 19:30:39 +0000 (19:30 +0000)]
Merge "Fix security vulneratibly 31960359" into nyc-dev am: fefc4f4e94
am: afee0c9de4

Change-Id: I8378cc46c5d1caaa3b018c45929b6767cefa3bb9

7 years agoFix security vulneratibly 31960359 am: dffa078205
Fabien Sanglard [Tue, 6 Dec 2016 19:30:28 +0000 (19:30 +0000)]
Fix security vulneratibly 31960359 am: dffa078205
am: b8b076e553

Change-Id: Ia073be4ad2910078ac1e736ef6d2afadd849a525

7 years agoMerge "Fix security vulneratibly 31960359" into nyc-dev
Fabien Sanglard [Tue, 6 Dec 2016 19:26:58 +0000 (19:26 +0000)]
Merge "Fix security vulneratibly 31960359" into nyc-dev
am: fefc4f4e94

Change-Id: I06631f20e9a9070ff3a71c03f9d4bab324a8b27b

7 years agoFix security vulneratibly 31960359
Fabien Sanglard [Tue, 6 Dec 2016 19:26:57 +0000 (19:26 +0000)]
Fix security vulneratibly 31960359
am: dffa078205

Change-Id: Icea9297e2e5f7467ece053ae869208758f40b954

7 years agoMerge "Fix security vulneratibly 31960359" into nyc-dev
Fabien Sanglard [Tue, 6 Dec 2016 19:22:20 +0000 (19:22 +0000)]
Merge "Fix security vulneratibly 31960359" into nyc-dev

7 years agoresolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950 am: 02e44...
Christopher Tate [Tue, 6 Dec 2016 00:28:19 +0000 (00:28 +0000)]
resolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950 am: 02e4440eab am: 953c05276e am: e37a4dc7c4 am: 8ed5e3d7ca
am: 9d5dd3f584

Change-Id: Ic7effb22aa05c626d007aef30ab572363197cad3

7 years agoresolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950 am: 02e44...
Christopher Tate [Tue, 6 Dec 2016 00:24:19 +0000 (00:24 +0000)]
resolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950 am: 02e4440eab am: 953c05276e am: e37a4dc7c4
am: 8ed5e3d7ca

Change-Id: I634d3910a329dd10a90086c5c116ae716b2187af

7 years agoresolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950 am: 02e44...
Christopher Tate [Tue, 6 Dec 2016 00:22:18 +0000 (00:22 +0000)]
resolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950 am: 02e4440eab am: 953c05276e
am: e37a4dc7c4

Change-Id: Ie0e23d8fc47bf2cb87181ddf1a03dd439fc0f3f4

7 years agoresolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950 am: 02e44...
Christopher Tate [Tue, 6 Dec 2016 00:17:19 +0000 (00:17 +0000)]
resolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950 am: 02e4440eab
am: 953c05276e

Change-Id: If6e16f080e701171d7c9b69adbeaab3a6910b63a

7 years agoresolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950
Christopher Tate [Tue, 6 Dec 2016 00:13:48 +0000 (00:13 +0000)]
resolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d am: abe293b950
am: 02e4440eab

Change-Id: I66e7e982176555f09bf298325754d708ef0ecac0

7 years agoresolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d
Christopher Tate [Tue, 6 Dec 2016 00:09:47 +0000 (00:09 +0000)]
resolve merge conflicts of 13c5c34 to mnc-dev am: 79b74d787d
am: abe293b950

Change-Id: I7f8ce6dbb313d592b97b41a982e629680eba36c4

7 years agoresolve merge conflicts of 13c5c34 to mnc-dev
Christopher Tate [Tue, 6 Dec 2016 00:06:18 +0000 (00:06 +0000)]
resolve merge conflicts of 13c5c34 to mnc-dev
am: 79b74d787d

Change-Id: I383dde0596fe37282db3bb62f7ad65e763fdd1dc

7 years agoFix security vulneratibly 31960359
Fabien Sanglard [Mon, 5 Dec 2016 23:06:29 +0000 (15:06 -0800)]
Fix security vulneratibly 31960359

BufferQueueCore features a variable mLastQueuedSlot which is not
initialized in its constructor resulting in security vulnerability

Bug: 31960359
Change-Id: If892f59f6288d8b81b1e312995832a20c8341494
Tests: Manually on Angler

7 years agoresolve merge conflicts of 13c5c34 to mnc-dev
Christopher Tate [Mon, 5 Dec 2016 22:10:47 +0000 (14:10 -0800)]
resolve merge conflicts of 13c5c34 to mnc-dev

Change-Id: I7f57cde153648f48ff038400aa437b76971d4771

7 years agoCorrect overflow check in Parcel resize code am: 8b64307e95
Christopher Tate [Mon, 5 Dec 2016 21:23:36 +0000 (21:23 +0000)]
Correct overflow check in Parcel resize code am: 8b64307e95
am: ed6937ae2c

Change-Id: I9ea154fd1f2ca3a69f756066fb49efc99e889224

7 years agoCorrect overflow check in Parcel resize code
Christopher Tate [Mon, 5 Dec 2016 21:20:07 +0000 (21:20 +0000)]
Correct overflow check in Parcel resize code
am: 8b64307e95

Change-Id: I371fb7c6aaf34d44d69c740eea95fe3ba125164a

7 years agoCorrect overflow check in Parcel resize code
Christopher Tate [Thu, 3 Nov 2016 20:32:41 +0000 (13:32 -0700)]
Correct overflow check in Parcel resize code

Bug 31929765

Change-Id: Ie27b9945f1de056624668869bdf9a5578abff467

7 years ago[DO NOT MERGE ANYWHERE] Fix bodysensor permission
Nick Vaccaro [Wed, 23 Nov 2016 16:44:15 +0000 (08:44 -0800)]
[DO NOT MERGE ANYWHERE] Fix bodysensor permission

Bug: 33094188
Change-Id: I1d91e855163954666a18b2f8daadb2639b946b24

7 years agoMerge "Fix integer overflow in unsafeReadTypedVector" into nyc-dev am: e81a4f1518...
Casey Dahlin [Wed, 16 Nov 2016 00:03:50 +0000 (00:03 +0000)]
Merge "Fix integer overflow in unsafeReadTypedVector" into nyc-dev am: e81a4f1518 am: 2dbc712abe
am: 7be8fd60ea

Change-Id: Ic4a1d4bff81e892786296d3670559487f8d14070

7 years agoFix integer overflow in unsafeReadTypedVector am: 65a8f07e57 am: 894ba10a5f
Casey Dahlin [Wed, 16 Nov 2016 00:03:37 +0000 (00:03 +0000)]
Fix integer overflow in unsafeReadTypedVector am: 65a8f07e57 am: 894ba10a5f
am: b7a1cc50d2

Change-Id: Id199d45df5b34f3415bf1754cb324bce6a7ed983

7 years agoMerge "Fix integer overflow in unsafeReadTypedVector" into nyc-dev am: e81a4f1518
Casey Dahlin [Tue, 15 Nov 2016 23:57:19 +0000 (23:57 +0000)]
Merge "Fix integer overflow in unsafeReadTypedVector" into nyc-dev am: e81a4f1518
am: 2dbc712abe

Change-Id: I14abc8f99e191328ac70176c90ba4f57e617a45e

7 years agoFix integer overflow in unsafeReadTypedVector am: 65a8f07e57
Casey Dahlin [Tue, 15 Nov 2016 23:57:07 +0000 (23:57 +0000)]
Fix integer overflow in unsafeReadTypedVector am: 65a8f07e57
am: 894ba10a5f

Change-Id: If93da0dbcbf78ea65e3ac950c5539861587526bb

7 years agoMerge "Fix integer overflow in unsafeReadTypedVector" into nyc-dev
Casey Dahlin [Tue, 15 Nov 2016 23:49:37 +0000 (23:49 +0000)]
Merge "Fix integer overflow in unsafeReadTypedVector" into nyc-dev
am: e81a4f1518

Change-Id: I0b6ed467fc45cf8d6d233730a5a3d4b6dd3eafa7

7 years agoFix integer overflow in unsafeReadTypedVector
Casey Dahlin [Tue, 15 Nov 2016 23:49:36 +0000 (23:49 +0000)]
Fix integer overflow in unsafeReadTypedVector
am: 65a8f07e57

Change-Id: If37f6f01bfd8e7107063ce6993cf4c2b671fe99b

7 years agoMerge "Fix integer overflow in unsafeReadTypedVector" into nyc-dev
Casey Dahlin [Tue, 15 Nov 2016 23:40:20 +0000 (23:40 +0000)]
Merge "Fix integer overflow in unsafeReadTypedVector" into nyc-dev

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409...
Fabien Sanglard [Tue, 15 Nov 2016 01:44:23 +0000 (01:44 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409 am: 275b2347ef am: aff7827b4f am: c8684d517a am: 57dbf1c224 am: b17adaa85f am: c261a17e51
am: ce40ad2441

Change-Id: Ia569c1b5841cf75626ae29e656688a405709ad79

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409...
Fabien Sanglard [Tue, 15 Nov 2016 01:37:51 +0000 (01:37 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409 am: 275b2347ef am: aff7827b4f am: c8684d517a am: 57dbf1c224 am: b17adaa85f
am: c261a17e51

Change-Id: I8ef7a57b682596d4644bca2c8e5a7003d3125cca

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409...
Fabien Sanglard [Tue, 15 Nov 2016 01:31:22 +0000 (01:31 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409 am: 275b2347ef am: aff7827b4f am: c8684d517a am: 57dbf1c224
am: b17adaa85f

Change-Id: I4259f7bbfafe66f7690c1ecd80f8c81a398ae78f

7 years agoFix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b am: a928cc7169...
Fabien Sanglard [Tue, 15 Nov 2016 01:31:22 +0000 (01:31 +0000)]
Fix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b am: a928cc7169 am: 0517da2c5a am: b0dff427a1 am: 1852db9aa3
am: d4f7a66cf6

Change-Id: I468e9387f0541fc22d71179ff6e05397f99e4dce

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409...
Fabien Sanglard [Tue, 15 Nov 2016 01:23:50 +0000 (01:23 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409 am: 275b2347ef am: aff7827b4f am: c8684d517a
am: 57dbf1c224

Change-Id: I5f91ea6e826a24d37bf8c7f7cbcc49a235532a14

7 years agoFix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b am: a928cc7169...
Fabien Sanglard [Tue, 15 Nov 2016 01:23:50 +0000 (01:23 +0000)]
Fix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b am: a928cc7169 am: 0517da2c5a am: b0dff427a1
am: 1852db9aa3

Change-Id: Ief2e221eb25138131d4b9fe19b669dca26dd1726

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409...
Fabien Sanglard [Tue, 15 Nov 2016 01:17:50 +0000 (01:17 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409 am: 275b2347ef am: aff7827b4f
am: c8684d517a

Change-Id: I7d37baee66a7a16cb77e227b66ba93bc87119810

7 years agoFix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b am: a928cc7169...
Fabien Sanglard [Tue, 15 Nov 2016 01:17:50 +0000 (01:17 +0000)]
Fix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b am: a928cc7169 am: 0517da2c5a
am: b0dff427a1

Change-Id: If61fab86a971de18633549240d32f41205bc52e9

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409...
Fabien Sanglard [Tue, 15 Nov 2016 01:10:20 +0000 (01:10 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409 am: 275b2347ef
am: aff7827b4f

Change-Id: I2a759e2ecdf1c67cb764a9279da23386cfb54914

7 years agoFix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b am: a928cc7169
Fabien Sanglard [Tue, 15 Nov 2016 01:10:20 +0000 (01:10 +0000)]
Fix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b am: a928cc7169
am: 0517da2c5a

Change-Id: Ie25ecd20988d9aa8d3f59b07d00b80c0a18d5e3a

7 years agoFix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b
Fabien Sanglard [Tue, 15 Nov 2016 01:02:50 +0000 (01:02 +0000)]
Fix SF security vulnerability: 32706020 am: d073eb7a3f am: 230b943c6b
am: a928cc7169

Change-Id: I682597ada156253e34ef067ae565d656c6bb39f7

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409
Fabien Sanglard [Tue, 15 Nov 2016 01:02:49 +0000 (01:02 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2 am: 9d14ab5409
am: 275b2347ef

Change-Id: Iae0109ec3bddd6f71bab1759003a34e75270f6d4

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2
Fabien Sanglard [Tue, 15 Nov 2016 00:55:19 +0000 (00:55 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0 am: e5c91fe2e2
am: 9d14ab5409

Change-Id: I0ed8d425157308f35b43818a9592267c06cdc807

7 years agoFix SF security vulnerability: 32706020 am: d073eb7a3f
Fabien Sanglard [Tue, 15 Nov 2016 00:55:19 +0000 (00:55 +0000)]
Fix SF security vulnerability: 32706020 am: d073eb7a3f
am: 230b943c6b

Change-Id: I439ff370c0a353bb9a0adc14a39aedd1ec5a783d

7 years agoFix SF security vulnerability: 32660278 am: 2d8a2432e0
Fabien Sanglard [Tue, 15 Nov 2016 00:47:19 +0000 (00:47 +0000)]
Fix SF security vulnerability: 32660278 am: 2d8a2432e0
am: e5c91fe2e2

Change-Id: I0c2becbd05d41fae542a1c68b6f0f26b0f10a15a

7 years agoFix SF security vulnerability: 32706020
Fabien Sanglard [Tue, 15 Nov 2016 00:47:18 +0000 (00:47 +0000)]
Fix SF security vulnerability: 32706020
am: d073eb7a3f

Change-Id: I5b7bf4ecee39de868b9c275531a6f11e65d1c3fd

7 years agoFix SF security vulnerability: 32660278
Fabien Sanglard [Tue, 15 Nov 2016 00:39:18 +0000 (00:39 +0000)]
Fix SF security vulnerability: 32660278
am: 2d8a2432e0

Change-Id: Ia5f419d7d113692f5d52b483f70ca09589333e13

7 years agoFix SF security vulnerability: 32706020
Fabien Sanglard [Tue, 8 Nov 2016 23:35:02 +0000 (15:35 -0800)]
Fix SF security vulnerability: 32706020

Because of lack of mutex lock when get mConsumerName, if one thread
getConsumerName, another thread setConsumerName frequently, an UAF will
be triggered.

Change-Id: Id1bbf0d15de6d16def2f54ecade385058cda3b65
Test: Marling with poc provided in bug report.
Bug: 32706020

7 years agoFix SF security vulnerability: 32660278
Fabien Sanglard [Tue, 8 Nov 2016 23:31:32 +0000 (15:31 -0800)]
Fix SF security vulnerability: 32660278

Because of lack of mutex lock when get mSidebandStream, if one thread
getSidebandStream, another thread setSidebandStream frequently, an UAF
will be triggered.

Bug: 32660278
Test: Marlin device with poc
Change-Id: Idbcf0976ce2db682d0f13455105c45a5c7481a45

7 years agoCheck and restorecon cache/code_cache directories.
Jeff Sharkey [Mon, 31 Oct 2016 19:11:06 +0000 (19:11 +0000)]
Check and restorecon cache/code_cache directories.
am: 397ec26675

Change-Id: Ifd0ffc94a328f75148c24ff4e266461855c38965

7 years agoCheck and restorecon cache/code_cache directories.
Jeff Sharkey [Mon, 31 Oct 2016 17:22:19 +0000 (11:22 -0600)]
Check and restorecon cache/code_cache directories.

To speed up boot times, we recently relaxed SELinux restorecon logic
to only consider relabeling app storage when the top level SELinux
label changed.

However, if an app manually deletes either their cache or code_cache
directories, installd will helpfully recreate those directories at
the next boot, but they'll be stuck with incorrect SELinux labels
which an app can't fix.  (Our historically aggressive restorecons had
relabeled them, which is why we didn't observe until now.)

This change checks the labels of the cache/code_cache directories,
and runs a restorecon if needed, fixing the issue above.

Test: delete cache and verify recreated with correct label
Bug: 32504081
Change-Id: I0114ae4129223e5909b1075d56a9b1145ebc5ef4

7 years agoFix integer overflow in unsafeReadTypedVector
Casey Dahlin [Thu, 27 Oct 2016 00:18:25 +0000 (17:18 -0700)]
Fix integer overflow in unsafeReadTypedVector

Passing a size to std::vector that is too big causes it to silently
under-allocate when exceptions are disabled, leaving us open to an OOB
write. We check the bounds and the resulting size now to verify
allocation succeeds.

Test: Verified reproducer attached to bug no longer crashes Camera
      service.
Bug: 31677614

Change-Id: I064b1442838032d93658f8bf63b7aa6d021c99b7

7 years agoMerge "Do not set VR mode feature as handset default." into nyc-mr1-dev
Ruben Brunk [Wed, 26 Oct 2016 00:23:04 +0000 (00:23 +0000)]
Merge "Do not set VR mode feature as handset default." into nyc-mr1-dev
am: 4e1d67bd32

Change-Id: I951313d72530540077a777406754ab97a4566d72

7 years agoDo not set VR mode feature as handset default.
Ruben Brunk [Wed, 26 Oct 2016 00:22:50 +0000 (00:22 +0000)]
Do not set VR mode feature as handset default.
am: 5ce292f55b

Change-Id: I913dc6997a275c90b0617c0a785e3991a947bc22

7 years agoMerge "Do not set VR mode feature as handset default." into nyc-mr1-dev
Ruben Brunk [Wed, 26 Oct 2016 00:15:11 +0000 (00:15 +0000)]
Merge "Do not set VR mode feature as handset default." into nyc-mr1-dev

7 years agoMerge "Revert "services: surfaceflinger: ASAN fix"" into nyc-mr1-dev
Steve Pfetsch [Tue, 25 Oct 2016 22:05:01 +0000 (22:05 +0000)]
Merge "Revert "services: surfaceflinger: ASAN fix"" into nyc-mr1-dev
am: 103ba31665

Change-Id: Ic40bef2b672597ad00b4b106410c4347b556998b

7 years agoRevert "services: surfaceflinger: ASAN fix"
Steve Pfetsch [Tue, 25 Oct 2016 22:05:00 +0000 (22:05 +0000)]
Revert "services: surfaceflinger: ASAN fix"
am: 598f6d5429

Change-Id: Ic7f8483308c1f553e1614c8d1624583c9c472423

7 years agoMerge "Revert "services: surfaceflinger: ASAN fix"" into nyc-mr1-dev
Steve Pfetsch [Tue, 25 Oct 2016 21:54:41 +0000 (21:54 +0000)]
Merge "Revert "services: surfaceflinger: ASAN fix"" into nyc-mr1-dev

7 years agoRevert "services: surfaceflinger: ASAN fix"
Steve Pfetsch [Tue, 25 Oct 2016 21:47:58 +0000 (21:47 +0000)]
Revert "services: surfaceflinger: ASAN fix"

This reverts commit 1d3df546d5ee4dcc9e7cae6f8b8b790f741539af.

Original patch may have caused a stability issue caught in monkey testing.

Bug: 32312240
Change-Id: Ie8d291679590e624b8b90c4786b1c25c76cb2c9f

7 years agoMerge "DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report...
Felipe Leme [Tue, 25 Oct 2016 20:49:46 +0000 (20:49 +0000)]
Merge "DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."" into nyc-mr1-dev
am: 7781eccbc3

Change-Id: If9f104497a20203c6fd854091082672826857b52

7 years agoDO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."
Felipe Leme [Tue, 25 Oct 2016 20:49:45 +0000 (20:49 +0000)]
DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."
am: bb6b604623

Change-Id: I08b640b8c1ffae80205be5dcf179403c335e43ba

7 years agoMerge "DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report...
TreeHugger Robot [Tue, 25 Oct 2016 20:44:14 +0000 (20:44 +0000)]
Merge "DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."" into nyc-mr1-dev

7 years agoDO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."
Felipe Leme [Tue, 25 Oct 2016 18:18:24 +0000 (18:18 +0000)]
DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."

This reverts commit f87959e00732d7d737527f1248a71adea99ae29d.

BUG: 32402587
Fixes: 32365477

Change-Id: Ic4daec37efbaef1906450bf6609d5588d5c9a835

7 years agoDo not set VR mode feature as handset default.
Ruben Brunk [Tue, 25 Oct 2016 01:28:46 +0000 (18:28 -0700)]
Do not set VR mode feature as handset default.

Bug: 31959453
Change-Id: I6fef6781e14f3c1239197798b79cc9239d34d53d

7 years agoDO NOT MERGE. Added a is_zipping() function.
Felipe Leme [Fri, 21 Oct 2016 23:53:47 +0000 (23:53 +0000)]
DO NOT MERGE. Added a is_zipping() function.
am: 03974984bf

Change-Id: Ib14224bf42315b3b1633662fac1f88610a824296

7 years agoDO NOT MERGE. Added a is_zipping() function.
Felipe Leme [Fri, 21 Oct 2016 18:38:26 +0000 (11:38 -0700)]
DO NOT MERGE. Added a is_zipping() function.

BUG: 32219165
Fixes: 32335112
Change-Id: I2bc630f9c840ccd3a2e0474ed16a766e8a405ad8

7 years agoservices: surfaceflinger: ASAN fix
Steve Pfetsch [Wed, 19 Oct 2016 04:53:17 +0000 (04:53 +0000)]
services: surfaceflinger: ASAN fix
am: 1d3df546d5

Change-Id: If0447f27ab0a1c3033b0a87fc8426f53c2a82ac5

7 years agoservices: surfaceflinger: ASAN fix
Steve Pfetsch [Fri, 30 Sep 2016 00:16:29 +0000 (17:16 -0700)]
services: surfaceflinger: ASAN fix

Move layer removal to the main thread, while the display is on.

Bug: 30281222
Change-Id: Id9f956c1e626819734868340e7fa12abf257b702

7 years agoMerge changes I5d907c33,Ibce48cd2 into cw-f-dev
Matthew Bouyack [Tue, 18 Oct 2016 17:10:30 +0000 (17:10 +0000)]
Merge changes I5d907c33,Ibce48cd2 into cw-f-dev

* changes:
  In SurfaceFlinger, test fence before merging
  libui: Change hasSignaled to return optional<bool>

7 years agoSensors: Add WRIST_TILT_GESTURE as wake sensor
Nick Vaccaro [Mon, 17 Oct 2016 22:40:51 +0000 (15:40 -0700)]
Sensors: Add WRIST_TILT_GESTURE as wake sensor

Include WRIST_TILT_GESTURE sensor type when determining if
a sensor is a wake sensor or not in getDefaultSensor().

Change-Id: Ib9ae3990e063848163edd34be2ec021ed518e346

7 years agoIn SurfaceFlinger, test fence before merging
Matthew Bouyack [Fri, 7 Oct 2016 22:06:15 +0000 (15:06 -0700)]
In SurfaceFlinger, test fence before merging

If the old fence for a given layer has already expired, we can replace
it with the new fence rather than merging the two.

This saves 300-400us per frame on Android Wear

Change-Id: I5d907c336c7383ae4e2e0f71e42f23749494a359

7 years agolibui: Change hasSignaled to return optional<bool>
Dan Stoza [Thu, 13 Oct 2016 16:45:00 +0000 (09:45 -0700)]
libui: Change hasSignaled to return optional<bool>

Since the android::Fence::wait() call can possibly return an error,
we need some way of indicating to the caller of hasSignaled that a
fence that has not yet signaled (because it is in an error state) will
never signal. To do this, we return an optional<bool>, where true and
false indicate both that the fence is valid and that it has or hasn't
signaled. If an error is returned from wait(), we return a default
optional value (that is neither true nor false).

Test: m

Change-Id: Ibce48cd2e71ddb8ccf6cabe3284afe0efca8c132

7 years agoMerge "Add a feature to signal fitness quality heart rate monitors" into cw-f-dev
Ashutosh Joshi [Mon, 17 Oct 2016 17:20:35 +0000 (17:20 +0000)]
Merge "Add a feature to signal fitness quality heart rate monitors" into cw-f-dev

7 years agoAdd a feature to signal fitness quality heart rate monitors
Ashutosh Joshi [Thu, 6 Oct 2016 20:04:35 +0000 (13:04 -0700)]
Add a feature to signal fitness quality heart rate monitors

Adding a feature to signal the presence of a fitness quality heart
rate monitor on the device.

Change-Id: Iaf5f6a2dc1c76e7f4ce40612588c368bcfc0d29d

7 years agolibui: Add hasSignaled() method to Fence
Dan Stoza [Wed, 12 Oct 2016 17:35:17 +0000 (10:35 -0700)]
libui: Add hasSignaled() method to Fence

Adds a hasSignaled() method to android::Fence. This will make it easier
to write client code that only cares whether a fence has signaled, and
allows such code to gain the performance benefits of wait(0) (which is
significantly faster than getSignalTime()) while still being obvious
about what it is trying to do.

Test: m

Change-Id: Ia28ce6cff3860a171254ea20a24f3f1bfbc67eb8

7 years agoMove atrace init into on fs trigger
Wei Wang [Wed, 12 Oct 2016 01:06:17 +0000 (01:06 +0000)]
Move atrace init into on fs trigger
am: f920891b71

Change-Id: If6deb43479999924cfce63ca6b3994f9f7276c39

7 years agoMove atrace init into on fs trigger
Wei Wang [Tue, 11 Oct 2016 22:26:06 +0000 (15:26 -0700)]
Move atrace init into on fs trigger

sysfs should be ready on ealier stage than boot

Bug: 32025203
Test: take systrace
Change-Id: Id73b6959f3075dc793d93551963193a211060da8

7 years agoMerge "Use snprintf for SurfaceFlinger fence name" into cw-f-dev
Matthew Bouyack [Mon, 10 Oct 2016 18:03:37 +0000 (18:03 +0000)]
Merge "Use snprintf for SurfaceFlinger fence name" into cw-f-dev

7 years agoUse snprintf for SurfaceFlinger fence name
Matthew Bouyack [Fri, 7 Oct 2016 21:26:47 +0000 (14:26 -0700)]
Use snprintf for SurfaceFlinger fence name

snprintf is significantly faster than String8::format
This change saves ~50us per frame on Android Wear

Change-Id: I6ac47c2434662ca561208daae232f02a9f136aaf

7 years agoMerge "Eliminate unnecessary calls to onBufferReleased" into cw-f-dev
Matthew Bouyack [Thu, 6 Oct 2016 21:27:20 +0000 (21:27 +0000)]
Merge "Eliminate unnecessary calls to onBufferReleased" into cw-f-dev

7 years agoDumpstate should hold a wakelock to save bug report time. DO NOT MERGE.
Wei Liu [Thu, 6 Oct 2016 19:54:04 +0000 (19:54 +0000)]
Dumpstate should hold a wakelock to save bug report time. DO NOT MERGE.
am: 2cc37eaaa7

Change-Id: Ic58338aaf3dd67b9256e42fe4d61416b35c367de

7 years agoEliminate unnecessary calls to onBufferReleased
Matthew Bouyack [Mon, 3 Oct 2016 23:24:26 +0000 (16:24 -0700)]
Eliminate unnecessary calls to onBufferReleased

This change adds a callback to ProducerListener to indicate whether the
listener needs the 'onBufferReleased' notification. This allows us to
avoid making that binder call unnecessarily, saving ~170us per frame on
Android Wear.

By default the new callback returns true, so behavior for existing
clients should be unchanged. Only the DummyProducerListener returns
false.

Also note that it would be simpler to just pass NULL for the
ProducerListener if not for that fact that we still need it for death
notification.

Bug: b/31122630

Change-Id: I730834218a055d89e89f876dd77da8127eb78000

7 years agoDumpstate should hold a wakelock to save bug report time. DO NOT MERGE.
Wei Liu [Fri, 26 Aug 2016 21:51:42 +0000 (14:51 -0700)]
Dumpstate should hold a wakelock to save bug report time. DO NOT MERGE.

BUG: 31828706
BUG: 30832947

Change-Id: I0a4b1fcce91caa96ccbc4e890d9968e3033487de
(cherry picked from commit f87959e00732d7d737527f1248a71adea99ae29d)

7 years agoMerge "Add "ip xfrm policy" to dumpstate output" into nyc-mr1-dev
Erik Kline [Fri, 30 Sep 2016 17:04:03 +0000 (17:04 +0000)]
Merge "Add "ip xfrm policy" to dumpstate output" into nyc-mr1-dev
am: a4bb5c7173

Change-Id: Iad51735819ce9e2d57072e657aa99d471b5baedc

7 years agoAdd "ip xfrm policy" to dumpstate output
Erik Kline [Fri, 30 Sep 2016 17:04:02 +0000 (17:04 +0000)]
Add "ip xfrm policy" to dumpstate output
am: 53ca94ab34

Change-Id: I0b7b5f39acd68f0e176b4c684c108c7d906e5515

7 years agoMerge "Add "ip xfrm policy" to dumpstate output" into nyc-mr1-dev
TreeHugger Robot [Fri, 30 Sep 2016 17:00:16 +0000 (17:00 +0000)]
Merge "Add "ip xfrm policy" to dumpstate output" into nyc-mr1-dev

7 years agoEGL: check that display is still valid
Jesse Hall [Wed, 28 Sep 2016 23:01:38 +0000 (23:01 +0000)]
EGL: check that display is still valid
am: d6e9946cdd

Change-Id: I6d5f5e6f4790f16c1bd52f96743c7e138973a1b4

7 years agoEGL: check that display is still valid
Jesse Hall [Wed, 28 Sep 2016 18:26:57 +0000 (11:26 -0700)]
EGL: check that display is still valid

Bug: 31522731
Change-Id: I84d82e55aba5b58dfdbcac9e208c36767fbedfd1

7 years agoAdd "ip xfrm policy" to dumpstate output
Erik Kline [Wed, 28 Sep 2016 08:26:26 +0000 (17:26 +0900)]
Add "ip xfrm policy" to dumpstate output

Bug: 30869013
Change-Id: I1f0e5d820f0153484c38ecb0f9c764fca02d786c

7 years agoMerge "[sensorservice] Fix inconsistent states in SensorDevice" into cw-f-dev
Peng Xu [Wed, 28 Sep 2016 03:31:35 +0000 (03:31 +0000)]
Merge "[sensorservice] Fix inconsistent states in SensorDevice" into cw-f-dev

7 years agoAdd socket dumps via ss to bugreports.
Lorenzo Colitti [Tue, 27 Sep 2016 13:14:25 +0000 (13:14 +0000)]
Add socket dumps via ss to bugreports.
am: d3b809baff

Change-Id: I85daa9d7faf6cb0067955d235e4f12fe807adf5c

7 years ago[sensorservice] Fix inconsistent states in SensorDevice
Peng Xu [Mon, 26 Sep 2016 18:28:32 +0000 (11:28 -0700)]
[sensorservice] Fix inconsistent states in SensorDevice

This CL avoids inconsistent disabled client list when sensorservice
is in restricted mode and a restricted sensor event connection is
destroyed.

The inconsistency can cause registerLister error in sensor CTS.

Also removed the additional logging message since they are no longer
necessary.

Bug: 28533594

Test: Running "cts-tradefed run singleCommand cts-dev --module
CtsHardwareTestCases --test android.hardware.cts.SensorBatchingTests"
continuously while keep registering and unregistering sensor listener
in a separate app (e.g. enable BreakIt mode in SensorLogger).

Change-Id: I601aea87c88511f5543a80c4921ee4822cb89dff

7 years agoAdd socket dumps via ss to bugreports.
Lorenzo Colitti [Mon, 26 Sep 2016 04:37:45 +0000 (13:37 +0900)]
Add socket dumps via ss to bugreports.

Bug: 23113288
Change-Id: I6304425f968fcb22c75c3f6e64bf7992e34e0889

7 years agoMerge "Surface: Add force disconnection method." into nyc-mr1-dev
Rob Carr [Thu, 22 Sep 2016 23:24:12 +0000 (23:24 +0000)]
Merge "Surface: Add force disconnection method." into nyc-mr1-dev
am: 6cc1933af9

Change-Id: Ice30ea86acd7abfa71c0053dc1459361b4bbfb6c

7 years agoSurface: Add force disconnection method.
Robert Carr [Thu, 22 Sep 2016 23:24:11 +0000 (23:24 +0000)]
Surface: Add force disconnection method.
am: 97b9c86338

Change-Id: Ia9f9dbdcbd9527d54dacb2cdc90eda443230e8d9

7 years agoRecursively restorecon when SELinux label changes.
Jeff Sharkey [Thu, 22 Sep 2016 22:41:00 +0000 (22:41 +0000)]
Recursively restorecon when SELinux label changes.
am: 993de79607

Change-Id: Ibf9b6beaa58e7e6c2f006e8c6f064330624eb29f

7 years agoMerge "Surface: Add force disconnection method." into nyc-mr1-dev
Rob Carr [Thu, 22 Sep 2016 21:17:40 +0000 (21:17 +0000)]
Merge "Surface: Add force disconnection method." into nyc-mr1-dev

7 years agoMerge "Dumpstate should hold a wakelock to save bug report time." into cw-f-dev
Wei Liu [Thu, 22 Sep 2016 18:37:22 +0000 (18:37 +0000)]
Merge "Dumpstate should hold a wakelock to save bug report time." into cw-f-dev

7 years agoRecursively restorecon when SELinux label changes.
Jeff Sharkey [Wed, 21 Sep 2016 00:21:42 +0000 (18:21 -0600)]
Recursively restorecon when SELinux label changes.

PackageManager has been pretty aggressive about asking installd to
restorecon over app data when it thinks something might have
changed.  However, in the vast majority of cases these are no-op
requests, and we waste a bunch of time recursively walking all
private data, easily costing 60+ seconds on dogfooder devices.

This change updates the initial "create_app_data" command to kick off
a recursive restorecon if it detects that the top-level SELinux label
on the app private data directory changes.  The "create_app_data"
command is designed to ensure that an app's storage is ready, so
PackageManager always calls it at least once per boot before apps
can run.  (This change means that PackageManager no longer needs to
make separate "restorecon_app_data" calls.)

Test: booted, verified that a label change triggered restorecon
Bug: 30768146
Change-Id: I0c8d4018cf8ff888d0ae07a82adc3d61a6002aad

7 years agoMerge "Show masked value for sensor with permission" into cw-f-dev
Ashutosh Joshi [Wed, 21 Sep 2016 19:16:55 +0000 (19:16 +0000)]
Merge "Show masked value for sensor with permission" into cw-f-dev

7 years agoHWC2On1: Fall back to GLES for SolidColor
Dan Stoza [Fri, 16 Sep 2016 19:45:01 +0000 (19:45 +0000)]
HWC2On1: Fall back to GLES for SolidColor
am: 5df47cb648

Change-Id: I485ae0aa189b5338f6f98dd3c716dd87dac60ab1

7 years agoHWC2On1: Fall back to GLES for SolidColor
Dan Stoza [Thu, 15 Sep 2016 23:38:42 +0000 (16:38 -0700)]
HWC2On1: Fall back to GLES for SolidColor

Even though SolidColor layers map cleanly to HWC_BACKGROUND composition
in HWC1, SurfaceFlinger never used HWC_BACKGROUND, so we can't trust
that HWC1 devices implemented it correctly. To preserve backwards
compatibility, this changes the behavior to fall back to client
composition to minimize incompatibilities with existing devices.

Bug: 30479781
Change-Id: I638339062e03f2c057b3e1624e7157587ddee7ec

7 years agoDumpstate should hold a wakelock to save bug report time.
Wei Liu [Fri, 26 Aug 2016 21:51:42 +0000 (14:51 -0700)]
Dumpstate should hold a wakelock to save bug report time.

b/30832947

Change-Id: I0a4b1fcce91caa96ccbc4e890d9968e3033487de