OSDN Git Service

Merge "Implement per-app sensitivity settings toggle." into lmp-dev
authorChris Wren <cwren@android.com>
Thu, 4 Sep 2014 13:40:04 +0000 (13:40 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Thu, 4 Sep 2014 13:40:04 +0000 (13:40 +0000)
1  2 
src/com/android/settings/notification/AppNotificationSettings.java
src/com/android/settings/notification/NotificationAppList.java

@@@ -185,14 -186,18 +187,24 @@@ public class AppNotificationSettings ex
                  }
              });
          }
 +
 +        // Users cannot block notifications from system/signature packages
 +        if (Utils.isSystemPackage(pm, info)) {
 +            getPreferenceScreen().removePreference(mBlock);
 +            mPriority.setDependency(null); // don't have it depend on a preference that's gone
 +        }
      }
  
+     private boolean getLockscreenNotificationsEnabled() {
+         return Settings.Secure.getInt(getContentResolver(),
+                 Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) != 0;
+     }
+     private boolean getLockscreenAllowPrivateNotifications() {
+         return Settings.Secure.getInt(getContentResolver(),
+                 Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0) != 0;
+     }
      private void toastAndFinish() {
          Toast.makeText(mContext, R.string.app_not_found_dlg_text, Toast.LENGTH_SHORT).show();
          getActivity().finish();