Search in sources :

Example 51 with PackageItemInfo

use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_404Launcher by P-404.

the class WidgetsDiffReporterTest method createPackageItemInfo.

private PackageItemInfo createPackageItemInfo(String packageName, String appName, UserHandle userHandle) {
    PackageItemInfo pInfo = new PackageItemInfo(packageName, userHandle);
    pInfo.title = appName;
    pInfo.bitmap = BitmapInfo.of(Bitmap.createBitmap(10, 10, Bitmap.Config.ALPHA_8), 0);
    return pInfo;
}
Also used : PackageItemInfo(com.android.launcher3.model.data.PackageItemInfo)

Example 52 with PackageItemInfo

use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_404Launcher by P-404.

the class WidgetsListHeaderViewHolderBinderTest method generateSampleAppHeader.

private WidgetsListHeaderEntry generateSampleAppHeader(String appName, String packageName, int numOfWidgets) {
    PackageItemInfo appInfo = new PackageItemInfo(packageName, UserHandle.CURRENT);
    appInfo.title = appName;
    appInfo.bitmap = BitmapInfo.of(Bitmap.createBitmap(10, 10, Bitmap.Config.ALPHA_8), 0);
    return new WidgetsListHeaderEntry(appInfo, /* titleSectionName= */
    "", generateWidgetItems(packageName, numOfWidgets));
}
Also used : PackageItemInfo(com.android.launcher3.model.data.PackageItemInfo) WidgetsListHeaderEntry(com.android.launcher3.widget.model.WidgetsListHeaderEntry)

Example 53 with PackageItemInfo

use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_404Launcher by P-404.

the class WidgetsListSearchHeaderViewHolderBinderTest method generateSampleSearchHeader.

private WidgetsListSearchHeaderEntry generateSampleSearchHeader(String appName, String packageName, int numOfWidgets) {
    PackageItemInfo appInfo = new PackageItemInfo(packageName, UserHandle.CURRENT);
    appInfo.title = appName;
    appInfo.bitmap = BitmapInfo.of(Bitmap.createBitmap(10, 10, Bitmap.Config.ALPHA_8), 0);
    return new WidgetsListSearchHeaderEntry(appInfo, /* titleSectionName= */
    "", generateWidgetItems(packageName, numOfWidgets));
}
Also used : PackageItemInfo(com.android.launcher3.model.data.PackageItemInfo) WidgetsListSearchHeaderEntry(com.android.launcher3.widget.model.WidgetsListSearchHeaderEntry)

Example 54 with PackageItemInfo

use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_404Launcher by P-404.

the class SimpleWidgetsSearchAlgorithmTest method createWidgetsHeaderEntry.

private WidgetsListHeaderEntry createWidgetsHeaderEntry(String packageName, String appName, int numOfWidgets) {
    List<WidgetItem> widgetItems = generateWidgetItems(packageName, numOfWidgets);
    PackageItemInfo pInfo = createPackageItemInfo(packageName, appName, widgetItems.get(0).user);
    return new WidgetsListHeaderEntry(pInfo, /* titleSectionName= */
    "", widgetItems);
}
Also used : PackageItemInfo(com.android.launcher3.model.data.PackageItemInfo) WidgetItem(com.android.launcher3.model.WidgetItem) WidgetsListHeaderEntry(com.android.launcher3.widget.model.WidgetsListHeaderEntry)

Example 55 with PackageItemInfo

use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_404Launcher by P-404.

the class SimpleWidgetsSearchAlgorithmTest method createWidgetsContentEntry.

private WidgetsListContentEntry createWidgetsContentEntry(String packageName, String appName, int numOfWidgets) {
    List<WidgetItem> widgetItems = generateWidgetItems(packageName, numOfWidgets);
    PackageItemInfo pInfo = createPackageItemInfo(packageName, appName, widgetItems.get(0).user);
    return new WidgetsListContentEntry(pInfo, /* titleSectionName= */
    "", widgetItems);
}
Also used : PackageItemInfo(com.android.launcher3.model.data.PackageItemInfo) WidgetsListContentEntry(com.android.launcher3.widget.model.WidgetsListContentEntry) WidgetItem(com.android.launcher3.model.WidgetItem)

Aggregations

PackageItemInfo (com.android.launcher3.model.data.PackageItemInfo)94 WidgetsListContentEntry (com.android.launcher3.widget.model.WidgetsListContentEntry)39 WidgetsListHeaderEntry (com.android.launcher3.widget.model.WidgetsListHeaderEntry)39 WidgetItem (com.android.launcher3.model.WidgetItem)28 ArrayList (java.util.ArrayList)28 WidgetsListBaseEntry (com.android.launcher3.widget.model.WidgetsListBaseEntry)24 Map (java.util.Map)22 HashMap (java.util.HashMap)20 ComponentName (android.content.ComponentName)19 List (java.util.List)19 IconCache (com.android.launcher3.icons.IconCache)17 Context (android.content.Context)16 AlphabeticIndexCompat (com.android.launcher3.compat.AlphabeticIndexCompat)16 PackageUserKey (com.android.launcher3.util.PackageUserKey)16 Log (android.util.Log)14 Nullable (androidx.annotation.Nullable)14 ArrayMap (androidx.collection.ArrayMap)14 ShortcutConfigActivityInfo.queryList (com.android.launcher3.pm.ShortcutConfigActivityInfo.queryList)14 Arrays (java.util.Arrays)14 Predicate (java.util.function.Predicate)14