summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorHai Zhang <zhanghai@google.com>2020-11-30 17:03:09 -0800
committerHai Zhang <zhanghai@google.com>2020-12-01 16:54:29 -0800
commit1cd2eb673a4af8b3c16814c99353707b6d4c4981 (patch)
tree76eaa6c3081858c3ceaec490a497384763c833c9 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentea789fd6b1dd8f36059fcb930d10b861dcd19131 (diff)
Refactor updatePermissions() into onPackageInstalled().
1. For the case where a dangling system PackageSetting is left without a (disabled) factory package, the previous logic was to remove its data directory before ag/920260, which deferred the removal into reconcileAppsDataLI(). However, there are more package related states that should be cleaned up apart from the data directory, hence ag/7278993 added a call to removePackageDataLIF() for the similar case when handling dangling updated system apps. Meanwhile, ag/11872632 was later submitted to remove the permission state for this case of factory packages, but still, it seems more consistent to also call removePackageDataLIF() for consistency and better cleanup. 2. For enableCompressedPackage() and installPackageFromSystemLIF(), they are simply changed from calling updatePermissions() to call onPackageInstalled() with no additional permission granting. 3. onPackageInstalled() is changed to call updatePermissions() as the first thing, and updatePermissions() is removed from the internal API. 4. The call to updatePermissions() is removed from updateSettingsInternalLI(), because the only call path into it goes back to processInstallRequestsAsync(), which will always call restoreAndPostInstall() which goes into handlePackagePostInstall() and call onPackageInstalled() there. Packages needs to go through handlePackagePostInstall() to get their permission allowlisted/granted anyway so not calling updatePermissions() again earlier shouldn't be a problem. Bug: 158736025 Test: presubmit Test: manual Test: adb remount and push an APK to /system/priv-app Test: adb reboot and verify package is system package Test: flash a build with this change so that system partition is reset and app is gone Test: onPackageInstalled() logged stacktrace for being called and package setting is removed. Change-Id: Id68428b3aca18c0badee58d1a57663510db438e9
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions