summaryrefslogtreecommitdiffstats
path: root/quickstep/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'quickstep/src/com')
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/OverviewState.java5
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/UiFactory.java15
-rw-r--r--quickstep/src/com/android/quickstep/views/QuickstepDragIndicator.java78
3 files changed, 81 insertions, 17 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
index abbf45e2a..52faa517f 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
@@ -113,8 +113,9 @@ public class OverviewState extends LauncherState {
// TODO: Remove hotseat from overview
return HOTSEAT_ICONS;
} else {
- return launcher.getAppsView().getFloatingHeaderView().hasVisibleContent()
- ? HOTSEAT_EXTRA | ALL_APPS_HEADER_EXTRA : HOTSEAT_ICONS | HOTSEAT_EXTRA;
+ return HOTSEAT_SEARCH_BOX | DRAG_HANDLE_INDICATOR |
+ (launcher.getAppsView().getFloatingHeaderView().hasVisibleContent()
+ ? ALL_APPS_HEADER_EXTRA : HOTSEAT_ICONS);
}
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index 846e80377..5d975b0f6 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -21,14 +21,10 @@ import static com.android.quickstep.OverviewInteractionState.KEY_SWIPE_UP_ENABLE
import android.content.Context;
import android.content.SharedPreferences;
-import android.view.View;
-import android.view.View.AccessibilityDelegate;
import com.android.launcher3.AbstractFloatingView;
-import com.android.launcher3.Hotseat;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherStateManager.StateHandler;
-import com.android.launcher3.R;
import com.android.launcher3.util.TouchController;
import com.android.quickstep.OverviewInteractionState;
import com.android.quickstep.RecentsModel;
@@ -59,10 +55,6 @@ public class UiFactory {
}
}
- public static AccessibilityDelegate newPageIndicatorAccessibilityDelegate() {
- return null;
- }
-
public static StateHandler[] getStateHandler(Launcher launcher) {
return new StateHandler[] {
launcher.getAllAppsController(), launcher.getWorkspace(),
@@ -99,11 +91,4 @@ public class UiFactory {
model.onTrimMemory(level);
}
}
-
- public static View[] getHotseatExtraContent(Hotseat hotseat) {
- return new View[] {
- hotseat.findViewById(R.id.drag_indicator),
- hotseat.findViewById(R.id.search_container_hotseat),
- };
- }
}
diff --git a/quickstep/src/com/android/quickstep/views/QuickstepDragIndicator.java b/quickstep/src/com/android/quickstep/views/QuickstepDragIndicator.java
new file mode 100644
index 000000000..82ec84ec6
--- /dev/null
+++ b/quickstep/src/com/android/quickstep/views/QuickstepDragIndicator.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.quickstep.views;
+
+import static com.android.launcher3.LauncherState.ALL_APPS;
+import static com.android.launcher3.LauncherState.OVERVIEW;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+import com.android.launcher3.R;
+import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
+import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
+import com.android.launcher3.userevent.nano.LauncherLogProto.ControlType;
+import com.android.launcher3.views.LauncherDragIndicator;
+
+public class QuickstepDragIndicator extends LauncherDragIndicator {
+
+ public QuickstepDragIndicator(Context context) {
+ super(context);
+ }
+
+ public QuickstepDragIndicator(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public QuickstepDragIndicator(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ private boolean isInOverview() {
+ return mLauncher.isInState(OVERVIEW);
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ if (isInOverview()) {
+ info.setContentDescription(getContext().getString(R.string.all_apps_button_label));
+ }
+ }
+
+ @Override
+ protected void initCustomActions(AccessibilityNodeInfo info) {
+ if (!isInOverview()) {
+ super.initCustomActions(info);
+ }
+ }
+
+ @Override
+ public void onClick(View view) {
+ if (isInOverview()) {
+ mLauncher.getUserEventDispatcher().logActionOnControl(
+ Action.Touch.TAP, ControlType.ALL_APPS_BUTTON, ContainerType.TASKSWITCHER);
+ mLauncher.getStateManager().goToState(ALL_APPS);
+ super.onClick(view);
+ } else {
+ mLauncher.getUserEventDispatcher().logActionOnControl(
+ Action.Touch.TAP, ControlType.ALL_APPS_BUTTON, ContainerType.WORKSPACE);
+ mLauncher.getStateManager().goToState(OVERVIEW);
+ }
+ }
+}