summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-06-28 00:34:04 (GMT)
committerRaj Yengisetty <rajesh@cyngn.com>2014-06-28 00:34:04 (GMT)
commit0b0c09f1aabdafe8e134174e74b739754d64ccce (patch)
tree7cc23e56b2cb2da393e6d30cd31602b2602b4d3c
parentf888a33e9d451d24e19c98b82777e22dcbcb80cc (diff)
downloadandroid_packages_apps_Trebuchet-0b0c09f1aabdafe8e134174e74b739754d64ccce.zip
android_packages_apps_Trebuchet-0b0c09f1aabdafe8e134174e74b739754d64ccce.tar.gz
android_packages_apps_Trebuchet-0b0c09f1aabdafe8e134174e74b739754d64ccce.tar.bz2
Fixed small Search Bar bug
Repro: - Clear Trebuchet app data - Disable setting for Search Bar - Enable setting for Search Panel - Move shortcut/folder in workspace - Enter and exit Search Panel - Observe small Search Bar Change-Id: I3d7cd9d5629f3250de6cb22ca9223b67ef558348
-rw-r--r--src/com/android/launcher3/Launcher.java11
-rw-r--r--src/org/cyanogenmod/trebuchet/TrebuchetLauncher.java1
2 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a911e7a..0f8ce9a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1206,6 +1206,7 @@ public class Launcher extends Activity
public void setScrollY(int scroll) {
scrollY = scroll;
+ // Be careful of feature check isSearchBarEnabled
if (mWorkspace.isOnOrMovingToCustomContent()) {
mSearchDropTargetBar.setTranslationY(- scrollY);
getQsbBar().setTranslationY(-scrollY);
@@ -1215,7 +1216,9 @@ public class Launcher extends Activity
public void resetQSBScroll() {
mSearchDropTargetBar.animate().translationY(0).start();
- getQsbBar().animate().translationY(0).start();
+ if (isSearchBarEnabled()) {
+ getQsbBar().animate().translationY(0).start();
+ }
}
public interface CustomContentCallbacks {
@@ -4933,6 +4936,12 @@ public class Launcher extends Activity
mModel.startLoader(true, mWorkspace.getCurrentPage());
mWorkspace.updateCustomContentVisibility();
}
+
+ public boolean isSearchBarEnabled() {
+ return SettingsProvider.getBoolean(this,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
+ R.bool.preferences_interface_homescreen_search_default);
+ }
}
interface LauncherTransitionable {
diff --git a/src/org/cyanogenmod/trebuchet/TrebuchetLauncher.java b/src/org/cyanogenmod/trebuchet/TrebuchetLauncher.java
index ec91e10..3c5e6a7 100644
--- a/src/org/cyanogenmod/trebuchet/TrebuchetLauncher.java
+++ b/src/org/cyanogenmod/trebuchet/TrebuchetLauncher.java
@@ -212,7 +212,6 @@ public class TrebuchetLauncher extends Launcher {
if (mCurrentHomeApp != null) {
mQsbScroller = addToCustomContentPage(mCurrentHomeApp.mInstance.createCustomView(),
mCustomContentCallbacks, mCurrentHomeApp.mInstance.getName());
- mQsbScroller.setScrollY(200);
}
}