Merge "Set/read VM vibration and ringtone from default phone if SIM is absent" into oc-dev
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 3638877..a3b6195 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3429,9 +3429,9 @@
      */
     @Override
     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
-        final Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
+        Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
         if (phone == null) {
-            return null;
+            phone = mPhone;
         }
 
         return VoicemailNotificationSettingsUtil.getRingtoneUri(phone);
@@ -3459,8 +3459,7 @@
         }
         Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
         if (phone == null){
-            throw new IllegalArgumentException("The phoneAccountHandle does not correspond to an "
-                    + "active phone account.");
+           phone = mPhone;
         }
         VoicemailNotificationSettingsUtil.setRingtoneUri(phone, uri);
     }
@@ -3474,9 +3473,9 @@
      */
     @Override
     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
-        final Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
+        Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
         if (phone == null) {
-            return false;
+            phone = mPhone;
         }
 
         return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone);
@@ -3505,8 +3504,7 @@
 
         Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
         if (phone == null){
-            throw new IllegalArgumentException("The phoneAccountHandle does not correspond to an "
-                    + "active phone account.");
+            phone = mPhone;
         }
         VoicemailNotificationSettingsUtil.setVibrationEnabled(phone, enabled);
     }