From 6b9d9a0b7f7e9e2e5e4d7c03a63581bff84346a6 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 13 Aug 2015 14:01:36 -0700 Subject: Use correct "Can write to settings" check in DefaultRingtonePreference Bug: 23187565 Change-Id: I3a511e41ce9cb1e1c67dd2638e1f601e8ccebb9f --- src/com/android/dialer/settings/DefaultRingtonePreference.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/dialer/settings/DefaultRingtonePreference.java b/src/com/android/dialer/settings/DefaultRingtonePreference.java index f2648cb66..a1743814a 100644 --- a/src/com/android/dialer/settings/DefaultRingtonePreference.java +++ b/src/com/android/dialer/settings/DefaultRingtonePreference.java @@ -22,10 +22,10 @@ import android.content.Intent; import android.media.RingtoneManager; import android.net.Uri; import android.preference.RingtonePreference; +import android.provider.Settings; import android.util.AttributeSet; import android.widget.Toast; -import com.android.contacts.common.util.PermissionsUtil; import com.android.dialer.R; /** @@ -49,7 +49,7 @@ public class DefaultRingtonePreference extends RingtonePreference { @Override protected void onSaveRingtone(Uri ringtoneUri) { - if (!PermissionsUtil.hasAppOp(getContext(), AppOpsManager.OPSTR_WRITE_SETTINGS)) { + if (!Settings.System.canWrite(getContext())) { Toast.makeText( getContext(), getContext().getResources().getString(R.string.toast_cannot_write_system_settings), -- cgit v1.2.3