summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-29 22:36:51 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-29 22:36:51 +0000
commite36343738851a9d3ef0e3509c4f826539398183a (patch)
tree5f27675da9b8a57b073b491b333fed68bba91cfa
parent119607f9390b7a08b91d06c57779fb556b59b3a4 (diff)
parent14de8c051f132d41042808fc6a0a1c394660b469 (diff)
downloadcts-android13-s3-release.tar.gz
Change-Id: Ief1d4e61a3151cce6f6bc577dec0b89e2b24d313
-rw-r--r--tests/tests/uidmigration/src/android/uidmigration/cts/SharedUserMigrationTest.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/tests/uidmigration/src/android/uidmigration/cts/SharedUserMigrationTest.kt b/tests/tests/uidmigration/src/android/uidmigration/cts/SharedUserMigrationTest.kt
index 1f7af462bde..94fc6985c0f 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 @@ class SharedUserMigrationTest {
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) {