Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab3f44bc authored by Willie Koomson's avatar Willie Koomson
Browse files

Clean up code related to the old widget preview toast

This code is no longer used now that widget cells show an add button.

Bug: 335367158
Test: N/A
Flag: com.android.launcher3.enable_widget_tap_to_add
Change-Id: I8040c75a89394f34885c24308f4e889b7263cc54
parent caf7065e
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -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);
        }
    }