Removing dependencies on recents-specific code in SysUI
- Removing references to SystemServicesProxy (to be removed) for
AM/WMWrapper
- Removing unused code for old nav bar swiping logic, and also unused
and quickstep-incompatible code for dragging in recents
- Removing all event bus logic from outside recents subpackage
- Exposing PipUI component for bridge caller
Bug: 114137554
Test: Can still swipe up
Change-Id: Ibcfbe06acae06ea5950615cabd52243279fee16d
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 ee15655..04746c1 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -17,7 +17,6 @@
package com.android.systemui.pip.phone;
import static android.view.Display.DEFAULT_DISPLAY;
-import static android.view.WindowManager.INPUT_CONSUMER_PIP;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
@@ -36,15 +35,15 @@
import android.view.IPinnedStackListener;
import android.view.IWindowManager;
import android.view.WindowManagerGlobal;
-
+import com.android.systemui.Dependency;
+import com.android.systemui.UiOffloadThread;
import com.android.systemui.pip.BasePipManager;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.component.ExpandPipEvent;
-import com.android.systemui.recents.misc.SysUiTaskStackChangeListener;
-import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.InputConsumerController;
-
+import com.android.systemui.shared.system.TaskStackChangeListener;
+import com.android.systemui.shared.system.WindowManagerWrapper;
import java.io.PrintWriter;
/**
@@ -72,7 +71,7 @@
/**
* Handler for system task stack changes.
*/
- SysUiTaskStackChangeListener mTaskStackListener = new SysUiTaskStackChangeListener() {
+ TaskStackChangeListener mTaskStackListener = new TaskStackChangeListener() {
@Override
public void onActivityPinned(String packageName, int userId, int taskId, int stackId) {
mTouchHandler.onActivityPinned();
@@ -80,7 +79,9 @@
mMenuController.onActivityPinned();
mAppOpsListener.onActivityPinned(packageName);
- SystemServicesProxy.getInstance(mContext).setPipVisibility(true);
+ Dependency.get(UiOffloadThread.class).submit(() -> {
+ WindowManagerWrapper.getInstance().setPipVisibility(true);
+ });
}
@Override
@@ -93,7 +94,9 @@
mTouchHandler.onActivityUnpinned(topActivity);
mAppOpsListener.onActivityUnpinned();
- SystemServicesProxy.getInstance(mContext).setPipVisibility(topActivity != null);
+ Dependency.get(UiOffloadThread.class).submit(() -> {
+ WindowManagerWrapper.getInstance().setPipVisibility(topActivity != null);
+ });
}
@Override