am c5fb59fb: Fixing loadWorkspace being called multiple times Using right intent when refreshing shortcut icons
* commit 'c5fb59fb9a36180ce962f565d85aa92f9991da1a': Fixing loadWorkspace being called multiple times Using right intent when refreshing shortcut icons
This commit is contained in:
@@ -354,7 +354,7 @@ public class LauncherBackupHelper implements BackupHelper {
|
|||||||
try {
|
try {
|
||||||
ContentResolver cr = mContext.getContentResolver();
|
ContentResolver cr = mContext.getContentResolver();
|
||||||
ContentValues values = unpackFavorite(buffer, 0, dataSize);
|
ContentValues values = unpackFavorite(buffer, 0, dataSize);
|
||||||
cr.insert(Favorites.CONTENT_URI, values);
|
cr.insert(Favorites.CONTENT_URI_NO_NOTIFICATION, values);
|
||||||
} catch (InvalidProtocolBufferNanoException e) {
|
} catch (InvalidProtocolBufferNanoException e) {
|
||||||
Log.e(TAG, "failed to decode favorite", e);
|
Log.e(TAG, "failed to decode favorite", e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1905,7 +1905,7 @@ public class LauncherModel extends BroadcastReceiver
|
|||||||
|
|
||||||
final ArrayList<Long> itemsToRemove = new ArrayList<Long>();
|
final ArrayList<Long> itemsToRemove = new ArrayList<Long>();
|
||||||
final ArrayList<Long> restoredRows = 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);
|
if (DEBUG_LOADERS) Log.d(TAG, "loading model from " + contentUri);
|
||||||
final Cursor c = contentResolver.query(contentUri, null, null, null, null);
|
final Cursor c = contentResolver.query(contentUri, null, null, null, null);
|
||||||
|
|
||||||
@@ -2265,7 +2265,7 @@ public class LauncherModel extends BroadcastReceiver
|
|||||||
LauncherAppWidgetInfo.FLAG_RESTORE_STARTED;
|
LauncherAppWidgetInfo.FLAG_RESTORE_STARTED;
|
||||||
} else if (REMOVE_UNRESTORED_ICONS) {
|
} else if (REMOVE_UNRESTORED_ICONS) {
|
||||||
Launcher.addDumpLog(TAG,
|
Launcher.addDumpLog(TAG,
|
||||||
"Unrestored package removed: " + component, true);
|
"Unrestored widget removed: " + component, true);
|
||||||
itemsToRemove.add(id);
|
itemsToRemove.add(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -2332,7 +2332,7 @@ public class LauncherModel extends BroadcastReceiver
|
|||||||
|
|
||||||
if (itemsToRemove.size() > 0) {
|
if (itemsToRemove.size() > 0) {
|
||||||
ContentProviderClient client = contentResolver.acquireContentProviderClient(
|
ContentProviderClient client = contentResolver.acquireContentProviderClient(
|
||||||
LauncherSettings.Favorites.CONTENT_URI);
|
contentUri);
|
||||||
// Remove dead items
|
// Remove dead items
|
||||||
for (long id : itemsToRemove) {
|
for (long id : itemsToRemove) {
|
||||||
if (DEBUG_LOADERS) {
|
if (DEBUG_LOADERS) {
|
||||||
@@ -2350,7 +2350,7 @@ public class LauncherModel extends BroadcastReceiver
|
|||||||
|
|
||||||
if (restoredRows.size() > 0) {
|
if (restoredRows.size() > 0) {
|
||||||
ContentProviderClient updater = contentResolver.acquireContentProviderClient(
|
ContentProviderClient updater = contentResolver.acquireContentProviderClient(
|
||||||
LauncherSettings.Favorites.CONTENT_URI);
|
contentUri);
|
||||||
// Update restored items that no longer require special handling
|
// Update restored items that no longer require special handling
|
||||||
try {
|
try {
|
||||||
StringBuilder selectionBuilder = new StringBuilder();
|
StringBuilder selectionBuilder = new StringBuilder();
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class ShortcutInfo extends ItemInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateIcon(IconCache iconCache) {
|
public void updateIcon(IconCache iconCache) {
|
||||||
mIcon = iconCache.getIcon(intent, user);
|
mIcon = iconCache.getIcon(promisedIntent != null ? promisedIntent : intent, user);
|
||||||
usingFallbackIcon = iconCache.isDefaultIcon(mIcon, user);
|
usingFallbackIcon = iconCache.isDefaultIcon(mIcon, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user