summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/applications/WriteSettingsDetails.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/applications/WriteSettingsDetails.java')
-rw-r--r--src/com/android/settings/applications/WriteSettingsDetails.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/settings/applications/WriteSettingsDetails.java b/src/com/android/settings/applications/WriteSettingsDetails.java
index 30533c6..c89e7b3 100644
--- a/src/com/android/settings/applications/WriteSettingsDetails.java
+++ b/src/com/android/settings/applications/WriteSettingsDetails.java
@@ -142,6 +142,8 @@ public class WriteSettingsDetails extends AppInfoWithHeader implements OnPrefere
boolean canWrite = mWriteSettingsState.isPermissible();
mSwitchPref.setChecked(canWrite);
+ // you can't ask a user for a permission you didn't even declare!
+ mSwitchPref.setEnabled(mWriteSettingsState.permissionDeclared);
mWriteSettingsPrefs.setEnabled(canWrite);
getPreferenceScreen().removePreference(mWriteSettingsPrefs);