Merge "Finish attach appliation before creating app context"

This commit is contained in:
Zimuzo Ezeozue
2022-12-06 21:21:02 +00:00
committed by Android (Google) Code Review

View File

@@ -6717,6 +6717,13 @@ public final class ActivityThread extends ClientTransactionHandler
ii = null;
}
final IActivityManager mgr = ActivityManager.getService();
try {
mgr.finishAttachApplication(mStartSeq);
} catch (RemoteException ex) {
throw ex.rethrowFromSystemServer();
}
final ContextImpl appContext = ContextImpl.createAppContext(this, data.info);
mConfigurationController.updateLocaleListFromAppContext(appContext);
@@ -6785,13 +6792,6 @@ public final class ActivityThread extends ClientTransactionHandler
final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskWrites();
final StrictMode.ThreadPolicy writesAllowedPolicy = StrictMode.getThreadPolicy();
final IActivityManager mgr = ActivityManager.getService();
try {
mgr.finishAttachApplication(mStartSeq);
} catch (RemoteException ex) {
throw ex.rethrowFromSystemServer();
}
// Wait for debugger after we have notified the system to finish attach application
if (data.debugMode != ApplicationThreadConstants.DEBUG_OFF) {
// XXX should have option to change the port.