Loading services/core/java/com/android/server/am/ActivityManagerService.java +59 −58 Original line number Diff line number Diff line Loading @@ -6831,13 +6831,12 @@ public class ActivityManagerService extends IActivityManager.Stub "getContentProviderImpl: after checkContentProviderPermission"); final long origId = Binder.clearCallingIdentity(); try { checkTime(startTime, "getContentProviderImpl: incProviderCountLocked"); // In this case the provider instance already exists, so we can // return it right away. conn = incProviderCountLocked(r, cpr, token, callingUid, callingPackage, callingTag, stable); // Return the provider instance right away since it already exists. conn = incProviderCountLocked(r, cpr, token, callingUid, callingPackage, callingTag, stable); if (conn != null && (conn.stableCount+conn.unstableCount) == 1) { if (cpr.proc != null && r.setAdj <= ProcessList.PERCEPTIBLE_LOW_APP_ADJ) { // If this is a perceptible app accessing the provider, Loading @@ -6859,7 +6858,8 @@ public class ActivityManagerService extends IActivityManager.Stub // it, we will check whether the process still exists. Note that this doesn't // completely get rid of races with LMK killing the process, but should make // them much smaller. if (success && verifiedAdj != cpr.proc.setAdj && !isProcessAliveLocked(cpr.proc)) { if (success && verifiedAdj != cpr.proc.setAdj && !isProcessAliveLocked(cpr.proc)) { success = false; } maybeUpdateProviderUsageStatsLocked(r, cpr.info.packageName, name); Loading Loading @@ -6890,9 +6890,10 @@ public class ActivityManagerService extends IActivityManager.Stub } else { cpr.proc.verifiedAdj = cpr.proc.setAdj; } } finally { Binder.restoreCallingIdentity(origId); } } if (!providerRunning) { try { Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +59 −58 Original line number Diff line number Diff line Loading @@ -6831,13 +6831,12 @@ public class ActivityManagerService extends IActivityManager.Stub "getContentProviderImpl: after checkContentProviderPermission"); final long origId = Binder.clearCallingIdentity(); try { checkTime(startTime, "getContentProviderImpl: incProviderCountLocked"); // In this case the provider instance already exists, so we can // return it right away. conn = incProviderCountLocked(r, cpr, token, callingUid, callingPackage, callingTag, stable); // Return the provider instance right away since it already exists. conn = incProviderCountLocked(r, cpr, token, callingUid, callingPackage, callingTag, stable); if (conn != null && (conn.stableCount+conn.unstableCount) == 1) { if (cpr.proc != null && r.setAdj <= ProcessList.PERCEPTIBLE_LOW_APP_ADJ) { // If this is a perceptible app accessing the provider, Loading @@ -6859,7 +6858,8 @@ public class ActivityManagerService extends IActivityManager.Stub // it, we will check whether the process still exists. Note that this doesn't // completely get rid of races with LMK killing the process, but should make // them much smaller. if (success && verifiedAdj != cpr.proc.setAdj && !isProcessAliveLocked(cpr.proc)) { if (success && verifiedAdj != cpr.proc.setAdj && !isProcessAliveLocked(cpr.proc)) { success = false; } maybeUpdateProviderUsageStatsLocked(r, cpr.info.packageName, name); Loading Loading @@ -6890,9 +6890,10 @@ public class ActivityManagerService extends IActivityManager.Stub } else { cpr.proc.verifiedAdj = cpr.proc.setAdj; } } finally { Binder.restoreCallingIdentity(origId); } } if (!providerRunning) { try { Loading