summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-08-13 21:48:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-13 21:48:48 +0000
commit5a1e70b3fc3c09070c5ec80d4dfa47fca46b1f91 (patch)
treed5dbd631010352954d0e73bcb2a10046c6474d7c
parent21d3bd2d697671c7d0259b0e2f96e617475716d5 (diff)
parent11a953c6abdb816a8c2e35e29028e6efe6a24341 (diff)
am 11a953c6: am dd6bd7e0: am 6b9d9a0b: Use correct "Can write to settings" check in DefaultRingtonePreference
* commit '11a953c6abdb816a8c2e35e29028e6efe6a24341': 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),