diff options
author | Kevin F. Haggerty <haggertk@lineageos.org> | 2020-06-06 10:04:42 -0600 |
---|---|---|
committer | Kevin F. Haggerty <haggertk@lineageos.org> | 2020-06-06 10:05:30 -0600 |
commit | 0c062179a89e047d778925412632473005a2ec43 (patch) | |
tree | 639916800e76ccf6b5e9b371d3a1c0cb083486d0 /src/com/android/launcher3/folder/Folder.java | |
parent | b0838b261a6fb447fe9c4cf2513236a0736be209 (diff) | |
parent | 09bdbebdd2c93123a5d418de56053cc1c279afee (diff) | |
download | android_packages_apps_Trebuchet-lineage-17.1.tar.gz android_packages_apps_Trebuchet-lineage-17.1.tar.bz2 android_packages_apps_Trebuchet-lineage-17.1.zip |
Merge tag 'android-10.0.0_r37' into staging/lineage-17.1_merge-android-10.0.0_r37lineage-17.1
Android 10.0.0 Release 37 (QQ3A.200605.001)
* tag 'android-10.0.0_r37':
[DO NOT MERGE] Enable APP_SEARCH_IMPROVEMENTS flag.
Ensure current animation is cancelled before building new folder animation.
Fixes ag/10573640 on qt-future-dev branch.
[DO NOT MERGE] Adds basic smart-folder logging.
[DO NOT MERGE] Support blacklisting live wallpapers from showing sysui scrims
Import translations. DO NOT MERGE
Revert "[DO NOT MERGE] Turn off FOLDER_NAME_SUGGEST feature flag"
[DO NOT MERGE] Initiailize APP_SEARCH_IMRPOVEMENT flag outside DEBUG builds.
[DO NOT MERGE] Adds fling gesture suppression to Launcher
Dismisses system overlays for Home intent.
[DO NOT MERGE] Fix some visual jumps when swiping home
[DO NOT MERGE] Turn off FOLDER_NAME_SUGGEST feature flag Bug: 150788630
[DO NOT MERGE] Prevent hotseat touch hijack
Change-Id: I2316620bda33d83d668c8727e728af09db3e3e4c
Diffstat (limited to 'src/com/android/launcher3/folder/Folder.java')
-rw-r--r-- | src/com/android/launcher3/folder/Folder.java | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index 0bd2c9af7..8df5e7d03 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; @@ -442,9 +445,6 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo } private void startAnimation(final AnimatorSet a) { - if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) { - mCurrentAnimator.cancel(); - } final Workspace workspace = mLauncher.getWorkspace(); final CellLayout currentCellLayout = (CellLayout) workspace.getChildAt(workspace.getCurrentPage()); @@ -550,6 +550,9 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo // dropping. One resulting issue is that replaceFolderWithFinalItem() can be called twice. mDeleteFolderOnDropCompleted = false; + if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) { + mCurrentAnimator.cancel(); + } AnimatorSet anim = new FolderAnimationManager(this, true /* isOpening */).getAnimator(); anim.addListener(new AnimatorListenerAdapter() { @Override @@ -650,6 +653,9 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo } private void animateClosed() { + if (mCurrentAnimator != null && mCurrentAnimator.isRunning()) { + mCurrentAnimator.cancel(); + } AnimatorSet a = new FolderAnimationManager(this, false /* isOpening */).getAnimator(); a.addListener(new AnimatorListenerAdapter() { @Override @@ -1340,6 +1346,9 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo if (hasFocus) { startEditingFolderName(); } else { + if (isEditingName()) { + logEditFolderLabel(); + } mFolderName.dispatchBackKey(); } } @@ -1517,4 +1526,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); + } } |