diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-23 07:23:07 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-05-23 07:23:07 +0000 |
commit | 4ac63b28ced5d5b09eaae39adca68377a2a7ef5b (patch) | |
tree | 190b1a5377bf6dfc836e4be57767d0cd512c6bf2 /src/com/android/launcher3/SecondaryDropTarget.java | |
parent | 8102503413976f42f825aacda49af53a5483933b (diff) | |
parent | d00202ed3306950264be533cb2e8a171f58f7930 (diff) | |
download | android_packages_apps_Trebuchet-4ac63b28ced5d5b09eaae39adca68377a2a7ef5b.tar.gz android_packages_apps_Trebuchet-4ac63b28ced5d5b09eaae39adca68377a2a7ef5b.tar.bz2 android_packages_apps_Trebuchet-4ac63b28ced5d5b09eaae39adca68377a2a7ef5b.zip |
Snap for 4799153 from d00202ed3306950264be533cb2e8a171f58f7930 to pi-release
Change-Id: I72cfd121a4f78f4f1c44a5989a07bc9926593a2c
Diffstat (limited to 'src/com/android/launcher3/SecondaryDropTarget.java')
-rw-r--r-- | src/com/android/launcher3/SecondaryDropTarget.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/launcher3/SecondaryDropTarget.java b/src/com/android/launcher3/SecondaryDropTarget.java index 024b4eb59..76e85e255 100644 --- a/src/com/android/launcher3/SecondaryDropTarget.java +++ b/src/com/android/launcher3/SecondaryDropTarget.java @@ -8,8 +8,6 @@ import static com.android.launcher3.ItemInfoWithIcon.FLAG_SYSTEM_NO; import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_DESKTOP; import static com.android.launcher3.accessibility.LauncherAccessibilityDelegate.RECONFIGURE; import static com.android.launcher3.accessibility.LauncherAccessibilityDelegate.UNINSTALL; -import static com.android.launcher3.userevent.nano.LauncherLogProto.ControlType.SETTINGS_BUTTON; -import static com.android.launcher3.userevent.nano.LauncherLogProto.ControlType.UNINSTALL_TARGET; import android.appwidget.AppWidgetHostView; import android.appwidget.AppWidgetManager; @@ -33,6 +31,8 @@ import android.widget.Toast; import com.android.launcher3.Launcher.OnResumeCallback; import com.android.launcher3.compat.LauncherAppsCompat; import com.android.launcher3.dragndrop.DragOptions; +import com.android.launcher3.logging.LoggerUtils; +import com.android.launcher3.userevent.nano.LauncherLogProto.ControlType; import com.android.launcher3.userevent.nano.LauncherLogProto.Target; import com.android.launcher3.util.Themes; @@ -52,7 +52,7 @@ public class SecondaryDropTarget extends ButtonDropTarget implements OnAlarmList private final Alarm mCacheExpireAlarm; - private int mCurrentAccessibilityAction = -1; + protected int mCurrentAccessibilityAction = -1; public SecondaryDropTarget(Context context, AttributeSet attrs) { this(context, attrs, 0); } @@ -70,7 +70,7 @@ public class SecondaryDropTarget extends ButtonDropTarget implements OnAlarmList setupUi(UNINSTALL); } - private void setupUi(int action) { + protected void setupUi(int action) { if (action == mCurrentAccessibilityAction) { return; } @@ -98,8 +98,11 @@ public class SecondaryDropTarget extends ButtonDropTarget implements OnAlarmList } @Override - public int getControlTypeForLogging() { - return mCurrentAccessibilityAction == UNINSTALL ? UNINSTALL_TARGET : SETTINGS_BUTTON; + public Target getDropTargetForLogging() { + Target t = LoggerUtils.newTarget(Target.Type.CONTROL); + t.controlType = mCurrentAccessibilityAction == UNINSTALL ? ControlType.UNINSTALL_TARGET + : ControlType.SETTINGS_BUTTON; + return t; } @Override |