No Activity found to handle Intent
{act=android.intent.action.MANAGE_PERMISSIONS}
Check whether activity exists befor start activity.
Change-Id: Ie373d760cbd22a3b24b4b735b3a5fbe290fc25c4
CRs-Fixed:
1069238
addPreferencesFromResource(R.xml.advanced_apps);
Preference permissions = getPreferenceScreen().findPreference(KEY_APP_PERM);
- permissions.setIntent(new Intent(Intent.ACTION_MANAGE_PERMISSIONS));
+ final Intent intent = new Intent(Intent.ACTION_MANAGE_PERMISSIONS);
+ if (!getPackageManager().queryIntentActivities(intent, 0).isEmpty()) {
+ permissions.setIntent(intent);
+ }
ApplicationsState applicationsState = ApplicationsState.getInstance(
getActivity().getApplication());