return onKeyguard && (isMethodInsecure || mDozing || mScreenOnComingFromTouch);
}
+ public boolean isDozing() {
+ return mDozing;
+ }
+
@Override // NotificationData.Environment
public String getCurrentMediaNotificationKey() {
return mMediaNotificationKey;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
+import android.media.session.MediaSessionLegacyHelper;
import android.os.IBinder;
import android.util.AttributeSet;
import android.view.KeyEvent;
if (!down) {
return mService.onSpacePressed();
}
+ break;
case KeyEvent.KEYCODE_VOLUME_DOWN:
case KeyEvent.KEYCODE_VOLUME_UP:
- if (down) {
- mService.wakeUpIfDozing(event.getEventTime(), false);
+ if (mService.isDozing()) {
+ MediaSessionLegacyHelper.getHelper(mContext).sendVolumeKeyEvent(event, true);
+ return true;
}
+ break;
}
if (mService.interceptMediaKey(event)) {
return true;