summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Čížek <DavidCizek@seznam.cz>2015-09-30 10:38:42 (GMT)
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-10-01 18:13:35 (GMT)
commit9d8ee9ea0196dd6dc6947dbee9e88742b7ae560e (patch)
tree85b82590d4d2e58d8a63daa0ad7ff2d3619ef32e
parentb1f28ea34e66b59e281ec6b3f60d94485268b19e (diff)
downloadandroid_packages_apps_Trebuchet-9d8ee9ea0196dd6dc6947dbee9e88742b7ae560e.zip
android_packages_apps_Trebuchet-9d8ee9ea0196dd6dc6947dbee9e88742b7ae560e.tar.gz
android_packages_apps_Trebuchet-9d8ee9ea0196dd6dc6947dbee9e88742b7ae560e.tar.bz2
fix NPE when dragging icon to desktop, when QuickSearchBox is missing
Change-Id: I82003c814a0f685d3d7781c79b6725cb49ec6530
-rw-r--r--src/com/android/launcher3/SearchDropTargetBar.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/SearchDropTargetBar.java b/src/com/android/launcher3/SearchDropTargetBar.java
index 38daadd..66a8518 100644
--- a/src/com/android/launcher3/SearchDropTargetBar.java
+++ b/src/com/android/launcher3/SearchDropTargetBar.java
@@ -217,7 +217,8 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D
// Animate out the QSB search bar, and animate in the drop target bar
prepareStartAnimation(mDropTargetBar);
mDropTargetBarAnim.start();
- if (!isAnyFolderOpen() && (!mIsSearchBarHidden || mQSBSearchBar.getAlpha() > 0f)) {
+ if (!isAnyFolderOpen() && (!mIsSearchBarHidden ||
+ (mQSBSearchBar != null && mQSBSearchBar.getAlpha() > 0f))) {
prepareStartAnimation(mQSBSearchBar);
mQSBSearchBarAnim.start();
}
@@ -240,7 +241,8 @@ public class SearchDropTargetBar extends FrameLayout implements DragController.D
// Restore the QSB search bar, and animate out the drop target bar
prepareStartAnimation(mDropTargetBar);
mDropTargetBarAnim.reverse();
- if (!isAnyFolderOpen() && (!mIsSearchBarHidden || mQSBSearchBar.getAlpha() < 1f)) {
+ if (!isAnyFolderOpen() && (!mIsSearchBarHidden ||
+ (mQSBSearchBar != null && mQSBSearchBar.getAlpha() < 1f))) {
if (mLauncher != null && mLauncher.shouldShowSearchBar()
&& mQSBSearchBar.getVisibility() != View.VISIBLE) {
mQSBSearchBar.setVisibility(View.VISIBLE);