Ignore sharedUserId when package already left shared UID

After a package has left shared UID, its non-shared UID state should be
preserved after the next scan (e.g. reboot or an APK upgrade), or else
the app would observe data loss.

Bug: 235460457
Test: atest CtsSharedUserMigrationTestCases
Change-Id: I128ee864edfbcd609dcd8e9d8ce919198052321e
(cherry picked from commit f43da6d00aefe9a2c545910760a3689e2eee0005)
Merged-In: I128ee864edfbcd609dcd8e9d8ce919198052321e
1 file changed