Minor refactoring to support moving code to shell
Bug: 148148105
Test: atest SystemUITests
Change-Id: I8614fe50cb87f66b1e403dfbfe8a68d1e043bd13
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index e48a23f..239ef36 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -46,7 +46,8 @@
import com.android.systemui.shared.system.PinnedStackListenerForwarder.PinnedStackListener;
import com.android.systemui.shared.system.TaskStackChangeListener;
import com.android.systemui.shared.system.WindowManagerWrapper;
-import com.android.systemui.wm.DisplayWindowController;
+import com.android.systemui.wm.DisplayChangeController;
+import com.android.systemui.wm.DisplayController;
import java.io.PrintWriter;
@@ -79,7 +80,7 @@
/**
* Handler for display rotation changes.
*/
- private final DisplayWindowController.OnDisplayWindowRotationController mRotationController = (
+ private final DisplayChangeController.OnDisplayChangingListener mRotationController = (
int displayId, int fromRotation, int toRotation, WindowContainerTransaction t) -> {
final boolean changed = mPipBoundsHandler.onDisplayRotationChanged(mTmpNormalBounds,
displayId, fromRotation, toRotation, t);
@@ -230,7 +231,7 @@
* Initializes {@link PipManager}.
*/
public void initialize(Context context, BroadcastDispatcher broadcastDispatcher,
- DisplayWindowController displayWindowController) {
+ DisplayController displayController) {
mContext = context;
mActivityManager = ActivityManager.getService();
mActivityTaskManager = ActivityTaskManager.getService();
@@ -251,7 +252,7 @@
mMenuController, mInputConsumerController, mPipBoundsHandler);
mAppOpsListener = new PipAppOpsListener(context, mActivityManager,
mTouchHandler.getMotionHelper());
- displayWindowController.addRotationController(mRotationController);
+ displayController.addDisplayChangingController(mRotationController);
// If SystemUI restart, and it already existed a pinned stack,
// register the pip input consumer to ensure touch can send to it.