use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_Launcher3 by ArrowOS.
the class WidgetsListTableViewHolderBinderTest method generateSampleAppWithWidgets.
private WidgetsListContentEntry generateSampleAppWithWidgets(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 WidgetsListContentEntry(appInfo, /* titleSectionName= */
"", generateWidgetItems(packageName, numOfWidgets), Integer.MAX_VALUE);
}
use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_Launcher3 by ArrowOS.
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);
}
use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_Launcher3 by ArrowOS.
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);
}
use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_Launcher3 by ArrowOS.
the class PackageUserKeyTest method fromPackageItemInfo_shouldCreateExpectedObject.
@Test
public void fromPackageItemInfo_shouldCreateExpectedObject() {
PackageUserKey packageUserKey = PackageUserKey.fromPackageItemInfo(new PackageItemInfo(TEST_PACKAGE, UserHandle.CURRENT));
assertThat(packageUserKey.mPackageName).isEqualTo(TEST_PACKAGE);
assertThat(packageUserKey.mWidgetCategory).isEqualTo(NO_CATEGORY);
assertThat(packageUserKey.mUser).isEqualTo(UserHandle.CURRENT);
}
use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_Launcher3 by ArrowOS.
the class WidgetsDiffReporterTest 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);
}
Aggregations