summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-10-14 16:42:54 -0700
committerSunny Goyal <sunnygoyal@google.com>2014-10-14 16:43:45 -0700
commit2350bc97851eea1662eee43d61290eb7a8382021 (patch)
tree522b594c3e69f78b2615671f534832f9d63b9b53 /src/com/android/launcher3/LauncherModel.java
parent76229a7ccca69e92700f7b5f9d54739ee67276be (diff)
downloadandroid_packages_apps_Trebuchet-2350bc97851eea1662eee43d61290eb7a8382021.tar.gz
android_packages_apps_Trebuchet-2350bc97851eea1662eee43d61290eb7a8382021.tar.bz2
android_packages_apps_Trebuchet-2350bc97851eea1662eee43d61290eb7a8382021.zip
Adding NPE check in InstallShortcutReceiver
> Removing some unused methods Bug: 17971165 Change-Id: I1bc5c764fd65b44c950a58371b60d2b53c221995
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r--src/com/android/launcher3/LauncherModel.java21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 0b7ee2e1f..f747423e6 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -3499,17 +3499,6 @@ public class LauncherModel extends BroadcastReceiver
}
}
- ShortcutInfo addShortcut(Context context, Intent data, long container, int screen,
- int cellX, int cellY, boolean notify) {
- final ShortcutInfo info = infoFromShortcutIntent(context, data, null);
- if (info == null) {
- return null;
- }
- addItemToDatabase(context, info, container, screen, cellX, cellY, notify);
-
- return info;
- }
-
/**
* Attempts to find an AppWidgetProviderInfo that matches the given component.
*/
@@ -3525,7 +3514,7 @@ public class LauncherModel extends BroadcastReceiver
return null;
}
- ShortcutInfo infoFromShortcutIntent(Context context, Intent data, Bitmap fallbackIcon) {
+ ShortcutInfo infoFromShortcutIntent(Context context, Intent data) {
Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
Parcelable bitmap = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON);
@@ -3558,12 +3547,8 @@ public class LauncherModel extends BroadcastReceiver
// users wouldn't get here without intent forwarding anyway.
info.user = UserHandleCompat.myUserHandle();
if (icon == null) {
- if (fallbackIcon != null) {
- icon = fallbackIcon;
- } else {
- icon = mIconCache.getDefaultIcon(info.user);
- info.usingFallbackIcon = true;
- }
+ icon = mIconCache.getDefaultIcon(info.user);
+ info.usingFallbackIcon = true;
}
info.setIcon(icon);