summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/AppInfo.java10
-rw-r--r--src/com/android/launcher3/graphics/IconShapeOverride.java2
-rw-r--r--src/com/android/launcher3/widget/WidgetsDiffReporter.java7
3 files changed, 12 insertions, 7 deletions
diff --git a/src/com/android/launcher3/AppInfo.java b/src/com/android/launcher3/AppInfo.java
index 9ec26e26a..3da199635 100644
--- a/src/com/android/launcher3/AppInfo.java
+++ b/src/com/android/launcher3/AppInfo.java
@@ -95,10 +95,14 @@ public class AppInfo extends ItemInfoWithIcon {
}
public static Intent makeLaunchIntent(LauncherActivityInfo info) {
+ return makeLaunchIntent(info.getComponentName());
+ }
+
+ public static Intent makeLaunchIntent(ComponentName cn) {
return new Intent(Intent.ACTION_MAIN)
- .addCategory(Intent.CATEGORY_LAUNCHER)
- .setComponent(info.getComponentName())
- .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+ .addCategory(Intent.CATEGORY_LAUNCHER)
+ .setComponent(cn)
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
}
@Override
diff --git a/src/com/android/launcher3/graphics/IconShapeOverride.java b/src/com/android/launcher3/graphics/IconShapeOverride.java
index e2d1d50e4..654fa98bc 100644
--- a/src/com/android/launcher3/graphics/IconShapeOverride.java
+++ b/src/com/android/launcher3/graphics/IconShapeOverride.java
@@ -130,7 +130,7 @@ public class IconShapeOverride {
private final int mOverrideId;
private final String mOverrideValue;
- @SuppressWarnings("deprecated")
+ @SuppressWarnings("deprecation")
public ResourcesOverride(Resources parent, int overrideId, String overrideValue) {
super(parent.getAssets(), parent.getDisplayMetrics(), parent.getConfiguration());
mOverrideId = overrideId;
diff --git a/src/com/android/launcher3/widget/WidgetsDiffReporter.java b/src/com/android/launcher3/widget/WidgetsDiffReporter.java
index d9c9ef9e3..52deec32b 100644
--- a/src/com/android/launcher3/widget/WidgetsDiffReporter.java
+++ b/src/com/android/launcher3/widget/WidgetsDiffReporter.java
@@ -29,7 +29,7 @@ import java.util.Iterator;
* Do diff on widget's tray list items and call the {@link NotifyListener} methods accordingly.
*/
public class WidgetsDiffReporter {
- private final boolean DEBUG = true;
+ private final boolean DEBUG = false;
private final String TAG = "WidgetsDiffReporter";
private final IconCache mIconCache;
private NotifyListener mListener;
@@ -89,12 +89,13 @@ public class WidgetsDiffReporter {
index = orgRowEntry != null? currentEntries.indexOf(orgRowEntry):
currentEntries.size();
currentEntries.add(index, newRowEntry);
- newRowEntry = newIter.hasNext() ? newIter.next() : null;
- mListener.notifyItemInserted(index);
if (DEBUG) {
Log.d(TAG, String.format("notifyItemInserted called (%d)%s", index,
newRowEntry.titleSectionName));
}
+ newRowEntry = newIter.hasNext() ? newIter.next() : null;
+ mListener.notifyItemInserted(index);
+
} else {
// same package name but,
// did the icon, title, etc, change?