am 25596374: Merge "[ActivityManager] Prevent provider from been created twice."
* commit '255963742982daf46eb665a2934bd61e7ed95c81': [ActivityManager] Prevent provider from been created twice.
This commit is contained in:
@@ -9484,11 +9484,13 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
if (DEBUG_PROVIDER) {
|
||||
Slog.d(TAG, "Installing in existing process " + proc);
|
||||
}
|
||||
checkTime(startTime, "getContentProviderImpl: scheduling install");
|
||||
proc.pubProviders.put(cpi.name, cpr);
|
||||
try {
|
||||
proc.thread.scheduleInstallProvider(cpi);
|
||||
} catch (RemoteException e) {
|
||||
if (!proc.pubProviders.containsKey(cpi.name)) {
|
||||
checkTime(startTime, "getContentProviderImpl: scheduling install");
|
||||
proc.pubProviders.put(cpi.name, cpr);
|
||||
try {
|
||||
proc.thread.scheduleInstallProvider(cpi);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
checkTime(startTime, "getContentProviderImpl: before start process");
|
||||
|
||||
Reference in New Issue
Block a user