Skip setting installedState to false for apps on adoptable storage

If an adoptable storage is being unmounted, apps are marked for uninstallation with DELETE_KEEP_DATA flag. As such, if an uninstall request comes with DELETE_KEEP_DATA flag, check if the package was installed on adoptable storage and if yes, skip setting installed state explicitly.

Bug: 300267830
Test: atest
android.content.pm.cts.PackageManagerTest#testUninstallWithKeepData
Test: atest CtsAdoptableHostTestCases

Change-Id: Ie3a4b7334a460c1b84901d3f320e4af3defa8873
1 file changed