Commit Graph

4367 Commits

Author SHA1 Message Date
TreeHugger Robot
5ef41d061b Merge "Camera: Don't switch image callbacks during extension sessions" into sc-dev 2021-03-09 21:16:39 +00:00
Bernardo Rufino
11687fae2c Merge "Annotate obscuring opacity getter/setter w/ @FloatRange" into sc-dev 2021-03-09 14:18:28 +00:00
Bernardo Rufino
2ce8b611b1 Annotate obscuring opacity getter/setter w/ @FloatRange
And document accordingly.

Bug: 182215611
Test: Builds
Change-Id: I7727abfba0611e3b56d83d29927ba7052ecb9489
2021-03-09 11:26:59 +00:00
Darryl Johnson
b87e44ce32 Merge "Don't report device state until hardware state is known." into sc-dev 2021-03-09 06:20:01 +00:00
Darryl L Johnson
090b0afb1b Don't report device state until hardware state is known.
The previous implementation of DeviceStateProviderImpl would report the
current device state as soon as a listener was registered leading to a
series of device state changes on boot as the state of the hardware
becomes known. This changes the implementation to await callbacks before
notifying the listener of a change in device state.

Fixes: 181671216
Test: atest DeviceStateProviderImplTest
Test: atest DeviceStateManagerServiceTest
Test: atest DeviceStateManagerGlobalTest

Change-Id: I3f133b6d7135b829b79c9f225ae52c71061faa3e
2021-03-08 18:02:57 -08:00
Kevin Chyn
4c4961ab26 Hide Udfps Overlay together with system transitions
Prevent the UDFPS overlay from showing when system dialogs are
expected to be closed. Since the UDFPS affordances are not
actually shown in the application's window, we should nicely
hide the UDFPS overlay together with the system transitions.

1) Adds IUdfpsOverlayControllerCallback for SysUI to notify
   FingerprintService of per-session events.
2) Adds AcquisitionClient#onUserCanceled, which notifies the
   caller of ERROR_USER_CANCELED, and then cancels the HAL
   request

Bug: 178403701
Test: Enroll, swipe up. UDFPS affordances animate away together
      with the activity. BiometricScheduler logs also indicate
      enrollment canceled.
Test: atest AcquisitionClientTest
Test: atest UdfpsControllerTest

Change-Id: I0b2c9eb20ef0686e426ea12896769e4df077cadb
2021-03-08 11:00:00 -08:00
TreeHugger Robot
466661da29 Merge "Add LightsRequest.Builder#setLight back to SystemApi as Deprecated." into sc-dev 2021-03-05 21:13:31 +00:00
TreeHugger Robot
71ecb60a5a Merge "Camera: Add multi-resolution image reader and reprocessing support" into sc-dev 2021-03-05 20:14:08 +00:00
Chris Ye
65ef0fafea Add LightsRequest.Builder#setLight back to SystemApi as Deprecated.
LightRequest.Builder#setLight was renamed to
LightRequest.Builder#addLight, as metalava check enforce the check for a
getter. ApiChecker CTS test still check the method with API 28, 29, 30 and will fail on:
 missing_method: android.hardware.lights.LightsRequest.Builder#setLight(android.hardware.lights.Light, android.hardware.lights.LightState)  Error: No method with correct signature found.
Add the method back to SystemApi and annotate it as deprecated.

Bug: 181019981
Test: atest android.signature.cts.api.system.SignatureTest#testSignature
Change-Id: Id05f11ad77c01e26e62eaece78ffc875ec5e72df
2021-03-05 09:29:50 -08:00
Curtis Belmonte
02a13d14d5 Merge "Add authenticator-aware string methods to BiometricManager" into sc-dev 2021-03-04 05:42:09 +00:00
Curtis Belmonte
f52c748192 Add authenticator-aware string methods to BiometricManager
Adds methods to BiometricManager to return localized strings that may be
used by apps that utilize biometric authentication. These methods should
provide strings that are appropriate for the specific authenticators
that are present on a device and that will actually be used for
authentication in practice. This should alleviate the issue of apps
needing to use overly broad, less user-friendly strings in order to
cover all possible authentication types that may be used.

Test: atest BiometricManagerTest
Test: Manually checked strings using biometric test app

Bug: 162973174
Bug: 180732913
Change-Id: Icd16d8a3b0339e4a963d47e4eb213fa7df83412c
2021-03-03 13:40:45 -08:00
Ytai Ben-tsvi
6f1e0dddd6 Merge "Support sound models with no data" into sc-dev 2021-03-03 17:56:40 +00:00
Shuzhen Wang
80fc5cad54 Camera: Add multi-resolution image reader and reprocessing support
- Add MultiResolutionImageReader class for variable size image output.
- Add camera characteristics for support multi-resolution output and input
streams.
- Update reprocessing interface doc for variable size support.

Test: atest MultiResolutionImageReaderTest, MultiResolutionReprocessCaptureTest
Bug: 156254356
Change-Id: I913abe38020c224c40903f42b8d45d40b65a5612
2021-03-02 14:27:16 -08:00
Sally Yuen
f6b5277ce2 Merge "Add configurable strength values for Reduce Bright Colors" into sc-dev 2021-03-02 17:38:30 +00:00
Kriti Dang
f2a12691aa Merge "Adding public API to expose DisplayInfo.deviceProductInfo" into sc-dev 2021-03-02 09:19:44 +00:00
Darryl Johnson
e72cce5235 Merge "Add callbacks for change in supported device states and non-override state." into sc-dev 2021-03-01 22:22:06 +00:00
Ytai Ben-Tsvi
e80fd68007 Support sound models with no data
This change allows using SoundModels with null or empty data.

Test: Manual testing of soundtrigger use-cases.
      Testing of null-/empty-data models using SoundTriggerTestService
      and mocked HAL.
Fixes: 181103994
Change-Id: I00b3c4e343a81e9f4f4580becf1128fd3ba60b14
2021-03-01 11:53:52 -08:00
Darryl L Johnson
2c35bdf901 Add callbacks for change in supported device states and non-override
state.

This:
1. Renames DeviceStateListener to DeviceStateCallback as there is more
than one method in the callback.
2. Adds a callback to DeviceStateCallback to notify clients about a
change in supported device states.
3. Adds a callback to DeviceStateCallback to notify clients about a
change in non-override state (the state of the device without
considering override requests).
4. Restructures the IDeviceStateManager callback interface to return a
DeviceStateInfo object on successful registration of the callback
instead of triggering callbacks after registation. This simplifies the
callback code paths.

Bug: 159401801
Bug: 154038218
Fixes: 179291575
Test: atest DeviceStateManagerServiceTest
Test: atest DeviceStateManagerGlobalTest
Test: atest DeviceStateInfoTest

Change-Id: I42841de3e19ec0161a8c7b18c5baac0f2c2548bf
2021-03-01 09:31:22 -08:00
Kevin Chyn
e9e5607415 Merge changes Ib61c9a4f,I308cd691 into sc-dev
* changes:
  Inflate a new UdfpsView for each new operation
  Add defaults to fix fake UDFPS
2021-02-26 21:35:12 +00:00
Vladimir Marko
cce3bb5244 resolve merge conflicts of 6f0d5e0d1b to sc-dev
Test: N/A
Bug: None
Change-Id: I88560c8b73cff8b5dab5f0d53af026651e8952d0
2021-02-26 17:04:21 +00:00
Kriti Dang
af97773335 Adding public API to expose DisplayInfo.deviceProductInfo
Changing class DeviceProductInfo to public class with hidden ctor to expose via
Display#getDeviceProductInfo. Removing the relative address and changing
to connectionToSinkType.

Bug: 179775994
Test: atest CtsDisplayTestCases
Change-Id: I92f32461a054244b75dc4d5ddfd30e9a7968f3dd
2021-02-26 12:37:44 +01:00
Curtis Belmonte
b7bc5bce77 Tweak strings for traffic light face enrollment
Makes the following changes to help messages that will be shown during
traffic light face enrollment:
- Swaps messages for FACE_ACQUIRED_TOO_HIGH and FACE_ACQUIRED_TOO_LOW.
- Changes FACE_ACQUIRED_TILT_TOO_EXTREME message from "turn" to "tilt".

Test: Manually tested traffic light enrollment.

Bug: 179044580
Change-Id: I729cc1ac1909f3181b88d869358a4e9deb6761fd
2021-02-25 17:21:11 -08:00
Emilian Peev
c0880b85d0 Camera: Don't switch image callbacks during extension sessions
- Relying on camera capture callbacks to switch appropriate
  camera output surface image callbacks can result in timing
  issues. For example a capture started callback from a new
  capture request can execute before the sequence complete
  callback gets scheduled for the old request. This can result
  in images from the new request getting redirected to the
  wrong/old callback.
  Avoid this by using a single image callback instance per
  camera output for the entire duration of the capture session
  and allow individual images to be redirected to appropriate
  handlers on a precise timestamp basis.
- Additionally refactor an odd looking if-else case within
  'ImageWriter'.

Bug: 180451857
Bug: 180451435
Test: Camera CTS

Change-Id: Iae497ff2eefacc00ea45ff5e598581156aa64c0d
2021-02-25 16:11:08 -08:00
Kevin Chyn
bdeac8e72e Add defaults to fix fake UDFPS
Bug: 178438459
Test: adb shell settings put secure com.android.server.biometrics.sensors.fingerprint.test_udfps.enable 1
      reboot
Change-Id: I308cd691f3b5ad4647073b19d692b7502ad8b4ca
2021-02-25 10:49:45 -08:00
Evan Severson
445abca30e Merge "Expose SensorPrivacy as SystemApi" into sc-dev 2021-02-25 18:29:43 +00:00
Ytai Ben-tsvi
6f0d5e0d1b Merge "Add ytai@ as OWNER of soundtrigger-related dirs" am: 29cfbb1a50 am: a2c4396579
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1603659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibb454376c644ffe0f1bf6c53a74d1c08c56f6ea7
2021-02-25 00:10:29 +00:00
Evan Severson
0f9d5aea50 Expose SensorPrivacy as SystemApi
Rename the apis to be more consistent.
Also expose to test api.
Have the aosp mark that it supports the toggle features by default.

Test: atest CtsSensorPrivacyTestCases
Bug: 162549680

Change-Id: Ib38c16adfc5cec931347e1a1891618983d78248b
2021-02-24 15:39:19 -08:00
Curtis Belmonte
075cee61d4 Merge "Fix string for face auth positional help messages" into sc-dev 2021-02-24 23:11:46 +00:00
Ytai Ben-tsvi
a2c4396579 Merge "Add ytai@ as OWNER of soundtrigger-related dirs" am: 29cfbb1a50
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1603659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I611305c07c10336ac15a6c0cf1e13733fc9134f4
2021-02-24 22:58:32 +00:00
sallyyuen
57733d9be8 Add configurable strength values for Reduce Bright Colors
Test: atest FrameworkServicesTests:ReduceBrightColorsTintControllerTest,
atest FrameworksServicesTests:ColorDisplayServiceTest

 Bug: b/179805222

Change-Id: I70bfedd9d2226abac2a2cb6952ffb835ea8891d5
2021-02-24 13:58:49 -08:00
Ytai Ben-Tsvi
233f1a159b Add ytai@ as OWNER of soundtrigger-related dirs
Change-Id: Ie1ab78515c6f1c7cb444752a0623cb6f701d0410
2021-02-24 09:50:21 -08:00
Anton Hansson
eaeaf0acac Merge "Revert "Adding public API to expose DisplayInfo.deviceProductInfo"" into sc-dev 2021-02-24 12:27:18 +00:00
TreeHugger Robot
e40cc0a9d2 Merge "Fix possible NPE when matching accessory version" into rvc-qpr-dev am: 01f8961bce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13671451

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5379f67519077a60ac692babb18ba74a6ab23cb6
2021-02-24 08:15:20 +00:00
Kevin Chyn
eef75a4842 Merge "Add re-enrollment notification for face AIDL" into sc-dev 2021-02-24 03:17:15 +00:00
Michael Wright
69a0c089e9 Merge "Consolidate OWNERS for input" am: 471c70287e am: 916d84985b am: 863092a877
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1600293

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I83f41b7b86208b6ada82728c08043e76f57ac44a
2021-02-24 00:23:09 +00:00
Kevin Chyn
7b6dd6a64c Add re-enrollment notification for face AIDL
1) Move re-enrollment logic to its own class
2) Show / clear the notification when appropriate for face AIDL

Fixes: 180652977
Test: manual
Change-Id: I85b386be132974cda6e6e973b244f3cb8300c291
2021-02-23 16:12:27 -08:00
Michael Wright
916d84985b Merge "Consolidate OWNERS for input" am: 471c70287e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1600293

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I365e6075c104f327331e08fc642c74d0050c21b5
2021-02-24 00:10:55 +00:00
TreeHugger Robot
360c3626e9 Merge "Camera2: Add jpeg encoding support for all camera extensions" into sc-dev 2021-02-23 21:48:35 +00:00
Curtis Belmonte
1674d0da7d Fix string for face auth positional help messages
Test: Manual

Bug: 179044580
Change-Id: If4bcc6c1feafb7af385344108fe977ed35d10d2b
2021-02-23 13:41:27 -08:00
Ulyana Trafimovich
d6bff72799 Revert "Adding public API to expose DisplayInfo.deviceProductInfo"
Revert "Adding aidl file to share deviceProductInfo constants bw..."

Revert "Changes in tvsystem/ DeviceProductInfo to mirror changes..."

Revert "Adding new CTS test for the API display#getDeviceProductInfo"

Revert submission 13552775-expose DisplayInfo.deviceProductInfo

Reason for revert: broken test android.compat.sjp.cts.StrictJavaPackagesTest#testBootClassPathAndSystemServerClasspath_nonDuplicateClasses
    on git_sc-dev on cf_x86_64_phone-userdebug at 7162420

Bug: 181021245

Reverted Changes:
Id6767127f:Adding aidl file to share deviceProductInfo consta...
I6959d2829:Adding public API to expose DisplayInfo.deviceProd...
I720dbfe84:Adding new CTS test for the API display#getDeviceP...
I6c726e12c:Changes in tvsystem/ DeviceProductInfo to mirror c...

Change-Id: I4c8545c651d1e399ed3ca5061d1ef5f526c3929a
2021-02-23 17:14:58 +00:00
Sean Stout
303e58eebf Merge "Request power state updates for individual DisplayGroups" into sc-dev 2021-02-23 11:21:15 +00:00
Daniel Peykov
41802905f9 Fix possible NPE when matching accessory version
As UsbAccessory#getVersion is nullable, a NPE can occur if the manufacturer/model match.

Bug: 172002066
Bug: 178227159
Bug: 180055624
Change-Id: I751a01e3d182e01e5a9dbc011b60535997f9bc15
(cherry picked from commit 25dca30e2f)
2021-02-23 09:11:52 +00:00
Chris Ye
98580a2e82 Merge changes from topic "LightsManager" into sc-dev
* changes:
  Support input device lights manager feature in frameworks.
  Add SET_REPORT data output to hid commandline tool.
2021-02-23 08:19:13 +00:00
Sean Stout
0e9bb71eda Request power state updates for individual DisplayGroups
Update PowerManagerService to track and update the power state of
DisplayGroups individually.

This allows for different Displays to be on or off instead of needing to
all share the same power state.

Bug: 138328918
Test: atest FrameworksServicesTests:PowerManagerServiceTest
Change-Id: Ia32039415863ba745c7de2fba55bf25e68de4d15
2021-02-22 23:18:42 -08:00
Michael Wright
471c70287e Merge "Consolidate OWNERS for input" 2021-02-23 00:11:44 +00:00
Chris Ye
cbb480c25e Support input device lights manager feature in frameworks.
Add lights manager support to input frameworks.

Bug: 161633625
Test: atest LightsManagerTest, atest InputDeviceLightsManagerTest
Change-Id: Ic6c701cad84f277325583c77195592d96d9296b8
2021-02-22 16:06:35 -08:00
Michael Wright
bea28e9f39 Consolidate OWNERS for input
Bug: N/A
Test: N/A
Change-Id: Ib1b3172575b50fbd3869e173d3a751864600173a
2021-02-22 23:30:08 +00:00
TreeHugger Robot
4226338442 Merge "Plumb attribution tag from Sensor Manager" into sc-dev 2021-02-22 18:20:36 +00:00
Kriti Dang
bcd8ea64de Merge "Adding public API to expose DisplayInfo.deviceProductInfo" into sc-dev 2021-02-22 13:31:42 +00:00
Xin Li
be473bf819 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559
2021-02-21 09:39:53 -08:00