request at max
To simplify orchestration around handling multiple override
requests, we are reducing the OverrideRequestController to
only having one override request at a time. If a new request
is added, the previous request will be cancelled and removed.
This change also means that we can remove the SUSPENDED status
of a request and the accompanying callbacks
Bug: 216495664, Bug: 207686851
Test: OverrideRequestControllerTest
Change-Id: I787f2ce8567812a633c0afdd5b3f684da4508249
This refactoring will let us have alternative implementations for the
state of microphone/camera. It also seperates the storage of the other
feature that is known as the "Sensor mute" so that the reuse of this
service doesn't get too convoluted.
Also extract the persitable state from the state implementation so that
alternative implementations can resuse the persistence code.
Some smaller changes:
* Start the sensor use dailog as user 0 always since system UI requires
user 0
* Use SystemClock.elapsedRealTime() instead of network time since it's
guaranteed to my monotonic. This will also change that intervals used in
telemetry aren't going to measure time the device is powered off.
Ignore-AOSP-First: New OWNERS file
Test: atest CtsSensorPrivacyTestCases SensorPrivacyServiceMockingTest
Bug: 200649586
Change-Id: I4c23c2509d7d1bdf49360fc9bbadb79ccd451dcc
This change adds BrightnessThrottler, which is responsible for limiting
the usable range of display brightness based on skin temperature thermal
throttling (extensible to account for other events/conditions in the
future). Brightness constraints calculated by BrightnessThrottling are
applied by DisplayPowerController as a brightness transform similarly to
dimming and low power states.
This change also adds a field to BrightnessInfo in order to capture the
reason for an unusual max brightness (currently only accounts for a
thermal reason).
Finally, change HighBrightnessModeController (HBMC) so that HBM thermal
throttling is still reported correctly to FrameworkStatsLog when
brightness throttling is performed in DisplayPowerController (through
BrightnessThrottler) rather than through HBMC's own thermal throttling
mechanism. HBMC's own thermal throttling mechanism will be deprecated in
a future change.
Bug: 206857086
Bug: 212634465
Test: atest BrightnessThrottlerTest DisplayModeDirectorTest
BrightnessLevelPreferenceControllerTest
HighBrightnessModeControllerTest
Test: Manually trigger and clear thermal throttling, and verify
transitions,
1. While in manual brightness mode
2. While in automatic Brightness mode
3. While high brightness mode is enabled for HDR
3. Across display suspend/resume events
Change-Id: I4c10f037a0a616e84fc109cc755bf3a5eaa3d111
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