import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.util.LatencyTracker;
import com.android.systemui.Dependency;
+import com.android.systemui.OverviewProxyService;
import com.android.systemui.R;
import com.android.systemui.SysUiServiceProvider;
import com.android.systemui.assist.AssistManager;
private int mSystemUiVisibility;
private LightBarController mLightBarController;
+ private OverviewProxyService mOverviewProxyService;
+
public boolean mHomeBlockedThisTouch;
// ----- Fragment Lifecycle Callbacks -----
mDisabledFlags1 = savedInstanceState.getInt(EXTRA_DISABLE_STATE, 0);
}
mAssistManager = Dependency.get(AssistManager.class);
+ mOverviewProxyService = Dependency.get(OverviewProxyService.class);
try {
WindowManagerGlobal.getWindowManagerService()
private boolean shouldDisableNavbarGestures() {
return !mStatusBar.isDeviceProvisioned()
- || (mDisabledFlags1 & StatusBarManager.DISABLE_SEARCH) != 0;
+ || (mDisabledFlags1 & StatusBarManager.DISABLE_SEARCH) != 0
+ || mOverviewProxyService.getProxy() != null;
}
private void repositionNavigationBar() {
MetricsLogger.action(getContext(), MetricsEvent.ACTION_ASSIST_LONG_PRESS);
mAssistManager.startAssist(new Bundle() /* args */);
mStatusBar.awakenDreams();
+
if (mNavigationBarView != null) {
mNavigationBarView.abortCurrentGesture();
}
private GestureHelper mGestureHelper;
private DeadZone mDeadZone;
private final NavigationBarTransitions mBarTransitions;
+ private final OverviewProxyService mOverviewProxyService;
// workaround for LayoutTransitions leaving the nav buttons in a weird state (bug 5549288)
final static boolean WORKAROUND_INVALID_LAYOUT = true;
mButtonDispatchers.put(R.id.ime_switcher, new ButtonDispatcher(R.id.ime_switcher));
mButtonDispatchers.put(R.id.accessibility_button,
new ButtonDispatcher(R.id.accessibility_button));
+ mOverviewProxyService = Dependency.get(OverviewProxyService.class);
}
public BarTransitions getBarTransitions() {
disableBack = false;
disableRecent = false;
}
+ if (mOverviewProxyService.getProxy() != null) {
+ // When overview is connected to the launcher service, disable the recents button
+ disableRecent = true;
+ }
ViewGroup navButtons = (ViewGroup) getCurrentView().findViewById(R.id.nav_buttons);
if (navButtons != null) {
onPluginDisconnected(null); // Create default gesture helper
Dependency.get(PluginManager.class).addPluginListener(this,
NavGesture.class, false /* Only one */);
- Dependency.get(OverviewProxyService.class).addCallback(mOverviewProxyListener);
+ mOverviewProxyService.addCallback(mOverviewProxyListener);
}
@Override
if (mGestureHelper != null) {
mGestureHelper.destroy();
}
- Dependency.get(OverviewProxyService.class).removeCallback(mOverviewProxyListener);
+ mOverviewProxyService.removeCallback(mOverviewProxyListener);
}
@Override