use of android.content.pm.LauncherApps in project android_frameworks_base by crdroidandroid.
the class AppWidgetHostView method updateContentDescription.
private void updateContentDescription(AppWidgetProviderInfo info) {
if (info != null) {
LauncherApps launcherApps = getContext().getSystemService(LauncherApps.class);
ApplicationInfo appInfo = launcherApps.getApplicationInfo(info.provider.getPackageName(), 0, info.getProfile());
if (appInfo != null && (appInfo.flags & ApplicationInfo.FLAG_SUSPENDED) != 0) {
setContentDescription(Resources.getSystem().getString(com.android.internal.R.string.suspended_widget_accessibility, info.label));
} else {
setContentDescription(info.label);
}
}
}
Aggregations