summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/allapps')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsCaretController.java3
-rw-r--r--src/com/android/launcher3/allapps/AllAppsRecyclerView.java92
-rw-r--r--src/com/android/launcher3/allapps/AllAppsTransitionController.java24
-rw-r--r--src/com/android/launcher3/allapps/VerticalPullDetector.java306
-rw-r--r--src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java4
5 files changed, 58 insertions, 371 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsCaretController.java b/src/com/android/launcher3/allapps/AllAppsCaretController.java
index 622322bfc..583b49f7b 100644
--- a/src/com/android/launcher3/allapps/AllAppsCaretController.java
+++ b/src/com/android/launcher3/allapps/AllAppsCaretController.java
@@ -22,13 +22,14 @@ import android.view.animation.Interpolator;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.pageindicators.CaretDrawable;
+import com.android.launcher3.touch.SwipeDetector;
public class AllAppsCaretController {
// Determines when the caret should flip. Should be accessed via getThreshold()
private static final float CARET_THRESHOLD = 0.015f;
private static final float CARET_THRESHOLD_LAND = 0.5f;
// The velocity at which the caret will peak (i.e. exhibit a 90 degree bend)
- private static final float PEAK_VELOCITY = VerticalPullDetector.RELEASE_VELOCITY_PX_MS * .7f;
+ private static final float PEAK_VELOCITY = SwipeDetector.RELEASE_VELOCITY_PX_MS * .7f;
private Launcher mLauncher;
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index 701402b02..494cd5ac5 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -36,6 +36,8 @@ import com.android.launcher3.anim.SpringAnimationHandler;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.graphics.DrawableFactory;
import com.android.launcher3.logging.UserEventDispatcher.LogContainerProvider;
+import com.android.launcher3.touch.OverScroll;
+import com.android.launcher3.touch.SwipeDetector;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
@@ -60,7 +62,7 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
private SpringAnimationHandler mSpringAnimationHandler;
private OverScrollHelper mOverScrollHelper;
- private VerticalPullDetector mPullDetector;
+ private SwipeDetector mPullDetector;
private float mContentTranslationY = 0;
public static final Property<AllAppsRecyclerView, Float> CONTENT_TRANS_Y =
@@ -97,9 +99,8 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
R.dimen.all_apps_empty_search_bg_top_offset);
mOverScrollHelper = new OverScrollHelper();
- mPullDetector = new VerticalPullDetector(getContext());
- mPullDetector.setListener(mOverScrollHelper);
- mPullDetector.setDetectableScrollConditions(VerticalPullDetector.DIRECTION_BOTH, true);
+ mPullDetector = new SwipeDetector(getContext(), mOverScrollHelper, SwipeDetector.VERTICAL);
+ mPullDetector.setDetectableScrollConditions(SwipeDetector.DIRECTION_BOTH, true);
}
public void setSpringAnimationHandler(SpringAnimationHandler springAnimationHandler) {
@@ -110,12 +111,6 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
}
@Override
- public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent ev) {
- mPullDetector.onTouchEvent(ev);
- return super.onInterceptTouchEvent(rv, ev) || mOverScrollHelper.isInOverScroll();
- }
-
- @Override
public boolean onTouchEvent(MotionEvent e) {
mPullDetector.onTouchEvent(e);
if (FeatureFlags.LAUNCHER3_PHYSICS && mSpringAnimationHandler != null) {
@@ -204,8 +199,6 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
@Override
public void onDraw(Canvas c) {
- c.translate(0, mContentTranslationY);
-
// Draw the background
if (mEmptySearchBackground != null && mEmptySearchBackground.getAlpha() > 0) {
mEmptySearchBackground.draw(c);
@@ -214,6 +207,13 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
super.onDraw(c);
}
+ @Override
+ protected void dispatchDraw(Canvas canvas) {
+ canvas.translate(0, mContentTranslationY);
+ super.dispatchDraw(canvas);
+ canvas.translate(0, -mContentTranslationY);
+ }
+
public float getContentTranslationY() {
return mContentTranslationY;
}
@@ -281,7 +281,8 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
@Override
public boolean onInterceptTouchEvent(MotionEvent e) {
- boolean result = super.onInterceptTouchEvent(e);
+ mPullDetector.onTouchEvent(e);
+ boolean result = super.onInterceptTouchEvent(e) || mOverScrollHelper.isInOverScroll();
if (!result && e.getAction() == MotionEvent.ACTION_DOWN
&& mEmptySearchBackground != null && mEmptySearchBackground.getAlpha() > 0) {
mEmptySearchBackground.setHotspot(e.getX(), e.getY());
@@ -338,6 +339,22 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
mFastScrollHelper.onSetAdapter((AllAppsGridAdapter) adapter);
}
+ @Override
+ protected float getBottomFadingEdgeStrength() {
+ // No bottom fading edge.
+ return 0;
+ }
+
+ @Override
+ protected boolean isPaddingOffsetRequired() {
+ return true;
+ }
+
+ @Override
+ protected int getTopPaddingOffset() {
+ return -getPaddingTop();
+ }
+
/**
* Updates the bounds for the scrollbar.
*/
@@ -507,7 +524,7 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
}
}
- private class OverScrollHelper implements VerticalPullDetector.Listener {
+ private class OverScrollHelper implements SwipeDetector.Listener {
private static final float MAX_RELEASE_VELOCITY = 5000; // px / s
private static final float MAX_OVERSCROLL_PERCENTAGE = 0.07f;
@@ -540,11 +557,16 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
// and if one of the following criteria are met:
// - User scrolls down when they're already at the bottom.
// - User starts scrolling up, hits the top, and continues scrolling up.
+ boolean wasInOverScroll = mIsInOverScroll;
mIsInOverScroll = !mScrollbar.isDraggingThumb() &&
((!canScrollVertically(1) && displacement < 0) ||
(!canScrollVertically(-1) && isScrollingUp && mFirstScrollYOnScrollUp != 0));
- if (mIsInOverScroll) {
+ if (wasInOverScroll && !mIsInOverScroll) {
+ // Exit overscroll. This can happen when the user is in overscroll and then
+ // scrolls the opposite way.
+ reset(false /* shouldSpring */);
+ } else if (mIsInOverScroll) {
if (Float.compare(mFirstDisplacement, 0) == 0) {
// Because users can scroll before entering overscroll, we need to
// subtract the amount where the user was not in overscroll.
@@ -559,11 +581,15 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
@Override
public void onDragEnd(float velocity, boolean fling) {
+ reset(mIsInOverScroll /* shouldSpring */);
+ }
+
+ private void reset(boolean shouldSpring) {
float y = getContentTranslationY();
if (Float.compare(y, 0) != 0) {
- if (FeatureFlags.LAUNCHER3_PHYSICS) {
+ if (FeatureFlags.LAUNCHER3_PHYSICS && shouldSpring) {
// We calculate our own velocity to give the springs the desired effect.
- velocity = y / getDampedOverScroll(getHeight()) * MAX_RELEASE_VELOCITY;
+ float velocity = y / getDampedOverScroll(getHeight()) * MAX_RELEASE_VELOCITY;
// We want to negate the velocity because we are moving to 0 from -1 due to the
// downward motion. (y-axis -1 is above 0).
mSpringAnimationHandler.animateToPositionWithVelocity(0, -1, -velocity);
@@ -585,37 +611,7 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
}
private float getDampedOverScroll(float y) {
- return dampedOverScroll(y, getHeight()) * MAX_OVERSCROLL_PERCENTAGE;
- }
-
- /**
- * This curve determines how the effect of scrolling over the limits of the page diminishes
- * as the user pulls further and further from the bounds
- *
- * @param f The percentage of how much the user has overscrolled.
- * @return A transformed percentage based on the influence curve.
- */
- private float overScrollInfluenceCurve(float f) {
- f -= 1.0f;
- return f * f * f + 1.0f;
- }
-
- /**
- * @param amount The original amount overscrolled.
- * @param max The maximum amount that the View can overscroll.
- * @return The dampened overscroll amount.
- */
- private float dampedOverScroll(float amount, float max) {
- float f = amount / max;
- if (Float.compare(f, 0) == 0) return 0;
- f = f / (Math.abs(f)) * (overScrollInfluenceCurve(Math.abs(f)));
-
- // Clamp this factor, f, to -1 < f < 1
- if (Math.abs(f) >= 1) {
- f /= Math.abs(f);
- }
-
- return Math.round(f * max);
+ return OverScroll.dampedScroll(y, getHeight());
}
}
}
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index b85321e63..edfe0c15e 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -25,6 +25,7 @@ import com.android.launcher3.Workspace;
import com.android.launcher3.anim.SpringAnimationHandler;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.graphics.GradientView;
+import com.android.launcher3.touch.SwipeDetector;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.util.SystemUiController;
@@ -41,7 +42,7 @@ import com.android.launcher3.util.TouchController;
* If release velocity < THRES1, snap according to either top or bottom depending on whether it's
* closer to top or closer to the page indicator.
*/
-public class AllAppsTransitionController implements TouchController, VerticalPullDetector.Listener,
+public class AllAppsTransitionController implements TouchController, SwipeDetector.Listener,
SearchUiManager.OnScrollRangeChangeListener {
private static final String TAG = "AllAppsTrans";
@@ -51,8 +52,8 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
private final Interpolator mHotseatAccelInterpolator = new AccelerateInterpolator(1.5f);
private final Interpolator mDecelInterpolator = new DecelerateInterpolator(3f);
private final Interpolator mFastOutSlowInInterpolator = new FastOutSlowInInterpolator();
- private final VerticalPullDetector.ScrollInterpolator mScrollInterpolator
- = new VerticalPullDetector.ScrollInterpolator();
+ private final SwipeDetector.ScrollInterpolator mScrollInterpolator
+ = new SwipeDetector.ScrollInterpolator();
private static final float PARALLAX_COEFFICIENT = .125f;
private static final int SINGLE_FRAME_MS = 16;
@@ -68,7 +69,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
private float mStatusBarHeight;
private final Launcher mLauncher;
- private final VerticalPullDetector mDetector;
+ private final SwipeDetector mDetector;
private final ArgbEvaluator mEvaluator;
private final boolean mIsDarkTheme;
@@ -104,8 +105,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
public AllAppsTransitionController(Launcher l) {
mLauncher = l;
- mDetector = new VerticalPullDetector(l);
- mDetector.setListener(this);
+ mDetector = new SwipeDetector(l, this, SwipeDetector.VERTICAL);
mShiftRange = DEFAULT_SHIFT_RANGE;
mProgress = 1f;
@@ -134,17 +134,17 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
if (mDetector.isIdleState()) {
if (mLauncher.isAllAppsVisible()) {
- directionsToDetectScroll |= VerticalPullDetector.DIRECTION_DOWN;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_NEGATIVE;
} else {
- directionsToDetectScroll |= VerticalPullDetector.DIRECTION_UP;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_POSITIVE;
}
} else {
if (isInDisallowRecatchBottomZone()) {
- directionsToDetectScroll |= VerticalPullDetector.DIRECTION_UP;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_POSITIVE;
} else if (isInDisallowRecatchTopZone()) {
- directionsToDetectScroll |= VerticalPullDetector.DIRECTION_DOWN;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_NEGATIVE;
} else {
- directionsToDetectScroll |= VerticalPullDetector.DIRECTION_BOTH;
+ directionsToDetectScroll |= SwipeDetector.DIRECTION_BOTH;
ignoreSlopWhenSettling = true;
}
}
@@ -360,7 +360,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
}
private void calculateDuration(float velocity, float disp) {
- mAnimationDuration = mDetector.calculateDuration(velocity, disp / mShiftRange);
+ mAnimationDuration = SwipeDetector.calculateDuration(velocity, disp / mShiftRange);
}
public boolean animateToAllApps(AnimatorSet animationOut, long duration) {
diff --git a/src/com/android/launcher3/allapps/VerticalPullDetector.java b/src/com/android/launcher3/allapps/VerticalPullDetector.java
deleted file mode 100644
index 13c4f63f0..000000000
--- a/src/com/android/launcher3/allapps/VerticalPullDetector.java
+++ /dev/null
@@ -1,306 +0,0 @@
-package com.android.launcher3.allapps;
-
-import android.content.Context;
-import android.util.Log;
-import android.view.MotionEvent;
-import android.view.ViewConfiguration;
-import android.view.animation.Interpolator;
-
-/**
- * One dimensional scroll gesture detector for all apps container pull up interaction.
- * Client (e.g., AllAppsTransitionController) of this class can register a listener.
- * <p/>
- * Features that this gesture detector can support.
- */
-public class VerticalPullDetector {
-
- private static final boolean DBG = false;
- private static final String TAG = "VerticalPullDetector";
-
- private final float mTouchSlop;
-
- private int mScrollConditions;
- public static final int DIRECTION_UP = 1 << 0;
- public static final int DIRECTION_DOWN = 1 << 1;
- public static final int DIRECTION_BOTH = DIRECTION_DOWN | DIRECTION_UP;
-
- private static final float ANIMATION_DURATION = 1200;
- private static final float FAST_FLING_PX_MS = 10;
-
- /**
- * The minimum release velocity in pixels per millisecond that triggers fling..
- */
- public static final float RELEASE_VELOCITY_PX_MS = 1.0f;
-
- /**
- * The time constant used to calculate dampening in the low-pass filter of scroll velocity.
- * Cutoff frequency is set at 10 Hz.
- */
- public static final float SCROLL_VELOCITY_DAMPENING_RC = 1000f / (2f * (float) Math.PI * 10);
-
- /* Scroll state, this is set to true during dragging and animation. */
- private ScrollState mState = ScrollState.IDLE;
-
- enum ScrollState {
- IDLE,
- DRAGGING, // onDragStart, onDrag
- SETTLING // onDragEnd
- }
-
- //------------------- ScrollState transition diagram -----------------------------------
- //
- // IDLE -> (mDisplacement > mTouchSlop) -> DRAGGING
- // DRAGGING -> (MotionEvent#ACTION_UP, MotionEvent#ACTION_CANCEL) -> SETTLING
- // SETTLING -> (MotionEvent#ACTION_DOWN) -> DRAGGING
- // SETTLING -> (View settled) -> IDLE
-
- private void setState(ScrollState newState) {
- if (DBG) {
- Log.d(TAG, "setState:" + mState + "->" + newState);
- }
- // onDragStart and onDragEnd is reported ONLY on state transition
- if (newState == ScrollState.DRAGGING) {
- initializeDragging();
- if (mState == ScrollState.IDLE) {
- reportDragStart(false /* recatch */);
- } else if (mState == ScrollState.SETTLING) {
- reportDragStart(true /* recatch */);
- }
- }
- if (newState == ScrollState.SETTLING) {
- reportDragEnd();
- }
-
- mState = newState;
- }
-
- public boolean isDraggingOrSettling() {
- return mState == ScrollState.DRAGGING || mState == ScrollState.SETTLING;
- }
-
- /**
- * There's no touch and there's no animation.
- */
- public boolean isIdleState() {
- return mState == ScrollState.IDLE;
- }
-
- public boolean isSettlingState() {
- return mState == ScrollState.SETTLING;
- }
-
- public boolean isDraggingState() {
- return mState == ScrollState.DRAGGING;
- }
-
- private float mDownX;
- private float mDownY;
-
- private float mLastY;
- private long mCurrentMillis;
-
- private float mVelocity;
- private float mLastDisplacement;
- private float mDisplacementY;
- private float mDisplacementX;
-
- private float mSubtractDisplacement;
- private boolean mIgnoreSlopWhenSettling;
-
- /* Client of this gesture detector can register a callback. */
- private Listener mListener;
-
- public void setListener(Listener l) {
- mListener = l;
- }
-
- public interface Listener {
- void onDragStart(boolean start);
-
- boolean onDrag(float displacement, float velocity);
-
- void onDragEnd(float velocity, boolean fling);
- }
-
- public VerticalPullDetector(Context context) {
- mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
- }
-
- public void setDetectableScrollConditions(int scrollDirectionFlags, boolean ignoreSlop) {
- mScrollConditions = scrollDirectionFlags;
- mIgnoreSlopWhenSettling = ignoreSlop;
- }
-
- private boolean shouldScrollStart() {
- // reject cases where the slop condition is not met.
- if (Math.abs(mDisplacementY) < mTouchSlop) {
- return false;
- }
-
- // reject cases where the angle condition is not met.
- float deltaY = Math.abs(mDisplacementY);
- float deltaX = Math.max(Math.abs(mDisplacementX), 1);
- if (deltaX > deltaY) {
- return false;
- }
- // Check if the client is interested in scroll in current direction.
- if (((mScrollConditions & DIRECTION_DOWN) > 0 && mDisplacementY > 0) ||
- ((mScrollConditions & DIRECTION_UP) > 0 && mDisplacementY < 0)) {
- return true;
- }
- return false;
- }
-
- public boolean onTouchEvent(MotionEvent ev) {
- switch (ev.getAction()) {
- case MotionEvent.ACTION_DOWN:
- mDownX = ev.getX();
- mDownY = ev.getY();
- mLastDisplacement = 0;
- mDisplacementY = 0;
- mVelocity = 0;
-
- if (mState == ScrollState.SETTLING && mIgnoreSlopWhenSettling) {
- setState(ScrollState.DRAGGING);
- }
- break;
- case MotionEvent.ACTION_MOVE:
- mDisplacementX = ev.getX() - mDownX;
- mDisplacementY = ev.getY() - mDownY;
- computeVelocity(ev);
-
- // handle state and listener calls.
- if (mState != ScrollState.DRAGGING && shouldScrollStart()) {
- setState(ScrollState.DRAGGING);
- }
- if (mState == ScrollState.DRAGGING) {
- reportDragging();
- }
- break;
- case MotionEvent.ACTION_CANCEL:
- case MotionEvent.ACTION_UP:
- // These are synthetic events and there is no need to update internal values.
- if (mState == ScrollState.DRAGGING) {
- setState(ScrollState.SETTLING);
- }
- break;
- default:
- //TODO: add multi finger tracking by tracking active pointer.
- break;
- }
- // Do house keeping.
- mLastDisplacement = mDisplacementY;
- mLastY = ev.getY();
- return true;
- }
-
- public void finishedScrolling() {
- setState(ScrollState.IDLE);
- }
-
- private boolean reportDragStart(boolean recatch) {
- mListener.onDragStart(!recatch);
- if (DBG) {
- Log.d(TAG, "onDragStart recatch:" + recatch);
- }
- return true;
- }
-
- private void initializeDragging() {
- if (mState == ScrollState.SETTLING && mIgnoreSlopWhenSettling) {
- mSubtractDisplacement = 0;
- }
- if (mDisplacementY > 0) {
- mSubtractDisplacement = mTouchSlop;
- } else {
- mSubtractDisplacement = -mTouchSlop;
- }
- }
-
- private boolean reportDragging() {
- float delta = mDisplacementY - mLastDisplacement;
- if (delta != 0) {
- if (DBG) {
- Log.d(TAG, String.format("onDrag disp=%.1f, velocity=%.1f",
- mDisplacementY, mVelocity));
- }
-
- return mListener.onDrag(mDisplacementY - mSubtractDisplacement, mVelocity);
- }
- return true;
- }
-
- private void reportDragEnd() {
- if (DBG) {
- Log.d(TAG, String.format("onScrollEnd disp=%.1f, velocity=%.1f",
- mDisplacementY, mVelocity));
- }
- mListener.onDragEnd(mVelocity, Math.abs(mVelocity) > RELEASE_VELOCITY_PX_MS);
-
- }
-
- /**
- * Computes the damped velocity using the two motion events and the previous velocity.
- */
- private float computeVelocity(MotionEvent to) {
- return computeVelocity(to.getY() - mLastY, to.getEventTime());
- }
-
- public float computeVelocity(float delta, long currentMillis) {
- long previousMillis = mCurrentMillis;
- mCurrentMillis = currentMillis;
-
- float deltaTimeMillis = mCurrentMillis - previousMillis;
- float velocity = (deltaTimeMillis > 0) ? (delta / deltaTimeMillis) : 0;
- if (Math.abs(mVelocity) < 0.001f) {
- mVelocity = velocity;
- } else {
- float alpha = computeDampeningFactor(deltaTimeMillis);
- mVelocity = interpolate(mVelocity, velocity, alpha);
- }
- return mVelocity;
- }
-
- /**
- * Returns a time-dependent dampening factor using delta time.
- */
- private static float computeDampeningFactor(float deltaTime) {
- return deltaTime / (SCROLL_VELOCITY_DAMPENING_RC + deltaTime);
- }
-
- /**
- * Returns the linear interpolation between two values
- */
- private static float interpolate(float from, float to, float alpha) {
- return (1.0f - alpha) * from + alpha * to;
- }
-
- public long calculateDuration(float velocity, float progressNeeded) {
- // TODO: make these values constants after tuning.
- float velocityDivisor = Math.max(2f, Math.abs(0.5f * velocity));
- float travelDistance = Math.max(0.2f, progressNeeded);
- long duration = (long) Math.max(100, ANIMATION_DURATION / velocityDivisor * travelDistance);
- if (DBG) {
- Log.d(TAG, String.format("calculateDuration=%d, v=%f, d=%f", duration, velocity, progressNeeded));
- }
- return duration;
- }
-
- public static class ScrollInterpolator implements Interpolator {
-
- boolean mSteeper;
-
- public void setVelocityAtZero(float velocity) {
- mSteeper = velocity > FAST_FLING_PX_MS;
- }
-
- public float getInterpolation(float t) {
- t -= 1.0f;
- float output = t * t * t;
- if (mSteeper) {
- output *= t * t; // Make interpolation initial slope steeper
- }
- return output + 1;
- }
- }
-}
diff --git a/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java b/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java
index 21eb3fba0..26f6ec357 100644
--- a/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java
+++ b/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java
@@ -71,10 +71,6 @@ public class DefaultAppSearchAlgorithm implements SearchAlgorithm {
return result;
}
- public static boolean matches(AppInfo info, String query) {
- return matches(info, query, StringMatcher.getInstance());
- }
-
public static boolean matches(AppInfo info, String query, StringMatcher matcher) {
int queryLength = query.length();