Loading core/java/android/app/INotificationManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ interface INotificationManager void clearRequestedListenerHints(in INotificationListener token); void requestHintsFromListener(in INotificationListener token, int hints); int getHintsFromListener(in INotificationListener token); int getHintsFromListenerNoToken(); void requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter); int getInterruptionFilterFromListener(in INotificationListener token); void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim); Loading core/java/android/preference/SeekBarVolumizer.java +15 −3 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba private final int mMaxStreamVolume; private boolean mAffectedByRingerMode; private boolean mNotificationOrRing; private final boolean mNotifAliasRing; private final Receiver mReceiver = new Receiver(); private Handler mHandler; Loading Loading @@ -179,6 +180,8 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba if (mNotificationOrRing) { mRingerMode = mAudioManager.getRingerModeInternal(); } mNotifAliasRing = mContext.getResources().getBoolean( com.android.internal.R.bool.config_alias_ring_notif_stream_types); mZenMode = mNotificationManager.getZenMode(); if (hasAudioProductStrategies()) { Loading Loading @@ -280,7 +283,15 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba if (zenMuted) { mSeekBar.setProgress(mLastAudibleStreamVolume, true); } else if (mNotificationOrRing && mRingerMode == AudioManager.RINGER_MODE_VIBRATE) { /** * the first variable above is preserved and the conditions below are made explicit * so that when user attempts to slide the notification seekbar out of vibrate the * seekbar doesn't wrongly snap back to 0 when the streams aren't aliased */ if (mNotifAliasRing || mStreamType == AudioManager.STREAM_RING || (mStreamType == AudioManager.STREAM_NOTIFICATION && mMuted)) { mSeekBar.setProgress(0, true); } } else if (mMuted) { mSeekBar.setProgress(0, true); } else { Loading Loading @@ -354,6 +365,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba // set the time of stop volume if ((mStreamType == AudioManager.STREAM_VOICE_CALL || mStreamType == AudioManager.STREAM_RING || (!mNotifAliasRing && mStreamType == AudioManager.STREAM_NOTIFICATION) || mStreamType == AudioManager.STREAM_ALARM)) { sStopVolumeTime = java.lang.System.currentTimeMillis(); } Loading Loading @@ -631,8 +643,8 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba } private void updateVolumeSlider(int streamType, int streamValue) { final boolean streamMatch = mNotificationOrRing ? isNotificationOrRing(streamType) : (streamType == mStreamType); final boolean streamMatch = mNotifAliasRing && mNotificationOrRing ? isNotificationOrRing(streamType) : streamType == mStreamType; if (mSeekBar != null && streamMatch && streamValue != -1) { final boolean muted = mAudioManager.isStreamMute(mStreamType) || streamValue == 0; Loading services/core/java/com/android/server/notification/NotificationManagerService.java +7 −0 Original line number Diff line number Diff line Loading @@ -4867,6 +4867,13 @@ public class NotificationManagerService extends SystemService { } } @Override public int getHintsFromListenerNoToken() { synchronized (mNotificationLock) { return mListenerHints; } } @Override public void requestInterruptionFilterFromListener(INotificationListener token, int interruptionFilter) throws RemoteException { Loading Loading
core/java/android/app/INotificationManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,7 @@ interface INotificationManager void clearRequestedListenerHints(in INotificationListener token); void requestHintsFromListener(in INotificationListener token, int hints); int getHintsFromListener(in INotificationListener token); int getHintsFromListenerNoToken(); void requestInterruptionFilterFromListener(in INotificationListener token, int interruptionFilter); int getInterruptionFilterFromListener(in INotificationListener token); void setOnNotificationPostedTrimFromListener(in INotificationListener token, int trim); Loading
core/java/android/preference/SeekBarVolumizer.java +15 −3 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba private final int mMaxStreamVolume; private boolean mAffectedByRingerMode; private boolean mNotificationOrRing; private final boolean mNotifAliasRing; private final Receiver mReceiver = new Receiver(); private Handler mHandler; Loading Loading @@ -179,6 +180,8 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba if (mNotificationOrRing) { mRingerMode = mAudioManager.getRingerModeInternal(); } mNotifAliasRing = mContext.getResources().getBoolean( com.android.internal.R.bool.config_alias_ring_notif_stream_types); mZenMode = mNotificationManager.getZenMode(); if (hasAudioProductStrategies()) { Loading Loading @@ -280,7 +283,15 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba if (zenMuted) { mSeekBar.setProgress(mLastAudibleStreamVolume, true); } else if (mNotificationOrRing && mRingerMode == AudioManager.RINGER_MODE_VIBRATE) { /** * the first variable above is preserved and the conditions below are made explicit * so that when user attempts to slide the notification seekbar out of vibrate the * seekbar doesn't wrongly snap back to 0 when the streams aren't aliased */ if (mNotifAliasRing || mStreamType == AudioManager.STREAM_RING || (mStreamType == AudioManager.STREAM_NOTIFICATION && mMuted)) { mSeekBar.setProgress(0, true); } } else if (mMuted) { mSeekBar.setProgress(0, true); } else { Loading Loading @@ -354,6 +365,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba // set the time of stop volume if ((mStreamType == AudioManager.STREAM_VOICE_CALL || mStreamType == AudioManager.STREAM_RING || (!mNotifAliasRing && mStreamType == AudioManager.STREAM_NOTIFICATION) || mStreamType == AudioManager.STREAM_ALARM)) { sStopVolumeTime = java.lang.System.currentTimeMillis(); } Loading Loading @@ -631,8 +643,8 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba } private void updateVolumeSlider(int streamType, int streamValue) { final boolean streamMatch = mNotificationOrRing ? isNotificationOrRing(streamType) : (streamType == mStreamType); final boolean streamMatch = mNotifAliasRing && mNotificationOrRing ? isNotificationOrRing(streamType) : streamType == mStreamType; if (mSeekBar != null && streamMatch && streamValue != -1) { final boolean muted = mAudioManager.isStreamMute(mStreamType) || streamValue == 0; Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +7 −0 Original line number Diff line number Diff line Loading @@ -4867,6 +4867,13 @@ public class NotificationManagerService extends SystemService { } } @Override public int getHintsFromListenerNoToken() { synchronized (mNotificationLock) { return mListenerHints; } } @Override public void requestInterruptionFilterFromListener(INotificationListener token, int interruptionFilter) throws RemoteException { Loading