summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nick James <nickjames@google.com> 2018-07-09 20:21:37 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-07-09 20:21:37 +0000
commit8077622e413f947bc53f570c4847517e5e09b1ac (patch)
treeb537f4ee0592ca4f5f6417a2ec138d0cd44bc1d5
parentd2af61a1e8271cf7b413a515c333d6b2d3dcb6c4 (diff)
parenta485ec65b5ba947d69158ad90905abf3310655cf (diff)
Merge "Disable DND status change notification on watches."
-rw-r--r--services/core/java/com/android/server/notification/ZenModeHelper.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 669d5565534d..1954ed4bfa45 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -1182,11 +1182,19 @@ public class ZenModeHelper {
}
private void showZenUpgradeNotification(int zen) {
+ final boolean isWatch = mContext.getPackageManager().hasSystemFeature(
+ PackageManager.FEATURE_WATCH);
final boolean showNotification = mIsBootComplete
&& zen != Global.ZEN_MODE_OFF
+ && !isWatch
&& Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 0) != 0;
+ if (isWatch) {
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 0);
+ }
+
if (showNotification) {
mNotificationManager.notify(TAG, SystemMessage.NOTE_ZEN_UPGRADE,
createZenUpgradeNotification());