summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-03-24 23:17:32 (GMT)
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-03-24 23:17:32 (GMT)
commitdfbf109817f9da5bafbcb204b0c2195f41a1a0c4 (patch)
treee83c158c451b8d74ef60ef8bee23b118ed1a367a
parent6aa6412aba507dfd4429ff923549e6c4b8732ec8 (diff)
parent66dc70c91b22026800b6f7cfb85fe233a72fd462 (diff)
downloadandroid_packages_apps_Trebuchet-dfbf109817f9da5bafbcb204b0c2195f41a1a0c4.zip
android_packages_apps_Trebuchet-dfbf109817f9da5bafbcb204b0c2195f41a1a0c4.tar.gz
android_packages_apps_Trebuchet-dfbf109817f9da5bafbcb204b0c2195f41a1a0c4.tar.bz2
Snap for 6328604 from 66dc70c91b22026800b6f7cfb85fe233a72fd462 to qt-qpr3-release
Change-Id: Ib0a30f9e77726bd1ce22a20783b51724a64fb98f
-rw-r--r--protos/launcher_log.proto3
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java8
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/UiFactory.java8
-rw-r--r--src/com/android/launcher3/folder/Folder.java41
-rw-r--r--src/com/android/launcher3/logging/LoggerUtils.java2
5 files changed, 51 insertions, 11 deletions
diff --git a/protos/launcher_log.proto b/protos/launcher_log.proto
index 055ade5..fd36d4b 100644
--- a/protos/launcher_log.proto
+++ b/protos/launcher_log.proto
@@ -137,7 +137,8 @@ message Action {
AUTOMATED = 1;
COMMAND = 2;
TIP = 3;
- // SOFT_KEYBOARD, HARD_KEYBOARD, ASSIST
+ SOFT_KEYBOARD = 4;
+ // HARD_KEYBOARD, ASSIST
}
enum Touch {
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java
index 4d935e1..cac170c 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java
@@ -19,7 +19,6 @@ 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;
@@ -49,7 +48,6 @@ 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;
@@ -210,12 +208,6 @@ 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> {
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index eb58b94..0790cf6 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -28,6 +28,7 @@ import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_SEEN;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN;
+import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
@@ -58,6 +59,7 @@ import com.android.quickstep.SysUINavigationMode.Mode;
import com.android.quickstep.SysUINavigationMode.NavigationModeChangeListener;
import com.android.quickstep.util.RemoteFadeOutAnimationListener;
import com.android.systemui.shared.system.ActivityCompat;
+import com.android.systemui.shared.system.ActivityManagerWrapper;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
@@ -252,5 +254,9 @@ public class UiFactory extends RecentsUiFactory {
return persons == null ? Utilities.EMPTY_PERSON_ARRAY : persons;
}
- public static void closeSystemWindows() {}
+ /** Closes system windows. */
+ public static void closeSystemWindows() {
+ ActivityManagerWrapper.getInstance()
+ .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
+ }
}
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 0bd2c9a..f483d78 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -17,6 +17,8 @@
package com.android.launcher3.folder;
import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_EXIT_DELAY;
+import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_DESKTOP;
+import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent;
@@ -74,6 +76,7 @@ import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.logging.LoggerUtils;
import com.android.launcher3.pageindicators.PageIndicatorDots;
+import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
@@ -1340,6 +1343,9 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
if (hasFocus) {
startEditingFolderName();
} else {
+ if (isEditingName()) {
+ logEditFolderLabel();
+ }
mFolderName.dispatchBackKey();
}
}
@@ -1517,4 +1523,39 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
super.draw(canvas);
}
}
+
+ private void logEditFolderLabel() {
+ LauncherLogProto.LauncherEvent ev = new LauncherLogProto.LauncherEvent();
+ LauncherLogProto.Action action = new LauncherLogProto.Action();
+ action.type = LauncherLogProto.Action.Type.SOFT_KEYBOARD;
+ ev.action = action;
+
+ LauncherLogProto.Target edittext_target = new LauncherLogProto.Target();
+ edittext_target.type = LauncherLogProto.Target.Type.ITEM;
+ edittext_target.itemType = LauncherLogProto.ItemType.EDITTEXT;
+
+ LauncherLogProto.Target folder_target = new LauncherLogProto.Target();
+ folder_target.type = LauncherLogProto.Target.Type.CONTAINER;
+ folder_target.containerType = LauncherLogProto.ContainerType.FOLDER;
+ folder_target.pageIndex = mInfo.screenId;
+ folder_target.gridX = mInfo.cellX;
+ folder_target.gridY = mInfo.cellY;
+ folder_target.cardinality = mInfo.contents.size();
+
+ LauncherLogProto.Target parent_target = new LauncherLogProto.Target();
+ parent_target.type = LauncherLogProto.Target.Type.CONTAINER;
+ switch (mInfo.container) {
+ case CONTAINER_HOTSEAT:
+ parent_target.containerType = LauncherLogProto.ContainerType.HOTSEAT;
+ break;
+ case CONTAINER_DESKTOP:
+ parent_target.containerType = LauncherLogProto.ContainerType.WORKSPACE;
+ break;
+ default:
+ Log.e(TAG, String.format("Expected container to be either %s or %s but found %s.",
+ CONTAINER_HOTSEAT, CONTAINER_DESKTOP, mInfo.container));
+ }
+ ev.srcTarget = new LauncherLogProto.Target[]{edittext_target, folder_target, parent_target};
+ mLauncher.getUserEventDispatcher().dispatchUserEvent(ev, null);
+ }
}
diff --git a/src/com/android/launcher3/logging/LoggerUtils.java b/src/com/android/launcher3/logging/LoggerUtils.java
index 598792a..925b7ba 100644
--- a/src/com/android/launcher3/logging/LoggerUtils.java
+++ b/src/com/android/launcher3/logging/LoggerUtils.java
@@ -109,7 +109,7 @@ public class LoggerUtils {
t.containerType == NAVBAR) {
str += " id=" + t.pageIndex;
} else if (t.containerType == ContainerType.FOLDER) {
- str += " grid(" + t.gridX + "," + t.gridY + ")";
+ str += "[PageIndex=" + t.pageIndex + ", grid(" + t.gridX + "," + t.gridY + ")]";
}
break;
default: