/* package */ Notification processNotification(Notification notification) { switch (mSoundMode) { case OVERRIDE: notification.sound = mSoundOverride; break; case SUPPRESS: silenceNotification(notification); break; case DEFAULT: } switch (mVibrateMode) { case OVERRIDE: notification.defaults |= Notification.DEFAULT_VIBRATE; break; case SUPPRESS: suppressVibrate(notification); break; case DEFAULT: } switch (mLightsMode) { case OVERRIDE: notification.defaults |= Notification.DEFAULT_LIGHTS; break; case SUPPRESS: suppressLights(notification); break; case DEFAULT: } return notification; }
private void silenceNotification(Notification notification) { notification.defaults &= (~Notification.DEFAULT_SOUND); notification.sound = null; }