diff options
| author | 2019-07-31 14:30:04 -0700 | |
|---|---|---|
| committer | 2019-07-31 14:30:04 -0700 | |
| commit | 5e5a52d18829d28e2a58925431c8237787ad7e2f (patch) | |
| tree | 1341e7626479f75c1a305a0dbe1e981832789515 | |
| parent | 1f8702c05bf04a1ae144632d98ebd6e85063c7da (diff) | |
| parent | 7976aee698ef7d916faa1f6457ba0caedc611d0b (diff) | |
Merge changes from topic "libbinder-bitness-header" into stage-aosp-master am: baa900adda am: a879c6860a
am: 7976aee698
Change-Id: Iaaddf7e945f673450e9d5055677c1a9a1b4a00f4
| -rw-r--r-- | core/tests/coretests/src/android/os/ParcelTest.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/core/tests/coretests/src/android/os/ParcelTest.java b/core/tests/coretests/src/android/os/ParcelTest.java index 0eba2edbb3c3..46873b9eb70b 100644 --- a/core/tests/coretests/src/android/os/ParcelTest.java +++ b/core/tests/coretests/src/android/os/ParcelTest.java @@ -43,8 +43,8 @@ public class ParcelTest { // WorkSource can be updated. p.writeInterfaceToken(INTERFACE_TOKEN_1); - assertEquals(true, p.replaceCallingWorkSourceUid(WORK_SOURCE_1)); - assertEquals(WORK_SOURCE_1, p.readCallingWorkSourceUid()); + assertEquals(true, p.replaceCallingWorkSourceUid(WORK_SOURCE_2)); + assertEquals(WORK_SOURCE_2, p.readCallingWorkSourceUid()); // WorkSource can be updated to unset value. assertEquals(true, p.replaceCallingWorkSourceUid(Binder.UNSET_WORKSOURCE)); @@ -56,18 +56,16 @@ public class ParcelTest { @Test public void testCallingWorkSourceUidAfterEnforce() { Parcel p = Parcel.obtain(); - // Write headers manually so that we do not invoke #writeInterfaceToken. - p.writeInt(1); // strict mode header - p.writeInt(WORK_SOURCE_1); // worksource header. - p.writeString(INTERFACE_TOKEN_1); // interface token. + p.writeInterfaceToken(INTERFACE_TOKEN_1); + assertEquals(true, p.replaceCallingWorkSourceUid(WORK_SOURCE_1)); p.setDataPosition(0); p.enforceInterface(INTERFACE_TOKEN_1); assertEquals(WORK_SOURCE_1, p.readCallingWorkSourceUid()); // WorkSource can be updated. - assertEquals(true, p.replaceCallingWorkSourceUid(WORK_SOURCE_1)); - assertEquals(WORK_SOURCE_1, p.readCallingWorkSourceUid()); + assertEquals(true, p.replaceCallingWorkSourceUid(WORK_SOURCE_2)); + assertEquals(WORK_SOURCE_2, p.readCallingWorkSourceUid()); p.recycle(); } |