diff options
Diffstat (limited to 'java/com/android/dialer/app')
-rw-r--r-- | java/com/android/dialer/app/settings/DialerSettingsActivity.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/com/android/dialer/app/settings/DialerSettingsActivity.java b/java/com/android/dialer/app/settings/DialerSettingsActivity.java index 641095512..fc56fa7e0 100644 --- a/java/com/android/dialer/app/settings/DialerSettingsActivity.java +++ b/java/com/android/dialer/app/settings/DialerSettingsActivity.java @@ -40,6 +40,7 @@ import com.android.dialer.common.LogUtil; import com.android.dialer.compat.telephony.TelephonyManagerCompat; import com.android.dialer.configprovider.ConfigProviderBindings; import com.android.dialer.proguard.UsedByReflection; +import com.android.dialer.util.PermissionsUtil; import com.android.dialer.voicemail.settings.VoicemailSettingsFragment; import com.android.voicemail.VoicemailClient; import java.util.List; @@ -194,6 +195,11 @@ public class DialerSettingsActivity extends AppCompatPreferenceActivity { return; } + if (!PermissionsUtil.hasReadPhoneStatePermissions(this)) { + LogUtil.i("DialerSettingsActivity.addVoicemailSettings", "Missing READ_PHONE_STATE"); + return; + } + LogUtil.i("DialerSettingsActivity.addVoicemailSettings", "adding voicemail settings"); Header voicemailSettings = new Header(); voicemailSettings.titleRes = R.string.voicemail_settings_label; |