Loading core/java/android/view/IRecentsAnimationController.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -51,4 +51,12 @@ interface IRecentsAnimationController { * and then enable it mid-animation to start receiving touch events. */ void setInputConsumerEnabled(boolean enabled); /** * Informs the system whether the animation targets passed into * IRecentsAnimationRunner.onAnimationStart are currently behind the system bars. If they are, * they can control the SystemUI flags, otherwise the SystemUI flags from home activity will be * taken. */ void setAnimationTargetsBehindSystemBars(boolean behindSystemBars); } packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java +8 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,14 @@ public class RecentsAnimationControllerCompat { } } public void setAnimationTargetsBehindSystemBars(boolean behindSystemBars) { try { mAnimationController.setAnimationTargetsBehindSystemBars(behindSystemBars); } catch (RemoteException e) { Log.e(TAG, "Failed to set whether animation targets are behind system bars", e); } } public void finish(boolean toHome) { try { mAnimationController.finish(toHome); Loading services/core/java/com/android/server/wm/RecentsAnimationController.java +17 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,22 @@ public class RecentsAnimationController { } } @Override public void setAnimationTargetsBehindSystemBars(boolean behindSystemBars) throws RemoteException { long token = Binder.clearCallingIdentity(); try { synchronized (mService.getWindowManagerLock()) { for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { mPendingAnimations.get(i).mTask.setCanAffectSystemUiFlags(behindSystemBars); } mService.mWindowPlacerLocked.requestTraversal(); } } finally { Binder.restoreCallingIdentity(token); } } @Override public void setInputConsumerEnabled(boolean enabled) { if (DEBUG) Log.d(TAG, "setInputConsumerEnabled(" + enabled + "): mCanceled=" Loading Loading @@ -289,6 +305,7 @@ public class RecentsAnimationController { + mPendingAnimations.size()); for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { final TaskAnimationAdapter adapter = mPendingAnimations.get(i); adapter.mTask.setCanAffectSystemUiFlags(true); adapter.mCapturedFinishCallback.onAnimationFinished(adapter); } mPendingAnimations.clear(); Loading services/core/java/com/android/server/wm/Task.java +18 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,9 @@ class Task extends WindowContainer<AppWindowToken> { private Dimmer mDimmer = new Dimmer(this); private final Rect mTmpDimBoundsRect = new Rect(); /** @see #setCanAffectSystemUiFlags */ private boolean mCanAffectSystemUiFlags = true; Task(int taskId, TaskStack stack, int userId, WindowManagerService service, int resizeMode, boolean supportsPictureInPicture, TaskDescription taskDescription, TaskWindowContainerController controller) { Loading Loading @@ -627,6 +630,21 @@ class Task extends WindowContainer<AppWindowToken> { callback.accept(this); } /** * @param canAffectSystemUiFlags If false, all windows in this task can not affect SystemUI * flags. See {@link WindowState#canAffectSystemUiFlags()}. */ void setCanAffectSystemUiFlags(boolean canAffectSystemUiFlags) { mCanAffectSystemUiFlags = canAffectSystemUiFlags; } /** * @see #setCanAffectSystemUiFlags */ boolean canAffectSystemUiFlags() { return mCanAffectSystemUiFlags; } @Override public String toString() { return "{taskId=" + mTaskId + " appTokens=" + mChildren + " mdr=" + mDeferRemoval + "}"; Loading services/core/java/com/android/server/wm/WindowState.java +3 −1 Original line number Diff line number Diff line Loading @@ -1573,7 +1573,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean exiting = mAnimatingExit || mDestroying; return shown && !exiting; } else { return !mAppToken.isHidden(); final Task task = getTask(); final boolean canFromTask = task != null && task.canAffectSystemUiFlags(); return canFromTask && !mAppToken.isHidden(); } } Loading Loading
core/java/android/view/IRecentsAnimationController.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -51,4 +51,12 @@ interface IRecentsAnimationController { * and then enable it mid-animation to start receiving touch events. */ void setInputConsumerEnabled(boolean enabled); /** * Informs the system whether the animation targets passed into * IRecentsAnimationRunner.onAnimationStart are currently behind the system bars. If they are, * they can control the SystemUI flags, otherwise the SystemUI flags from home activity will be * taken. */ void setAnimationTargetsBehindSystemBars(boolean behindSystemBars); }
packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java +8 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,14 @@ public class RecentsAnimationControllerCompat { } } public void setAnimationTargetsBehindSystemBars(boolean behindSystemBars) { try { mAnimationController.setAnimationTargetsBehindSystemBars(behindSystemBars); } catch (RemoteException e) { Log.e(TAG, "Failed to set whether animation targets are behind system bars", e); } } public void finish(boolean toHome) { try { mAnimationController.finish(toHome); Loading
services/core/java/com/android/server/wm/RecentsAnimationController.java +17 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,22 @@ public class RecentsAnimationController { } } @Override public void setAnimationTargetsBehindSystemBars(boolean behindSystemBars) throws RemoteException { long token = Binder.clearCallingIdentity(); try { synchronized (mService.getWindowManagerLock()) { for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { mPendingAnimations.get(i).mTask.setCanAffectSystemUiFlags(behindSystemBars); } mService.mWindowPlacerLocked.requestTraversal(); } } finally { Binder.restoreCallingIdentity(token); } } @Override public void setInputConsumerEnabled(boolean enabled) { if (DEBUG) Log.d(TAG, "setInputConsumerEnabled(" + enabled + "): mCanceled=" Loading Loading @@ -289,6 +305,7 @@ public class RecentsAnimationController { + mPendingAnimations.size()); for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { final TaskAnimationAdapter adapter = mPendingAnimations.get(i); adapter.mTask.setCanAffectSystemUiFlags(true); adapter.mCapturedFinishCallback.onAnimationFinished(adapter); } mPendingAnimations.clear(); Loading
services/core/java/com/android/server/wm/Task.java +18 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,9 @@ class Task extends WindowContainer<AppWindowToken> { private Dimmer mDimmer = new Dimmer(this); private final Rect mTmpDimBoundsRect = new Rect(); /** @see #setCanAffectSystemUiFlags */ private boolean mCanAffectSystemUiFlags = true; Task(int taskId, TaskStack stack, int userId, WindowManagerService service, int resizeMode, boolean supportsPictureInPicture, TaskDescription taskDescription, TaskWindowContainerController controller) { Loading Loading @@ -627,6 +630,21 @@ class Task extends WindowContainer<AppWindowToken> { callback.accept(this); } /** * @param canAffectSystemUiFlags If false, all windows in this task can not affect SystemUI * flags. See {@link WindowState#canAffectSystemUiFlags()}. */ void setCanAffectSystemUiFlags(boolean canAffectSystemUiFlags) { mCanAffectSystemUiFlags = canAffectSystemUiFlags; } /** * @see #setCanAffectSystemUiFlags */ boolean canAffectSystemUiFlags() { return mCanAffectSystemUiFlags; } @Override public String toString() { return "{taskId=" + mTaskId + " appTokens=" + mChildren + " mdr=" + mDeferRemoval + "}"; Loading
services/core/java/com/android/server/wm/WindowState.java +3 −1 Original line number Diff line number Diff line Loading @@ -1573,7 +1573,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean exiting = mAnimatingExit || mDestroying; return shown && !exiting; } else { return !mAppToken.isHidden(); final Task task = getTask(); final boolean canFromTask = task != null && task.canAffectSystemUiFlags(); return canFromTask && !mAppToken.isHidden(); } } Loading