summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-08-14 03:28:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-14 03:28:31 +0000
commiteac047fee7695a19b23c725caf02619a066ad224 (patch)
tree94d2f949728f5941fa9d460c661715e5e57876f8
parentc4079241a7ea29773cfec497281a114b7cbbbddd (diff)
parent67bd92ca1b5fa1a92ab6a1fa3ffec6ef672a75df (diff)
am 67bd92ca: am 5a1e70b3: am 11a953c6: am dd6bd7e0: am 6b9d9a0b: Use correct "Can write to settings" check in DefaultRingtonePreference
* commit '67bd92ca1b5fa1a92ab6a1fa3ffec6ef672a75df': Use correct "Can write to settings" check in DefaultRingtonePreference
-rw-r--r--src/com/android/dialer/settings/DefaultRingtonePreference.java4
1 files 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),