Loading src/com/android/settings/notification/NotificationVolumePreferenceController.java +6 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.media.AudioManager; import android.os.Binder; import android.os.Handler; import android.os.Looper; import android.os.Message; Loading Loading @@ -109,9 +110,9 @@ public class NotificationVolumePreferenceController extends public void onResume() { super.onResume(); mReceiver.register(true); DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, ActivityThread.currentApplication().getMainExecutor(), this::onDeviceConfigChange); Binder.withCleanCallingIdentity(() -> DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, ActivityThread.currentApplication().getMainExecutor(), this::onDeviceConfigChange)); } @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) Loading @@ -119,7 +120,8 @@ public class NotificationVolumePreferenceController extends public void onPause() { super.onPause(); mReceiver.register(false); DeviceConfig.removeOnPropertiesChangedListener(this::onDeviceConfigChange); Binder.withCleanCallingIdentity(() -> DeviceConfig.removeOnPropertiesChangedListener(this::onDeviceConfigChange)); } @Override Loading src/com/android/settings/notification/RingVolumePreferenceController.java +6 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.media.AudioManager; import android.os.Binder; import android.os.Handler; import android.os.Looper; import android.os.Message; Loading Loading @@ -85,8 +86,9 @@ public class RingVolumePreferenceController extends super.onResume(); mReceiver.register(true); readSeparateNotificationVolumeConfig(); DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, ActivityThread.currentApplication().getMainExecutor(), this::onDeviceConfigChange); Binder.withCleanCallingIdentity(() -> DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, ActivityThread.currentApplication().getMainExecutor(), this::onDeviceConfigChange)); updateEffectsSuppressor(); selectPreferenceIconState(); Loading @@ -100,7 +102,8 @@ public class RingVolumePreferenceController extends public void onPause() { super.onPause(); mReceiver.register(false); DeviceConfig.removeOnPropertiesChangedListener(this::onDeviceConfigChange); Binder.withCleanCallingIdentity(() -> DeviceConfig.removeOnPropertiesChangedListener(this::onDeviceConfigChange)); } @Override Loading @@ -124,7 +127,6 @@ public class RingVolumePreferenceController extends @Override protected boolean hintsMatch(int hints) { boolean notificationSeparated = isSeparateNotificationConfigEnabled(); return (hints & NotificationListenerService.HINT_HOST_DISABLE_CALL_EFFECTS) != 0 || (hints & NotificationListenerService.HINT_HOST_DISABLE_EFFECTS) != 0 || ((hints & NotificationListenerService.HINT_HOST_DISABLE_NOTIFICATION_EFFECTS) Loading src/com/android/settings/notification/RingerModeAffectedVolumePreferenceController.java +4 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.app.NotificationManager; import android.content.ComponentName; import android.content.Context; import android.media.AudioManager; import android.os.Binder; import android.os.ServiceManager; import android.os.Vibrator; import android.provider.DeviceConfig; Loading Loading @@ -118,9 +119,10 @@ public abstract class RingerModeAffectedVolumePreferenceController extends } protected boolean isSeparateNotificationConfigEnabled() { return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, return Binder.withCleanCallingIdentity(() -> DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, CONFIG_SEPARATE_NOTIFICATION_DEFAULT_VAL); CONFIG_SEPARATE_NOTIFICATION_DEFAULT_VAL)); } /** Loading Loading
src/com/android/settings/notification/NotificationVolumePreferenceController.java +6 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.media.AudioManager; import android.os.Binder; import android.os.Handler; import android.os.Looper; import android.os.Message; Loading Loading @@ -109,9 +110,9 @@ public class NotificationVolumePreferenceController extends public void onResume() { super.onResume(); mReceiver.register(true); DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, ActivityThread.currentApplication().getMainExecutor(), this::onDeviceConfigChange); Binder.withCleanCallingIdentity(() -> DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, ActivityThread.currentApplication().getMainExecutor(), this::onDeviceConfigChange)); } @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) Loading @@ -119,7 +120,8 @@ public class NotificationVolumePreferenceController extends public void onPause() { super.onPause(); mReceiver.register(false); DeviceConfig.removeOnPropertiesChangedListener(this::onDeviceConfigChange); Binder.withCleanCallingIdentity(() -> DeviceConfig.removeOnPropertiesChangedListener(this::onDeviceConfigChange)); } @Override Loading
src/com/android/settings/notification/RingVolumePreferenceController.java +6 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.media.AudioManager; import android.os.Binder; import android.os.Handler; import android.os.Looper; import android.os.Message; Loading Loading @@ -85,8 +86,9 @@ public class RingVolumePreferenceController extends super.onResume(); mReceiver.register(true); readSeparateNotificationVolumeConfig(); DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, ActivityThread.currentApplication().getMainExecutor(), this::onDeviceConfigChange); Binder.withCleanCallingIdentity(() -> DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, ActivityThread.currentApplication().getMainExecutor(), this::onDeviceConfigChange)); updateEffectsSuppressor(); selectPreferenceIconState(); Loading @@ -100,7 +102,8 @@ public class RingVolumePreferenceController extends public void onPause() { super.onPause(); mReceiver.register(false); DeviceConfig.removeOnPropertiesChangedListener(this::onDeviceConfigChange); Binder.withCleanCallingIdentity(() -> DeviceConfig.removeOnPropertiesChangedListener(this::onDeviceConfigChange)); } @Override Loading @@ -124,7 +127,6 @@ public class RingVolumePreferenceController extends @Override protected boolean hintsMatch(int hints) { boolean notificationSeparated = isSeparateNotificationConfigEnabled(); return (hints & NotificationListenerService.HINT_HOST_DISABLE_CALL_EFFECTS) != 0 || (hints & NotificationListenerService.HINT_HOST_DISABLE_EFFECTS) != 0 || ((hints & NotificationListenerService.HINT_HOST_DISABLE_NOTIFICATION_EFFECTS) Loading
src/com/android/settings/notification/RingerModeAffectedVolumePreferenceController.java +4 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.app.NotificationManager; import android.content.ComponentName; import android.content.Context; import android.media.AudioManager; import android.os.Binder; import android.os.ServiceManager; import android.os.Vibrator; import android.provider.DeviceConfig; Loading Loading @@ -118,9 +119,10 @@ public abstract class RingerModeAffectedVolumePreferenceController extends } protected boolean isSeparateNotificationConfigEnabled() { return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, return Binder.withCleanCallingIdentity(() -> DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, SystemUiDeviceConfigFlags.VOLUME_SEPARATE_NOTIFICATION, CONFIG_SEPARATE_NOTIFICATION_DEFAULT_VAL); CONFIG_SEPARATE_NOTIFICATION_DEFAULT_VAL)); } /** Loading