diff options
| author | 2015-09-10 21:46:01 +0000 | |
|---|---|---|
| committer | 2015-09-10 21:46:01 +0000 | |
| commit | ffa2d69193c70a4e8455aeb5f41487e43c4d48aa (patch) | |
| tree | 8288ccd244d3a8b94fd0072cb651d603b0d6efbf | |
| parent | 5c732ee53e5bb5e0c8de920816bca729b6330e5d (diff) | |
| parent | e753361508a51ecea4bc2c84ffba68fd5a8cdd4b (diff) | |
Merge "Adds config flag for USB notification." into cw-e-dev
| -rw-r--r-- | core/res/res/values-watch/config.xml | 3 | ||||
| -rwxr-xr-x | core/res/res/values/config.xml | 5 | ||||
| -rwxr-xr-x | core/res/res/values/symbols.xml | 1 | ||||
| -rw-r--r-- | services/usb/java/com/android/server/usb/UsbDeviceManager.java | 3 |
4 files changed, 10 insertions, 2 deletions
diff --git a/core/res/res/values-watch/config.xml b/core/res/res/values-watch/config.xml index 90448023bbf8..41b05ea8757a 100644 --- a/core/res/res/values-watch/config.xml +++ b/core/res/res/values-watch/config.xml @@ -51,4 +51,7 @@ <!-- Scale factor threshold used by the screen magnifier to determine when to switch from panning to scaling the magnification viewport. --> <item name="config_screen_magnification_scaling_threshold" format="float" type="dimen">0.1</item> + + <!-- Do not show the message saying USB is connected in charging mode. --> + <bool name="config_usbChargingMessage">false</bool> </resources> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 901ef5a23cd4..f06241d973db 100755 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -248,7 +248,7 @@ <integer name="config_networkTransitionTimeout">60000</integer> <!-- List of regexpressions describing the interface (if any) that represent tetherable - USB interfaces. If the device doesn't want to support tething over USB this should + USB interfaces. If the device doesn't want to support tethering over USB this should be empty. An example would be "usb.*" --> <string-array translatable="false" name="config_tether_usb_regexs"> </string-array> @@ -543,6 +543,9 @@ <!-- If this is true, the screen will come on when you unplug usb/power/whatever. --> <bool name="config_unplugTurnsOnScreen">false</bool> + <!-- If this is true, the message that USB is only being used for charging will be shown. --> + <bool name="config_usbChargingMessage">true</bool> + <!-- Set this true only if the device has separate attention and notification lights. --> <bool name="config_useAttentionLight">false</bool> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 2648ddd9b945..171f226867d4 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1633,6 +1633,7 @@ <java-symbol type="bool" name="config_enableNetworkLocationOverlay" /> <java-symbol type="bool" name="config_sf_limitedAlpha" /> <java-symbol type="bool" name="config_unplugTurnsOnScreen" /> + <java-symbol type="bool" name="config_usbChargingMessage" /> <java-symbol type="bool" name="config_allowAutoBrightnessWhileDozing" /> <java-symbol type="bool" name="config_allowTheaterModeWakeFromUnplug" /> <java-symbol type="bool" name="config_allowTheaterModeWakeFromGesture" /> diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index fb9a3a3c3d82..1321281d00ed 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 { |