Limited recents in window introductory cl
Test: Built and tested locally
Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug:292269949
Change-Id: I5352ba0b6c5bc196fbd1322d435a7e27e884f7b5
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index fec94fe..2e75261 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -188,7 +188,7 @@
public SystemUiController getSystemUiController() {
if (mSystemUiController == null) {
- mSystemUiController = new SystemUiController(getWindow());
+ mSystemUiController = new SystemUiController(getWindow().getDecorView());
}
return mSystemUiController;
}
diff --git a/src/com/android/launcher3/statemanager/StatefulContainer.java b/src/com/android/launcher3/statemanager/StatefulContainer.java
index 702dc6a..b10af0a 100644
--- a/src/com/android/launcher3/statemanager/StatefulContainer.java
+++ b/src/com/android/launcher3/statemanager/StatefulContainer.java
@@ -20,11 +20,9 @@
import static com.android.launcher3.LauncherState.FLAG_CLOSE_POPUPS;
import static com.android.launcher3.statemanager.BaseState.FLAG_NON_INTERACTIVE;
-import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.Configuration;
-import android.view.Window;
import androidx.annotation.CallSuper;
diff --git a/src/com/android/launcher3/util/SystemUiController.java b/src/com/android/launcher3/util/SystemUiController.java
index df54fd7..368b267 100644
--- a/src/com/android/launcher3/util/SystemUiController.java
+++ b/src/com/android/launcher3/util/SystemUiController.java
@@ -17,7 +17,6 @@
package com.android.launcher3.util;
import android.view.View;
-import android.view.Window;
import androidx.annotation.IntDef;
@@ -54,11 +53,11 @@
})
public @interface SystemUiControllerFlags {}
- private final Window mWindow;
+ private final View mView;
private final int[] mStates = new int[5];
- public SystemUiController(Window window) {
- mWindow = window;
+ public SystemUiController(View view) {
+ mView = view;
}
public void updateUiState(int uiState, boolean isLight) {
@@ -72,14 +71,14 @@
}
mStates[uiState] = flags;
- int oldFlags = mWindow.getDecorView().getSystemUiVisibility();
+ int oldFlags = mView.getSystemUiVisibility();
// Apply the state flags in priority order
int newFlags = oldFlags;
for (int stateFlag : mStates) {
newFlags = getSysUiVisibilityFlags(stateFlag, newFlags);
}
if (newFlags != oldFlags) {
- mWindow.getDecorView().setSystemUiVisibility(newFlags);
+ mView.setSystemUiVisibility(newFlags);
}
}
@@ -88,7 +87,7 @@
*/
public int getBaseSysuiVisibility() {
return getSysUiVisibilityFlags(
- mStates[UI_STATE_BASE_WINDOW], mWindow.getDecorView().getSystemUiVisibility());
+ mStates[UI_STATE_BASE_WINDOW], mView.getSystemUiVisibility());
}
private int getSysUiVisibilityFlags(int stateFlag, int currentVisibility) {
diff --git a/src/com/android/launcher3/views/ActivityContext.java b/src/com/android/launcher3/views/ActivityContext.java
index a86caf3..9676b38 100644
--- a/src/com/android/launcher3/views/ActivityContext.java
+++ b/src/com/android/launcher3/views/ActivityContext.java
@@ -30,6 +30,7 @@
import android.app.ActivityOptions;
import android.app.PendingIntent;
import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
@@ -175,7 +176,7 @@
/**
* The root view to support drag-and-drop and popup support.
*/
- BaseDragLayer<?> getDragLayer();
+ BaseDragLayer getDragLayer();
/**
* @see Activity#getWindow()
@@ -187,6 +188,14 @@
}
/**
+ * @see Activity#getComponentName()
+ * @return ComponentName
+ */
+ default ComponentName getComponentName() {
+ return null;
+ }
+
+ /**
* The all apps container, if it exists in this context.
*/
default ActivityAllAppsContainerView<?> getAppsView() {