am 25596374: Merge "[ActivityManager] Prevent provider from been created twice."

* commit '255963742982daf46eb665a2934bd61e7ed95c81':
  [ActivityManager] Prevent provider from been created twice.
This commit is contained in:
Craig Mautner
2014-12-01 00:22:10 +00:00
committed by Android Git Automerger

View File

@@ -9484,12 +9484,14 @@ public final class ActivityManagerService extends ActivityManagerNative
if (DEBUG_PROVIDER) { if (DEBUG_PROVIDER) {
Slog.d(TAG, "Installing in existing process " + proc); Slog.d(TAG, "Installing in existing process " + proc);
} }
if (!proc.pubProviders.containsKey(cpi.name)) {
checkTime(startTime, "getContentProviderImpl: scheduling install"); checkTime(startTime, "getContentProviderImpl: scheduling install");
proc.pubProviders.put(cpi.name, cpr); proc.pubProviders.put(cpi.name, cpr);
try { try {
proc.thread.scheduleInstallProvider(cpi); proc.thread.scheduleInstallProvider(cpi);
} catch (RemoteException e) { } catch (RemoteException e) {
} }
}
} else { } else {
checkTime(startTime, "getContentProviderImpl: before start process"); checkTime(startTime, "getContentProviderImpl: before start process");
proc = startProcessLocked(cpi.processName, proc = startProcessLocked(cpi.processName,