Loading core/java/android/app/Instrumentation.java +10 −7 Original line number Diff line number Diff line Loading @@ -493,6 +493,7 @@ public class Instrumentation { public Activity startActivitySync(@NonNull Intent intent, @Nullable Bundle options) { validateNotAppThread(); final Activity activity; synchronized (mSync) { intent = new Intent(intent); Loading Loading @@ -527,16 +528,18 @@ public class Instrumentation { } catch (InterruptedException e) { } } while (mWaitingActivities.contains(aw)); activity = aw.activity; } waitForEnterAnimationComplete(aw.activity); // Do not call this method within mSync, lest it could block the main thread. waitForEnterAnimationComplete(activity); // Apply an empty transaction to ensure SF has a chance to update before // the Activity is ready (b/138263890). try (SurfaceControl.Transaction t = new SurfaceControl.Transaction()) { t.apply(true); } return aw.activity; } return activity; } /** Loading Loading
core/java/android/app/Instrumentation.java +10 −7 Original line number Diff line number Diff line Loading @@ -493,6 +493,7 @@ public class Instrumentation { public Activity startActivitySync(@NonNull Intent intent, @Nullable Bundle options) { validateNotAppThread(); final Activity activity; synchronized (mSync) { intent = new Intent(intent); Loading Loading @@ -527,16 +528,18 @@ public class Instrumentation { } catch (InterruptedException e) { } } while (mWaitingActivities.contains(aw)); activity = aw.activity; } waitForEnterAnimationComplete(aw.activity); // Do not call this method within mSync, lest it could block the main thread. waitForEnterAnimationComplete(activity); // Apply an empty transaction to ensure SF has a chance to update before // the Activity is ready (b/138263890). try (SurfaceControl.Transaction t = new SurfaceControl.Transaction()) { t.apply(true); } return aw.activity; } return activity; } /** Loading