Introduce WindowOrganizer
WM currently only allows the organization of tasks, however we will soon
be allowing the organization of DisplayAreas. To help with the code
structure, we are introducing WindowOrganizer interface which will
contain common APIs for all types of windows organizers (e.g.
applyTransaction) and also be the interfaece for getting the controller
for other organizers.
Test: they pass!
Bug: 147406652
Bug: 152113464
Bug: 152117221
Change-Id: Id2797b288ce92430206c25345d60e7b0e3be98c8
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 a0dff3f..e89ce2e 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -18,6 +18,7 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
+import static android.window.WindowOrganizer.TaskOrganizer;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
@@ -35,6 +36,7 @@
import android.view.DisplayInfo;
import android.view.IPinnedStackController;
import android.window.WindowContainerTransaction;
+import android.window.WindowOrganizer;
import com.android.systemui.Dependency;
import com.android.systemui.UiOffloadThread;
@@ -248,8 +250,7 @@
mPipBoundsHandler.onDisplayInfoChanged(displayInfo);
try {
- ActivityTaskManager.getTaskOrganizerController().registerTaskOrganizer(
- mPipTaskOrganizer, WINDOWING_MODE_PINNED);
+ TaskOrganizer.registerOrganizer(mPipTaskOrganizer, WINDOWING_MODE_PINNED);
ActivityManager.StackInfo stackInfo = activityTaskManager.getStackInfo(
WINDOWING_MODE_PINNED, ACTIVITY_TYPE_UNDEFINED);
if (stackInfo != null) {