Merge "Catch exceptions when setting wallpaper offsets" into jb-ub-gel-agar
diff --git a/src/com/android/launcher3/AppsCustomizeCellLayout.java b/src/com/android/launcher3/AppsCustomizeCellLayout.java
index a2acb64..3c8bda9 100644
--- a/src/com/android/launcher3/AppsCustomizeCellLayout.java
+++ b/src/com/android/launcher3/AppsCustomizeCellLayout.java
@@ -17,12 +17,7 @@
 package com.android.launcher3;
 
 import android.content.Context;
-import android.content.res.Resources;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
 import android.view.View;
-import android.view.ViewDebug;
-import android.view.ViewGroup;
 
 public class AppsCustomizeCellLayout extends CellLayout implements Page {
     public AppsCustomizeCellLayout(Context context) {
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 0d5d4fc..ee33f3a 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -25,7 +25,6 @@
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
-import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.graphics.Bitmap;
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index 3ab3a68..b31f45d 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -225,11 +225,11 @@
             String duplicateName = "";
             while (iter.hasNext()) {
                 final PendingInstallShortcutInfo pendingInfo = iter.next();
-                final Intent data = pendingInfo.data;
+                //final Intent data = pendingInfo.data;
                 final Intent intent = pendingInfo.launchIntent;
                 final String name = pendingInfo.name;
                 final boolean exists = LauncherModel.shortcutExists(context, name, intent);
-                final boolean allowDuplicate = data.getBooleanExtra(Launcher.EXTRA_SHORTCUT_DUPLICATE, true);
+                //final boolean allowDuplicate = data.getBooleanExtra(Launcher.EXTRA_SHORTCUT_DUPLICATE, true);
 
                 // TODO-XXX: Disable duplicates for now
                 if (!exists /* && allowDuplicate */) {
diff --git a/src/com/android/launcher3/LauncherAppWidgetHostView.java b/src/com/android/launcher3/LauncherAppWidgetHostView.java
index 90587f9..59bd307 100644
--- a/src/com/android/launcher3/LauncherAppWidgetHostView.java
+++ b/src/com/android/launcher3/LauncherAppWidgetHostView.java
@@ -18,15 +18,12 @@
 
 import android.appwidget.AppWidgetHostView;
 import android.content.Context;
-import android.graphics.Canvas;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.RemoteViews;
 
-import com.android.launcher3.R;
-
 /**
  * {@inheritDoc}
  */
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 9081e23..a76378e 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -2835,7 +2835,6 @@
     }
 
     private ArrayList<ItemInfo> getItemInfoForPackageName(final String pn) {
-        HashSet<ItemInfo> infos = new HashSet<ItemInfo>();
         ItemInfoFilter filter  = new ItemInfoFilter() {
             @Override
             public boolean filterItem(ItemInfo parent, ItemInfo info, ComponentName cn) {
@@ -2846,7 +2845,6 @@
     }
 
     private ArrayList<ItemInfo> getItemInfoForComponentName(final ComponentName cname) {
-        HashSet<ItemInfo> infos = new HashSet<ItemInfo>();
         ItemInfoFilter filter  = new ItemInfoFilter() {
             @Override
             public boolean filterItem(ItemInfo parent, ItemInfo info, ComponentName cn) {
diff --git a/src/com/android/launcher3/PageIndicator.java b/src/com/android/launcher3/PageIndicator.java
index 110d6d9..a9016d5 100644
--- a/src/com/android/launcher3/PageIndicator.java
+++ b/src/com/android/launcher3/PageIndicator.java
@@ -49,12 +49,6 @@
             new ArrayList<PageIndicatorMarker>();
     private int mActiveMarkerIndex;
 
-    private TimeInterpolator mAlphaInterpolator = new TimeInterpolator() {
-        public float getInterpolation(float t) {
-            return t;
-        }
-    };
-
     public PageIndicator(Context context) {
         this(context, null);
     }
diff --git a/src/com/android/launcher3/PagedViewCellLayout.java b/src/com/android/launcher3/PagedViewCellLayout.java
index 75d3aee..2d9e10b 100644
--- a/src/com/android/launcher3/PagedViewCellLayout.java
+++ b/src/com/android/launcher3/PagedViewCellLayout.java
@@ -17,7 +17,6 @@
 package com.android.launcher3;
 
 import android.content.Context;
-import android.content.res.Resources;
 import android.util.AttributeSet;
 import android.view.MotionEvent;
 import android.view.View;
@@ -60,7 +59,6 @@
         // setup default cell parameters
         LauncherAppState app = LauncherAppState.getInstance();
         DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
-        Resources resources = context.getResources();
         mOriginalCellWidth = mCellWidth = grid.cellWidthPx;
         mOriginalCellHeight = mCellHeight = grid.cellHeightPx;
         mCellCountX = (int) grid.numColumns;
diff --git a/src/com/android/launcher3/ShortcutAndWidgetContainer.java b/src/com/android/launcher3/ShortcutAndWidgetContainer.java
index 6c33601..5ce5571 100644
--- a/src/com/android/launcher3/ShortcutAndWidgetContainer.java
+++ b/src/com/android/launcher3/ShortcutAndWidgetContainer.java
@@ -161,9 +161,6 @@
 
     @Override
     protected void onLayout(boolean changed, int l, int t, int r, int b) {
-        LauncherAppState app = LauncherAppState.getInstance();
-        DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
-
         int count = getChildCount();
         for (int i = 0; i < count; i++) {
             final View child = getChildAt(i);
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 90db5ab..4a8a237 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -44,7 +44,6 @@
  * Various utilities shared amongst the Launcher's classes.
  */
 final class Utilities {
-    @SuppressWarnings("unused")
     private static final String TAG = "Launcher.Utilities";
 
     private static int sIconWidth = -1;
@@ -215,8 +214,6 @@
         int count = ancestorChain.size();
         for (int i = 0; i < count; i++) {
             View v0 = ancestorChain.get(i);
-            View v1 = i < count -1 ? ancestorChain.get(i + 1) : null;
-
             // For TextViews, scroll has a meaning which relates to the text position
             // which is very strange... ignore the scroll.
             if (v0 != descendant || includeRootScroll) {
diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/src/com/android/launcher3/WallpaperPickerActivity.java
index 674c597..6c09347 100644
--- a/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -31,7 +31,6 @@
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LevelListDrawable;
 import android.net.Uri;
-import android.os.Bundle;
 import android.util.Log;
 import android.util.Pair;
 import android.view.LayoutInflater;
@@ -41,7 +40,6 @@
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
-import android.view.WindowManager;
 import android.view.animation.DecelerateInterpolator;
 import android.widget.BaseAdapter;
 import android.widget.FrameLayout;
@@ -67,7 +65,6 @@
     private Resources mWallpaperResources;
 
     private View mSelectedThumb;
-    private CropView mCropView;
     private boolean mIgnoreNextTap;
     private OnClickListener mThumbnailOnClickListener;