mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Merge "Dismisses system overlays for Home intent." into ub-launcher3-qt-future-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
86ace54523
@@ -19,6 +19,7 @@ package com.android.launcher3.uioverrides;
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON;
|
||||
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
@@ -48,6 +49,7 @@ import com.android.quickstep.SysUINavigationMode;
|
||||
import com.android.quickstep.SysUINavigationMode.Mode;
|
||||
import com.android.quickstep.TouchInteractionService;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
import com.android.systemui.shared.system.WindowManagerWrapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -208,6 +210,12 @@ public abstract class RecentsUiFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/** Closes system windows. */
|
||||
public static void closeSystemWindows() {
|
||||
ActivityManagerWrapper.getInstance()
|
||||
.closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
|
||||
}
|
||||
|
||||
private static final class LauncherTaskViewController extends
|
||||
TaskViewTouchController<Launcher> {
|
||||
|
||||
|
||||
@@ -251,4 +251,6 @@ public class UiFactory extends RecentsUiFactory {
|
||||
Person[] persons = si.getPersons();
|
||||
return persons == null ? Utilities.EMPTY_PERSON_ARRAY : persons;
|
||||
}
|
||||
|
||||
public static void closeSystemWindows() {}
|
||||
}
|
||||
|
||||
@@ -1397,6 +1397,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||
if (!internalStateHandled) {
|
||||
// In all these cases, only animate if we're already on home
|
||||
AbstractFloatingView.closeAllOpenViews(this, isStarted());
|
||||
UiFactory.closeSystemWindows();
|
||||
|
||||
if (!isInState(NORMAL)) {
|
||||
// Only change state, if not already the same. This prevents cancelling any
|
||||
|
||||
@@ -101,4 +101,6 @@ public class UiFactory {
|
||||
public static Person[] getPersons(ShortcutInfo si) {
|
||||
return Utilities.EMPTY_PERSON_ARRAY;
|
||||
}
|
||||
|
||||
public static void closeSystemWindows() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user