am a01902ff: am 09cecf6d: am 7e38964c: Merge "Clean up unused code and import declarations" into ics-mr1
* commit 'a01902ffbd51d4952efb0794853a1c0dc2f8c353': Clean up unused code and import declarations
This commit is contained in:
commit
0c710a4812
|
@ -24,7 +24,6 @@ import android.appwidget.AppWidgetProviderInfo;
|
|||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.res.Configuration;
|
||||
|
@ -443,22 +442,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
|||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
}
|
||||
|
||||
/** Removes and returns the ResolveInfo with the specified ComponentName */
|
||||
private ResolveInfo removeResolveInfoWithComponentName(List<ResolveInfo> list,
|
||||
ComponentName cn) {
|
||||
Iterator<ResolveInfo> iter = list.iterator();
|
||||
while (iter.hasNext()) {
|
||||
ResolveInfo rinfo = iter.next();
|
||||
ActivityInfo info = rinfo.activityInfo;
|
||||
ComponentName c = new ComponentName(info.packageName, info.name);
|
||||
if (c.equals(cn)) {
|
||||
iter.remove();
|
||||
return rinfo;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void onPackagesUpdated() {
|
||||
// TODO: this isn't ideal, but we actually need to delay here. This call is triggered
|
||||
// by a broadcast receiver, and in order for it to work correctly, we need to know that
|
||||
|
@ -992,10 +975,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
|||
private void renderDrawableToBitmap(Drawable d, Bitmap bitmap, int x, int y, int w, int h) {
|
||||
renderDrawableToBitmap(d, bitmap, x, y, w, h, 1f, 0xFFFFFFFF);
|
||||
}
|
||||
private void renderDrawableToBitmap(Drawable d, Bitmap bitmap, int x, int y, int w, int h,
|
||||
float scale) {
|
||||
renderDrawableToBitmap(d, bitmap, x, y, w, h, scale, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
private void renderDrawableToBitmap(Drawable d, Bitmap bitmap, int x, int y, int w, int h,
|
||||
float scale, int multiplyColor) {
|
||||
if (bitmap != null) {
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
package com.android.launcher2;
|
||||
|
||||
import com.android.launcher.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
|
@ -30,9 +28,10 @@ import android.graphics.Region.Op;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.launcher.R;
|
||||
|
||||
/**
|
||||
* TextView that draws a bubble behind the text. We cannot use a LineBackgroundSpan
|
||||
* because we want to make the bubble taller than the text and TextView's clip is
|
||||
|
|
|
@ -20,7 +20,6 @@ import android.content.Context;
|
|||
import android.content.res.Resources;
|
||||
import android.graphics.Paint;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.launcher.R;
|
||||
|
|
|
@ -18,7 +18,6 @@ package com.android.launcher2;
|
|||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.PropertyValuesHolder;
|
||||
import android.animation.TimeInterpolator;
|
||||
|
|
|
@ -23,7 +23,6 @@ import android.content.res.Resources;
|
|||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.TransitionDrawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
|
|
@ -20,7 +20,6 @@ import android.content.Context;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Vibrator;
|
||||
|
|
|
@ -199,7 +199,6 @@ public class DragLayer extends FrameLayout {
|
|||
|
||||
private void sendTapOutsideFolderAccessibilityEvent(boolean isEditingName) {
|
||||
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
|
||||
Folder currentFolder = mLauncher.getWorkspace().getOpenFolder();
|
||||
int stringId = isEditingName ? R.string.folder_tap_to_rename : R.string.folder_tap_to_close;
|
||||
AccessibilityEvent event = AccessibilityEvent.obtain(
|
||||
AccessibilityEvent.TYPE_VIEW_FOCUSED);
|
||||
|
|
|
@ -23,7 +23,6 @@ import android.view.ViewGroup;
|
|||
import android.view.ViewParent;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TabWidget;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.launcher.R;
|
||||
|
||||
|
@ -117,13 +116,6 @@ public class FocusHelper {
|
|||
return wasHandled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Private helper to determine whether a view is visible.
|
||||
*/
|
||||
private static boolean isVisible(View v) {
|
||||
return v.getVisibility() == View.VISIBLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Viewgroup containing page contents for the page at the index specified.
|
||||
*/
|
||||
|
|
|
@ -32,7 +32,6 @@ import android.util.AttributeSet;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.ImageView;
|
||||
|
|
|
@ -71,11 +71,6 @@ public class HandleView extends ImageView {
|
|||
return super.onTouchEvent(ev);
|
||||
}
|
||||
|
||||
private static boolean isDirectionKey(int keyCode) {
|
||||
return keyCode == KeyEvent.KEYCODE_DPAD_DOWN || keyCode == KeyEvent.KEYCODE_DPAD_LEFT ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_RIGHT || keyCode == KeyEvent.KEYCODE_DPAD_UP;
|
||||
}
|
||||
|
||||
void setLauncher(Launcher launcher) {
|
||||
mLauncher = launcher;
|
||||
}
|
||||
|
|
|
@ -221,7 +221,6 @@ public class IconCache {
|
|||
public HashMap<ComponentName,Bitmap> getAllIcons() {
|
||||
synchronized (mCache) {
|
||||
HashMap<ComponentName,Bitmap> set = new HashMap<ComponentName,Bitmap>();
|
||||
int i = 0;
|
||||
for (ComponentName cn : mCache.keySet()) {
|
||||
final CacheEntry e = mCache.get(cn);
|
||||
set.put(cn, e.icon);
|
||||
|
|
|
@ -1398,11 +1398,6 @@ public final class Launcher extends Activity
|
|||
return mWorkspaceLoading || mWaitingForResult;
|
||||
}
|
||||
|
||||
private void addItems() {
|
||||
showWorkspace(true);
|
||||
showAddDialog();
|
||||
}
|
||||
|
||||
private void resetAddInfo() {
|
||||
mPendingAddInfo.container = ItemInfo.NO_ID;
|
||||
mPendingAddInfo.screen = -1;
|
||||
|
@ -1560,13 +1555,6 @@ public final class Launcher extends Activity
|
|||
sFolders.remove(folder.id);
|
||||
}
|
||||
|
||||
private void showNotifications() {
|
||||
final StatusBarManager statusBar = (StatusBarManager) getSystemService(STATUS_BAR_SERVICE);
|
||||
if (statusBar != null) {
|
||||
statusBar.expand();
|
||||
}
|
||||
}
|
||||
|
||||
private void startWallpaper() {
|
||||
showWorkspace(true);
|
||||
final Intent pickWallpaper = new Intent(Intent.ACTION_SET_WALLPAPER);
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
package com.android.launcher2;
|
||||
|
||||
import android.appwidget.AppWidgetHostView;
|
||||
import android.appwidget.AppWidgetProviderInfo;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
@ -35,12 +33,10 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView {
|
|||
private boolean mHasPerformedLongPress;
|
||||
private CheckForLongPress mPendingCheckForLongPress;
|
||||
private LayoutInflater mInflater;
|
||||
private Launcher mLauncher;
|
||||
|
||||
public LauncherAppWidgetHostView(Context context) {
|
||||
super(context);
|
||||
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mLauncher = (Launcher) context;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,8 +25,6 @@ import android.content.IntentFilter;
|
|||
import android.content.res.Configuration;
|
||||
import android.database.ContentObserver;
|
||||
import android.os.Handler;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Maintains in-memory state of the Launcher. It is expected that there should be only one
|
||||
|
@ -1347,7 +1346,7 @@ public class LauncherModel extends BroadcastReceiver {
|
|||
|
||||
// shallow copy
|
||||
final ArrayList<ApplicationInfo> list
|
||||
= (ArrayList<ApplicationInfo>)mAllAppsList.data.clone();
|
||||
= (ArrayList<ApplicationInfo>) mAllAppsList.data.clone();
|
||||
mHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
final long t = SystemClock.uptimeMillis();
|
||||
|
|
|
@ -19,7 +19,6 @@ package com.android.launcher2;
|
|||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewDebug;
|
||||
|
|
|
@ -42,8 +42,6 @@ import com.android.launcher.R;
|
|||
public class PagedViewWidget extends LinearLayout implements Checkable {
|
||||
static final String TAG = "PagedViewWidgetLayout";
|
||||
|
||||
private static final int sPreviewFadeInDuration = 80;
|
||||
private static final int sPreviewFadeInStaggerDuration = 20;
|
||||
private static boolean sDeletePreviewsWhenDetachedFromWindow = true;
|
||||
|
||||
private final Paint mPaint = new Paint();
|
||||
|
|
|
@ -21,38 +21,29 @@
|
|||
package com.android.launcher2;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.PropertyValuesHolder;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.TimeAnimator;
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.support.v13.dreams.BasicDream;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.os.Handler;
|
||||
import android.support.v13.dreams.BasicDream;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Pair;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
import com.android.launcher.R;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
public class RocketLauncher extends BasicDream {
|
||||
public static final boolean ROCKET_LAUNCHER = true;
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
package com.android.launcher2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.app.WallpaperManager;
|
||||
|
@ -27,20 +26,17 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.Gallery;
|
||||
import android.widget.GridView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.SpinnerAdapter;
|
||||
|
|
|
@ -1521,8 +1521,6 @@ public class Workspace extends SmoothPagedView
|
|||
// We need to add extra padding to the bitmap to make room for the glow effect
|
||||
final int bitmapPadding = HolographicOutlineHelper.MAX_OUTER_BLUR_RADIUS;
|
||||
|
||||
CellLayout cl = (CellLayout) getChildAt(0);
|
||||
|
||||
int[] size = estimateItemSize(info.spanX, info.spanY, info, false);
|
||||
|
||||
// The outline is used to visualize where the item will land if dropped
|
||||
|
@ -1872,9 +1870,6 @@ public class Workspace extends SmoothPagedView
|
|||
* Returns a new bitmap to be used as the object outline, e.g. to visualize the drop location.
|
||||
* Responsibility for the bitmap is transferred to the caller.
|
||||
*/
|
||||
private Bitmap createDragOutline(Bitmap orig, Canvas canvas, int padding, int w, int h) {
|
||||
return createDragOutline(orig, canvas, padding, w, h, null);
|
||||
}
|
||||
private Bitmap createDragOutline(Bitmap orig, Canvas canvas, int padding, int w, int h,
|
||||
Paint alphaClipPaint) {
|
||||
final int outlineColor = getResources().getColor(android.R.color.holo_blue_light);
|
||||
|
|
Loading…
Reference in New Issue