summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/ActivityPicker.java4
-rw-r--r--src/com/android/settings/notificationlight/NotificationLightSettings.java28
2 files changed, 21 insertions, 11 deletions
diff --git a/src/com/android/settings/ActivityPicker.java b/src/com/android/settings/ActivityPicker.java
index 7c269238e..97996c878 100644
--- a/src/com/android/settings/ActivityPicker.java
+++ b/src/com/android/settings/ActivityPicker.java
@@ -78,6 +78,10 @@ public class ActivityPicker extends AlertActivity implements
Parcelable parcel = intent.getParcelableExtra(Intent.EXTRA_INTENT);
if (parcel instanceof Intent) {
mBaseIntent = (Intent) parcel;
+ mBaseIntent.setFlags(mBaseIntent.getFlags() & ~(Intent.FLAG_GRANT_READ_URI_PERMISSION
+ | Intent.FLAG_GRANT_WRITE_URI_PERMISSION
+ | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION
+ | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION));
} else {
mBaseIntent = new Intent(Intent.ACTION_MAIN, null);
mBaseIntent.addCategory(Intent.CATEGORY_DEFAULT);
diff --git a/src/com/android/settings/notificationlight/NotificationLightSettings.java b/src/com/android/settings/notificationlight/NotificationLightSettings.java
index 3b02d36c9..f0b546ac7 100644
--- a/src/com/android/settings/notificationlight/NotificationLightSettings.java
+++ b/src/com/android/settings/notificationlight/NotificationLightSettings.java
@@ -276,6 +276,7 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
Context context = getActivity();
if (!parsePackageList()) {
+ maybeDisplayApplicationHint(context);
return;
}
@@ -302,17 +303,22 @@ public class NotificationLightSettings extends SettingsPreferenceFragment implem
}
}
- /* Display a pref explaining how to add apps */
- if (mApplicationPrefList.getPreferenceCount() == 0) {
- String summary = getResources().getString(
- R.string.notification_light_no_apps_summary);
- String useCustom = getResources().getString(
- R.string.notification_light_use_custom);
- Preference pref = new Preference(context);
- pref.setSummary(String.format(summary, useCustom));
- pref.setEnabled(false);
- mApplicationPrefList.addPreference(pref);
- }
+ maybeDisplayApplicationHint(context);
+ }
+ }
+
+ private void maybeDisplayApplicationHint(Context context)
+ {
+ /* Display a pref explaining how to add apps */
+ if (mApplicationPrefList != null && mApplicationPrefList.getPreferenceCount() == 0) {
+ String summary = getResources().getString(
+ R.string.notification_light_no_apps_summary);
+ String useCustom = getResources().getString(
+ R.string.notification_light_use_custom);
+ Preference pref = new Preference(context);
+ pref.setSummary(String.format(summary, useCustom));
+ pref.setEnabled(false);
+ mApplicationPrefList.addPreference(pref);
}
}