use of com.android.launcher3.LauncherSettings.Favorites.CONTAINER_ALL_APPS in project android_packages_apps_Trebuchet by LineageOS.
the class SecondaryDisplayLauncher method onIconClicked.
private void onIconClicked(View v) {
// view has detached (it's possible for this to happen if the view is removed mid touch).
if (v.getWindowToken() == null)
return;
Object tag = v.getTag();
if (tag instanceof ItemInfo) {
ItemInfo item = (ItemInfo) tag;
Intent intent;
if (item instanceof PromiseAppInfo) {
PromiseAppInfo promiseAppInfo = (PromiseAppInfo) item;
intent = promiseAppInfo.getMarketIntent(this);
} else {
intent = item.getIntent();
}
if (intent == null) {
throw new IllegalArgumentException("Input must have a valid intent");
}
startActivitySafely(v, intent, item, CONTAINER_ALL_APPS);
}
}
use of com.android.launcher3.LauncherSettings.Favorites.CONTAINER_ALL_APPS in project Neo-Launcher by NeoApplications.
the class ItemClickHandler method onClick.
private static void onClick(View v, String sourceContainer) {
// view has detached (it's possible for this to happen if the view is removed mid touch).
if (v.getWindowToken() == null)
return;
Launcher launcher = Launcher.getLauncher(v.getContext());
if (!launcher.getWorkspace().isFinishedSwitchingState())
return;
Object tag = v.getTag();
if (tag instanceof WorkspaceItemInfo) {
onClickAppShortcut(v, (WorkspaceItemInfo) tag, launcher, sourceContainer);
} else if (tag instanceof FolderInfo) {
if (v instanceof FolderIcon) {
onClickFolderIcon(v);
}
} else if (tag instanceof AppInfo) {
startAppShortcutOrInfoActivity(v, (AppInfo) tag, launcher, sourceContainer == null ? CONTAINER_ALL_APPS : sourceContainer);
if (Utilities.getOmegaPrefs(launcher).getSortMode() == Config.SORT_MOST_USED) {
Utilities.getOmegaPrefs(launcher).updateSortApps();
Log.d(TAG, "Sort Mode Most Used");
}
} else if (tag instanceof LauncherAppWidgetInfo) {
if (v instanceof PendingAppWidgetHostView) {
onClickPendingWidget((PendingAppWidgetHostView) v, launcher);
}
}
}
use of com.android.launcher3.LauncherSettings.Favorites.CONTAINER_ALL_APPS in project android_packages_apps_Trebuchet by LineageOS.
the class ItemClickHandler method onClick.
private static void onClick(View v, String sourceContainer) {
// view has detached (it's possible for this to happen if the view is removed mid touch).
if (v.getWindowToken() == null)
return;
Launcher launcher = Launcher.getLauncher(v.getContext());
if (!launcher.getWorkspace().isFinishedSwitchingState())
return;
Object tag = v.getTag();
if (tag instanceof WorkspaceItemInfo) {
onClickAppShortcut(v, (WorkspaceItemInfo) tag, launcher, sourceContainer);
} else if (tag instanceof FolderInfo) {
if (v instanceof FolderIcon) {
onClickFolderIcon(v);
}
} else if (tag instanceof AppInfo) {
startAppShortcutOrInfoActivity(v, (AppInfo) tag, launcher, sourceContainer == null ? CONTAINER_ALL_APPS : sourceContainer);
} else if (tag instanceof LauncherAppWidgetInfo) {
if (v instanceof PendingAppWidgetHostView) {
onClickPendingWidget((PendingAppWidgetHostView) v, launcher);
}
}
}
Aggregations