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

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

View File

@@ -9339,11 +9339,13 @@ 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);
} }
checkTime(startTime, "getContentProviderImpl: scheduling install"); if (!proc.pubProviders.containsKey(cpi.name)) {
proc.pubProviders.put(cpi.name, cpr); checkTime(startTime, "getContentProviderImpl: scheduling install");
try { proc.pubProviders.put(cpi.name, cpr);
proc.thread.scheduleInstallProvider(cpi); try {
} catch (RemoteException e) { proc.thread.scheduleInstallProvider(cpi);
} catch (RemoteException e) {
}
} }
} else { } else {
checkTime(startTime, "getContentProviderImpl: before start process"); checkTime(startTime, "getContentProviderImpl: before start process");