Merge "Adde back check to make sure Activity.recreate() is called on main thread." into pi-dev

This commit is contained in:
TreeHugger Robot
2018-05-17 05:01:33 +00:00
committed by Android (Google) Code Review

View File

@@ -5580,6 +5580,9 @@ public class Activity extends ContextThemeWrapper
if (mParent != null) {
throw new IllegalStateException("Can only be called on top-level activity");
}
if (Looper.myLooper() != mMainThread.getLooper()) {
throw new IllegalStateException("Must be called from main thread");
}
mMainThread.scheduleRelaunchActivity(mToken);
}