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

Commit 395765a9 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "UsbManager: document that passing null setCurrentFunction restores default function"

parents 2b15115f 875c24b8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -409,9 +409,10 @@ public class UsbManager {

    /**
     * Sets the current USB function.
     * If function is null, then the current function is set to the default function.
     *
     * @param function name of the USB function
     * @param makeDefault true if this should be set as the default
     * @param function name of the USB function, or null to restore the default function
     * @param makeDefault true if the function should be set as the new default function
     *
     * {@hide}
     */
+1 −4
Original line number Diff line number Diff line
@@ -473,10 +473,7 @@ public class UsbDeviceManager {
                case MSG_SET_CURRENT_FUNCTION:
                    String function = (String)msg.obj;
                    boolean makeDefault = (msg.arg1 == 1);
                    if (makeDefault) {
                        if (function == null) {
                            throw new NullPointerException();
                        }
                    if (function != null && makeDefault) {
                        if (mAdbEnabled) {
                            function = addFunction(function, UsbManager.USB_FUNCTION_ADB);
                        }