Revert "Add shortcut manager support to Settings (2/2) b/28298258"
b/28643184
This reverts commit 79ec6df771
.
Change-Id: I3de8a27e88a5a84825e914725259530b22756da0
This commit is contained in:
@@ -59,14 +59,14 @@ public class CreateShortcut extends LauncherActivity {
|
||||
ResolveInfo resolveInfo = itemForPosition(position).resolveInfo;
|
||||
ActivityInfo activityInfo = resolveInfo.activityInfo;
|
||||
if (activityInfo.icon != 0) {
|
||||
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, createIcon(this, activityInfo.icon));
|
||||
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, createIcon(activityInfo.icon));
|
||||
}
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
static Bitmap createIcon(Context ctx, int resource) {
|
||||
Context context = new ContextThemeWrapper(ctx, android.R.style.Theme_Material);
|
||||
private Bitmap createIcon(int resource) {
|
||||
Context context = new ContextThemeWrapper(this, android.R.style.Theme_Material);
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.shortcut_badge, null);
|
||||
((ImageView) view.findViewById(android.R.id.icon)).setImageResource(resource);
|
||||
|
||||
|
Reference in New Issue
Block a user