OutputConfiguration uses writeIntArray in writeToParcel. It must use
readIntArray in createFromParcel instead of readList.
Bug: 188675581
Test: Sample app which tries to write invalid data into an
OutputConfiguration parcel. When read again, the exception is
thrown and not swallowed.
Test: create OutputConfiguration; add certain sensorPixelModes;
writeToParcel; set parcel's data position to 0; create
OutputConfiguration from same parcel and read sensor pixel modes.
They match.
Change-Id: Id50396d328ba6fc830012a1c359934cf82249764
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Do not catch exceptions when we attempt to create the following classes
from a parcel
- OutputConfiguration
- VendorTagDescriptor
- VendorTagDescriptorCache
- SessionConfiguration
This could cause subsequent parcel information to be read incorrectly.
Bug: 188675581
Test: Sample app which tries to write invalid data into an
OutputConfiguration parcel to send in an intent via Broadcast. When read by the receiving app,
gets an exception (not swallowed).
Change-Id: I745ca49daa6ca36b1020d518e9f346b52684f2b1
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Prevent unnecessary use of HBM. This change decouples illumination
state from touch state. onFingerUp should always be called whenever
the finger leaves the HBM area, and not only when illumination was
requested (isFingerDown was actually isIlluminationRequested()).
Moves the check to onFingerUp to stop illumination only if illumination
was actually happening.
Bug: 187460696
Test: atest UdfpsControllerTest
Change-Id: I2eebe32990761d2fbf86cab228e4a7221a209b42
OutputConfiguration.writeToParcel previously used writeList to parcel
the List<Integer> mSensorPixelModesUsed. The Integer list read from a
Parcel into a vector of int32_ts in cameraserver native code, doesn't get read correctly
(values sent are not the ones received).
Therefore, instead we explicitly convert the Integer list into an int[]
before parcelling using writeIntArray. We also explicitly use
readInt32Vector on the native side in readFromParcel now.
Bug: 184396641
Test: atest RobustnessTest.java#testConfigureInvalidSensorPixelModes
Change-Id: Ie0a8d0da2f89c959df6a3529d4836889e235fa93
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Fixes: 188912467
Test: Modify HAL to send above constants. No longer see
"Unknown enrollment acquired message" in logcat
Change-Id: I286465dae550fa123fef785879084e86081f2b43
Tests can still fail due to flakiness in cleanup (main cause seems to be stale enrollments).
Fix: 187250205
Test: atest CtsBiometricsTestCases
Change-Id: I3e379322277cde984f5a0112d38db60b9c6e360d
Add capabilities of MONO, RGB and PLAYER_ID to
android.hardware.lights.Light, and the APIs to query the capabilities.
Bug: 181743615
Test: atest InputDeviceLightsManagerTest, atest LightsManagerTest, atest android.hardware.input.cts.tests
Change-Id: I266c83584d63815e1a71897e5975d6c13e8543bb
If a listener can be registered for multiple sensors they should be able
to be removed individually.
Test: Build
Bug: 181681375
Change-Id: I04b867de8140adc8db0137e7d13c0f8d1a966a5e
Configure side-fps devices to display a indicator for the fingerprint
sensor location during fps-related events (enrollment, auth, etc)
Test: Observe indicator behavior during fingerprint enrollment
Bug: 186470722
Change-Id: I353ec22a239a01edc5cc3dbf0e3c6d80faa2a0e9
Prevents operations that happen in rapid succession from failing.
Fix: 185969412
Test: atest com.android.server.biometrics
Test: manual enroll/delete multiple times on device
Change-Id: I20f19c13ec545884c3ed0c91e103f27927413737
Add a new private window attribute for allowing apps to specify the max
display refresh rate. This is useful for use cases such as keyguard
where the refresh rate should be limited to preserve power.
In the next CLs the preferredDiplayModeId would be enabled for
frame rate override (60-on-120) and the preferredMaxDisplayRefreshRate
would be the alternative to control the display refresh rate (as opposed
to the frame rate experienced by the app).
Test: atest RefreshRatePolicyTest
Test: atest DisplayModeDirectorTest
Test: Launch camera app and observe refresh rate
Bug: 183226498
Change-Id: I1c5e9f6047cbea4bfb581251b8dd2b9058b3e378
This reverts commit 8b82086722.
Reason for revert: Metrics no-longer needed, we are adding compat for this.
Bug: 187153492
Test: N/A
Change-Id: I31bbe36378a2da969a094405b0e0a7b7b9cde3a0
Reduces the need for each code that needs to know about fold/unfold from
duplicating the exact same code.
Bug: 184795211
Test: They pass!
Change-Id: Ic05a2067c2ec64db7dab0227a7204283c1144a5f
Add a listener to know when HDR layers are present on displays
which support HBM.
Pass both HDR and SDR brightness requests from DPC to
SurfaceFlinger. Lots and lots of scaffolding for this.
Bug: 175321409
Bug: 175821789
Test: atest com.android.server.display
Test: Manually verify that brightness levels are correct when in high
lux and HDR, low lux and HDR, and various luxes without HDR.
Change-Id: I530299455a7745fd57d44b1e8b20477674894e21
Rename Battery to BatteryState, and rename the method hasBattery to
isPresent.
Return NaN in getCapacity() if capacity can not be read.
Bug: 180733860
Test: atest android.hardware.input.cts.tests
Change-Id: I8e855be0b263479c2744b817df5f591c9d1e4a64
Previous behavior:
1. Detect a valid touch.
2. Enable HBM.
3. Notify the HAL about onPointerDown when HBM is enabled.
New behavior:
1. Detect a valid touch and report onPointerDown right away.
2. Enable HBM.
3. Notify the HAL about onUiReady when HBM is enabled.
Bug: 184361899
Test: atest UdfpsControllerTest
Test: on device
Change-Id: I48aa3945902a8ca151aabe61a5e71e910773bd88
BiometricManager runs in the app, not in system server, so use
the appropriate call to look up the current user.
Test: aosp/1686345
Bug: 163866361
Change-Id: I10c1ddacf14bd6b77ecfc1cb8235c42b8a7fbcfe
Allow the caller to get authenticator IDs for a specific UID. If
that UID is not the caller UID the USE_BIOMETRIC_INTERNAL permission
is required; this is enforced by AuthService.
Test: aosp/1686345
Bug: 163866361
Merged-In: I0eef28ecefb85f1c10a73a354d08c38087d59814
Change-Id: I0eef28ecefb85f1c10a73a354d08c38087d59814