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

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

Merge "AppOps: Don't add "adb" if it is "charging" function"

parents 9481065e 5520812d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -461,11 +461,13 @@ public class UsbDeviceManager {
            // with OEM specific mode.
            if (functions != null && makeDefault && !needsOemUsbOverride()) {

                if (!"charging".equals(functions)) {
                    if (mAdbEnabled) {
                        functions = addFunction(functions, UsbManager.USB_FUNCTION_ADB);
                    } else {
                        functions = removeFunction(functions, UsbManager.USB_FUNCTION_ADB);
                    }
                }
                if (!mDefaultFunctions.equals(functions)) {
                    if (!setUsbConfig("none")) {
                        Slog.e(TAG, "Failed to disable USB");