voicemail notification settings cleanup
fionaxu [Sat, 6 May 2017 00:21:52 +0000 (17:21 -0700)]
- remove UI preference for voicemail notification ringtone & vibration
settings as they are not functioning with notification channel
introduced
- have a new Notification Preference under voicemailSettings which will
navigate to the system settings screen for that channel.
- modify telephonymanager API getVoiceMailRingToneUri and
isVoiceMailVibrationEnabled from sharedPreference to NotificationChannel
data.
- more cleanup work needed till next API bump for telephonyManager APIs
setVoicemailVibrationEnabled and setVoicemailRingToneUri

Bug: 37912316
Test: Manaul test
Change-Id: Ic28713c012672b991b8f131545c06e1dbfd6765f

src/java/com/android/internal/telephony/util/NotificationChannelController.java

index 785c3cc..8d967b1 100644 (file)
@@ -84,6 +84,11 @@ public class NotificationChannelController {
         createAll(context);
     }
 
+    public static NotificationChannel getChannel(String channelId, Context context) {
+        return context.getSystemService(NotificationManager.class)
+                .getNotificationChannel(channelId);
+    }
+
     // rename all registered channels on locale change
     private BroadcastReceiver mLocaleChangeReceiver = new BroadcastReceiver() {
         @Override