Loading packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +0 −8 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.doze; import android.annotation.NonNull; import android.app.PendingIntent; /** * Interface the doze service uses to communicate with the rest of system UI. Loading @@ -34,7 +33,6 @@ public interface DozeHost { boolean isProvisioned(); boolean isBlockingDoze(); void startPendingIntentDismissingKeyguard(PendingIntent intent); void extendPulse(); void setAnimateWakeup(boolean animateWakeup); Loading @@ -47,12 +45,6 @@ public interface DozeHost { void onIgnoreTouchWhilePulsing(boolean ignore); /** * If the device was waken up by a passive interrupt that will show the lock screen without * expanding the notification panel/shade. */ void setPassiveInterrupt(boolean lightInterrupt); interface Callback { /** * Called when a high priority notification is added. Loading packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +0 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,6 @@ public class DozeTriggers implements DozeMachine.Part { mDozeHost.onDoubleTap(screenX, screenY); mMachine.wakeUp(); } else if (isPickup) { mDozeHost.setPassiveInterrupt(true); mMachine.wakeUp(); } else { mDozeHost.extendPulse(); Loading Loading @@ -221,7 +220,6 @@ public class DozeTriggers implements DozeMachine.Part { case INITIALIZED: mBroadcastReceiver.register(mContext); mDozeHost.addCallback(mHostCallback); mDozeHost.setPassiveInterrupt(false); checkTriggersAtInit(); break; case DOZE: Loading @@ -231,7 +229,6 @@ public class DozeTriggers implements DozeMachine.Part { mDozeSensors.reregisterAllSensors(); } mDozeSensors.setListening(true); mDozeHost.setPassiveInterrupt(false); if (newState == DozeMachine.State.DOZE_AOD && !sWakeDisplaySensorState) { onWakeScreen(false); } Loading packages/SystemUI/src/com/android/systemui/doze/LockScreenWakeUpController.java +0 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,6 @@ public class LockScreenWakeUpController implements StatusBarStateController.Stat DozeLog.traceLockScreenWakeUp(wakeEvent); if (wakeEvent && mDozing) { mDozeHost.setPassiveInterrupt(true); if (DEBUG) Log.d(TAG, "Wake up."); mPowerManager.wakeUp(SystemClock.uptimeMillis(), "com.android.systemui:NODOZE"); } else if (!wakeEvent && !mDozing) { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +1 −1 Original line number Diff line number Diff line Loading @@ -5823,7 +5823,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd (int) (dragLengthY / mDisplayMetrics.density), 0 /* velocityDp - N/A */); if (mNotificationPanel.onDraggedDown() || startingChild != null) { if (!mAmbientState.isDark() || startingChild != null) { // We have notifications, go to locked shade. mShadeController.goToLockedShade(startingChild); if (startingChild instanceof ExpandableNotificationRow) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +11 −64 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.os.PowerManager; import android.os.SystemProperties; import android.util.AttributeSet; import android.util.Log; import android.util.MathUtils; Loading Loading @@ -106,23 +105,6 @@ public class NotificationPanelView extends PanelView implements private static final boolean DEBUG = false; /** * If passive interrupts expand the NSSL or not */ private static final boolean EXPAND_ON_PASSIVE_INTERRUPT = SystemProperties.getBoolean( "persist.sysui.expand_shade_on_wake_up", true); /** * If the notification panel should remain collapsed when the phone wakes up, even if the user * presses power. */ private static final boolean NEVER_EXPAND_WHEN_WAKING_UP = SystemProperties.getBoolean( "persist.sysui.defer_notifications_on_lock_screen", false); /** * If waking up the phone should take you to SHADE_LOCKED instead of KEYGUARD */ private static final boolean WAKE_UP_TO_SHADE = SystemProperties.getBoolean( "persist.sysui.go_to_shade_on_wake_up", false); /** * Fling expanding QS. */ Loading Loading @@ -283,12 +265,6 @@ public class NotificationPanelView extends PanelView implements */ private float mLinearDarkAmount; /** * State where the device isn't dozing anymore, but the lock screen isn't fully awake. * The screen will be dimmed down with the shade collapsed. */ private boolean mSemiAwake; private boolean mPulsing; private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger(); private boolean mNoVisibleNotifications = true; Loading Loading @@ -1256,11 +1232,6 @@ public class NotificationPanelView extends PanelView implements updateDozingVisibilities(false /* animate */); } // Expand notification shade if the device was is semi-awake state if (mBarState == StatusBarState.SHADE && isSemiAwake()) { mNotificationStackScroller.setDark(false /* dark */, false /* animated */, null /* touchLocation */); } resetVerticalPanelPosition(); updateQsState(); } Loading Loading @@ -2790,35 +2761,30 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller.setAnimationsEnabled(!disabled); } public void setDozing(boolean dozing, boolean animate, PointF wakeUpTouchLocation, boolean passivelyInterrupted) { /** * Sets the dozing state. * * @param dozing {@code true} when dozing. * @param animate if transition should be animated. * @param wakeUpTouchLocation touch event location - if woken up by SLPI sensor. */ public void setDozing(boolean dozing, boolean animate, PointF wakeUpTouchLocation) { if (dozing == mDozing) return; mDozing = dozing; boolean doNotExpand = (!EXPAND_ON_PASSIVE_INTERRUPT && passivelyInterrupted) || NEVER_EXPAND_WHEN_WAKING_UP; mSemiAwake = doNotExpand && !mDozing; if (!mSemiAwake) { mNotificationStackScroller.setDark(mDozing, animate, wakeUpTouchLocation); } if (mBarState == StatusBarState.KEYGUARD || mBarState == StatusBarState.SHADE_LOCKED) { updateDozingVisibilities(animate); } final float darkAmount = dozing && !mSemiAwake ? 1 : 0; if (!mSemiAwake) { final float darkAmount = dozing ? 1 : 0; mStatusBarStateController.setDozeAmount(darkAmount, animate); } if (animate) { mNotificationStackScroller.notifyDarkAnimationStart(mDozing); } } public boolean isSemiAwake() { return mSemiAwake; } @Override public void onDozeAmountChanged(float linearAmount, float amount) { mInterpolatedDarkAmount = amount; Loading Loading @@ -3011,23 +2977,4 @@ public class NotificationPanelView extends PanelView implements public void showTransientIndication(int id) { mKeyguardBottomArea.showTransientIndication(id); } /** * Whenever a user drags down on the empty area (pulling down the shade and clock) and lets go. * * @return {@code true} if dragging down should take the user to SHADE_LOCKED. */ public boolean onDraggedDown() { if (isSemiAwake()) { mSemiAwake = false; mNotificationStackScroller.setDark(false /* dark */, true /* animate */, null /* touchLocation */); mStatusBarStateController.setDozeAmount(0f, true /* animated */); mNotificationStackScroller.notifyDarkAnimationStart(mDozing); mStatusBar.updateScrimController(); return WAKE_UP_TO_SHADE; } return true; } } Loading
packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +0 −8 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.doze; import android.annotation.NonNull; import android.app.PendingIntent; /** * Interface the doze service uses to communicate with the rest of system UI. Loading @@ -34,7 +33,6 @@ public interface DozeHost { boolean isProvisioned(); boolean isBlockingDoze(); void startPendingIntentDismissingKeyguard(PendingIntent intent); void extendPulse(); void setAnimateWakeup(boolean animateWakeup); Loading @@ -47,12 +45,6 @@ public interface DozeHost { void onIgnoreTouchWhilePulsing(boolean ignore); /** * If the device was waken up by a passive interrupt that will show the lock screen without * expanding the notification panel/shade. */ void setPassiveInterrupt(boolean lightInterrupt); interface Callback { /** * Called when a high priority notification is added. Loading
packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +0 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,6 @@ public class DozeTriggers implements DozeMachine.Part { mDozeHost.onDoubleTap(screenX, screenY); mMachine.wakeUp(); } else if (isPickup) { mDozeHost.setPassiveInterrupt(true); mMachine.wakeUp(); } else { mDozeHost.extendPulse(); Loading Loading @@ -221,7 +220,6 @@ public class DozeTriggers implements DozeMachine.Part { case INITIALIZED: mBroadcastReceiver.register(mContext); mDozeHost.addCallback(mHostCallback); mDozeHost.setPassiveInterrupt(false); checkTriggersAtInit(); break; case DOZE: Loading @@ -231,7 +229,6 @@ public class DozeTriggers implements DozeMachine.Part { mDozeSensors.reregisterAllSensors(); } mDozeSensors.setListening(true); mDozeHost.setPassiveInterrupt(false); if (newState == DozeMachine.State.DOZE_AOD && !sWakeDisplaySensorState) { onWakeScreen(false); } Loading
packages/SystemUI/src/com/android/systemui/doze/LockScreenWakeUpController.java +0 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,6 @@ public class LockScreenWakeUpController implements StatusBarStateController.Stat DozeLog.traceLockScreenWakeUp(wakeEvent); if (wakeEvent && mDozing) { mDozeHost.setPassiveInterrupt(true); if (DEBUG) Log.d(TAG, "Wake up."); mPowerManager.wakeUp(SystemClock.uptimeMillis(), "com.android.systemui:NODOZE"); } else if (!wakeEvent && !mDozing) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +1 −1 Original line number Diff line number Diff line Loading @@ -5823,7 +5823,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd (int) (dragLengthY / mDisplayMetrics.density), 0 /* velocityDp - N/A */); if (mNotificationPanel.onDraggedDown() || startingChild != null) { if (!mAmbientState.isDark() || startingChild != null) { // We have notifications, go to locked shade. mShadeController.goToLockedShade(startingChild); if (startingChild instanceof ExpandableNotificationRow) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +11 −64 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.os.PowerManager; import android.os.SystemProperties; import android.util.AttributeSet; import android.util.Log; import android.util.MathUtils; Loading Loading @@ -106,23 +105,6 @@ public class NotificationPanelView extends PanelView implements private static final boolean DEBUG = false; /** * If passive interrupts expand the NSSL or not */ private static final boolean EXPAND_ON_PASSIVE_INTERRUPT = SystemProperties.getBoolean( "persist.sysui.expand_shade_on_wake_up", true); /** * If the notification panel should remain collapsed when the phone wakes up, even if the user * presses power. */ private static final boolean NEVER_EXPAND_WHEN_WAKING_UP = SystemProperties.getBoolean( "persist.sysui.defer_notifications_on_lock_screen", false); /** * If waking up the phone should take you to SHADE_LOCKED instead of KEYGUARD */ private static final boolean WAKE_UP_TO_SHADE = SystemProperties.getBoolean( "persist.sysui.go_to_shade_on_wake_up", false); /** * Fling expanding QS. */ Loading Loading @@ -283,12 +265,6 @@ public class NotificationPanelView extends PanelView implements */ private float mLinearDarkAmount; /** * State where the device isn't dozing anymore, but the lock screen isn't fully awake. * The screen will be dimmed down with the shade collapsed. */ private boolean mSemiAwake; private boolean mPulsing; private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger(); private boolean mNoVisibleNotifications = true; Loading Loading @@ -1256,11 +1232,6 @@ public class NotificationPanelView extends PanelView implements updateDozingVisibilities(false /* animate */); } // Expand notification shade if the device was is semi-awake state if (mBarState == StatusBarState.SHADE && isSemiAwake()) { mNotificationStackScroller.setDark(false /* dark */, false /* animated */, null /* touchLocation */); } resetVerticalPanelPosition(); updateQsState(); } Loading Loading @@ -2790,35 +2761,30 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller.setAnimationsEnabled(!disabled); } public void setDozing(boolean dozing, boolean animate, PointF wakeUpTouchLocation, boolean passivelyInterrupted) { /** * Sets the dozing state. * * @param dozing {@code true} when dozing. * @param animate if transition should be animated. * @param wakeUpTouchLocation touch event location - if woken up by SLPI sensor. */ public void setDozing(boolean dozing, boolean animate, PointF wakeUpTouchLocation) { if (dozing == mDozing) return; mDozing = dozing; boolean doNotExpand = (!EXPAND_ON_PASSIVE_INTERRUPT && passivelyInterrupted) || NEVER_EXPAND_WHEN_WAKING_UP; mSemiAwake = doNotExpand && !mDozing; if (!mSemiAwake) { mNotificationStackScroller.setDark(mDozing, animate, wakeUpTouchLocation); } if (mBarState == StatusBarState.KEYGUARD || mBarState == StatusBarState.SHADE_LOCKED) { updateDozingVisibilities(animate); } final float darkAmount = dozing && !mSemiAwake ? 1 : 0; if (!mSemiAwake) { final float darkAmount = dozing ? 1 : 0; mStatusBarStateController.setDozeAmount(darkAmount, animate); } if (animate) { mNotificationStackScroller.notifyDarkAnimationStart(mDozing); } } public boolean isSemiAwake() { return mSemiAwake; } @Override public void onDozeAmountChanged(float linearAmount, float amount) { mInterpolatedDarkAmount = amount; Loading Loading @@ -3011,23 +2977,4 @@ public class NotificationPanelView extends PanelView implements public void showTransientIndication(int id) { mKeyguardBottomArea.showTransientIndication(id); } /** * Whenever a user drags down on the empty area (pulling down the shade and clock) and lets go. * * @return {@code true} if dragging down should take the user to SHADE_LOCKED. */ public boolean onDraggedDown() { if (isSemiAwake()) { mSemiAwake = false; mNotificationStackScroller.setDark(false /* dark */, true /* animate */, null /* touchLocation */); mStatusBarStateController.setDozeAmount(0f, true /* animated */); mNotificationStackScroller.notifyDarkAnimationStart(mDozing); mStatusBar.updateScrimController(); return WAKE_UP_TO_SHADE; } return true; } }