Merge "Clean up code related to the old widget preview toast" into main

This commit is contained in:
Willie Koomson
2024-06-27 00:47:30 +00:00
committed by Android (Google) Code Review
@@ -46,7 +46,6 @@ import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.apppairs.AppPairIcon;
import com.android.launcher3.folder.Folder;
import com.android.launcher3.folder.FolderIcon;
@@ -67,10 +66,7 @@ import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.ApiWrapper;
import com.android.launcher3.util.ItemInfoMatcher;
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;
@@ -127,20 +123,6 @@ 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) {
if (DEBUG) {
String targetPackage = ((PendingAddWidgetInfo) tag).getTargetPackage();
Log.d(TAG, "onClick: PendingAddWidgetInfo clicked for package=" + targetPackage);
}
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);
}
}