summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-09-26 10:18:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-26 10:18:31 +0000
commitb16200e89eb8503ab70fe531aff8d2fcda15d3d3 (patch)
tree12a7d6f55aede438d3214722271312f199a9ad5e /src/com
parent974976cc03fc8f7cc5cb397a15175caaf66d5d8d (diff)
parentfdff96d385fdbbcb1d0a49853e89d60211a48cc7 (diff)
downloadandroid_packages_apps_Trebuchet-b16200e89eb8503ab70fe531aff8d2fcda15d3d3.tar.gz
android_packages_apps_Trebuchet-b16200e89eb8503ab70fe531aff8d2fcda15d3d3.tar.bz2
android_packages_apps_Trebuchet-b16200e89eb8503ab70fe531aff8d2fcda15d3d3.zip
am fdff96d3: am c5fb59fb: Fixing loadWorkspace being called multiple times Using right intent when refreshing shortcut icons
* commit 'fdff96d385fdbbcb1d0a49853e89d60211a48cc7': Fixing loadWorkspace being called multiple times Using right intent when refreshing shortcut icons
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/LauncherBackupHelper.java2
-rw-r--r--src/com/android/launcher3/LauncherModel.java8
-rw-r--r--src/com/android/launcher3/ShortcutInfo.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/launcher3/LauncherBackupHelper.java b/src/com/android/launcher3/LauncherBackupHelper.java
index 1ea562b3f..911a41dca 100644
--- a/src/com/android/launcher3/LauncherBackupHelper.java
+++ b/src/com/android/launcher3/LauncherBackupHelper.java
@@ -354,7 +354,7 @@ public class LauncherBackupHelper implements BackupHelper {
try {
ContentResolver cr = mContext.getContentResolver();
ContentValues values = unpackFavorite(buffer, 0, dataSize);
- cr.insert(Favorites.CONTENT_URI, values);
+ cr.insert(Favorites.CONTENT_URI_NO_NOTIFICATION, values);
} catch (InvalidProtocolBufferNanoException e) {
Log.e(TAG, "failed to decode favorite", e);
}
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index d2cf8f50b..dd948916b 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -1905,7 +1905,7 @@ public class LauncherModel extends BroadcastReceiver
final ArrayList<Long> itemsToRemove = new ArrayList<Long>();
final ArrayList<Long> restoredRows = new ArrayList<Long>();
- final Uri contentUri = LauncherSettings.Favorites.CONTENT_URI;
+ final Uri contentUri = LauncherSettings.Favorites.CONTENT_URI_NO_NOTIFICATION;
if (DEBUG_LOADERS) Log.d(TAG, "loading model from " + contentUri);
final Cursor c = contentResolver.query(contentUri, null, null, null, null);
@@ -2265,7 +2265,7 @@ public class LauncherModel extends BroadcastReceiver
LauncherAppWidgetInfo.FLAG_RESTORE_STARTED;
} else if (REMOVE_UNRESTORED_ICONS) {
Launcher.addDumpLog(TAG,
- "Unrestored package removed: " + component, true);
+ "Unrestored widget removed: " + component, true);
itemsToRemove.add(id);
continue;
}
@@ -2332,7 +2332,7 @@ public class LauncherModel extends BroadcastReceiver
if (itemsToRemove.size() > 0) {
ContentProviderClient client = contentResolver.acquireContentProviderClient(
- LauncherSettings.Favorites.CONTENT_URI);
+ contentUri);
// Remove dead items
for (long id : itemsToRemove) {
if (DEBUG_LOADERS) {
@@ -2350,7 +2350,7 @@ public class LauncherModel extends BroadcastReceiver
if (restoredRows.size() > 0) {
ContentProviderClient updater = contentResolver.acquireContentProviderClient(
- LauncherSettings.Favorites.CONTENT_URI);
+ contentUri);
// Update restored items that no longer require special handling
try {
StringBuilder selectionBuilder = new StringBuilder();
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java
index 5b27f845e..daf343460 100644
--- a/src/com/android/launcher3/ShortcutInfo.java
+++ b/src/com/android/launcher3/ShortcutInfo.java
@@ -174,7 +174,7 @@ public class ShortcutInfo extends ItemInfo {
}
public void updateIcon(IconCache iconCache) {
- mIcon = iconCache.getIcon(intent, user);
+ mIcon = iconCache.getIcon(promisedIntent != null ? promisedIntent : intent, user);
usingFallbackIcon = iconCache.isDefaultIcon(mIcon, user);
}