summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/values/dimens.xml5
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java10
5 files changed, 17 insertions, 22 deletions
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index c8db284..0af693d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -115,9 +115,6 @@
<!-- Diameter of outer shape drawable shown in navbar search. Should be 1/2 of above value -->
<dimen name="navbar_search_outerring_radius">170dp</dimen>
- <!-- Threshold for swipe-up gesture to activate search dialog -->
- <dimen name="navbar_search_up_threshhold">40dip</dimen>
-
<!-- Height of search panel including navigation bar height -->
<dimen name="navbar_search_panel_height">230dip</dimen>
@@ -420,7 +417,7 @@
<dimen name="search_card_peek_height">100dp</dimen>
<!-- How far the user needs to drag up to invoke search. -->
- <dimen name="search_panel_threshold">150dp</dimen>
+ <dimen name="search_panel_threshold">100dp</dimen>
<!-- The width/height of the phone/camera/unlock icon on keyguard. -->
<dimen name="keyguard_affordance_height">56dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index ad568b8..f4d0669 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -1323,9 +1323,7 @@ public class KeyguardViewMediator extends SystemUI {
// (like recents). Temporary enable/disable (e.g. the "back" button) are
// done in KeyguardHostView.
flags |= StatusBarManager.DISABLE_RECENT;
- if (!isAssistantAvailable()) {
- flags |= StatusBarManager.DISABLE_SEARCH;
- }
+ flags |= StatusBarManager.DISABLE_SEARCH;
}
if (isShowingAndNotOccluded()) {
flags |= StatusBarManager.DISABLE_HOME;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 3a20b00..f275945 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -114,7 +114,6 @@ public abstract class BaseStatusBar extends SystemUI implements
protected static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 1023;
protected static final int MSG_SHOW_NEXT_AFFILIATED_TASK = 1024;
protected static final int MSG_SHOW_PREV_AFFILIATED_TASK = 1025;
- protected static final int MSG_OPEN_SEARCH_PANEL = 1026;
protected static final int MSG_CLOSE_SEARCH_PANEL = 1027;
protected static final int MSG_SHOW_HEADS_UP = 1028;
protected static final int MSG_HIDE_HEADS_UP = 1029;
@@ -728,9 +727,9 @@ public abstract class BaseStatusBar extends SystemUI implements
@Override
public void showSearchPanel() {
- int msg = MSG_OPEN_SEARCH_PANEL;
- mHandler.removeMessages(msg);
- mHandler.sendEmptyMessage(msg);
+ if (mSearchPanelView != null && mSearchPanelView.isAssistantAvailable()) {
+ mSearchPanelView.show(true, true);
+ }
}
@Override
@@ -943,12 +942,6 @@ public abstract class BaseStatusBar extends SystemUI implements
case MSG_SHOW_PREV_AFFILIATED_TASK:
showRecentsPreviousAffiliatedTask();
break;
- case MSG_OPEN_SEARCH_PANEL:
- if (DEBUG) Log.d(TAG, "opening search panel");
- if (mSearchPanelView != null && mSearchPanelView.isAssistantAvailable()) {
- mSearchPanelView.show(true, true);
- }
- break;
case MSG_CLOSE_SEARCH_PANEL:
if (DEBUG) Log.d(TAG, "closing search panel");
if (mSearchPanelView != null && mSearchPanelView.isShowing()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
index 3a82753..628aab8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java
@@ -20,8 +20,7 @@ import android.app.StatusBarManager;
import android.graphics.RectF;
import android.view.MotionEvent;
import android.view.View;
-
-import com.android.systemui.R;
+import android.view.ViewConfiguration;
public class DelegateViewHelper {
private View mDelegateView;
@@ -107,8 +106,8 @@ public class DelegateViewHelper {
public void setSourceView(View view) {
mSourceView = view;
if (mSourceView != null) {
- mTriggerThreshhold = mSourceView.getContext().getResources()
- .getDimension(R.dimen.navbar_search_up_threshhold);
+ mTriggerThreshhold =
+ ViewConfiguration.get(mSourceView.getContext()).getScaledPagingTouchSlop();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
index 3c20d1f..c5f8303 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
@@ -33,6 +33,7 @@ public class NavigationBarViewTaskSwitchHelper extends GestureDetector.SimpleOnG
private final int mMinFlingVelocity;
private boolean mInterceptTouches;
private int mTouchDownX;
+ private int mTouchDownY;
public NavigationBarViewTaskSwitchHelper(Context context) {
ViewConfiguration configuration = ViewConfiguration.get(context);
@@ -58,12 +59,19 @@ public class NavigationBarViewTaskSwitchHelper extends GestureDetector.SimpleOnG
switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN: {
mTouchDownX = (int) event.getX();
+ mTouchDownY = (int) event.getY();
mInterceptTouches = false;
break;
}
case MotionEvent.ACTION_MOVE: {
int x = (int) event.getX();
- if (Math.abs(x - mTouchDownX) > mScrollTouchSlop) {
+ int y = (int) event.getY();
+ int xDiff = Math.abs(x - mTouchDownX);
+ int yDiff = Math.abs(y - mTouchDownY);
+ boolean exceededTouchSlop = !mIsVertical
+ ? xDiff > mScrollTouchSlop && xDiff > yDiff
+ : yDiff > mScrollTouchSlop && yDiff > xDiff;
+ if (exceededTouchSlop) {
mInterceptTouches = true;
return true;
}