Using the default search widget in Launcher3
> Removing all logic related to search and voice overlays
from Launcher3
> Using the widget provided by global search provider on the
homescreen
> Removing VoiceButtonProxy, as it is not being used anymore
Change-Id: Ie8b09b44f7213c8fa11bce685914442e4884295d
diff --git a/src/com/android/launcher3/SearchDropTargetBar.java b/src/com/android/launcher3/SearchDropTargetBar.java
index 6205088..99c2e08 100644
--- a/src/com/android/launcher3/SearchDropTargetBar.java
+++ b/src/com/android/launcher3/SearchDropTargetBar.java
@@ -22,7 +22,6 @@
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
@@ -50,7 +49,6 @@
private int mBarHeight;
private boolean mDeferOnDragEnd = false;
- private Drawable mPreviousBackground;
private boolean mEnableDropDownDropTargets;
public SearchDropTargetBar(Context context, AttributeSet attrs) {
@@ -70,7 +68,10 @@
dragController.setFlingToDeleteDropTarget(mDeleteDropTarget);
mInfoDropTarget.setLauncher(launcher);
mDeleteDropTarget.setLauncher(launcher);
- mQSBSearchBar = launcher.getQsbBar();
+ }
+
+ public void setQsbSearchBar(View qsb) {
+ mQSBSearchBar = qsb;
if (mQSBSearchBar != null) {
if (mEnableDropDownDropTargets) {
mQSBSearchBarAnim = LauncherAnimUtils.ofFloat(mQSBSearchBar, "translationY", 0,
@@ -224,20 +225,6 @@
}
}
- public void onSearchPackagesChanged(boolean searchVisible, boolean voiceVisible) {
- if (mQSBSearchBar != null) {
- Drawable bg = mQSBSearchBar.getBackground();
- if (bg != null && (!searchVisible && !voiceVisible)) {
- // Save the background and disable it
- mPreviousBackground = bg;
- mQSBSearchBar.setBackgroundResource(0);
- } else if (mPreviousBackground != null && (searchVisible || voiceVisible)) {
- // Restore the background
- mQSBSearchBar.setBackground(mPreviousBackground);
- }
- }
- }
-
public Rect getSearchBarBounds() {
if (mQSBSearchBar != null) {
final int[] pos = new int[2];