summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorChirayu Desai <cdesai@cyanogenmod.org>2015-12-07 14:10:44 -0800
committerClayton Craft <craftyguy@gmail.com>2015-12-16 14:56:23 -0800
commit1d87c14008301f5488c1ebece0345eef2afe2cf1 (patch)
treef7c198102d2a2b55f690ca5394f1369e8cff70f1 /services
parent31f15ebbb463065c78c53e0db7ec35b97b5b6374 (diff)
downloadframeworks_base-1d87c14008301f5488c1ebece0345eef2afe2cf1.zip
frameworks_base-1d87c14008301f5488c1ebece0345eef2afe2cf1.tar.gz
frameworks_base-1d87c14008301f5488c1ebece0345eef2afe2cf1.tar.bz2
Allow disabling the privacy guard notification - port from cm-12.1 (2/3)
Change-Id: Iab0288f50685220c8be0c11ea5075f91ec1bbe32
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/am/ActivityStack.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index cc86695..f48b448 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -71,6 +71,7 @@ import android.view.Display;
import com.android.server.LocalServices;
import cyanogenmod.power.PerformanceManagerInternal;
+import cyanogenmod.providers.CMSettings;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -2108,13 +2109,16 @@ final class ActivityStack {
boolean privacy = mService.mAppOpsService.getPrivacyGuardSettingForPackage(
next.app.uid, next.packageName);
+ boolean privacyNotification = (CMSettings.Secure.getInt(
+ mService.mContext.getContentResolver(),
+ CMSettings.Secure.PRIVACY_GUARD_NOTIFICATION, 1) == 1);
if (privacyGuardPackageName != null && !privacy) {
Message msg = mService.mHandler.obtainMessage(
ActivityManagerService.CANCEL_PRIVACY_NOTIFICATION_MSG, next.userId);
msg.sendToTarget();
mStackSupervisor.mPrivacyGuardPackageName = null;
- } else if (privacy) {
+ } else if (privacy && privacyNotification) {
Message msg = mService.mHandler.obtainMessage(
ActivityManagerService.POST_PRIVACY_NOTIFICATION_MSG, next);
msg.sendToTarget();