Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 32e9cd9b authored by William Loh's avatar William Loh
Browse files

Fix appMetadataFilePath when restoring system app

When restoring a disabled system app the appMetadataFilePath field was
not being copied over from the disabled PackageSetting to the new
PackageSetting. This is now copied over in enableSystemPackageLPw.

The appMetadataFilePath was also being set in commitPackageSettings
which is shared code path for both installs and restores. This was
causing the appMetadataFilePath to be set to null when restoring. Moved
the relevant code instead to commitPackagesLocked so that it only sets
for installs and not restores.

Also added GET_APP_METADATA permission check to guard the
get-app-metadata adb command.

Bug: 281589646
Test: Manual
Test: atest android.packageinstaller.install.cts.InstallAppMetadataTest
Change-Id: I69b90d61b1f53f8eaefc2adf719eca99f77e81ea
parent c0d1de11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment