Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +6 −1 Original line number Diff line number Diff line Loading @@ -317,7 +317,7 @@ public abstract class PanelView extends FrameLayout { } mJustPeeked = false; } if (-h >= mUnlockFalsingThreshold) { if (-h >= getFalsingThreshold()) { mTouchAboveFalsingThreshold = true; } if (!mJustPeeked && (!waitForTouchSlop || mTracking) && !isTrackingBlocked()) { Loading Loading @@ -370,6 +370,11 @@ public abstract class PanelView extends FrameLayout { return !waitForTouchSlop || mTracking; } private int getFalsingThreshold() { float factor = mStatusBar.isScreenOnComingFromTouch() ? 1.5f : 1.0f; return (int) (mUnlockFalsingThreshold * factor); } protected abstract boolean hasConflictingGestures(); protected void onTrackingStopped(boolean expand) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +11 −2 Original line number Diff line number Diff line Loading @@ -262,6 +262,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private StatusBarWindowManager mStatusBarWindowManager; private UnlockMethodCache mUnlockMethodCache; private DozeServiceHost mDozeServiceHost; private boolean mScreenOnComingFromTouch; int mPixelFormat; Object mQueueLock = new Object(); Loading Loading @@ -2118,10 +2119,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, return mNotificationPanel.isQsExpanded(); } public boolean isScreenOnComingFromTouch() { return mScreenOnComingFromTouch; } public boolean isFalsingThresholdNeeded() { boolean onKeyguard = getBarState() == StatusBarState.KEYGUARD; boolean isMethodInsecure = mUnlockMethodCache.isMethodInsecure(); return onKeyguard && (isMethodInsecure || mDozing); return onKeyguard && (isMethodInsecure || mDozing || mScreenOnComingFromTouch); } @Override // NotificationData.Environment Loading Loading @@ -3909,6 +3914,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public void onScreenTurnedOff() { mScreenOnFromKeyguard = false; mScreenOnComingFromTouch = false; mStackScroller.setAnimationsEnabled(false); } Loading Loading @@ -4011,10 +4017,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, return !mNotificationData.getActiveNotifications().isEmpty(); } public void wakeUpIfDozing(long time) { public void wakeUpIfDozing(long time, boolean fromTouch) { if (mDozing && mScrimController.isPulsing()) { PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); pm.wakeUp(time); if (fromTouch) { mScreenOnComingFromTouch = true; } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +2 −2 Original line number Diff line number Diff line Loading @@ -132,7 +132,7 @@ public class StatusBarWindowView extends FrameLayout { case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_VOLUME_UP: if (down) { mService.wakeUpIfDozing(event.getEventTime()); mService.wakeUpIfDozing(event.getEventTime(), false); } } if (mService.interceptMediaKey(event)) { Loading Loading @@ -164,7 +164,7 @@ public class StatusBarWindowView extends FrameLayout { intercept = mDragDownHelper.onInterceptTouchEvent(ev); // wake up on a touch down event, if dozing if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { mService.wakeUpIfDozing(ev.getEventTime()); mService.wakeUpIfDozing(ev.getEventTime(), true); } } if (!intercept) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +6 −1 Original line number Diff line number Diff line Loading @@ -317,7 +317,7 @@ public abstract class PanelView extends FrameLayout { } mJustPeeked = false; } if (-h >= mUnlockFalsingThreshold) { if (-h >= getFalsingThreshold()) { mTouchAboveFalsingThreshold = true; } if (!mJustPeeked && (!waitForTouchSlop || mTracking) && !isTrackingBlocked()) { Loading Loading @@ -370,6 +370,11 @@ public abstract class PanelView extends FrameLayout { return !waitForTouchSlop || mTracking; } private int getFalsingThreshold() { float factor = mStatusBar.isScreenOnComingFromTouch() ? 1.5f : 1.0f; return (int) (mUnlockFalsingThreshold * factor); } protected abstract boolean hasConflictingGestures(); protected void onTrackingStopped(boolean expand) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +11 −2 Original line number Diff line number Diff line Loading @@ -262,6 +262,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private StatusBarWindowManager mStatusBarWindowManager; private UnlockMethodCache mUnlockMethodCache; private DozeServiceHost mDozeServiceHost; private boolean mScreenOnComingFromTouch; int mPixelFormat; Object mQueueLock = new Object(); Loading Loading @@ -2118,10 +2119,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, return mNotificationPanel.isQsExpanded(); } public boolean isScreenOnComingFromTouch() { return mScreenOnComingFromTouch; } public boolean isFalsingThresholdNeeded() { boolean onKeyguard = getBarState() == StatusBarState.KEYGUARD; boolean isMethodInsecure = mUnlockMethodCache.isMethodInsecure(); return onKeyguard && (isMethodInsecure || mDozing); return onKeyguard && (isMethodInsecure || mDozing || mScreenOnComingFromTouch); } @Override // NotificationData.Environment Loading Loading @@ -3909,6 +3914,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public void onScreenTurnedOff() { mScreenOnFromKeyguard = false; mScreenOnComingFromTouch = false; mStackScroller.setAnimationsEnabled(false); } Loading Loading @@ -4011,10 +4017,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, return !mNotificationData.getActiveNotifications().isEmpty(); } public void wakeUpIfDozing(long time) { public void wakeUpIfDozing(long time, boolean fromTouch) { if (mDozing && mScrimController.isPulsing()) { PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); pm.wakeUp(time); if (fromTouch) { mScreenOnComingFromTouch = true; } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +2 −2 Original line number Diff line number Diff line Loading @@ -132,7 +132,7 @@ public class StatusBarWindowView extends FrameLayout { case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_VOLUME_UP: if (down) { mService.wakeUpIfDozing(event.getEventTime()); mService.wakeUpIfDozing(event.getEventTime(), false); } } if (mService.interceptMediaKey(event)) { Loading Loading @@ -164,7 +164,7 @@ public class StatusBarWindowView extends FrameLayout { intercept = mDragDownHelper.onInterceptTouchEvent(ev); // wake up on a touch down event, if dozing if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { mService.wakeUpIfDozing(ev.getEventTime()); mService.wakeUpIfDozing(ev.getEventTime(), true); } } if (!intercept) { Loading