diff options
| author | Tracy Zhou <tracyzhou@google.com> | 2018-03-08 21:58:36 -0800 |
|---|---|---|
| committer | Tracy Zhou <tracyzhou@google.com> | 2018-03-19 17:41:08 +0000 |
| commit | 43513086d28f0e35a08b46de4f2c3373266763a1 (patch) | |
| tree | c41d67f1a40c04a5b591035e240803865188f6ab /core/java/android | |
| parent | 1b929db32d8e801a7cabbc7fb66915de73e23d34 (diff) | |
Move default pip position to right above the shelf.
This change takes care of the flow from WindowManagerService to
PinnedStackController, all the way to PipTouchHandler. It also
introduces a WindowManager hook that allows Launcher to pass in
shelf visibility and height. A separate change is made to send
signals from Launcher to SysUI. (ag/3724896)
Bug: 73961893
Change-Id: I2ff54e78bc2dc35c806b902464048b051a4d6394
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerPinnedStackTests
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/ActivityManagerInternal.java | 6 | ||||
| -rw-r--r-- | core/java/android/view/IPinnedStackListener.aidl | 12 | ||||
| -rw-r--r-- | core/java/android/view/IWindowManager.aidl | 11 |
3 files changed, 24 insertions, 5 deletions
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java index 2752fa9f1eb3..db9d9234aeb8 100644 --- a/core/java/android/app/ActivityManagerInternal.java +++ b/core/java/android/app/ActivityManagerInternal.java @@ -385,4 +385,10 @@ public abstract class ActivityManagerInternal { * Returns a list that contains the memory stats for currently running processes. */ public abstract List<ProcessMemoryState> getMemoryStateForProcesses(); + + /** + * This enforces {@code func} can only be called if either the caller is Recents activity or + * has {@code permission}. + */ + public abstract void enforceCallerIsRecentsOrHasPermission(String permission, String func); } diff --git a/core/java/android/view/IPinnedStackListener.aidl b/core/java/android/view/IPinnedStackListener.aidl index 9382741a81ec..2da353b1f0ee 100644 --- a/core/java/android/view/IPinnedStackListener.aidl +++ b/core/java/android/view/IPinnedStackListener.aidl @@ -47,17 +47,25 @@ oneway interface IPinnedStackListener { * the WM has changed in the mean time but the client has not received onMovementBoundsChanged). */ void onMovementBoundsChanged(in Rect insetBounds, in Rect normalBounds, in Rect animatingBounds, - boolean fromImeAdjustement, int displayRotation); + boolean fromImeAdjustment, boolean fromShelfAdjustment, int displayRotation); /** * Called when window manager decides to adjust the pinned stack bounds because of the IME, or * when the listener is first registered to allow the listener to synchronized its state with * the controller. This call will always be followed by a onMovementBoundsChanged() call - * with fromImeAdjustement set to true. + * with fromImeAdjustement set to {@code true}. */ void onImeVisibilityChanged(boolean imeVisible, int imeHeight); /** + * Called when window manager decides to adjust the pinned stack bounds because of the shelf, or + * when the listener is first registered to allow the listener to synchronized its state with + * the controller. This call will always be followed by a onMovementBoundsChanged() call + * with fromShelfAdjustment set to {@code true}. + */ + void onShelfVisibilityChanged(boolean shelfVisible, int shelfHeight); + + /** * Called when window manager decides to adjust the minimized state, or when the listener * is first registered to allow the listener to synchronized its state with the controller. */ diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl index d172fb5cd9ad..613e6d8c6b14 100644 --- a/core/java/android/view/IWindowManager.aidl +++ b/core/java/android/view/IWindowManager.aidl @@ -284,7 +284,12 @@ interface IWindowManager */ oneway void setPipVisibility(boolean visible); - /** + /** + * Called by System UI to notify of changes to the visibility and height of the shelf. + */ + void setShelfHeight(boolean visible, int shelfHeight); + + /** * Called by System UI to enable or disable haptic feedback on the navigation bar buttons. */ void setNavBarVirtualKeyHapticFeedbackEnabled(boolean enabled); @@ -295,8 +300,8 @@ interface IWindowManager boolean hasNavigationBar(); /** - * Get the position of the nav bar - */ + * Get the position of the nav bar + */ int getNavBarPosition(); /** |
