Usb Gadget: Add UVC to Usb Gadget interface

UVC Gadget Function is required for DeviceAsWebcam service that lets
Android Devices be used as Webcam when connected to hosts. This CL adds
the UVC GadgetFunction to the USB Gadget interface.

Bug: 242344221
Test: Manually tested that the HAL and the framework pick up the new
      GadgetFunction
Change-Id: I93acf458f279500320ffc5abd55f139d3d768101
This commit is contained in:
Avichal Rakesh
2023-01-19 19:52:06 -08:00
parent c4c75ee63c
commit e1153030e7
2 changed files with 12 additions and 7 deletions

View File

@@ -36,11 +36,12 @@ package android.hardware.usb.gadget;
parcelable GadgetFunction {
const long NONE = 0;
const long ADB = 1;
const long ACCESSORY = 2;
const long MTP = 4;
const long MIDI = 8;
const long PTP = 16;
const long RNDIS = 32;
const long AUDIO_SOURCE = 64;
const long NCM = 1024;
const long ACCESSORY = (1 << 1);
const long MTP = (1 << 2);
const long MIDI = (1 << 3);
const long PTP = (1 << 4);
const long RNDIS = (1 << 5);
const long AUDIO_SOURCE = (1 << 6);
const long UVC = (1 << 7);
const long NCM = (1 << 10);
}

View File

@@ -50,6 +50,10 @@ parcelable GadgetFunction {
* AOAv2.0 - Audio Source function.
*/
const long AUDIO_SOURCE = 1 << 6;
/**
* UVC - Universal Video Class function.
*/
const long UVC = 1 << 7;
/**
* NCM - NCM function.
*/