use of com.android.launcher3.model.data.AppInfo in project android_packages_apps_Launcher3 by AOSPA.
the class AllAppsContainerView method onAppsUpdated.
private void onAppsUpdated() {
boolean hasWorkApps = false;
for (AppInfo app : mAllAppsStore.getApps()) {
if (mWorkManager.getMatcher().matches(app, null)) {
hasWorkApps = true;
break;
}
}
mHasWorkApps = hasWorkApps;
if (!mAH[AdapterHolder.MAIN].appsList.hasFilter()) {
rebindAdapters();
if (hasWorkApps) {
mWorkManager.reset();
}
}
}
use of com.android.launcher3.model.data.AppInfo in project android_packages_apps_Launcher3 by AOSPA.
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));
}
use of com.android.launcher3.model.data.AppInfo in project android_packages_apps_Launcher3 by AOSPA.
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.data.AppInfo in project android_packages_apps_Launcher3 by AOSPA.
the class LauncherModel method dumpState.
public void dumpState(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
if (args.length > 0 && TextUtils.equals(args[0], "--all")) {
writer.println(prefix + "All apps list: size=" + mBgAllAppsList.data.size());
for (AppInfo info : mBgAllAppsList.data) {
writer.println(prefix + " title=\"" + info.title + "\" bitmapIcon=" + info.bitmap.icon + " componentName=" + info.componentName.getPackageName());
}
writer.println();
}
mModelDelegate.dump(prefix, fd, writer, args);
mBgDataModel.dump(prefix, fd, writer, args);
}
use of com.android.launcher3.model.data.AppInfo in project android_packages_apps_Launcher3 by AOSPA.
the class FolderNameProviderTest method setUp.
@Before
public void setUp() {
mContext = getApplicationContext();
mItem1 = new WorkspaceItemInfo(new AppInfo(new ComponentName("a.b.c", "a.b.c/a.b.c.d"), "title1", UserHandle.of(10), new Intent().setComponent(new ComponentName("a.b.c", "a.b.c/a.b.c.d"))));
mItem2 = new WorkspaceItemInfo(new AppInfo(new ComponentName("a.b.c", "a.b.c/a.b.c.d"), "title2", UserHandle.of(10), new Intent().setComponent(new ComponentName("a.b.c", "a.b.c/a.b.c.d"))));
}
Aggregations