summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index a6fa670..c3dd638 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -10054,10 +10054,9 @@ public final class ActivityManagerService extends ActivityManagerNative
} finally {
// Ensure that whatever happens, we clean up the identity state
sCallerIdentity.remove();
+ // Ensure we're done with the provider.
+ removeContentProviderExternalUnchecked(name, null, userId);
}
-
- // We've got the fd now, so we're done with the provider.
- removeContentProviderExternalUnchecked(name, null, userId);
} else {
Slog.d(TAG, "Failed to get provider for authority '" + name + "'");
}