summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-07-09 07:07:27 -0400
committerMike Lockwood <lockwood@android.com>2009-07-09 14:24:42 -0400
commited7603779282d416356ce3c9739056d632307275 (patch)
tree576f0a7007db402627e90d364a96768c78e048da /services
parentb45451f6dac5b32bcd8c52352a9697854eab40d0 (diff)
downloadframeworks_base-ed7603779282d416356ce3c9739056d632307275.zip
frameworks_base-ed7603779282d416356ce3c9739056d632307275.tar.gz
frameworks_base-ed7603779282d416356ce3c9739056d632307275.tar.bz2
Add a persistent system property to disable the adb notification.
Setting to persist.adb.notify to 0 will disable the ad notification. You need to be root to set this, so this allows disabling the notification only on eng and userdebug builds. Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/NotificationManagerService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 190d3e6..38fb7c9 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -49,6 +49,7 @@ import android.os.IBinder;
import android.os.Message;
import android.os.Power;
import android.os.RemoteException;
+import android.os.SystemProperties;
import android.os.Vibrator;
import android.provider.Settings;
import android.text.TextUtils;
@@ -945,6 +946,9 @@ class NotificationManagerService extends INotificationManager.Stub
// to accidentally lose.
private void updateAdbNotification() {
if (mAdbEnabled && mBatteryPlugged == BatteryManager.BATTERY_PLUGGED_USB) {
+ if ("0".equals(SystemProperties.get("persist.adb.notify"))) {
+ return;
+ }
if (!mAdbNotificationShown) {
NotificationManager notificationManager = (NotificationManager) mContext
.getSystemService(Context.NOTIFICATION_SERVICE);