Lines Matching defs:function
58 * mass storage function is enabled
60 * adb function is enabled
62 * RNDIS ethernet function is enabled
64 * MTP function is enabled
66 * PTP function is enabled
68 * accessory function is enabled
70 * audio source function is enabled
143 * Name of the USB mass storage USB function.
151 * Name of the adb USB function.
159 * Name of the RNDIS ethernet USB function.
167 * Name of the MTP USB function.
175 * Name of the PTP USB function.
183 * Name of the audio source USB function.
191 * Name of the Accessory USB function.
403 private static boolean propertyContainsFunction(String property, String function) {
405 int index = functions.indexOf(function);
408 int charAfter = index + function.length();
414 * Returns true if the specified USB function is currently enabled.
416 * @param function name of the USB function
417 * @return true if the USB function is enabled.
421 public boolean isFunctionEnabled(String function) {
422 return propertyContainsFunction("sys.usb.config", function);
426 * Returns the current default USB function.
428 * @return name of the default function.
443 * Sets the current USB function.
444 * If function is null, then the current function is set to the default function.
446 * @param function name of the USB function, or null to restore the default function
447 * @param makeDefault true if the function should be set as the new default function
451 public void setCurrentFunction(String function, boolean makeDefault) {
453 mService.setCurrentFunction(function, makeDefault);