OSDN Git Service

android-x86/frameworks-native.git
5 years agolibui: add boundary check to GraphicBuffer::unflatten
Chia-I Wu [Tue, 9 Oct 2018 22:22:46 +0000 (15:22 -0700)]
libui: add boundary check to GraphicBuffer::unflatten

Commit cb496acbe593326e8d5d563847067d02b2df40ec removed the boundary
check by accident.

Bug: 114223584
Test: manual
Change-Id: I057bc02d5807e438530d1a5327c2e02b9d154151

6 years agoMerge changes from topic "am-27943b02-3710-49e4-84f6-eabc78fdbe01" into oc-dev
Martijn Coenen [Fri, 11 May 2018 10:04:01 +0000 (03:04 -0700)]
Merge changes from topic "am-27943b02-3710-49e4-84f6-eabc78fdbe01" into oc-dev
am: 4a1214cbbd

Change-Id: I360013fdd9e679c39ecf9899e547e448ce55b27f

6 years agoMerge changes from topic "am-27943b02-3710-49e4-84f6-eabc78fdbe01" into oc-dev
TreeHugger Robot [Fri, 11 May 2018 09:53:53 +0000 (09:53 +0000)]
Merge changes from topic "am-27943b02-3710-49e4-84f6-eabc78fdbe01" into oc-dev

* changes:
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e am: a01397282d am: 6fccb21cd7 am: f6384b4a10 am: 04ab0619be
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e am: a01397282d am: 6fccb21cd7 am: f6384b4a10
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e am: a01397282d am: 6fccb21cd7
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e am: a01397282d
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47
  [automerger] Don't pad before calling writeInPlace(). am: 732132b765
  Don't pad before calling writeInPlace().

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Michael Wachenschwanz [Tue, 1 May 2018 01:31:03 +0000 (18:31 -0700)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd am: 21c05cbf8f am: 0f23470ebc am: 4af41a2977 am: 75061f171d am: d9d1fbf29a am: e1794e5b42 am: 634696f9e8
am: c78029ca3d

Change-Id: Ia2288e1134ecc539dfb4e63c941f1ff0ac35dfe9

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:32 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd am: 21c05cbf8f am: 0f23470ebc am: 4af41a2977 am: 75061f171d am: d9d1fbf29a am: e1794e5b42 am: 634696f9e8

Change-Id: I87fa509ed5691bc801ebaa8091dfef43aab8cac6

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:31 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd am: 21c05cbf8f am: 0f23470ebc am: 4af41a2977 am: 75061f171d am: d9d1fbf29a am: e1794e5b42

Change-Id: Ie99fa624313b7a9481426470138abfa42c973487

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:30 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd am: 21c05cbf8f am: 0f23470ebc am: 4af41a2977 am: 75061f171d am: d9d1fbf29a

Change-Id: I22b2eba7d3b5e34457e622feeb4a4992b33a54fa

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:29 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd am: 21c05cbf8f am: 0f23470ebc am: 4af41a2977 am: 75061f171d

Change-Id: I40d5e7268965e48d8bb7da9fdad42dffe17c7881

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:27 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd am: 21c05cbf8f am: 0f23470ebc am: 4af41a2977

Change-Id: I0440d06e468f1eb3cc0add6947653159a5cf60d4

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:26 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd am: 21c05cbf8f am: 0f23470ebc

Change-Id: Ie598c4fb14b0b2c12e5573ff1c4e4a3d70b191c6

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:25 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd am: 21c05cbf8f

Change-Id: I41fe9b982b47c06069c801571ee80f6ed8efbb38

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1...
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:24 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1 am: 7ae915f9bd

Change-Id: I52bc4ae176c145ceaac935629727e3979a905de2

6 years ago[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1
Android Build Merger (Role) [Wed, 18 Apr 2018 20:08:22 +0000 (20:08 +0000)]
[automerger] Increment when attempting to read protected Parcel Data am: 6a825e8ad1

Change-Id: I8af403ccdcf03f14cfc27be9809092accd16a0bf

6 years agoIncrement when attempting to read protected Parcel Data
Michael Wachenschwanz [Tue, 17 Apr 2018 23:52:40 +0000 (16:52 -0700)]
Increment when attempting to read protected Parcel Data

Make sure to increment the parcel data position even when trying to
improperly read from protected data

Bug: 29833520

Test (M): cts-tradefed run cts -c android.os.cts.ParcelTest -m testBinderDataProtection
Test (M): cts-tradefed run cts -c android.os.cts.ParcelTest -m testBinderDataProtectionIncrements
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest#testBinderDataProtection
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest#testBinderDataProtectionIncrements

Change-Id: Ie4aae6277fc5f5c924f603d9828c3a608998b986
Merged-In: Ie4aae6277fc5f5c924f603d9828c3a608998b986

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47...
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:42 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e am: a01397282d am: 6fccb21cd7 am: f6384b4a10 am: 04ab0619be

Change-Id: Id2ecf4e01ae29b991fa54794f830ad1cc82a7d22

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47...
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:41 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e am: a01397282d am: 6fccb21cd7 am: f6384b4a10

Change-Id: Iaea7823dc4edb28184d64945779b0b9d4f181244

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47...
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:40 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e am: a01397282d am: 6fccb21cd7

Change-Id: Id867385a5a598489152c7b978cfd40e726f7dfb9

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47...
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:39 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e am: a01397282d

Change-Id: Ic33c5a73fa98f2310c22c4efc83764a69708f44b

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47...
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:38 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0 am: 32da4bbe1e

Change-Id: Idc1c74bc23e6de9a7d0232ef4e557f52e3701d84

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47...
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:37 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4 am: 953b08b7c0

Change-Id: Ic029be2236a7ec7f4425b0f3095274c78d35ea3b

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47...
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:36 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47 am: 325909a4e4

Change-Id: Ibf77228b5793e53cdf5a2d2e2953425b7b3fb614

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:35 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765 am: a6a5c3fa47

Change-Id: I729908048f3ba8fea012dda2888bf8f42b6dada8

6 years ago[automerger] Don't pad before calling writeInPlace(). am: 732132b765
Android Build Merger (Role) [Mon, 16 Apr 2018 18:57:33 +0000 (18:57 +0000)]
[automerger] Don't pad before calling writeInPlace(). am: 732132b765

Change-Id: Iccca7f34e2f59bc0c1971978bf87a76d7c123d3f

6 years agoDon't pad before calling writeInPlace().
Martijn Coenen [Wed, 4 Apr 2018 09:46:56 +0000 (11:46 +0200)]
Don't pad before calling writeInPlace().

writeInplace() itself already pads securely, by masking off
the padded bytes. If the padding is done before calling
writeInplace(), no mask is applied, and heap data can leak.

Bug: 77237570
Test: builds
Change-Id: Ide27a0002d4ed4196530430760245b971f6a3f44
Merged-In: Ide27a0002d4ed4196530430760245b971f6a3f44

(cherry picked from commit f8542381b72a7bb2452a5278a00ca8c34edbf8a0)

6 years ago[automerger skipped] [automerger] Disallow reading object data from Parcels with...
akirilov [Wed, 11 Apr 2018 00:21:55 +0000 (17:21 -0700)]
[automerger skipped] [automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5 am: 22b5950994 am: f4dc4cd4a3 am: 81a160b19e am: 2d14de5c70 am: 9f92221278 am: 2de1de1499 skipped: e6373f11f4
am: 2944d59824  -s ours

Change-Id: I3679b7c54bbdde41b2af0981dbae26ceb7a4b624

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 18:28:04 +0000 (18:28 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5 am: 22b5950994 am: f4dc4cd4a3 am: 81a160b19e am: 2d14de5c70 am: 9f92221278 am: 2de1de1499 skipped: e6373f11f4

Change-Id: Id000a2b1420765de1ca26d73f7bbe098b313033c

6 years agoDisallow reading object data from Parcels with non-object reads
Michael Wachenschwanz [Tue, 10 Apr 2018 17:56:34 +0000 (10:56 -0700)]
Disallow reading object data from Parcels with non-object reads
am: c517681c66

Change-Id: Ice4fc19864ae5d8d832a0d2f85406f338e346f5e

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 17:54:22 +0000 (17:54 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5 am: 22b5950994 am: f4dc4cd4a3 am: 81a160b19e am: 2d14de5c70 am: 9f92221278 am: 2de1de1499

Change-Id: Id8d3aa4511e46c119e1a59a9c50d5f47164600bc

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 17:54:21 +0000 (17:54 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5 am: 22b5950994 am: f4dc4cd4a3 am: 81a160b19e am: 2d14de5c70 am: 9f92221278

Change-Id: I395dac225043d260eec457970ac609ecf8dec446

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 17:54:20 +0000 (17:54 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5 am: 22b5950994 am: f4dc4cd4a3 am: 81a160b19e am: 2d14de5c70

Change-Id: I675e00460fcd5015897db7ea364f5e94e80335d0

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 17:54:19 +0000 (17:54 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5 am: 22b5950994 am: f4dc4cd4a3 am: 81a160b19e

Change-Id: I7c8569f04b6d7e0524afbe959bdc7171a660de98

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 17:54:18 +0000 (17:54 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5 am: 22b5950994 am: f4dc4cd4a3

Change-Id: Ib5cdb798a65437c13778a9d2fb7816144642fa16

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 17:54:17 +0000 (17:54 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5 am: 22b5950994

Change-Id: Ia4f15258461e917461006ccb0d274a7c8211efeb

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 17:54:16 +0000 (17:54 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17 am: c6ae5cf9c5

Change-Id: Ia4a664f4afc8ccdffd63a13c4be32a9de9fe2bad

6 years ago[automerger] Disallow reading object data from Parcels with non-object reads am:...
Android Build Merger (Role) [Tue, 10 Apr 2018 17:54:15 +0000 (17:54 +0000)]
[automerger] Disallow reading object data from Parcels with non-object reads am: f784183c17

Change-Id: I603df899d072f3048ebcaa82e2f87aa0f549cb99

6 years agoDisallow reading object data from Parcels with non-object reads
Michael Wachenschwanz [Sat, 18 Nov 2017 02:25:05 +0000 (18:25 -0800)]
Disallow reading object data from Parcels with non-object reads

The check added to each non-object reads adds an overhead. If the
objects (binders and file descriptors) were written to the Parcel in
sequential order then check adds a small O(1) overhead to each read,
plus an O(N) overhead to the first read (to verify the N objects were
added in order).
If the objects were written out of order (as in by jumping around the Parcel
with setDataPosition and writing Binder, DON'T DO THIS!!) (writing non
objects out of order is fine), the first read is forced to sort the objects
in the internal bookkeeping. Based on the assumption non sequential writes
are infrequent and overall Parcels are probably mostly sorted, insertion
sort was used. Worst case sorts will add an O(N^2) overhead to the first
non object read from the Parcel.

Test: run cts -m CtsOsTestCases -t android.os.cts.ParcelTest

Bug: 29833520
Change-Id: I82de8eb5f5eb56f869542d5358e96884c24301b2

6 years agoDisallow reading object data from Parcels with non-object reads
akirilov [Tue, 3 Apr 2018 19:56:06 +0000 (12:56 -0700)]
Disallow reading object data from Parcels with non-object reads

The check added to each non-object reads adds an overhead. If the
objects (binders and file descriptors) were written to the Parcel in
sequential order then check adds a small O(1) overhead to each read,
plus an O(N) overhead to the first read (to verify the N objects were
added in order).
If the objects were written out of order (as in by jumping around the Parcel
with setDataPosition and writing Binder, DON'T DO THIS!!) (writing non
objects out of order is fine), the first read is forced to sort the objects
in the internal bookkeeping. Based on the assumption non sequential writes
are infrequent and overall Parcels are probably mostly sorted, insertion
sort was used. Worst case sorts will add an O(N^2) overhead to the first
non object read from the Parcel.

Test: run cts -m CtsOsTestCases -t android.os.cts.ParcelTest

Bug: 29833520
Change-Id: Id0119caf530023fe8b61be6d15f5b6a9c49c08df
Merged-In: I82de8eb5f5eb56f869542d5358e96884c24301b2

6 years agoAdd bounds check to sensors direct channel creation
Brian Duddie [Sat, 10 Mar 2018 01:57:28 +0000 (01:57 +0000)]
Add bounds check to sensors direct channel creation
am: 0eb4624b33

Change-Id: I903acbba3c3ca5513b43419246bf277c013a7f8c

6 years agoAdd bounds check to sensors direct channel creation
Brian Duddie [Thu, 15 Feb 2018 23:02:29 +0000 (15:02 -0800)]
Add bounds check to sensors direct channel creation

Avoids attempting to read a 0-size array during input validation. Adds
SafetyNet logging when this is triggered.

Also, change the cast for the ashmem size check from int to int64_t to
avoid potential conversion to negative number on 32-bit systems.

Bug: 70986337
Test: run POC, confirm via logs that function bails early
Change-Id: I674285738983f18de3466f9e818d83dabe269b7d

6 years ago[automerger] Merge "Add binderLibTest_IPC_32" into oreo-vts-dev am: f9439589f4 ...
Android Build Merger (Role) [Tue, 23 Jan 2018 22:54:16 +0000 (22:54 +0000)]
[automerger] Merge "Add binderLibTest_IPC_32" into oreo-vts-dev am: f9439589f4  -s ours am: 11e6a7f0e8

Change-Id: I5f47ef52d4bd18383d5eec7ce6ea30bb6721a7e8

6 years agoMerge "Add binderLibTest_IPC_32" into oreo-vts-dev
Hsin-Yi Chen [Tue, 23 Jan 2018 22:53:52 +0000 (22:53 +0000)]
Merge "Add binderLibTest_IPC_32" into oreo-vts-dev
am: f9439589f4  -s ours

Change-Id: Ib020c68f0cbf6b32117c35c8bf43b36be96d5f79

6 years ago[automerger] Merge "Add target binderDriverInterfaceTest_IPC_32" into oreo-vts-dev...
Android Build Merger (Role) [Tue, 23 Jan 2018 22:53:06 +0000 (22:53 +0000)]
[automerger] Merge "Add target binderDriverInterfaceTest_IPC_32" into oreo-vts-dev am: 9d332a7110  -s ours am: 4b0f233673

Change-Id: I5287815ce28df1569d991df2adb3269525e5dd3a

6 years agoMerge "Add target binderDriverInterfaceTest_IPC_32" into oreo-vts-dev
Hsin-Yi Chen [Tue, 23 Jan 2018 22:52:41 +0000 (22:52 +0000)]
Merge "Add target binderDriverInterfaceTest_IPC_32" into oreo-vts-dev
am: 9d332a7110  -s ours

Change-Id: I5c3570a5a050eae9edf34cbdd41b5328924e95f9

6 years agoMerge "Add binderLibTest_IPC_32" into oreo-vts-dev
Treehugger Robot [Tue, 23 Jan 2018 22:18:58 +0000 (22:18 +0000)]
Merge "Add binderLibTest_IPC_32" into oreo-vts-dev

6 years agoMerge "Add target binderDriverInterfaceTest_IPC_32" into oreo-vts-dev
Treehugger Robot [Tue, 23 Jan 2018 22:18:28 +0000 (22:18 +0000)]
Merge "Add target binderDriverInterfaceTest_IPC_32" into oreo-vts-dev

6 years agoAdd binderLibTest_IPC_32
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
Merged-In: I40c738a039459fbfece9689012249ae7ea93df9d
Change-Id: I40c738a039459fbfece9689012249ae7ea93df9d
(cherry picked from commit f6edfc1b096cba544227d85b0ea3f38a4dd11af5)
(cherry picked from commit 75be4a10008a846c74bc30652584b280669c3b85)

6 years agoAdd target binderDriverInterfaceTest_IPC_32
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
Merged-In: Ifad9ef24c35060179650955e24d1f046af7b7385
Change-Id: Ifad9ef24c35060179650955e24d1f046af7b7385
(cherry picked from commit 6929575affc7d0037c79a45b2cb0ef7c6020581a)
(cherry picked from commit 9c3e759479ea9c66919b9a50958b256eb3bbc1ac)

6 years ago[automerger] Merge "Cast binder data type to uint64_t in high bits test" into oreo...
Android Build Merger (Role) [Tue, 23 Jan 2018 22:11:42 +0000 (22:11 +0000)]
[automerger] Merge "Cast binder data type to uint64_t in high bits test" into oreo-vts-dev am: d7e46dddcb  -s ours am: 34cf9bb677

Change-Id: I06375440a61652de87fa7cea238f0e670793458d

6 years agoMerge "Cast binder data type to uint64_t in high bits test" into oreo-vts-dev
Hsin-Yi Chen [Tue, 23 Jan 2018 22:11:16 +0000 (22:11 +0000)]
Merge "Cast binder data type to uint64_t in high bits test" into oreo-vts-dev
am: d7e46dddcb  -s ours

Change-Id: I2429e0d0a29f05281b87d9baa05b69c00e88a4b5

6 years agoMerge "Cast binder data type to uint64_t in high bits test" into oreo-vts-dev
Treehugger Robot [Tue, 23 Jan 2018 22:02:56 +0000 (22:02 +0000)]
Merge "Cast binder data type to uint64_t in high bits test" into oreo-vts-dev

6 years agoCast binder data type to uint64_t in high bits test
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
Merged-In: I4f736bd5b55db5af8598db0d5cd5fbd9ef323448
Change-Id: I4f736bd5b55db5af8598db0d5cd5fbd9ef323448
(cherry picked from commit 7e04edd5b3f0ca9a2d8bca78d5ae70c09b623299)
(cherry picked from commit 3b7d54dd791dfb58b6e42429311dd7ec9a4f1bb6)

6 years agosurfaceflinger: make vsync injection more robust
Chia-I Wu [Tue, 31 Oct 2017 18:40:00 +0000 (18:40 +0000)]
surfaceflinger: make vsync injection more robust
am: 6200eacdc9

Change-Id: Ie04e3e56b035ea9e52038de49a2e5c2e67c8abe2

6 years agosurfaceflinger: make vsync injection more robust
Chia-I Wu [Thu, 5 Oct 2017 21:24:41 +0000 (14:24 -0700)]
surfaceflinger: make vsync injection more robust

There are more issues than I expected :)

 - no lock to synchronize enable/disable and injection
 - Every time injection is diabled and enabled, a new EventThread is
   created
 - mCallback might be nullptr
 - ENABLE_VSYNC_INJECTIONS/INJECT_VSYNC should require special
   permission
 - MessageQueue::setEventThread must be called from the main thread
 - MessageQueue::setEventThread does not handle EventThread switch
   well

Bug: 65483324
Test: manual
Merged-In: I7d7b98d1f57afc64af0f2065a9bc7c8ad004ca9f
Change-Id: I7d7b98d1f57afc64af0f2065a9bc7c8ad004ca9f

6 years agoAdd new color setting
Romain Guy [Tue, 24 Oct 2017 20:40:32 +0000 (21:40 +0100)]
Add new color setting

On devices that support wide color rendering and color management,
add a new setting to disable color management ("saturated" color
mode). To disable color management, the framework can set a persistent
property. Color management can be also toggled by using a Binder
transaction. Finally this change adds a new Binder query so Settings
can easily check whether the device supports wide color rendering.

Bug: 68159303
Test: manual (adb shell + apps)
Change-Id: If74d9b0273bc04f4a3d11e63fe2ec96451fbcc2e
(cherry picked from commit 54f154a28284eabb52ade2689d4a9f8fa190163b)

6 years agoMerge "Add a new keycode for TV (ALL_APPS)" into oc-dev
Sujith Ramakrishnan [Thu, 7 Sep 2017 02:00:12 +0000 (02:00 +0000)]
Merge "Add a new keycode for TV (ALL_APPS)" into oc-dev
am: 6afce442ea

Change-Id: I7933009ee4c64025245373ee6b5ad1b0d77291e9

6 years agoMerge "Add a new keycode for TV (ALL_APPS)" into oc-dev
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

6 years agoAdd a new keycode for TV (ALL_APPS)
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

6 years agoMerge "surfaceflinger: fix a nullptr dereference" into oc-dev
Chia-I Wu [Thu, 17 Aug 2017 23:54:07 +0000 (23:54 +0000)]
Merge "surfaceflinger: fix a nullptr dereference" into oc-dev
am: 29e5fa3fda

Change-Id: I8b183fcc791880d464847340b8024a81d9f3b498

6 years agoMerge "surfaceflinger: fix a nullptr dereference" into oc-dev
TreeHugger Robot [Thu, 17 Aug 2017 23:35:14 +0000 (23:35 +0000)]
Merge "surfaceflinger: fix a nullptr dereference" into oc-dev

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
Siarhei Vishniakou [Wed, 16 Aug 2017 22:00:38 +0000 (22:00 +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
am: ce50585702  -s ours

Change-Id: Ifa1dac1ddb5c9ab76527f90e1ca900b79215f5da

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8 am: 3cc2b38fe3...
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea am: f431a7cbf8
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

6 years agoRemove window obscurement information. am: ff7dd3b9ea
Siarhei Vishniakou [Wed, 16 Aug 2017 20:32:41 +0000 (20:32 +0000)]
Remove window obscurement information. am: ff7dd3b9ea
am: f431a7cbf8

Change-Id: Ifdaed9e6e75c06fc89b042c37ded20b2b273531b

6 years agoRemove window obscurement information.
Siarhei Vishniakou [Wed, 16 Aug 2017 20:24:33 +0000 (20:24 +0000)]
Remove window obscurement information.
am: ff7dd3b9ea

Change-Id: I3da41df019f3d660a5fd10d1f4239846158c62fe

6 years agoRevert "Postpone color mode change until after boot animation"
Thierry Strudel [Mon, 14 Aug 2017 22:19:37 +0000 (15:19 -0700)]
Revert "Postpone color mode change until after boot animation"

This reverts commit c53d3558d55dfd1d1c424b0d632fea693113e83e.

To have better control on when the color shift is happening, the
bootloader asset will be aligned with the Android OS applied
saturation. So apply the color setting as soon as SF is up.

Bug: 63520186
Bug: 63823274
Test: Verify that sRGB is applied at the start of boot animation
Change-Id: I611eb61266c909fde50e7ea2b4c1314541228736

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
Siarhei Vishniakou [Fri, 11 Aug 2017 02:30:36 +0000 (02:30 +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
am: dfe44a12ab

Change-Id: I90f59bd979e33e39a9f9cfa8ca8f58d93a00994f

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
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

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
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

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
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

6 years agosurfaceflinger: fix a nullptr dereference
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)

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
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

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
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

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
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

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
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

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737 am...
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

6 years ago[automerger] DO NOT MERGE Remove window obscurement information. am: edac95e737
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

6 years agoDO NOT MERGE Remove window obscurement information. am: 5508ca2c19 am: 3847972ad2...
Siarhei Vishniakou [Thu, 10 Aug 2017 20:41:09 +0000 (20:41 +0000)]
DO NOT MERGE Remove window obscurement information. am: 5508ca2c19 am: 3847972ad2 am: cd71708eca am: 88855f8de7 am: 41f75ecb79  -s ours
am: d0cd82abe9

Change-Id: I4727fefa936cbafaa2a2d138909ae0a468d76c32

6 years agoDO NOT MERGE Remove window obscurement information. am: 5508ca2c19 am: 3847972ad2...
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

6 years agoDO NOT MERGE Remove window obscurement information. am: 5508ca2c19 am: 3847972ad2...
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

6 years agoDO NOT MERGE Remove window obscurement information. am: 5508ca2c19 am: 3847972ad2
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

6 years agoDO NOT MERGE Remove window obscurement information. am: 5508ca2c19
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

6 years agoDO NOT MERGE Remove window obscurement information.
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

6 years agoMerge "Fix DEQP failure regarding VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT:" into...
TreeHugger Robot [Thu, 10 Aug 2017 06:40:10 +0000 (06:40 +0000)]
Merge "Fix DEQP failure regarding VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT:" into oc-dr1-dev

6 years agoCast binder data type to uint64_t in high bits test
Hsin-Yi Chen [Thu, 10 Aug 2017 06:03:47 +0000 (06:03 +0000)]
Cast binder data type to uint64_t in high bits test
am: 7e04edd5b3

Change-Id: Idad9b44edb27f34ac1bebebfe07b1246c348804e

6 years agoFix DEQP failure regarding VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT:
Courtney Goeltzenleuchter [Mon, 7 Aug 2017 23:13:04 +0000 (17:13 -0600)]
Fix DEQP failure regarding VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT:

Needed to teach GetNativeDataspace about the new color space.
Bug: 64402817
Test: adb -s HT7391A00040 -d shell am start \
    -n com.drawelements.deqp/android.app.NativeActivity \
    -e cmdLine '"deqp --deqp-case=dEQP-VK.wsi.android.swapchain.* \
    --deqp-log-filename=/sdcard/dEQP-Log.qpa"'

Change-Id: I3fe7fefff1f074656d766f2b24639adcdbfd2fb7
(cherry picked from commit e327e9adfc85028d77d1252746c9ee07ff99f0b3)

6 years agoMerge "Fix out-of-order transactions (2/2)" into oc-dr1-dev
Jorim Jaggi [Wed, 9 Aug 2017 16:10:29 +0000 (16:10 +0000)]
Merge "Fix out-of-order transactions (2/2)" into oc-dr1-dev

6 years agoCast binder data type to uint64_t in high bits test
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

6 years agoFix out-of-order transactions (2/2)
Jorim Jaggi [Tue, 8 Aug 2017 13:22:08 +0000 (15:22 +0200)]
Fix out-of-order transactions (2/2)

The following sequence of order may happen which cause wrong
surface positions:
- WA.animate updates surfaces properties to S
- WA.animate closes the surface transaction
- Since the previous animation transaction wasn't commited yet,
closeSurfaceTransaction blocks and updating the surface properties
on SF side is deferred.
- In the meantime, since we are not holding WM lock, we have
another thread updating surfaces properties to S'
- Closing the transaction in this thread completes immediately
because it's not a synchronous transaction or animation
transaction.
- After a frame has been processed S gets applied on SF side as
the other transaction is done waiting for the frame to complete.

The issue here is that properties are now set to S instead of S'.
Sad!

We originally started calling closeTransaction without the WM
lock being held because it lead to thread starvation (b/38192114).
However, that fix has this big flaw as described above.

To fix this, we create an empty animation transaction before
updating the animation properties to simulate the back-pressuring
behavior of animation transactions without the WM lock being held.
If that transaction arrives out of order, it doesn't matter at all
because it is empty.

After that, we perform the animation udpate in a transaction that
is not marked as an animation transaction, and thus will not
block, which avoids the starvation issue.

Part of this change is also a change in SF to allow executing
empty animation transactions.

Test: go/wm-smoke
Test: Open VideoPlayer from VRCore, close it, observe no wrong
positiioning of surfaces.
Test: Inspect traces while animating. Ensure back pressuring still
works.

Change-Id: Ie545463e71e0d1bc73439d14381077a290d2f959
Fixes: 63905190
Bug: 38192114

6 years agoRemove window obscurement information.
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

6 years agolibsurfaceflinger: fix screenshot permission check
Chia-I Wu [Mon, 7 Aug 2017 22:27:49 +0000 (15:27 -0700)]
libsurfaceflinger: fix screenshot permission check

Fix the logic for layers we check isSecure or isVisible for.  It was
regressed by my previous change to support
WINDOW_TYPE_DONT_SCREENSHOT.

Bug: 63311708
Bug: 62656774
Test: CTS
Change-Id: I7768cb590014cc610ec564847958bbd98742c277

6 years agoMerge "Fix race condition clearing VSYNC enable on VrFlinger startup." into oc-dr1-dev
TreeHugger Robot [Sat, 5 Aug 2017 03:28:04 +0000 (03:28 +0000)]
Merge "Fix race condition clearing VSYNC enable on VrFlinger startup." into oc-dr1-dev

6 years agoDO NOT MERGE Remove window obscurement information.
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