Skip to content

Commit 4c3cc7d

Browse files
John SpurlockAndroid Git Automerger
authored andcommitted
am 928c887: am c6a2fa8: Merge "Disable assist gesture when keyguard is active" into jb-dev
* commit '928c88774db7d89036aef0f4286f7414b3a597f3': Disable assist gesture when keyguard is active
2 parents 777b598 + 928c887 commit 4c3cc7d

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,4 +953,9 @@ protected boolean showNotificationEvenIfUnprovisioned(StatusBarNotification sbn)
953953
}
954954
return false;
955955
}
956+
957+
public boolean inKeyguardRestrictedInputMode() {
958+
KeyguardManager km = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
959+
return km.inKeyguardRestrictedInputMode();
960+
}
956961
}

packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public void setBar(BaseStatusBar phoneStatusBar) {
4848
}
4949

5050
public boolean onInterceptTouchEvent(MotionEvent event) {
51-
if (mSourceView == null || mDelegateView == null || mBar.shouldDisableNavbarGestures()) {
51+
if (mSourceView == null || mDelegateView == null
52+
|| mBar.shouldDisableNavbarGestures() || mBar.inKeyguardRestrictedInputMode()) {
5253
return false;
5354
}
5455

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ public void run() {
616616
public boolean onTouch(View v, MotionEvent event) {
617617
switch(event.getAction()) {
618618
case MotionEvent.ACTION_DOWN:
619-
if (!shouldDisableNavbarGestures()) {
619+
if (!shouldDisableNavbarGestures() && !inKeyguardRestrictedInputMode()) {
620620
mHandler.removeCallbacks(mShowSearchPanel);
621621
mHandler.postDelayed(mShowSearchPanel, mShowSearchHoldoff);
622622
}

packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public void run() {
201201
public boolean onTouch(View v, MotionEvent event) {
202202
switch(event.getAction()) {
203203
case MotionEvent.ACTION_DOWN:
204-
if (!shouldDisableNavbarGestures()) {
204+
if (!shouldDisableNavbarGestures() && !inKeyguardRestrictedInputMode()) {
205205
mHandler.removeCallbacks(mShowSearchPanel);
206206
mHandler.postDelayed(mShowSearchPanel, mShowSearchHoldoff);
207207
}

0 commit comments

Comments
 (0)