Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bf3dfea authored by Daniel Koulomzin's avatar Daniel Koulomzin Committed by Android Git Automerger
Browse files

am ffa2d691: Merge "Adds config flag for USB notification." into cw-e-dev

* commit 'ffa2d691':
  Adds config flag for USB notification.
parents 48093547 ffa2d691
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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>
+4 −1
Original line number Diff line number Diff line
@@ -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>

+1 −0
Original line number Diff line number Diff line
@@ -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" />
+2 −1
Original line number Diff line number Diff line
@@ -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 {