Add UVC support

This CL adds support for UVC GadgetFunction. UVC can be enabled/disabled
by setting the `ro.usb.uvc.enabled` property, and this CL makes sure
that the Settings app honors the property when showing USB functions to
the user.

Bug: 242344221
Test: Manually tested that the 'USB Webcam' option is present when the
      property is set, and removed when property is unset.
Change-Id: I5d1ff0a43d3c0c722bc9e03132a581da5c61bd76
This commit is contained in:
Avichal Rakesh
2023-01-19 14:21:02 -08:00
parent d540e02be8
commit e6731b05e1
5 changed files with 25 additions and 2 deletions

View File

@@ -52,6 +52,7 @@ public class UsbDetailsFunctionsController extends UsbDetailsController
FUNCTIONS_MAP.put(UsbManager.FUNCTION_RNDIS, R.string.usb_use_tethering);
FUNCTIONS_MAP.put(UsbManager.FUNCTION_MIDI, R.string.usb_use_MIDI);
FUNCTIONS_MAP.put(UsbManager.FUNCTION_PTP, R.string.usb_use_photo_transfers);
FUNCTIONS_MAP.put(UsbManager.FUNCTION_UVC, R.string.usb_use_uvc_webcam);
FUNCTIONS_MAP.put(UsbManager.FUNCTION_NONE, R.string.usb_use_charging_only);
}