From 8aa379e0eb2aa87129e8d95751eb5cdd5a435d38 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Tue, 4 Apr 2017 18:12:27 -0700 Subject: [PATCH] Make sure pending cookie persistence canceled When a full app is uninstalled we delete its instant app cookie but were not canceling a pending write which ended up having the written cookie file after the app is uninstalled. Test: InstantCookieHostTest#testCookieResetOnNonInstantReinstall bug:36455310 Change-Id: Iec6d1f95f8ff731885241913808daf12ce3a5587 --- services/core/java/com/android/server/pm/InstantAppRegistry.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/pm/InstantAppRegistry.java b/services/core/java/com/android/server/pm/InstantAppRegistry.java index 0ae5f314d4736..89a303d21413c 100644 --- a/services/core/java/com/android/server/pm/InstantAppRegistry.java +++ b/services/core/java/com/android/server/pm/InstantAppRegistry.java @@ -272,6 +272,7 @@ class InstantAppRegistry { } else { // Deleting an app prunes all instant state such as cookie deleteDir(getInstantApplicationDir(pkg.packageName, userId)); + mCookiePersistence.cancelPendingPersistLPw(pkg, userId); removeAppLPw(userId, ps.appId); } }