Loading core/java/android/app/Activity.java +0 −6 Original line number Diff line number Diff line Loading @@ -1027,9 +1027,6 @@ public class Activity extends ContextThemeWrapper /** The autofill client controller. Always access via {@link #getAutofillClientController()}. */ private AutofillClientController mAutofillClientController; /** @hide */ boolean mEnterAnimationComplete; private boolean mIsInMultiWindowMode; /** @hide */ boolean mIsInPictureInPictureMode; Loading Loading @@ -2898,7 +2895,6 @@ public class Activity extends ContextThemeWrapper mCalled = true; getAutofillClientController().onActivityStopped(mIntent, mChangingConfigurations); mEnterAnimationComplete = false; notifyVoiceInteractionManagerServiceActivityEvent( VoiceInteractionSession.VOICE_INTERACTION_ACTIVITY_EVENT_STOP); Loading Loading @@ -8594,8 +8590,6 @@ public class Activity extends ContextThemeWrapper * @hide */ public void dispatchEnterAnimationComplete() { mEnterAnimationComplete = true; mInstrumentation.onEnterAnimationComplete(); onEnterAnimationComplete(); if (getWindow() != null && getWindow().getDecorView() != null) { View decorView = getWindow().getDecorView(); Loading core/java/android/app/Instrumentation.java +8 −34 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.SurfaceControl; import android.view.ViewConfiguration; import android.view.Window; import android.view.WindowManagerGlobal; Loading Loading @@ -137,7 +136,6 @@ public class Instrumentation { private PerformanceCollector mPerformanceCollector; private Bundle mPerfMetrics = new Bundle(); private UiAutomation mUiAutomation; private final Object mAnimationCompleteLock = new Object(); @RavenwoodKeep public Instrumentation() { Loading Loading @@ -455,31 +453,6 @@ public class Instrumentation { idler.waitForIdle(); } private void waitForEnterAnimationComplete(Activity activity) { synchronized (mAnimationCompleteLock) { long timeout = 5000; try { // We need to check that this specified Activity completed the animation, not just // any Activity. If it was another Activity, then decrease the timeout by how long // it's already waited and wait for the thread to wakeup again. while (timeout > 0 && !activity.mEnterAnimationComplete) { long startTime = System.currentTimeMillis(); mAnimationCompleteLock.wait(timeout); long totalTime = System.currentTimeMillis() - startTime; timeout -= totalTime; } } catch (InterruptedException e) { } } } /** @hide */ public void onEnterAnimationComplete() { synchronized (mAnimationCompleteLock) { mAnimationCompleteLock.notifyAll(); } } /** * Execute a call on the application's main thread, blocking until it is * complete. Useful for doing things that are not thread-safe, such as Loading Loading @@ -640,13 +613,14 @@ public class Instrumentation { activity = 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); // Typically, callers expect that the launched activity can receive input events after this // method returns, so wait until a stable state, i.e. animation is finished and input info // is updated. try { WindowManagerGlobal.getWindowManagerService() .syncInputTransactions(true /* waitForAnimations */); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return activity; } Loading Loading
core/java/android/app/Activity.java +0 −6 Original line number Diff line number Diff line Loading @@ -1027,9 +1027,6 @@ public class Activity extends ContextThemeWrapper /** The autofill client controller. Always access via {@link #getAutofillClientController()}. */ private AutofillClientController mAutofillClientController; /** @hide */ boolean mEnterAnimationComplete; private boolean mIsInMultiWindowMode; /** @hide */ boolean mIsInPictureInPictureMode; Loading Loading @@ -2898,7 +2895,6 @@ public class Activity extends ContextThemeWrapper mCalled = true; getAutofillClientController().onActivityStopped(mIntent, mChangingConfigurations); mEnterAnimationComplete = false; notifyVoiceInteractionManagerServiceActivityEvent( VoiceInteractionSession.VOICE_INTERACTION_ACTIVITY_EVENT_STOP); Loading Loading @@ -8594,8 +8590,6 @@ public class Activity extends ContextThemeWrapper * @hide */ public void dispatchEnterAnimationComplete() { mEnterAnimationComplete = true; mInstrumentation.onEnterAnimationComplete(); onEnterAnimationComplete(); if (getWindow() != null && getWindow().getDecorView() != null) { View decorView = getWindow().getDecorView(); Loading
core/java/android/app/Instrumentation.java +8 −34 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.SurfaceControl; import android.view.ViewConfiguration; import android.view.Window; import android.view.WindowManagerGlobal; Loading Loading @@ -137,7 +136,6 @@ public class Instrumentation { private PerformanceCollector mPerformanceCollector; private Bundle mPerfMetrics = new Bundle(); private UiAutomation mUiAutomation; private final Object mAnimationCompleteLock = new Object(); @RavenwoodKeep public Instrumentation() { Loading Loading @@ -455,31 +453,6 @@ public class Instrumentation { idler.waitForIdle(); } private void waitForEnterAnimationComplete(Activity activity) { synchronized (mAnimationCompleteLock) { long timeout = 5000; try { // We need to check that this specified Activity completed the animation, not just // any Activity. If it was another Activity, then decrease the timeout by how long // it's already waited and wait for the thread to wakeup again. while (timeout > 0 && !activity.mEnterAnimationComplete) { long startTime = System.currentTimeMillis(); mAnimationCompleteLock.wait(timeout); long totalTime = System.currentTimeMillis() - startTime; timeout -= totalTime; } } catch (InterruptedException e) { } } } /** @hide */ public void onEnterAnimationComplete() { synchronized (mAnimationCompleteLock) { mAnimationCompleteLock.notifyAll(); } } /** * Execute a call on the application's main thread, blocking until it is * complete. Useful for doing things that are not thread-safe, such as Loading Loading @@ -640,13 +613,14 @@ public class Instrumentation { activity = 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); // Typically, callers expect that the launched activity can receive input events after this // method returns, so wait until a stable state, i.e. animation is finished and input info // is updated. try { WindowManagerGlobal.getWindowManagerService() .syncInputTransactions(true /* waitForAnimations */); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return activity; } Loading