File tree Expand file tree Collapse file tree
packages/SystemUI/src/com/android/systemui/statusbar/phone Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2135,6 +2135,10 @@ public boolean isFalsingThresholdNeeded() {
21352135 return onKeyguard && (isMethodInsecure || mDozing || mScreenOnComingFromTouch );
21362136 }
21372137
2138+ public boolean isDozing () {
2139+ return mDozing ;
2140+ }
2141+
21382142 @ Override // NotificationData.Environment
21392143 public String getCurrentMediaNotificationKey () {
21402144 return mMediaNotificationKey ;
Original file line number Diff line number Diff line change 2323import android .graphics .PorterDuff ;
2424import android .graphics .PorterDuffXfermode ;
2525import android .graphics .Rect ;
26+ import android .media .session .MediaSessionLegacyHelper ;
2627import android .os .IBinder ;
2728import android .util .AttributeSet ;
2829import android .view .KeyEvent ;
@@ -133,11 +134,14 @@ public boolean dispatchKeyEvent(KeyEvent event) {
133134 if (!down ) {
134135 return mService .onSpacePressed ();
135136 }
137+ break ;
136138 case KeyEvent .KEYCODE_VOLUME_DOWN :
137139 case KeyEvent .KEYCODE_VOLUME_UP :
138- if (down ) {
139- mService .wakeUpIfDozing (event .getEventTime (), false );
140+ if (mService .isDozing ()) {
141+ MediaSessionLegacyHelper .getHelper (mContext ).sendVolumeKeyEvent (event , true );
142+ return true ;
140143 }
144+ break ;
141145 }
142146 if (mService .interceptMediaKey (event )) {
143147 return true ;
You can’t perform that action at this time.
0 commit comments