summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/privacyguard
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-05-20 12:28:25 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-06-15 12:47:11 -0700
commitbe7d45fd0d063cff25f186a7ca45fa485ebdf048 (patch)
tree74f7e24d84b489452a95d18eb37589a9cc2e59f9 /src/com/android/settings/privacyguard
parent6c6d0e68be18a61d20ead5a01297425839118f8c (diff)
downloadpackages_apps_Settings-be7d45fd0d063cff25f186a7ca45fa485ebdf048.zip
packages_apps_Settings-be7d45fd0d063cff25f186a7ca45fa485ebdf048.tar.gz
packages_apps_Settings-be7d45fd0d063cff25f186a7ca45fa485ebdf048.tar.bz2
Settings: Dissallow privacy guarding system apps on overlay.
Bandaid fix for google play services inundating the permission dialog request queue within AppOps service and causing watchdog to consistently kill the system server's activity manager service which is deadlocked retrieving dialogs from the queue. Change-Id: I10c432cebe6a4199517839598046eee7d19dcf72 TICKET: CYNGNOS-2869
Diffstat (limited to 'src/com/android/settings/privacyguard')
-rw-r--r--src/com/android/settings/privacyguard/PrivacyGuardManager.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/settings/privacyguard/PrivacyGuardManager.java b/src/com/android/settings/privacyguard/PrivacyGuardManager.java
index adbe8cc..c2f485a 100644
--- a/src/com/android/settings/privacyguard/PrivacyGuardManager.java
+++ b/src/com/android/settings/privacyguard/PrivacyGuardManager.java
@@ -17,6 +17,7 @@
package com.android.settings.privacyguard;
import android.app.FragmentTransaction;
+import android.os.Build;
import android.view.animation.AnimationUtils;
import android.app.Activity;
import android.app.AlertDialog;
@@ -297,9 +298,9 @@ public class PrivacyGuardManager extends Fragment
return true;
}
-
private boolean shouldShowSystemApps() {
- return mPreferences.getBoolean("show_system_apps", false);
+ return mPreferences.getBoolean("show_system_apps", true) &&
+ mActivity.getResources().getBoolean(R.bool.config_showBuiltInAppsForPG);
}
public static class HelpDialogFragment extends DialogFragment {
@@ -372,7 +373,11 @@ public class PrivacyGuardManager extends Fragment
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.privacy_guard_manager, menu);
- menu.findItem(R.id.show_system_apps).setChecked(shouldShowSystemApps());
+ if (!mActivity.getResources().getBoolean(R.bool.config_showBuiltInAppsForPG)) {
+ menu.removeItem(R.id.show_system_apps);
+ } else {
+ menu.findItem(R.id.show_system_apps).setChecked(shouldShowSystemApps());
+ }
}
@Override