Merge "Disable assist gesture when keyguard is active" into jb-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c6a2fa8cba
@ -953,4 +953,9 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean inKeyguardRestrictedInputMode() {
|
||||||
|
KeyguardManager km = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
|
||||||
|
return km.inKeyguardRestrictedInputMode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,8 @@ public class DelegateViewHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||||
if (mSourceView == null || mDelegateView == null || mBar.shouldDisableNavbarGestures()) {
|
if (mSourceView == null || mDelegateView == null
|
||||||
|
|| mBar.shouldDisableNavbarGestures() || mBar.inKeyguardRestrictedInputMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -608,7 +608,7 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
switch(event.getAction()) {
|
switch(event.getAction()) {
|
||||||
case MotionEvent.ACTION_DOWN:
|
case MotionEvent.ACTION_DOWN:
|
||||||
if (!shouldDisableNavbarGestures()) {
|
if (!shouldDisableNavbarGestures() && !inKeyguardRestrictedInputMode()) {
|
||||||
mHandler.removeCallbacks(mShowSearchPanel);
|
mHandler.removeCallbacks(mShowSearchPanel);
|
||||||
mHandler.postDelayed(mShowSearchPanel, mShowSearchHoldoff);
|
mHandler.postDelayed(mShowSearchPanel, mShowSearchHoldoff);
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ public class TabletStatusBar extends BaseStatusBar implements
|
|||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
switch(event.getAction()) {
|
switch(event.getAction()) {
|
||||||
case MotionEvent.ACTION_DOWN:
|
case MotionEvent.ACTION_DOWN:
|
||||||
if (!shouldDisableNavbarGestures()) {
|
if (!shouldDisableNavbarGestures() && !inKeyguardRestrictedInputMode()) {
|
||||||
mHandler.removeCallbacks(mShowSearchPanel);
|
mHandler.removeCallbacks(mShowSearchPanel);
|
||||||
mHandler.postDelayed(mShowSearchPanel, mShowSearchHoldoff);
|
mHandler.postDelayed(mShowSearchPanel, mShowSearchHoldoff);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user