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

Commit f0d64ff9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "UMS: Add the missing notification when USB connected"

parents 8b09d9ec 81aa0216
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
-->

<resources>
    <!-- Whether to popup usb computer connection-->
    <bool name="always_popup_usb_computer_connection">false</bool>
    <!-- Whether to popup usb computer connection option-->
    <bool name="always_popup_usb_computer_connection_option">false</bool>
    <bool name="kg_enable_camera_default_widget">true</bool>
+1 −0
Original line number Diff line number Diff line
@@ -254,6 +254,7 @@
  <java-symbol type="bool" name="action_bar_embed_tabs_pre_jb" />
  <java-symbol type="bool" name="action_bar_expanded_action_views_exclusive" />
  <java-symbol type="bool" name="config_avoidGfxAccel" />
  <java-symbol type="bool" name="always_popup_usb_computer_connection" />
  <java-symbol type="bool" name="always_popup_usb_computer_connection_option" />
  <java-symbol type="bool" name="config_allowActionMenuItemTextWithIcon" />
  <java-symbol type="bool" name="config_bluetooth_address_validation" />
+10 −0
Original line number Diff line number Diff line
@@ -723,6 +723,16 @@ public class UsbDeviceManager {
                    id = com.android.internal.R.string.usb_cd_installer_notification_title;
                } else if (containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_ACCESSORY)) {
                    id = com.android.internal.R.string.usb_accessory_notification_title;
                } else if (r.getBoolean(
                        com.android.internal.R.bool.always_popup_usb_computer_connection)) {
                    // Default usb function is get from the property "persist.sys.usb.config"
                    // in device/qcom/common/rootdir/etc/init.qcom.usb.sh, which may not fall
                    // into any case above, like "diag,serial_smd,rmnet_bam,adb" for some
                    // device,this cause missing USB connection notification.

                    // Default config is false which can be overlaid, when it is true,
                    // it will still show USB connection notification.
                    id = com.android.internal.R.string.usb_cd_installer_notification_title;
                } else {
                    if (AppOpsManager.isStrictEnable()) {
                        id = com.android.internal.R.string.usb_choose_notification_title;