Loading services/usb/java/com/android/server/usb/UsbPortManager.java +9 −2 Original line number Diff line number Diff line Loading @@ -200,7 +200,11 @@ public class UsbPortManager implements IBinder.DeathRecipient { mHandler.sendEmptyMessage(MSG_SYSTEM_READY); } private void updateContaminantNotification() { private void updateContaminantNotificationLocked() { if (mNotificationManager == null) { return; } PortInfo currentPortInfo = null; Resources r = mContext.getResources(); int contaminantStatus = UsbPortStatus.CONTAMINANT_DETECTION_NOT_DETECTED; Loading Loading @@ -1171,7 +1175,7 @@ public class UsbPortManager implements IBinder.DeathRecipient { private void handlePortLocked(PortInfo portInfo, IndentingPrintWriter pw) { sendPortChangedBroadcastLocked(portInfo); logToStatsd(portInfo, pw); updateContaminantNotification(); updateContaminantNotificationLocked(); } private void handlePortAddedLocked(PortInfo portInfo, IndentingPrintWriter pw) { Loading Loading @@ -1433,6 +1437,9 @@ public class UsbPortManager implements IBinder.DeathRecipient { case MSG_SYSTEM_READY: { mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); synchronized (mLock) { updateContaminantNotificationLocked(); } break; } } Loading Loading
services/usb/java/com/android/server/usb/UsbPortManager.java +9 −2 Original line number Diff line number Diff line Loading @@ -200,7 +200,11 @@ public class UsbPortManager implements IBinder.DeathRecipient { mHandler.sendEmptyMessage(MSG_SYSTEM_READY); } private void updateContaminantNotification() { private void updateContaminantNotificationLocked() { if (mNotificationManager == null) { return; } PortInfo currentPortInfo = null; Resources r = mContext.getResources(); int contaminantStatus = UsbPortStatus.CONTAMINANT_DETECTION_NOT_DETECTED; Loading Loading @@ -1171,7 +1175,7 @@ public class UsbPortManager implements IBinder.DeathRecipient { private void handlePortLocked(PortInfo portInfo, IndentingPrintWriter pw) { sendPortChangedBroadcastLocked(portInfo); logToStatsd(portInfo, pw); updateContaminantNotification(); updateContaminantNotificationLocked(); } private void handlePortAddedLocked(PortInfo portInfo, IndentingPrintWriter pw) { Loading Loading @@ -1433,6 +1437,9 @@ public class UsbPortManager implements IBinder.DeathRecipient { case MSG_SYSTEM_READY: { mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); synchronized (mLock) { updateContaminantNotificationLocked(); } break; } } Loading