OSDN Git Service

Remove unnecessary use of some private APIs
authorMichael Jurka <mikejurka@google.com>
Thu, 14 Jun 2012 23:18:21 +0000 (16:18 -0700)
committerMichael Jurka <mikejurka@google.com>
Tue, 19 Jun 2012 17:32:38 +0000 (10:32 -0700)
Change-Id: Idaba6833ddf4a8615845ca2f643c458bdeb9c403

src/com/android/launcher2/CellLayout.java
src/com/android/launcher2/LauncherAppWidgetHost.java
src/com/android/launcher2/SearchDropTargetBar.java
src/com/android/launcher2/Utilities.java

index c028ff1..0760ee2 100644 (file)
@@ -17,9 +17,9 @@
 package com.android.launcher2;
 
 import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
 import android.animation.AnimatorSet;
 import android.animation.ObjectAnimator;
-import android.animation.AnimatorListenerAdapter;
 import android.animation.TimeInterpolator;
 import android.animation.ValueAnimator;
 import android.animation.ValueAnimator.AnimatorUpdateListener;
index 35c60a0..45c1d23 100644 (file)
@@ -47,7 +47,6 @@ public class LauncherAppWidgetHost extends AppWidgetHost {
         clearViews();
     }
 
-    @Override
     protected void onProvidersChanged() {
         // Once we get the message that widget packages are updated, we need to rebind items
         // in AppsCustomize accordingly.
index a1d36cd..49dd23c 100644 (file)
@@ -224,16 +224,14 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D
 
     public Rect getSearchBarBounds() {
         if (mQSBSearchBar != null) {
-            final float appScale = mQSBSearchBar.getContext().getResources()
-                    .getCompatibilityInfo().applicationScale;
             final int[] pos = new int[2];
             mQSBSearchBar.getLocationOnScreen(pos);
 
             final Rect rect = new Rect();
-            rect.left = (int) (pos[0] * appScale + 0.5f);
-            rect.top = (int) (pos[1] * appScale + 0.5f);
-            rect.right = (int) ((pos[0] + mQSBSearchBar.getWidth()) * appScale + 0.5f);
-            rect.bottom = (int) ((pos[1] + mQSBSearchBar.getHeight()) * appScale + 0.5f);
+            rect.left = pos[0];
+            rect.top = pos[1];
+            rect.right = pos[0] + mQSBSearchBar.getWidth();
+            rect.bottom = pos[1] + mQSBSearchBar.getHeight();
             return rect;
         } else {
             return null;
index b27f7bb..d3e4516 100644 (file)
@@ -29,7 +29,6 @@ import android.graphics.Paint;
 import android.graphics.PaintFlagsDrawFilter;
 import android.graphics.PorterDuff;
 import android.graphics.Rect;
-import android.graphics.TableMaskFilter;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.PaintDrawable;
@@ -243,9 +242,7 @@ final class Utilities {
 
         sBlurPaint.setMaskFilter(new BlurMaskFilter(5 * density, BlurMaskFilter.Blur.NORMAL));
         sGlowColorPressedPaint.setColor(0xffffc300);
-        sGlowColorPressedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30));
         sGlowColorFocusedPaint.setColor(0xffff8e00);
-        sGlowColorFocusedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30));
 
         ColorMatrix cm = new ColorMatrix();
         cm.setSaturation(0.2f);