mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Merging widget item click listener to default click listener
> Also removing check for dragHandle, since dragHandle is already removed Bug: 307306823 Test: atest Launcher3Tests Flag: N/A Change-Id: I0b452dd1fbccf15ed686370471e8866b179fd77e
This commit is contained in:
@@ -61,7 +61,10 @@ import com.android.launcher3.testing.shared.TestProtocol;
|
||||
import com.android.launcher3.util.ItemInfoMatcher;
|
||||
import com.android.launcher3.util.PackageManagerHelper;
|
||||
import com.android.launcher3.views.FloatingIconView;
|
||||
import com.android.launcher3.views.Snackbar;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
import com.android.launcher3.widget.PendingAddShortcutInfo;
|
||||
import com.android.launcher3.widget.PendingAddWidgetInfo;
|
||||
import com.android.launcher3.widget.PendingAppWidgetHostView;
|
||||
import com.android.launcher3.widget.WidgetAddFlowHandler;
|
||||
import com.android.launcher3.widget.WidgetManagerHelper;
|
||||
@@ -107,6 +110,16 @@ public class ItemClickHandler {
|
||||
}
|
||||
} else if (tag instanceof ItemClickProxy) {
|
||||
((ItemClickProxy) tag).onItemClicked(v);
|
||||
} else if (tag instanceof PendingAddShortcutInfo) {
|
||||
CharSequence msg = Utilities.wrapForTts(
|
||||
launcher.getText(R.string.long_press_shortcut_to_add),
|
||||
launcher.getString(R.string.long_accessible_way_to_add_shortcut));
|
||||
Snackbar.show(launcher, msg, null);
|
||||
} else if (tag instanceof PendingAddWidgetInfo) {
|
||||
CharSequence msg = Utilities.wrapForTts(
|
||||
launcher.getText(R.string.long_press_widget_to_add),
|
||||
launcher.getString(R.string.long_accessible_way_to_add));
|
||||
Snackbar.show(launcher, msg, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user