Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +1 −24 Original line number Diff line number Diff line Loading @@ -49,7 +49,6 @@ import android.app.ActivityManager; import android.app.Fragment; import android.app.StatusBarManager; import android.content.ContentResolver; import android.content.Context; import android.content.pm.ResolveInfo; import android.content.res.Configuration; import android.content.res.Resources; Loading Loading @@ -77,7 +76,6 @@ import android.transition.TransitionManager; import android.util.IndentingPrintWriter; import android.util.Log; import android.util.MathUtils; import android.view.GestureDetector; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.VelocityTracker; Loading Loading @@ -299,8 +297,6 @@ public class NotificationPanelViewController extends PanelViewController { private static final String STATUS_BAR_QUICK_QS_PULLDOWN = "lineagesystem:" + LineageSettings.System.STATUS_BAR_QUICK_QS_PULLDOWN; private static final String DOUBLE_TAP_SLEEP_GESTURE = "lineagesystem:" + LineageSettings.System.DOUBLE_TAP_SLEEP_GESTURE; private static final Rect M_DUMMY_DIRTY_RECT = new Rect(0, 0, 1, 1); private static final Rect EMPTY_RECT = new Rect(); Loading Loading @@ -543,8 +539,6 @@ public class NotificationPanelViewController extends PanelViewController { private NotificationShadeDepthController mDepthController; private int mDisplayId; private boolean mDoubleTapToSleepEnabled; private GestureDetector mDoubleTapGesture; /** * Cache the resource id of the theme to avoid unnecessary work in onThemeChanged. Loading Loading @@ -790,7 +784,7 @@ public class NotificationPanelViewController extends PanelViewController { UnlockedScreenOffAnimationController unlockedScreenOffAnimationController, ShadeTransitionController shadeTransitionController, SystemClock systemClock, TunerService tunerService, Context context) { TunerService tunerService) { super(view, falsingManager, dozeLog, Loading Loading @@ -890,16 +884,6 @@ public class NotificationPanelViewController extends PanelViewController { }); mBottomAreaShadeAlphaAnimator.setDuration(160); mBottomAreaShadeAlphaAnimator.setInterpolator(Interpolators.ALPHA_OUT); mDoubleTapGesture = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() { @Override public boolean onDoubleTap(MotionEvent e) { if (mPowerManager != null) { mPowerManager.goToSleep(e.getEventTime()); } return true; } }); mEntryManager = notificationEntryManager; mConversationNotificationManager = conversationNotificationManager; mAuthController = authController; Loading Loading @@ -4246,10 +4230,6 @@ public class NotificationPanelViewController extends PanelViewController { return false; } if (mDoubleTapToSleepEnabled && mBarState == StatusBarState.KEYGUARD) { mDoubleTapGesture.onTouchEvent(event); } // Make sure the next touch won't the blocked after the current ends. if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) { Loading Loading @@ -4954,7 +4934,6 @@ public class NotificationPanelViewController extends PanelViewController { mStatusBarStateListener.onStateChanged(mStatusBarStateController.getState()); mConfigurationController.addCallback(mConfigurationListener); mTunerService.addTunable(this, STATUS_BAR_QUICK_QS_PULLDOWN); mTunerService.addTunable(this, DOUBLE_TAP_SLEEP_GESTURE); // Theme might have changed between inflating this view and attaching it to the // window, so // force a call to onThemeChanged Loading @@ -4979,8 +4958,6 @@ public class NotificationPanelViewController extends PanelViewController { public void onTuningChanged(String key, String newValue) { if (STATUS_BAR_QUICK_QS_PULLDOWN.equals(key)) { mOneFingerQuickSettingsIntercept = TunerService.parseInteger(newValue, 1); } else if (DOUBLE_TAP_SLEEP_GESTURE.equals(key)) { mDoubleTapToSleepEnabled = TunerService.parseIntegerSwitch(newValue, true); } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java +2 −26 Original line number Diff line number Diff line Loading @@ -17,11 +17,9 @@ package com.android.systemui.statusbar.phone; import android.app.StatusBarManager; import android.content.Context; import android.hardware.display.AmbientDisplayConfiguration; import android.media.AudioManager; import android.media.session.MediaSessionLegacyHelper; import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; Loading Loading @@ -53,8 +51,6 @@ import com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManage import com.android.systemui.statusbar.window.StatusBarWindowStateController; import com.android.systemui.tuner.TunerService; import lineageos.providers.LineageSettings; import java.io.PrintWriter; import java.util.Optional; Loading Loading @@ -96,15 +92,9 @@ public class NotificationShadeWindowViewController { private final NotificationPanelViewController mNotificationPanelViewController; private final PanelExpansionStateManager mPanelExpansionStateManager; private final Optional<LowLightClockController> mLowLightClockController; private final PowerManager mPowerManager; private boolean mIsTrackingBarGesture = false; private static final String DOUBLE_TAP_SLEEP_GESTURE = "lineagesystem:" + LineageSettings.System.DOUBLE_TAP_SLEEP_GESTURE; private boolean mDoubleTapToSleepEnabled; private int mQuickQsOffsetHeight; @Inject public NotificationShadeWindowViewController( LockscreenShadeTransitionController transitionController, Loading @@ -124,8 +114,7 @@ public class NotificationShadeWindowViewController { CentralSurfaces centralSurfaces, NotificationShadeWindowController controller, KeyguardUnlockAnimationController keyguardUnlockAnimationController, AmbientState ambientState, Context context) { AmbientState ambientState) { mLockscreenShadeTransitionController = transitionController; mFalsingCollector = falsingCollector; mTunerService = tunerService; Loading @@ -144,7 +133,6 @@ public class NotificationShadeWindowViewController { mNotificationShadeWindowController = controller; mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mAmbientState = ambientState; mPowerManager = context.getSystemService(PowerManager.class); // This view is not part of the newly inflated expanded status bar. mBrightnessMirror = mView.findViewById(R.id.brightness_mirror_container); Loading @@ -171,18 +159,11 @@ public class NotificationShadeWindowViewController { break; case Settings.Secure.DOZE_TAP_SCREEN_GESTURE: mSingleTapEnabled = configuration.tapGestureEnabled(UserHandle.USER_CURRENT); break; case DOUBLE_TAP_SLEEP_GESTURE: mDoubleTapToSleepEnabled = TunerService.parseIntegerSwitch(newValue, true); break; } }; mTunerService.addTunable(tunable, Settings.Secure.DOZE_DOUBLE_TAP_GESTURE, Settings.Secure.DOZE_TAP_SCREEN_GESTURE, DOUBLE_TAP_SLEEP_GESTURE); mQuickQsOffsetHeight = mView.getResources().getDimensionPixelSize( com.android.internal.R.dimen.quick_qs_offset_height); Settings.Secure.DOZE_TAP_SCREEN_GESTURE); GestureDetector.SimpleOnGestureListener gestureListener = new GestureDetector.SimpleOnGestureListener() { Loading @@ -198,11 +179,6 @@ public class NotificationShadeWindowViewController { @Override public boolean onDoubleTap(MotionEvent e) { if (!mStatusBarStateController.isDozing() && mDoubleTapToSleepEnabled && e.getY() < mQuickQsOffsetHeight) { mPowerManager.goToSleep(e.getEventTime()); return true; } if (mDoubleTapEnabled || mSingleTapEnabled) { mService.wakeUpIfDozing( SystemClock.uptimeMillis(), mView, "DOUBLE_TAP"); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +1 −24 Original line number Diff line number Diff line Loading @@ -49,7 +49,6 @@ import android.app.ActivityManager; import android.app.Fragment; import android.app.StatusBarManager; import android.content.ContentResolver; import android.content.Context; import android.content.pm.ResolveInfo; import android.content.res.Configuration; import android.content.res.Resources; Loading Loading @@ -77,7 +76,6 @@ import android.transition.TransitionManager; import android.util.IndentingPrintWriter; import android.util.Log; import android.util.MathUtils; import android.view.GestureDetector; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.VelocityTracker; Loading Loading @@ -299,8 +297,6 @@ public class NotificationPanelViewController extends PanelViewController { private static final String STATUS_BAR_QUICK_QS_PULLDOWN = "lineagesystem:" + LineageSettings.System.STATUS_BAR_QUICK_QS_PULLDOWN; private static final String DOUBLE_TAP_SLEEP_GESTURE = "lineagesystem:" + LineageSettings.System.DOUBLE_TAP_SLEEP_GESTURE; private static final Rect M_DUMMY_DIRTY_RECT = new Rect(0, 0, 1, 1); private static final Rect EMPTY_RECT = new Rect(); Loading Loading @@ -543,8 +539,6 @@ public class NotificationPanelViewController extends PanelViewController { private NotificationShadeDepthController mDepthController; private int mDisplayId; private boolean mDoubleTapToSleepEnabled; private GestureDetector mDoubleTapGesture; /** * Cache the resource id of the theme to avoid unnecessary work in onThemeChanged. Loading Loading @@ -790,7 +784,7 @@ public class NotificationPanelViewController extends PanelViewController { UnlockedScreenOffAnimationController unlockedScreenOffAnimationController, ShadeTransitionController shadeTransitionController, SystemClock systemClock, TunerService tunerService, Context context) { TunerService tunerService) { super(view, falsingManager, dozeLog, Loading Loading @@ -890,16 +884,6 @@ public class NotificationPanelViewController extends PanelViewController { }); mBottomAreaShadeAlphaAnimator.setDuration(160); mBottomAreaShadeAlphaAnimator.setInterpolator(Interpolators.ALPHA_OUT); mDoubleTapGesture = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() { @Override public boolean onDoubleTap(MotionEvent e) { if (mPowerManager != null) { mPowerManager.goToSleep(e.getEventTime()); } return true; } }); mEntryManager = notificationEntryManager; mConversationNotificationManager = conversationNotificationManager; mAuthController = authController; Loading Loading @@ -4246,10 +4230,6 @@ public class NotificationPanelViewController extends PanelViewController { return false; } if (mDoubleTapToSleepEnabled && mBarState == StatusBarState.KEYGUARD) { mDoubleTapGesture.onTouchEvent(event); } // Make sure the next touch won't the blocked after the current ends. if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) { Loading Loading @@ -4954,7 +4934,6 @@ public class NotificationPanelViewController extends PanelViewController { mStatusBarStateListener.onStateChanged(mStatusBarStateController.getState()); mConfigurationController.addCallback(mConfigurationListener); mTunerService.addTunable(this, STATUS_BAR_QUICK_QS_PULLDOWN); mTunerService.addTunable(this, DOUBLE_TAP_SLEEP_GESTURE); // Theme might have changed between inflating this view and attaching it to the // window, so // force a call to onThemeChanged Loading @@ -4979,8 +4958,6 @@ public class NotificationPanelViewController extends PanelViewController { public void onTuningChanged(String key, String newValue) { if (STATUS_BAR_QUICK_QS_PULLDOWN.equals(key)) { mOneFingerQuickSettingsIntercept = TunerService.parseInteger(newValue, 1); } else if (DOUBLE_TAP_SLEEP_GESTURE.equals(key)) { mDoubleTapToSleepEnabled = TunerService.parseIntegerSwitch(newValue, true); } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java +2 −26 Original line number Diff line number Diff line Loading @@ -17,11 +17,9 @@ package com.android.systemui.statusbar.phone; import android.app.StatusBarManager; import android.content.Context; import android.hardware.display.AmbientDisplayConfiguration; import android.media.AudioManager; import android.media.session.MediaSessionLegacyHelper; import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; Loading Loading @@ -53,8 +51,6 @@ import com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManage import com.android.systemui.statusbar.window.StatusBarWindowStateController; import com.android.systemui.tuner.TunerService; import lineageos.providers.LineageSettings; import java.io.PrintWriter; import java.util.Optional; Loading Loading @@ -96,15 +92,9 @@ public class NotificationShadeWindowViewController { private final NotificationPanelViewController mNotificationPanelViewController; private final PanelExpansionStateManager mPanelExpansionStateManager; private final Optional<LowLightClockController> mLowLightClockController; private final PowerManager mPowerManager; private boolean mIsTrackingBarGesture = false; private static final String DOUBLE_TAP_SLEEP_GESTURE = "lineagesystem:" + LineageSettings.System.DOUBLE_TAP_SLEEP_GESTURE; private boolean mDoubleTapToSleepEnabled; private int mQuickQsOffsetHeight; @Inject public NotificationShadeWindowViewController( LockscreenShadeTransitionController transitionController, Loading @@ -124,8 +114,7 @@ public class NotificationShadeWindowViewController { CentralSurfaces centralSurfaces, NotificationShadeWindowController controller, KeyguardUnlockAnimationController keyguardUnlockAnimationController, AmbientState ambientState, Context context) { AmbientState ambientState) { mLockscreenShadeTransitionController = transitionController; mFalsingCollector = falsingCollector; mTunerService = tunerService; Loading @@ -144,7 +133,6 @@ public class NotificationShadeWindowViewController { mNotificationShadeWindowController = controller; mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mAmbientState = ambientState; mPowerManager = context.getSystemService(PowerManager.class); // This view is not part of the newly inflated expanded status bar. mBrightnessMirror = mView.findViewById(R.id.brightness_mirror_container); Loading @@ -171,18 +159,11 @@ public class NotificationShadeWindowViewController { break; case Settings.Secure.DOZE_TAP_SCREEN_GESTURE: mSingleTapEnabled = configuration.tapGestureEnabled(UserHandle.USER_CURRENT); break; case DOUBLE_TAP_SLEEP_GESTURE: mDoubleTapToSleepEnabled = TunerService.parseIntegerSwitch(newValue, true); break; } }; mTunerService.addTunable(tunable, Settings.Secure.DOZE_DOUBLE_TAP_GESTURE, Settings.Secure.DOZE_TAP_SCREEN_GESTURE, DOUBLE_TAP_SLEEP_GESTURE); mQuickQsOffsetHeight = mView.getResources().getDimensionPixelSize( com.android.internal.R.dimen.quick_qs_offset_height); Settings.Secure.DOZE_TAP_SCREEN_GESTURE); GestureDetector.SimpleOnGestureListener gestureListener = new GestureDetector.SimpleOnGestureListener() { Loading @@ -198,11 +179,6 @@ public class NotificationShadeWindowViewController { @Override public boolean onDoubleTap(MotionEvent e) { if (!mStatusBarStateController.isDozing() && mDoubleTapToSleepEnabled && e.getY() < mQuickQsOffsetHeight) { mPowerManager.goToSleep(e.getEventTime()); return true; } if (mDoubleTapEnabled || mSingleTapEnabled) { mService.wakeUpIfDozing( SystemClock.uptimeMillis(), mView, "DOUBLE_TAP"); Loading