Merge "Adde back check to make sure Activity.recreate() is called on main thread." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5f8e42f7f0
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user