Verify the USB Gadget HAL already implement.
Bug: 197300598
Test: Verify the API working manually
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I8a4a4966237c925c87b32f74a382b7a56f82ab7d
This change adds two systemApis to UsbPortStatus viz.,
a. getUsbDataStatus: Allows caller to infer whether USB data is enabled.
b. getPowerBrickStatus: Allows caller to infer whether a power brick
is connected to the USB port.
The change also adds enableUsbDataWhileDocked systemApi to UsbPort to
enable Usb data momentarily.
Bug: 211677613
Bug: 213312081
Test: Manually tested on tablet
CTS-Coverage-Bug: 215019881
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: Ib7521f0f04b7f8e3e58dc253b28072d3631f21a7
The physical key location is provided as a location keyCode pointing to a location on a US keyboard layout.
Bug: 179812917
Test: atest KeyboardLayoutChangeTest
Test: atest android.hardware.input.cts.tests -m
Change-Id: Ie1b424a0e0bfea2bc15b0b3a644f2f718f16094e
limitPowerTransfer when invoked limits the power transfer
in and out of the USB port. limitPortTransfer is deactivated
either when limitPowerTransfer is deactivated by the caller
or when Usb disconnect event is observed by the Usb service.
limitPowerTransfer API is asynchronous and the caller gets
notified by invoking UsbOperationCallback.onUsbOperationComplete
callback to notify the status of the operation.
USB_PORT_CHANGED event is broadcasted when port's limitPowerTransfer
status changes. UsbPortStatus object is updated to reflect the
current status.
limitPowerTransfer is protected by android.permission.MANAGE_USB.
Bug: 199357330
Bug: 199358576
Test: Tested on Pixel
CTS-Coverage-Bug: 215019881
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: Iabd1187f7527e14ed758abe355ba94a511d8c859
UsbPortManager is made to support both AIDL & HIDL interface until
HIDL is deprecated eventually. UsbPortHal abstract class is defined
which the UsbPortManager grabs an instance of from UsbPortHalInstance
method to talk to the Hal implementation process. UsbPortHalInstance
queries the underlying hal implementation and instantiates UsbPortHal
with either UsbPortHidl or UsbPortAidl based on the IUsb interface
implemented by HAL implementation.
go/iusb-aidl-migrate.
Bug: 200993386
Bug: 199357330
Bug: 211677613
Bug: 213312081
Bug: 199358576
Test: Manually tested through UI.
CTS-Coverage-Bug: 215019881
Change-Id: I246fd6e5bee8138d3ad3b6994665a1d4788c8789
This reverts commit 331be9a643.
Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).
Original commit message:
Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()
This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).
A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.
Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
Allow camera clients to query and select a specific 10-bit
dynamic range profile when initializing camera capture
sessions.
Bug: 195946346
Test: Camera CTS
Change-Id: If46c16a7ea95b772dcaa3ae36807ed73d197749f
* changes:
Add action to query <Set Audio Volume Level> support
Add feature action for sending <Give Features>
Update CEC network with feature support on receiving <Report Features>
Create class for building and parsing <Report Features>
Validate all messages on construction
Keep DeviceFeatures updated in local devices.
Add CEC feature tracking to HdmiDeviceInfo
Refactor HdmiDeviceInfo construction to use a builder
HdmiDeviceInfo now contains an object for tracking features
whose support is communicated in the [Device Features] operand.
Bug: 204854610
Test: atest DeviceFeaturesTest
Change-Id: Id2e19fb2e4480b5ed88529fd15012c7abad5d3a7
The builder makes it easier to copy a HdmiDeviceInfo with a few parameters changed.
All HdmiDeviceInfo constructors are replaced by static factory methods:
- The factory methods for MHL devices and hardware port devices retain their original parameters and use the builder internally.
- The factory method for CEC devices returns a builder; most parameters
are optional and are set individually.
Change-Id: I488cc76570eaa5433ae1d723dc19d65600d20319
Bug: 204854539
Test: atest com.android.server.hdmi
This reverts commit f4dc031e6c.
Reason for revert: Reapplying with additional change to fix the issue that broke HIDL clients.
Change-Id: Idd1485f182cf841b96ced1dab4b8330ff3b57c2a
Changed the names of existing display mode APIs.
Added similar APIs in Display class, so that
resolution and refresh rate settings can be pesisted for each display.
The APIs can now be used to set display mode (or only resolution or
refreshRate).
Bug: 206911689
Test: atest DefaultDisplayModeTest
Change-Id: I19655fc347d36e45b5664e2b6faa3d58b5d7004c
Limit the return value range based on feedback to reflect the 16-bit
value returned from the framework.
Fixes: 214028356
Test: None
Change-Id: Idaecebd9219e38fd5e04122043274b8a524d8bae
Use the new @EnforcePermission annotation for SerialService.
Test: Manually inspect ISerialManager.java, the permission checks are
correctly generated.
Test: Run SerialChat app as regular app, SecurityException triggered
when launching the app.
Test: Run SerialChat as priv-app. Access is granted, the app executes
normally.
Bug: 197828948
Change-Id: Ide1d2809f2226f7cd84efa0d364dc78da726f294