Fix a lot of easy lint issues

Change-Id: I80b43dae137cbbb912ec0fcc4e401de16a9b44a1
diff --git a/res/anim/paged_view_click_feedback.xml b/res/anim/paged_view_click_feedback.xml
deleted file mode 100644
index eb7ecef..0000000
--- a/res/anim/paged_view_click_feedback.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
-    android:valueFrom="1.0"
-    android:valueTo="0.5"
-    android:valueType="floatType"
-    android:duration="100"
-    android:propertyName="alpha"
-    android:repeatCount="1"
-    android:repeatMode="reverse"/>
diff --git a/res/drawable/button_bg.xml b/res/drawable/button_bg.xml
deleted file mode 100644
index e7b1bcd..0000000
--- a/res/drawable/button_bg.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_focused="true" android:drawable="@drawable/tab_unselected_focused_holo" />
-    <item android:state_pressed="true" android:drawable="@drawable/tab_unselected_focused_holo" />
-    <item android:drawable="@android:color/transparent" />
-</selector>
diff --git a/res/layout-land/folder_icon.xml b/res/layout-land/folder_icon.xml
index 4c92fca..808ff5e 100644
--- a/res/layout-land/folder_icon.xml
+++ b/res/layout-land/folder_icon.xml
@@ -16,7 +16,6 @@
 
 <com.android.launcher2.FolderIcon
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
diff --git a/res/layout-land/search_bar.xml b/res/layout-land/search_bar.xml
index c606173f..3352fbb 100644
--- a/res/layout-land/search_bar.xml
+++ b/res/layout-land/search_bar.xml
@@ -15,7 +15,6 @@
 -->
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     style="@style/SearchDropTargetBar"
     android:layout_width="@dimen/qsb_bar_height"
     android:layout_height="match_parent">
diff --git a/res/layout-port/folder_icon.xml b/res/layout-port/folder_icon.xml
index 0df16b8..5ee1327 100644
--- a/res/layout-port/folder_icon.xml
+++ b/res/layout-port/folder_icon.xml
@@ -16,7 +16,6 @@
 
 <com.android.launcher2.FolderIcon
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
diff --git a/res/layout-sw600dp/launcher.xml b/res/layout-sw600dp/launcher.xml
index 94c69a6..69b75be 100644
--- a/res/layout-sw600dp/launcher.xml
+++ b/res/layout-sw600dp/launcher.xml
@@ -15,8 +15,7 @@
 -->
 
 <com.android.launcher2.DragLayer
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
+    xmlns:android="http://schemas.android.com/apk/res/android" >
 
     android:id="@+id/drag_layer"
     android:layout_width="match_parent"
diff --git a/res/layout-sw600dp/market_button.xml b/res/layout-sw600dp/market_button.xml
index 3252790..7eaeafa 100644
--- a/res/layout-sw600dp/market_button.xml
+++ b/res/layout-sw600dp/market_button.xml
@@ -15,7 +15,6 @@
 -->
 <TextView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     style="@style/MarketButton"
     android:onClick="onClickAppMarketButton"
     android:gravity="center"
diff --git a/res/layout-sw600dp/search_bar.xml b/res/layout-sw600dp/search_bar.xml
index ebaf960..55ec959 100644
--- a/res/layout-sw600dp/search_bar.xml
+++ b/res/layout-sw600dp/search_bar.xml
@@ -15,7 +15,6 @@
 -->
 <RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     style="@style/SearchDropTargetBar"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
@@ -63,7 +62,6 @@
         android:layout_height="wrap_content"
         android:layout_alignParentRight="true"
         android:layout_alignParentTop="true"
-        android:layout_toLeftOf="@+id/all_apps_divider"
         android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
         android:paddingRight="@dimen/toolbar_button_horizontal_padding"
         android:paddingTop="@dimen/all_apps_button_vertical_padding"
@@ -73,4 +71,4 @@
         android:focusable="true"
         android:clickable="true"
         android:contentDescription="@string/accessibility_all_apps_button" />
-</RelativeLayout>
\ No newline at end of file
+</RelativeLayout>
diff --git a/res/layout/apps_customize_progressbar.xml b/res/layout/apps_customize_progressbar.xml
index 6a8010f..6aa9099 100644
--- a/res/layout/apps_customize_progressbar.xml
+++ b/res/layout/apps_customize_progressbar.xml
@@ -15,7 +15,6 @@
 -->
 <ProgressBar
    xmlns:android="http://schemas.android.com/apk/res/android"
-   xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
    style="?android:attr/progressBarStyleLarge"
    android:id="@+id/apps_customize_progress_bar"
    android:layout_width="wrap_content"
diff --git a/res/layout/market_button.xml b/res/layout/market_button.xml
index 27eb3fd..41e6ec7 100644
--- a/res/layout/market_button.xml
+++ b/res/layout/market_button.xml
@@ -15,7 +15,6 @@
 -->
 <TextView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     style="@style/MarketButton"
     android:onClick="onClickAppMarketButton"
     android:gravity="center"
diff --git a/res/layout/qsb_bar.xml b/res/layout/qsb_bar.xml
index 9daf7bf..ad9027f 100644
--- a/res/layout/qsb_bar.xml
+++ b/res/layout/qsb_bar.xml
@@ -15,7 +15,6 @@
 -->
 <com.android.launcher2.SearchDropTargetBar
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     style="@style/QSBBar"
     android:focusable="false">
 
diff --git a/res/layout/scroll_indicator.xml b/res/layout/scroll_indicator.xml
index 33eed8b..4ea312b 100644
--- a/res/layout/scroll_indicator.xml
+++ b/res/layout/scroll_indicator.xml
@@ -15,8 +15,7 @@
 -->
 <ImageView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     android:visibility="gone"
     android:alpha="0"
     android:scaleType="fitXY"
-    android:src="@drawable/hotseat_scrubber_holo" />
\ No newline at end of file
+    android:src="@drawable/hotseat_scrubber_holo" />
diff --git a/res/layout/workspace_divider.xml b/res/layout/workspace_divider.xml
index 257ea7c..c9cbca6 100644
--- a/res/layout/workspace_divider.xml
+++ b/res/layout/workspace_divider.xml
@@ -15,10 +15,9 @@
 -->
 <ImageView
     xmlns:android="http://schemas.android.com/apk/res/android"
-xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
     android:paddingLeft="@dimen/workspace_divider_padding_left"
     android:paddingRight="@dimen/workspace_divider_padding_right"
     android:paddingTop="@dimen/workspace_divider_padding_top"
     android:paddingBottom="@dimen/workspace_divider_padding_bottom"
     android:scaleType="fitXY"
-    android:src="@drawable/hotseat_track_holo" />
\ No newline at end of file
+    android:src="@drawable/hotseat_track_holo" />
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 6d0261f..b4ddc00 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -69,10 +69,6 @@
     <integer name="apps_customize_cling_focused_x">2</integer>
     <integer name="apps_customize_cling_focused_y">1</integer>
 
-    <!-- Padding applied to AppWidgets -->
-    <dimen name="app_widget_padding_top">8dp</dimen>
-    <dimen name="app_widget_padding_bottom">8dp</dimen>
-
 <!-- Folders -->
     <!-- The size of the image which sits behind the preview of the folder contents -->
     <dimen name="folder_preview_size">58dp</dimen>
diff --git a/res/values-sw340dp-land/dimens.xml b/res/values-sw340dp-land/dimens.xml
index b469ac0..ff2e237 100644
--- a/res/values-sw340dp-land/dimens.xml
+++ b/res/values-sw340dp-land/dimens.xml
@@ -30,10 +30,6 @@
 
     <dimen name="hotseat_width_gap">0dp</dimen>
     <dimen name="hotseat_height_gap">0dp</dimen>
-    <dimen name="hotseat_top_padding">-1dp</dimen>
-    <dimen name="hotseat_bottom_padding">-1dp</dimen>
-    <dimen name="hotseat_left_padding">-1dp</dimen>
-    <dimen name="hotseat_right_padding">-1dp</dimen>
 
     <dimen name="qsb_bar_height">48dp</dimen>
     <!-- height of the bottom row of controls -->
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 81fe13b..9c2046b 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -62,11 +62,6 @@
     <!-- dimensions for the wallpaper picker wallpaper thumbnail width -->
     <dimen name="wallpaper_chooser_grid_width">196dp</dimen>
     <dimen name="wallpaper_chooser_grid_height">140dp</dimen>
-    <dimen name="live_wallpaper_grid_item_padding">8dip</dimen>
-
-    <!-- How much the content view of an alert dialog should be inset (currently used
-        for the WallpaperChooser in XLarge mode) -->
-    <dimen name="alert_dialog_content_inset">0dp</dimen>
 
     <!-- When dragging items on the workspace, the number of dps by which the position of
      the drag view should be offset from the position of the original view. -->
diff --git a/res/values/config.xml b/res/values/config.xml
index c56d596..45ab544 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -5,21 +5,9 @@
 <!-- AllApps/Customize/AppsCustomize -->
     <!-- The alpha of the AppsCustomize bg in spring loaded mode -->
     <integer name="config_appsCustomizeSpringLoadedBgAlpha">45</integer>
-    <!-- Fade in/out duration of icons being dragged from the trays -->
-    <integer name="config_dragAppsCustomizeIconFadeInDuration">150</integer>
-    <integer name="config_dragAppsCustomizeIconFadeOutDuration">200</integer>
-    <integer name="config_dragAppsCustomizeIconFadeAlpha">100</integer>
     <integer name="config_workspaceUnshrinkTime">300</integer>
     <!-- Out of 100, the percent to shrink the workspace during spring loaded mode. -->
     <integer name="config_workspaceSpringLoadShrinkPercentage">80</integer>
-    <!-- When items are dropped on the mini screens in customize mode, we have a bounce animation
-         of the bright green hover outline, and then fade out the outline at the end. These are
-         the values used in that animation -->
-    <integer name="config_screenOnDropScalePercent">120</integer>
-    <integer name="config_screenOnDropScaleUpDuration">200</integer>
-    <integer name="config_screenOnDropScaleDownDuration">200</integer>
-    <integer name="config_screenOnDropAlphaFadeDelay">350</integer>
-    <integer name="config_screenOnDropAlphaFadeDuration">50</integer>
 
     <!-- Fade/zoom in/out duration & scale in the AllApps transition.
          Note: This should be less than the workspaceShrinkTime as they happen together. -->
@@ -76,15 +64,6 @@
     <integer name="config_dragFadeOutAlpha">80</integer>
     <integer name="config_dragFadeOutDuration">250</integer>
 
-    <!-- Workspace screens are cached to bitmaps only when they're smaller than a certain size
-         (maxScaleForUsingWorkspaceScreenBitmapCache), since the bitmap cache itself is smaller
-         than the view itself (workspaceScreenBitmapCacheScale)  -->
-    <integer name="config_workspaceScreenBitmapCacheScale">20</integer>
-    <integer name="config_maxScaleForUsingWorkspaceScreenBitmapCache">50</integer>
-
-    <!-- When shrinking the workspace, this is the percentage of its original size. -->
-    <integer name="config_workspaceShrinkPercent">17</integer>
-
     <!-- Folder max bounds and max number of items. Note: folder_max_count_x * folder_max_count_y
          >= folder_max_num_items. When these are set to -1, they are automatically determined. -->
     <integer name="folder_max_count_x">4</integer>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c6dfb49..4ef4f4d 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -70,7 +70,6 @@
     <dimen name="apps_customize_max_gap">18dp</dimen>
     <dimen name="apps_customize_widget_cell_width_gap">10dp</dimen>
     <dimen name="apps_customize_widget_cell_height_gap">8dp</dimen>
-    <dimen name="title_texture_width">120px</dimen>
 
     <!-- height of the bottom row of controls -->
     <dimen name="button_bar_height">62dip</dimen>
@@ -82,21 +81,9 @@
     <dimen name="button_bar_width_right_padding">0dp</dimen>
     <dimen name="button_bar_height_plus_padding">70dp</dimen>
 
-    <!-- extra horizontal spacing between mini screen thumbnails ie. in all
-         apps and in customization mode -->
-    <dimen name="smallScreenExtraSpacing">0dip</dimen>
-
-    <!-- Vertical spacing between edge of screen and mini cell layouts when they
-         are minimized to the bottom in all apps -->
-    <dimen name="allAppsSmallScreenVerticalMarginLandscape">30dip</dimen>
-    <dimen name="allAppsSmallScreenVerticalMarginPortrait">60dip</dimen>
-
     <!-- Drag padding to add to the bottom of drop targets -->
     <dimen name="drop_target_drag_padding">14dp</dimen>
 
-    <!-- padding between the delete zone drawable and text -->
-    <dimen name="delete_zone_drawable_padding">8dip</dimen>
-
     <!-- roughly a status bar (for vertically centering the all apps
          home icon in landscape) -->
     <dimen name="status_bar_height">25dip</dimen>
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 152b215..7108c9f 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -55,10 +55,17 @@
     private boolean mInTransition;
     private boolean mTransitioningToWorkspace;
     private boolean mResetAfterTransition;
+    private Runnable mRelayoutAndMakeVisible;
 
     public AppsCustomizeTabHost(Context context, AttributeSet attrs) {
         super(context, attrs);
         mLayoutInflater = LayoutInflater.from(context);
+        mRelayoutAndMakeVisible = new Runnable() {
+                public void run() {
+                    mTabs.requestLayout();
+                    mTabsContainer.setAlpha(1f);
+                }
+            };
     }
 
     /**
@@ -144,12 +151,7 @@
             if (contentWidth > 0 && mTabs.getLayoutParams().width != contentWidth) {
                 // Set the width and show the tab bar
                 mTabs.getLayoutParams().width = contentWidth;
-                post(new Runnable() {
-                    public void run() {
-                        mTabs.requestLayout();
-                        mTabsContainer.setAlpha(1f);
-                    }
-                });
+                post(mRelayoutAndMakeVisible);
             }
         }
         super.onMeasure(widthMeasureSpec, heightMeasureSpec);
diff --git a/src/com/android/launcher2/DragView.java b/src/com/android/launcher2/DragView.java
index 017d154..c3c274e 100644
--- a/src/com/android/launcher2/DragView.java
+++ b/src/com/android/launcher2/DragView.java
@@ -110,6 +110,7 @@
         // Force a measure, because Workspace uses getMeasuredHeight() before the layout pass
         int ms = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
         measure(ms, ms);
+        mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
     }
 
     public float getOffsetY() {
@@ -162,9 +163,6 @@
             p.setColor(0xaaffffff);
             canvas.drawRect(0, 0, getWidth(), getHeight(), p);
         }
-        if (mPaint == null) {
-            mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
-        }
 
         mHasDrawn = true;
         boolean crossFade = mCrossFadeProgress > 0 && mCrossFadeBitmap != null;
@@ -203,6 +201,9 @@
 
     public void setPaint(Paint paint) {
         mPaint = paint;
+        if (mPaint == null) {
+            mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
+        }
         invalidate();
     }
 
@@ -213,9 +214,6 @@
     @Override
     public void setAlpha(float alpha) {
         super.setAlpha(alpha);
-        if (mPaint == null) {
-            mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
-        }
         mPaint.setAlpha((int) (255 * alpha));
         invalidate();
     }