Loading services/core/java/com/android/server/am/ContentProviderHelper.java +51 −49 Original line number Diff line number Diff line Loading @@ -227,12 +227,12 @@ public class ContentProviderHelper { cpr.name.flattenToShortString(), startTime); 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, true, startTime, mService.mProcessList); // Return the provider instance right away since it already exists. conn = incProviderCountLocked(r, cpr, token, callingUid, callingPackage, callingTag, stable, true, startTime, mService.mProcessList); checkTime(startTime, "getContentProviderImpl: before updateOomAdj"); final int verifiedAdj = cpr.proc.verifiedAdj; Loading @@ -243,7 +243,8 @@ public class ContentProviderHelper { // 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 @@ -276,9 +277,10 @@ public class ContentProviderHelper { } else { cpr.proc.verifiedAdj = cpr.proc.setAdj; } } finally { Binder.restoreCallingIdentity(origId); } } if (!providerRunning) { try { Loading Loading
services/core/java/com/android/server/am/ContentProviderHelper.java +51 −49 Original line number Diff line number Diff line Loading @@ -227,12 +227,12 @@ public class ContentProviderHelper { cpr.name.flattenToShortString(), startTime); 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, true, startTime, mService.mProcessList); // Return the provider instance right away since it already exists. conn = incProviderCountLocked(r, cpr, token, callingUid, callingPackage, callingTag, stable, true, startTime, mService.mProcessList); checkTime(startTime, "getContentProviderImpl: before updateOomAdj"); final int verifiedAdj = cpr.proc.verifiedAdj; Loading @@ -243,7 +243,8 @@ public class ContentProviderHelper { // 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 @@ -276,9 +277,10 @@ public class ContentProviderHelper { } else { cpr.proc.verifiedAdj = cpr.proc.setAdj; } } finally { Binder.restoreCallingIdentity(origId); } } if (!providerRunning) { try { Loading