Merge "Proxy search disabled flag to Launcher" into qt-r1-dev
am: 6d4d529fb1
Change-Id: I680097d99903a8e3b608ab02798edda0f0ecc56e
This commit is contained in:
@@ -80,6 +80,8 @@ public class QuickStepContract {
|
||||
public static final int SYSUI_STATE_HOME_DISABLED = 1 << 8;
|
||||
// The keyguard is showing, but occluded
|
||||
public static final int SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED = 1 << 9;
|
||||
// The search feature is disabled (either by SUW/SysUI/device policy)
|
||||
public static final int SYSUI_STATE_SEARCH_DISABLED = 1 << 10;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({SYSUI_STATE_SCREEN_PINNING,
|
||||
@@ -91,7 +93,8 @@ public class QuickStepContract {
|
||||
SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING,
|
||||
SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED,
|
||||
SYSUI_STATE_OVERVIEW_DISABLED,
|
||||
SYSUI_STATE_HOME_DISABLED
|
||||
SYSUI_STATE_HOME_DISABLED,
|
||||
SYSUI_STATE_SEARCH_DISABLED
|
||||
})
|
||||
public @interface SystemUiStateFlags {}
|
||||
|
||||
@@ -100,6 +103,7 @@ public class QuickStepContract {
|
||||
str.add((flags & SYSUI_STATE_SCREEN_PINNING) != 0 ? "screen_pinned" : "");
|
||||
str.add((flags & SYSUI_STATE_OVERVIEW_DISABLED) != 0 ? "overview_disabled" : "");
|
||||
str.add((flags & SYSUI_STATE_HOME_DISABLED) != 0 ? "home_disabled" : "");
|
||||
str.add((flags & SYSUI_STATE_SEARCH_DISABLED) != 0 ? "search_disabled" : "");
|
||||
str.add((flags & SYSUI_STATE_NAV_BAR_HIDDEN) != 0 ? "navbar_hidden" : "");
|
||||
str.add((flags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) != 0 ? "notif_visible" : "");
|
||||
str.add((flags & SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING) != 0 ? "keygrd_visible" : "");
|
||||
@@ -150,10 +154,11 @@ public class QuickStepContract {
|
||||
* disabled.
|
||||
*/
|
||||
public static boolean isAssistantGestureDisabled(int sysuiStateFlags) {
|
||||
// Disable when in screen pinning, immersive, the bouncer is showing
|
||||
// Disable when in screen pinning, immersive, the bouncer is showing, or search is disabled
|
||||
int disableFlags = SYSUI_STATE_SCREEN_PINNING
|
||||
| SYSUI_STATE_NAV_BAR_HIDDEN
|
||||
| SYSUI_STATE_BOUNCER_SHOWING;
|
||||
| SYSUI_STATE_BOUNCER_SHOWING
|
||||
| SYSUI_STATE_SEARCH_DISABLED;
|
||||
if ((sysuiStateFlags & disableFlags) != 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -17,29 +17,32 @@
|
||||
package com.android.systemui.shared.system;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.TaskInfo;
|
||||
import android.content.ComponentName;
|
||||
|
||||
public class RecentTaskInfoCompat {
|
||||
public class TaskInfoCompat {
|
||||
|
||||
private ActivityManager.RecentTaskInfo mInfo;
|
||||
|
||||
public RecentTaskInfoCompat(ActivityManager.RecentTaskInfo info) {
|
||||
mInfo = info;
|
||||
public static int getUserId(TaskInfo info) {
|
||||
return info.userId;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return mInfo.userId;
|
||||
public static int getActivityType(TaskInfo info) {
|
||||
return info.configuration.windowConfiguration.getActivityType();
|
||||
}
|
||||
|
||||
public boolean supportsSplitScreenMultiWindow() {
|
||||
return mInfo.supportsSplitScreenMultiWindow;
|
||||
public static int getWindowingMode(TaskInfo info) {
|
||||
return info.configuration.windowConfiguration.getWindowingMode();
|
||||
}
|
||||
|
||||
public ComponentName getTopActivity() {
|
||||
return mInfo.topActivity;
|
||||
public static boolean supportsSplitScreenMultiWindow(TaskInfo info) {
|
||||
return info.supportsSplitScreenMultiWindow;
|
||||
}
|
||||
|
||||
public ActivityManager.TaskDescription getTaskDescription() {
|
||||
return mInfo.taskDescription;
|
||||
public static ComponentName getTopActivity(TaskInfo info) {
|
||||
return info.topActivity;
|
||||
}
|
||||
|
||||
public static ActivityManager.TaskDescription getTaskDescription(TaskInfo info) {
|
||||
return info.taskDescription;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_H
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SEARCH_DISABLED;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.isGesturalMode;
|
||||
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_OPAQUE;
|
||||
|
||||
@@ -719,6 +720,8 @@ public class NavigationBarView extends FrameLayout implements
|
||||
(mDisabledFlags & View.STATUS_BAR_DISABLE_RECENT) != 0, displayId);
|
||||
mOverviewProxyService.setSystemUiStateFlag(SYSUI_STATE_HOME_DISABLED,
|
||||
(mDisabledFlags & View.STATUS_BAR_DISABLE_HOME) != 0, displayId);
|
||||
mOverviewProxyService.setSystemUiStateFlag(SYSUI_STATE_SEARCH_DISABLED,
|
||||
(mDisabledFlags & View.STATUS_BAR_DISABLE_SEARCH) != 0, displayId);
|
||||
if (mPanelView != null) {
|
||||
mOverviewProxyService.setSystemUiStateFlag(SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED,
|
||||
mPanelView.isFullyExpanded() && !mPanelView.isInSettings(), displayId);
|
||||
|
||||
Reference in New Issue
Block a user