Loading core/java/android/view/InsetsController.java +17 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,14 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation default CompatibilityInfo.Translator getTranslator() { return null; } /** * Notifies when the state of running animation is changed. The state is either "running" or * "idle". * * @param running {@code true} if there is any animation running; {@code false} otherwise. */ default void notifyAnimationRunningStateChanged(boolean running) {} } private static final String TAG = "InsetsController"; Loading Loading @@ -749,6 +757,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation final InsetsAnimationControlRunner runner = new InsetsResizeAnimationRunner( mFrame, state1, mToState, RESIZE_INTERPOLATOR, ANIMATION_DURATION_RESIZE, mTypes, InsetsController.this); if (mRunningAnimations.isEmpty()) { mHost.notifyAnimationRunningStateChanged(true); } mRunningAnimations.add(new RunningAnimation(runner, runner.getAnimationType())); } }; Loading Loading @@ -1382,6 +1393,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_RUNNING); if (mRunningAnimations.isEmpty()) { mHost.notifyAnimationRunningStateChanged(true); } mRunningAnimations.add(new RunningAnimation(runner, animationType)); if (DEBUG) Log.d(TAG, "Animation added to runner. useInsetsAnimationThread: " + useInsetsAnimationThread); Loading Loading @@ -1588,6 +1602,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation break; } } if (mRunningAnimations.isEmpty()) { mHost.notifyAnimationRunningStateChanged(false); } onAnimationStateChanged(removedTypes, false /* running */); } Loading core/java/android/view/ViewRootImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -816,6 +816,8 @@ public final class ViewRootImpl implements ViewParent, private long mFpsPrevTime = -1; private int mFpsNumFrames; private boolean mInsetsAnimationRunning; /** * The resolved pointer icon type requested by this window. * A null value indicates the resolved pointer icon has not yet been calculated. Loading Loading @@ -2179,6 +2181,10 @@ public final class ViewRootImpl implements ViewParent, } } void notifyInsetsAnimationRunningStateChanged(boolean running) { mInsetsAnimationRunning = running; } @Override public void requestLayout() { if (!mHandlingLayoutInLayoutRequest) { Loading core/java/android/view/ViewRootInsetsControllerHost.java +7 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,13 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host { return null; } @Override public void notifyAnimationRunningStateChanged(boolean running) { if (mViewRoot != null) { mViewRoot.notifyInsetsAnimationRunningStateChanged(running); } } private boolean isVisibleToUser() { return mViewRoot.getHostVisibility() == View.VISIBLE; } Loading services/core/java/com/android/server/wm/InsetsPolicy.java +7 −0 Original line number Diff line number Diff line Loading @@ -740,6 +740,8 @@ class InsetsPolicy { private final Handler mHandler; private final String mName; private boolean mInsetsAnimationRunning; Host(Handler handler, String name) { mHandler = handler; mName = name; Loading Loading @@ -841,5 +843,10 @@ class InsetsPolicy { public IBinder getWindowToken() { return null; } @Override public void notifyAnimationRunningStateChanged(boolean running) { mInsetsAnimationRunning = running; } } } Loading
core/java/android/view/InsetsController.java +17 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,14 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation default CompatibilityInfo.Translator getTranslator() { return null; } /** * Notifies when the state of running animation is changed. The state is either "running" or * "idle". * * @param running {@code true} if there is any animation running; {@code false} otherwise. */ default void notifyAnimationRunningStateChanged(boolean running) {} } private static final String TAG = "InsetsController"; Loading Loading @@ -749,6 +757,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation final InsetsAnimationControlRunner runner = new InsetsResizeAnimationRunner( mFrame, state1, mToState, RESIZE_INTERPOLATOR, ANIMATION_DURATION_RESIZE, mTypes, InsetsController.this); if (mRunningAnimations.isEmpty()) { mHost.notifyAnimationRunningStateChanged(true); } mRunningAnimations.add(new RunningAnimation(runner, runner.getAnimationType())); } }; Loading Loading @@ -1382,6 +1393,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } } ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_ANIMATION_RUNNING); if (mRunningAnimations.isEmpty()) { mHost.notifyAnimationRunningStateChanged(true); } mRunningAnimations.add(new RunningAnimation(runner, animationType)); if (DEBUG) Log.d(TAG, "Animation added to runner. useInsetsAnimationThread: " + useInsetsAnimationThread); Loading Loading @@ -1588,6 +1602,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation break; } } if (mRunningAnimations.isEmpty()) { mHost.notifyAnimationRunningStateChanged(false); } onAnimationStateChanged(removedTypes, false /* running */); } Loading
core/java/android/view/ViewRootImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -816,6 +816,8 @@ public final class ViewRootImpl implements ViewParent, private long mFpsPrevTime = -1; private int mFpsNumFrames; private boolean mInsetsAnimationRunning; /** * The resolved pointer icon type requested by this window. * A null value indicates the resolved pointer icon has not yet been calculated. Loading Loading @@ -2179,6 +2181,10 @@ public final class ViewRootImpl implements ViewParent, } } void notifyInsetsAnimationRunningStateChanged(boolean running) { mInsetsAnimationRunning = running; } @Override public void requestLayout() { if (!mHandlingLayoutInLayoutRequest) { Loading
core/java/android/view/ViewRootInsetsControllerHost.java +7 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,13 @@ public class ViewRootInsetsControllerHost implements InsetsController.Host { return null; } @Override public void notifyAnimationRunningStateChanged(boolean running) { if (mViewRoot != null) { mViewRoot.notifyInsetsAnimationRunningStateChanged(running); } } private boolean isVisibleToUser() { return mViewRoot.getHostVisibility() == View.VISIBLE; } Loading
services/core/java/com/android/server/wm/InsetsPolicy.java +7 −0 Original line number Diff line number Diff line Loading @@ -740,6 +740,8 @@ class InsetsPolicy { private final Handler mHandler; private final String mName; private boolean mInsetsAnimationRunning; Host(Handler handler, String name) { mHandler = handler; mName = name; Loading Loading @@ -841,5 +843,10 @@ class InsetsPolicy { public IBinder getWindowToken() { return null; } @Override public void notifyAnimationRunningStateChanged(boolean running) { mInsetsAnimationRunning = running; } } }