use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_Launcher3 by ProtonAOSP.
the class WidgetsDiffReporterTest 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 ProtonAOSP.
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 ProtonAOSP.
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));
}
use of com.android.launcher3.model.PackageItemInfo in project android_packages_apps_Launcher3 by ProtonAOSP.
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 ProtonAOSP.
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);
}
Aggregations