Loading services/java/com/android/server/NotificationManagerService.java +8 −8 Original line number Diff line number Diff line Loading @@ -587,9 +587,8 @@ public class NotificationManagerService extends INotificationManager.Stub ContentResolver resolver = mContext.getContentResolver(); boolean adbEnabled = Settings.Secure.getInt(resolver, Settings.Secure.ADB_ENABLED, 0) != 0; boolean notifyEnabled = Settings.Secure.getInt(resolver, Settings.Secure.ADB_NOTIFY, 1) != 0; updateAdbNotification(adbEnabled && notifyEnabled && mUsbConnected); /* notify setting is checked inside updateAdbNotification() */ updateAdbNotification(adbEnabled && mUsbConnected); } } Loading Loading @@ -1678,12 +1677,13 @@ public class NotificationManagerService extends INotificationManager.Stub // security feature that we don't want people customizing the platform // to accidentally lose. private void updateAdbNotification(boolean adbEnabled) { if (adbEnabled) { if ("0".equals(SystemProperties.get("persist.adb.notify")) || Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.ADB_NOTIFY, 1) == 0) { return; adbEnabled = false; } if (adbEnabled) { if (!mAdbNotificationShown) { NotificationManager notificationManager = (NotificationManager) mContext .getSystemService(Context.NOTIFICATION_SERVICE); Loading Loading
services/java/com/android/server/NotificationManagerService.java +8 −8 Original line number Diff line number Diff line Loading @@ -587,9 +587,8 @@ public class NotificationManagerService extends INotificationManager.Stub ContentResolver resolver = mContext.getContentResolver(); boolean adbEnabled = Settings.Secure.getInt(resolver, Settings.Secure.ADB_ENABLED, 0) != 0; boolean notifyEnabled = Settings.Secure.getInt(resolver, Settings.Secure.ADB_NOTIFY, 1) != 0; updateAdbNotification(adbEnabled && notifyEnabled && mUsbConnected); /* notify setting is checked inside updateAdbNotification() */ updateAdbNotification(adbEnabled && mUsbConnected); } } Loading Loading @@ -1678,12 +1677,13 @@ public class NotificationManagerService extends INotificationManager.Stub // security feature that we don't want people customizing the platform // to accidentally lose. private void updateAdbNotification(boolean adbEnabled) { if (adbEnabled) { if ("0".equals(SystemProperties.get("persist.adb.notify")) || Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.ADB_NOTIFY, 1) == 0) { return; adbEnabled = false; } if (adbEnabled) { if (!mAdbNotificationShown) { NotificationManager notificationManager = (NotificationManager) mContext .getSystemService(Context.NOTIFICATION_SERVICE); Loading