* commit '4bf3dfeacf9fc7faf7126c32b161a7dae2bb2c4f': Adds config flag for USB notification.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user