diff options
author | Gus Prevas <kprevas@google.com> | 2015-09-09 16:10:54 -0400 |
---|---|---|
committer | Gus Prevas <kprevas@google.com> | 2015-09-10 13:37:59 -0400 |
commit | e753361508a51ecea4bc2c84ffba68fd5a8cdd4b (patch) | |
tree | 74e9d83ecd09d22dc2a1c72b16b5739ce01475eb /services/usb | |
parent | ad9a0efc070f8a948f943d52a43dccf54e49db61 (diff) | |
download | frameworks_base-e753361508a51ecea4bc2c84ffba68fd5a8cdd4b.zip frameworks_base-e753361508a51ecea4bc2c84ffba68fd5a8cdd4b.tar.gz frameworks_base-e753361508a51ecea4bc2c84ffba68fd5a8cdd4b.tar.bz2 |
Adds config flag for USB notification.
This change modifies UsbDeviceManager such that the ongoing
system notification for USB charging state is controlled by a
config flag.
Bug: 23409719
Change-Id: I2ef24fe74923170a6e8dd02375b973b4025281e4
Diffstat (limited to 'services/usb')
-rw-r--r-- | services/usb/java/com/android/server/usb/UsbDeviceManager.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index fb9a3a3..1321281 100644 --- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java +++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java @@ -233,7 +233,8 @@ public class UsbDeviceManager { final StorageManager storageManager = StorageManager.from(mContext); final StorageVolume primary = storageManager.getPrimaryVolume(); massStorageSupported = primary != null && primary.allowMassStorage(); - mUseUsbNotification = !massStorageSupported; + mUseUsbNotification = !massStorageSupported && mContext.getResources().getBoolean( + com.android.internal.R.bool.config_usbChargingMessage); // make sure the ADB_ENABLED setting value matches the current state try { |