commit | e36343738851a9d3ef0e3509c4f826539398183a | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 29 22:36:51 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 29 22:36:51 2022 +0000 |
tree | 5f27675da9b8a57b073b491b333fed68bba91cfa | |
parent | 119607f9390b7a08b91d06c57779fb556b59b3a4 [diff] | |
parent | 14de8c051f132d41042808fc6a0a1c394660b469 [diff] |
Merge cherrypicks of [19295567] into tm-release. Change-Id: Ief1d4e61a3151cce6f6bc577dec0b89e2b24d313
diff --git a/tests/tests/uidmigration/src/android/uidmigration/cts/SharedUserMigrationTest.kt b/tests/tests/uidmigration/src/android/uidmigration/cts/SharedUserMigrationTest.kt index 1f7af46..94fc698 100644 --- a/tests/tests/uidmigration/src/android/uidmigration/cts/SharedUserMigrationTest.kt +++ b/tests/tests/uidmigration/src/android/uidmigration/cts/SharedUserMigrationTest.kt
@@ -87,6 +87,11 @@ assertTrue(pkgs.sameAs(Const.INSTALL_TEST_PKG2)) pkgInfo = mPm.getPackageInfo(Const.INSTALL_TEST_PKG, FLAG_ZERO) assertNull(pkgInfo.sharedUserId) + // Upgrading an APK with sharedUserMaxSdkVersion set should not change its UID. + assertTrue(installPackage(InstallTest.APK4)) + val newPkgInfo = mPm.getPackageInfo(Const.INSTALL_TEST_PKG, FLAG_ZERO) + assertNull(newPkgInfo.sharedUserId) + assertEquals(pkgInfo.applicationInfo.uid, newPkgInfo.applicationInfo.uid) } private fun testBestEffort(uid: Int) {