Loading core/java/android/hardware/usb/UsbManager.java +17 −0 Original line number Diff line number Diff line Loading @@ -407,6 +407,23 @@ public class UsbManager { return propertyContainsFunction("sys.usb.config", function); } /** * Returns the current default USB function. * * @return name of the default function. * * {@hide} */ public String getDefaultFunction() { String functions = SystemProperties.get("persist.sys.usb.config", ""); int commaIndex = functions.indexOf(','); if (commaIndex > 0) { return functions.substring(0, commaIndex); } else { return functions; } } /** * Sets the current USB function. * If function is null, then the current function is set to the default function. Loading Loading
core/java/android/hardware/usb/UsbManager.java +17 −0 Original line number Diff line number Diff line Loading @@ -407,6 +407,23 @@ public class UsbManager { return propertyContainsFunction("sys.usb.config", function); } /** * Returns the current default USB function. * * @return name of the default function. * * {@hide} */ public String getDefaultFunction() { String functions = SystemProperties.get("persist.sys.usb.config", ""); int commaIndex = functions.indexOf(','); if (commaIndex > 0) { return functions.substring(0, commaIndex); } else { return functions; } } /** * Sets the current USB function. * If function is null, then the current function is set to the default function. Loading