Commit Graph

5204 Commits

Author SHA1 Message Date
TreeHugger Robot
1b23bfefc9 Merge "Fix constant" 2022-01-26 22:51:16 +00:00
TreeHugger Robot
5d4ad0c22c Merge "Support USB Port Reset" 2022-01-26 08:13:08 +00:00
John Reck
34e8f90af2 Fix constant
Why isn't this a compile failure??

Bug: 193558894
Test: WIP HardwareBuffer CTS test
Change-Id: Ib803816e70259f7c52fa4d4c06dffdb49df43e23
2022-01-25 17:34:38 -05:00
Ricky Niu
476cd2e3ca Support USB Port Reset
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
2022-01-25 12:01:34 +08:00
Christine Franks
6e84913f17 Merge "Set pointer acceleration for virtual devices" 2022-01-25 01:19:09 +00:00
Badhri Jagan Sridharan
d368d4ee67 Merge "Add systemApis to allow data transfer over USB-C while being docked" 2022-01-24 19:19:25 +00:00
Christine Franks
a7fe83fdc6 Set pointer acceleration for virtual devices
Bug: 202273865
Test: atest FrameworksServicesTests:InputControllerTest

Change-Id: Ida5db8b34e7b75f5db96d0c31484c76276803af0
2022-01-24 11:11:35 -08:00
Philip Junker
83704e06b3 Merge changes from topic "keyLayoutAPI"
* changes:
  Add TestAPIs to test InputDevice#getKeyCodeForKeyLocation().
  Add API to get KeyCode produced by physical key location.
2022-01-24 18:39:18 +00:00
Badhri Jagan Sridharan
7212c8fda4 Add systemApis to allow data transfer over USB-C while being docked
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
2022-01-24 21:30:05 +08:00
Badhri Jagan Sridharan
da433c60c1 Merge changes from topics "199357330", "200993386"
* changes:
  Add limitPowerTransfer SystemAPI to UsbPort
  Support IUsb AIDL interface
2022-01-22 01:20:21 +00:00
Christine Franks
1bc94f4f47 Merge "Add mouse handling APIs" 2022-01-21 20:34:27 +00:00
Maurice Lam
a1e7a448f9 Merge "Unhide VDM APIs" 2022-01-21 17:39:35 +00:00
John Reck
1556cb902c Merge "Add USAGE_FRONT_BUFFER constant" 2022-01-21 17:04:27 +00:00
Philip Junker
704afe2077 Add TestAPIs to test InputDevice#getKeyCodeForKeyLocation().
Mention @RequiredPermission(..) where applicable / move it from javadocs.

Bug: 179812917
Test: atest KeyboardLayoutChangeTest
Test: atest android.hardware.input.cts.tests -m
Change-Id: I183734d3bb80a6f0c69f27629bfaaa577e4fab59
2022-01-21 17:59:08 +01:00
Philip Junker
71355cd52a Add API to get KeyCode produced by physical key location.
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
2022-01-21 17:56:10 +01:00
Badhri Jagan Sridharan
bdbb2d15be Add limitPowerTransfer SystemAPI to UsbPort
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
2022-01-21 16:06:04 +08:00
Badhri Jagan Sridharan
bbfa92e694 Support IUsb AIDL interface
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
2022-01-21 16:04:33 +08:00
Christine Franks
488d915feb Add mouse handling APIs
Bug: 202273865
Test: atest FrameworksCoreTests:android.hardware.input
CTS-Coverage-Bug: 208247880
Change-Id: Ic70f5f9e914492cb512095abb5687727b3bb3f09
2022-01-20 21:43:50 -08:00
Maurice Lam
55cf7b0932 Unhide VDM APIs
Bug: 194949534
Test: ag/15781910
Change-Id: Ied73d2efaf4f3cf3f713fe80025d862a904d70d2
CTS-Coverage-Bug: 204606917
2022-01-20 20:40:12 -08:00
TreeHugger Robot
ce65b04d56 Merge "Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""" 2022-01-20 11:33:39 +00:00
John Reck
a2812e51df Add USAGE_FRONT_BUFFER constant
Bug: 193558894
Test: TBD
Change-Id: I17624c1b758235a0025bc737829afa38685962fc
2022-01-19 18:00:46 -05:00
Emilian Peev
5e32d1ae91 Merge "Camera: Enable 10-bit output camera API" 2022-01-19 19:21:30 +00:00
Bernardo Rufino
1a5cb387d6 Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""
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
2022-01-19 11:13:18 +00:00
Thiébaud Weksteen
1acb7b93dd Merge "Transition SerialManager to @EnforcePermission" am: dd9db63692 am: ada390bead am: ed7e6f6bdf am: a233ce9dc7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1946227

Change-Id: Iac629eab14a50b09549b92386aa6ca3265c75c3e
2022-01-19 01:16:02 +00:00
Thiébaud Weksteen
a233ce9dc7 Merge "Transition SerialManager to @EnforcePermission" am: dd9db63692 am: ada390bead am: ed7e6f6bdf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1946227

Change-Id: Id09a90dcc98540e1ad09947dceac9afd8be91e83
2022-01-19 01:01:51 +00:00
Thiébaud Weksteen
ed7e6f6bdf Merge "Transition SerialManager to @EnforcePermission" am: dd9db63692 am: ada390bead
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1946227

Change-Id: I0e5fb34d0a93f0d0ac695d6ba3a46846171b7b70
2022-01-19 00:50:34 +00:00
Thiébaud Weksteen
dd9db63692 Merge "Transition SerialManager to @EnforcePermission" 2022-01-19 00:28:57 +00:00
Emilian Peev
146945464b Camera: Enable 10-bit output camera API
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
2022-01-18 14:30:20 -08:00
Brian Duddie
796fa1f02d Expose new head tracker sensor type
Bug: 210156629
Test: n/a
CTS-Coverage-Bug: 214618172
Change-Id: I766f41d78bd3619cdd25849b46912f23ac8427a7
2022-01-18 17:52:56 +00:00
Yan Han
d708555b3b Merge changes I958029a4,I45653246,I49161c8f,I1c862e86,I5e8c0bbe, ...
* 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
2022-01-17 10:22:16 +00:00
Eric Laurent
d7ca91507b Merge "Sensor: expose sensor UUID to sytem and audio users" 2022-01-15 10:33:44 +00:00
David Zeuthen
d1fdef6927 Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d am: 62c776a7c2 am: 2bf36b756d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: I3ab418b52a3915ac324baa59f38fb936e2eee5b4
2022-01-14 22:14:15 +00:00
David Zeuthen
2bf36b756d Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d am: 62c776a7c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: Idb4d1ddd89a5ca58ccc852c67f098dad04cb1c5c
2022-01-14 21:56:18 +00:00
David Zeuthen
62c776a7c2 Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: I8b5ade103c4275871e990369c36480013f47f129
2022-01-14 21:39:07 +00:00
David Zeuthen
91b96e3454 Merge "identity: Add multi-document presentation support." 2022-01-14 21:07:03 +00:00
Joe Bolinger
0cc4a29f4a Merge changes Ifb73b014,Idd1485f1
* changes:
  Check current user when the operations runs for fingerprint hidl.
  Revert "Revert "Fix enrollment cancelation race conditions.""
2022-01-14 19:21:03 +00:00
Yan Han
2af8848d69 Update CEC network with feature support on receiving <Report Features>
Test: atest HdmiCecMessageValidatorTest
atest DeviceFeaturesTest
Bug: 199144863

Change-Id: I49161c8fd5ff2295b8654c8903cc548859d62664
2022-01-14 18:36:12 +01:00
Yan Han
23181eb8a6 Add CEC feature tracking to HdmiDeviceInfo
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
2022-01-14 18:36:11 +01:00
Yan Han
8bd2ec2f22 Refactor HdmiDeviceInfo construction to use a builder
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
2022-01-14 18:36:06 +01:00
Kriti Dang
1774563ec0 Merge "Runtime resolution changes" 2022-01-14 08:28:12 +00:00
Joe Bolinger
446644041b Revert "Revert "Fix enrollment cancelation race conditions.""
This reverts commit f4dc031e6c.

Reason for revert: Reapplying with additional change to fix the issue that broke HIDL clients.

Change-Id: Idd1485f182cf841b96ced1dab4b8330ff3b57c2a
2022-01-13 09:54:55 -08:00
Arthur Ishiguro
9ee529d8e0 Merge "Make ContextHubClient.getId() return a 16-bit value" 2022-01-13 17:06:28 +00:00
Eric Laurent
c4399988e8 Sensor: expose sensor UUID to sytem and audio users
Allow privileged UIDs (system and audioserver) access to
the complete UUID of dynamic sensors.

Bug: 210803914
Test: atest SensorTest
Change-Id: Ib03532a9ee58206cb5e94a330cdc87efb5618527
2022-01-13 16:15:53 +01:00
Kriti Dang
ecf14412d3 Runtime resolution changes
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
2022-01-13 13:47:59 +01:00
bsears
8ba50e5ce4 Merge "Revert "Fix enrollment cancelation race conditions."" 2022-01-13 06:38:54 +00:00
Daniel Chapin
f4dc031e6c Revert "Fix enrollment cancelation race conditions."
This reverts commit c7a7ee892a.

Reason for revert: Droidfood blocking bug: 213962104

Change-Id: I370cafcac7e70febbb77a05647a3fd5d0a158abd
2022-01-13 02:43:44 +00:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Arthur Ishiguro
71c765985b Make ContextHubClient.getId() return a 16-bit value
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
2022-01-12 18:43:04 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
Thiébaud Weksteen
c4895c4aa6 Transition SerialManager to @EnforcePermission
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
2022-01-12 16:26:09 +11:00