summaryrefslogtreecommitdiffstats
path: root/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2018-02-08 12:10:54 -0800
committerTony Wickham <twickham@google.com>2018-02-15 12:20:16 -0800
commit663759e444b9aebf4beb2c737df8f58ffc21a49b (patch)
tree0dcb8d86126242279e422c66d48c14577cb9f4af /quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
parent4c021ee1bca85957cb63bff8d948ff9de7adc8a4 (diff)
downloadandroid_packages_apps_Trebuchet-663759e444b9aebf4beb2c737df8f58ffc21a49b.tar.gz
android_packages_apps_Trebuchet-663759e444b9aebf4beb2c737df8f58ffc21a49b.tar.bz2
android_packages_apps_Trebuchet-663759e444b9aebf4beb2c737df8f58ffc21a49b.zip
Remove back button when on home screen
Add OverviewInteractionState to handle setting OverviewInteractionFlags. Hide back button when in NORMAL state and launcher's window is focused. Show it when in other states or when launcher's window loses focus. Change-Id: I35919561b9972789e995f1cc434c23e2afe9e77c
Diffstat (limited to 'quickstep/src/com/android/launcher3/uioverrides/UiFactory.java')
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/UiFactory.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index b4f40c215..92b38fe01 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -16,12 +16,11 @@
package com.android.launcher3.uioverrides;
-import android.content.pm.PackageManager;
+import static com.android.launcher3.LauncherState.NORMAL;
+
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.PointF;
-import android.os.Bundle;
-import android.view.View;
import android.view.View.AccessibilityDelegate;
import com.android.launcher3.Launcher;
@@ -29,6 +28,7 @@ import com.android.launcher3.LauncherStateManager.StateHandler;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.graphics.BitmapRenderer;
import com.android.launcher3.util.TouchController;
+import com.android.quickstep.OverviewInteractionState;
import com.android.quickstep.RecentsView;
import com.android.systemui.shared.recents.view.RecentsTransition;
@@ -68,6 +68,11 @@ public class UiFactory {
OptionsPopupView.show(launcher, touchPoint.x, touchPoint.y);
}
+ public static void onLauncherStateOrFocusChanged(Launcher launcher) {
+ OverviewInteractionState.setBackButtonVisible(launcher, !launcher.isInState(NORMAL)
+ || !launcher.hasWindowFocus());
+ }
+
public static Bitmap createFromRenderer(int width, int height, boolean forceSoftwareRenderer,
BitmapRenderer renderer) {
if (USE_HARDWARE_BITMAP && !forceSoftwareRenderer) {