Update persist cache when package updated.

Fix a bug where an old package does not have RECEIVE_BOOT_COMPLETED permission but a new application has this permission and still crashes.

Change-Id: I20f76b50b5f3cfe85ba633e74f098b8029d4ee14
Merged-In: I20f76b50b5f3cfe85ba633e74f098b8029d4ee14
This commit is contained in:
张倞诚 2023-03-07 08:50:21 +00:00
parent 44102a405a
commit 536184a9e1

View File

@ -906,6 +906,10 @@ public class JobSchedulerService extends com.android.server.SystemService
synchronized (mLock) {
mUidToPackageCache.remove(uid);
}
} else {
synchronized (mJobSchedulerStub.mPersistCache) {
mJobSchedulerStub.mPersistCache.remove(pkgUid);
}
}
} else if (Intent.ACTION_PACKAGE_FULLY_REMOVED.equals(action)) {
if (DEBUG) {