summaryrefslogtreecommitdiffstats
path: root/services/usb
diff options
context:
space:
mode:
authorGus Prevas <kprevas@google.com>2015-09-09 16:10:54 -0400
committerGus Prevas <kprevas@google.com>2015-09-10 13:37:59 -0400
commite753361508a51ecea4bc2c84ffba68fd5a8cdd4b (patch)
tree74e9d83ecd09d22dc2a1c72b16b5739ce01475eb /services/usb
parentad9a0efc070f8a948f943d52a43dccf54e49db61 (diff)
downloadframeworks_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.java3
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 {