Merge changes from topic "USB AIDL Migration" am: ef0ed10e8f

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2377088

Change-Id: Ie8b77fc207ec492b4f3b7f9c4ad0183b7d74e7fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-01-12 06:58:51 +00:00
committed by Automerger Merge Worker
4 changed files with 23 additions and 24 deletions

View File

@@ -34,7 +34,7 @@
package android.hardware.usb.gadget;
@VintfStability
interface IUsbGadgetCallback {
oneway void setCurrentUsbFunctionsCb(in long functions, in android.hardware.usb.gadget.Status status, long transactionId);
oneway void getCurrentUsbFunctionsCb(in long functions, in android.hardware.usb.gadget.Status status, long transactionId);
oneway void getUsbSpeedCb(in android.hardware.usb.gadget.UsbSpeed speed, long transactionId);
oneway void setCurrentUsbFunctionsCb(in long functions, in android.hardware.usb.gadget.Status status, long transactionId);
}

View File

@@ -29,29 +29,29 @@ parcelable GadgetFunction {
/**
* Android open accessory protocol function.
*/
const long ACCESSORY = 2;
const long ACCESSORY = 1 << 1;
/**
* Media Transfer protocol function.
*/
const long MTP = 4;
const long MTP = 1 << 2;
/**
* Peripheral mode USB Midi function.
*/
const long MIDI = 8;
const long MIDI = 1 << 3;
/**
* Picture transfer protocol function.
*/
const long PTP = 16;
const long PTP = 1 << 4;
/**
* Tethering function.
*/
const long RNDIS = 32;
const long RNDIS = 1 << 5;
/**
* AOAv2.0 - Audio Source function.
*/
const long AUDIO_SOURCE = 64;
const long AUDIO_SOURCE = 1 << 6;
/**
* NCM - NCM function.
*/
const long NCM = 1024;
const long NCM = 1 << 10;
}

View File

@@ -23,8 +23,7 @@ import android.hardware.usb.gadget.IUsbGadgetCallback;
oneway interface IUsbGadget {
/**
* This function is used to set the current USB gadget configuration.
* Usb gadget needs to teared down if an USB configuration is already
* active.
* Usb gadget needs to be reset if an USB configuration is already.
*
* @param functions The GadgetFunction bitmap. See GadgetFunction for
* the value of each bit.

View File

@@ -22,6 +22,20 @@ import android.hardware.usb.gadget.UsbSpeed;
@VintfStability
oneway interface IUsbGadgetCallback {
/**
* Callback function used to propagate the status of configuration
* switch to the caller.
*
* @param functions list of functions defined by GadgetFunction
* included in the current USB gadget composition.
* @param status SUCCESS when the functions are applied.
* FUNCTIONS_NOT_SUPPORTED when the configuration is
* not supported.
* ERROR otherwise.
* @param transactionId ID to be used when invoking the callback.
*/
void setCurrentUsbFunctionsCb(in long functions, in Status status, long transactionId);
/**
* Callback function used to propagate the current USB gadget
* configuration.
@@ -46,18 +60,4 @@ oneway interface IUsbGadgetCallback {
* @param transactionId ID to be used when invoking the callback.
*/
void getUsbSpeedCb(in UsbSpeed speed, long transactionId);
/**
* Callback function used to propagate the status of configuration
* switch to the caller.
*
* @param functions list of functions defined by GadgetFunction
* included in the current USB gadget composition.
* @param status SUCCESS when the functions are applied.
* FUNCTIONS_NOT_SUPPORTED when the configuration is
* not supported.
* ERROR otherwise.
* @param transactionId ID to be used when invoking the callback.
*/
void setCurrentUsbFunctionsCb(in long functions, in Status status, long transactionId);
}