Commit Graph

4398 Commits

Author SHA1 Message Date
Haining Chen
82a38b099e Merge "Add biometric component info and face type into SensorPropertiesInternal" into sc-dev 2021-03-19 03:49:10 +00:00
Shuzhen Wang
6001ff0cd1 Merge "Camera: Fix a doc typo" into sc-dev 2021-03-18 23:59:21 +00:00
Kevin Chyn
be59c0b015 Merge "Add BiometricPrompt.Builder#setAllowedSensorIds TestApi" into sc-dev 2021-03-18 23:55:00 +00:00
Ilya Matyukhin
2ce0a3739d Merge changes from topic "implement-lhbm" into sc-dev
* changes:
  Introduce IUdfpsHbmListener
  Implement LHBM/GHBM switch
2021-03-18 21:27:21 +00:00
Kevin Chyn
f8e775a357 Add BiometricPrompt.Builder#setAllowedSensorIds TestApi
Bug: 163058911
Test: atest CtsBiometricsTestCases
Change-Id: I7007e6f9803051b43d4d4909e210f3b6013b5538
2021-03-18 12:58:10 -07:00
Shuzhen Wang
2146f286b1 Camera: Fix a doc typo
Test: Build
Bug: 183123446
Change-Id: Ie6aebab3164a43df3851a677b43462753f780916
2021-03-18 18:59:05 +00:00
Anthony Stange
07033a219d Merge "Modify logic handling denied auth state" into sc-dev 2021-03-18 16:24:01 +00:00
Ilya Matyukhin
0f75ed396f Introduce IUdfpsHbmListener
Bug: 181682258
Test: atest CommandQueueTest
Change-Id: Ia03b845ff036d7267a5dfb5691da33562fda2aab
2021-03-18 12:38:08 +00:00
Kevin Chyn
f8ec6f3881 Merge "Biometric time-based resetLockout for multi-biometric devices" into sc-dev 2021-03-18 06:49:37 +00:00
Kevin Chyn
42968075d6 Biometric time-based resetLockout for multi-biometric devices
On devices with multiple sensors, lockout should be reset whenever
any strong sensor authenticates.

Bug: 163058911
Test: atest CtsBiometricsTestCases

Change-Id: I4bcdc0279cdaa444e59cf0fac6645d9a67e7d11d
2021-03-17 21:45:42 -07:00
Haining Chen
d04a1619c0 Add biometric component info and face type into SensorPropertiesInternal
Bug: 156024031

Test: m -j test-api-stubs-docs-non-updatable-update-current-api
Test: m -j
Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics
Change-Id: I527713b6c87a3d49e28aed09ed6c74df4b5db175
2021-03-17 16:10:18 -07:00
Shuzhen Wang
4683b6b8e8 Camera: Address some API review comments for MultiResolutionImageReader
- Remove MultiResolutioImageReader.newInstance. Use constructor instead.
- Add IntRange annotation in MultiResolutionStreamInfo class.

Test: Build
Bug: 182370111
Bug: 182914897
Change-Id: Ic711750fbaa433f3392b4eafa91e240518b19586
2021-03-17 23:01:06 +00:00
Anthony Stange
ef7bb78612 Modify logic handling denied auth state
To mesh with how other parts of the framework handle apps using APIs
when they are denied, ContextHubClientBroker should throw a security
exception when clients are in the denied authorization state rather than
returning a new error code. This is only enabled for clients targeting
S+. All other clients will receive an error code present before S
denoting an unknown error occurs so that they don't have to handle a new
exception.

Fixes: 181350407
Test: Run PTS
Change-Id: Icf828bb1c34797cf2c65a8adeb92eb83db3aaea6
2021-03-17 13:43:16 +00:00
Fiona Campbell
47f60213ec Merge "Add DisplayId to BrightnessTracker" into sc-dev 2021-03-16 08:29:12 +00:00
Kevin Chyn
a372cb1c84 Add resetLockoutRequiresChallenge property
IFace and IFingerprint AIDL interfaces do not require challenge
for resetLockout. Rather, they are time-based. See the HAL interface
for more details.

Bug: 182327296
Test: reset lockout on Pixel4
Test: atest com.android.systemui
Test: atest com.android.server.biometrics
Change-Id: Ibf1130d77e714d15fb9eccd3175027a28de08f7b
2021-03-15 19:14:34 -07:00
Kevin Chyn
dd77d27c13 Update lockout-related properties for easier understandability
1) resetLockoutRequiresHardwareAuthToken is moved to the base
   SensorPropertiesinternal class, despite face always requiring
   it. This will be clearer, since we are further splitting
   resetLockout logic into "challenge-required" (IBiometricsFace@1.0)
   and "challenge-less" (IFace@1.0) It would be weird to have
   a "resetLockoutRequiresChallenge" property without a
   "resetLockoutRequiresHardwareAuthToken" property.

2) Will be adding a resetLockoutRequiresChallenge to
   SensorPropertiesInternal in the next CL.

Bug: 182327296
Test: reset lockout on Pixel4
Change-Id: Ifa4b36dc42d91e967506a59d2880f47f61ec6cdf
2021-03-15 16:56:04 -07:00
Fiona Campbell
69a1db09f9 Add DisplayId to BrightnessTracker
BrightnessTracker is now global.
Pass in the physicaldisplayid of the primary display device of the
logical display that the display power controller is associated with.
This is so that we can determine the brightness changes for each
physical screen.

Bug: 181767734
Test: manual
Change-Id: Iaebb12ec5fe7785545374cc639d7a345ca469db8
2021-03-15 10:55:36 +00:00
Anh Pham
f66ec9e50d Merge "Fix a typo in the word "permission"." into sc-dev 2021-03-12 08:34:38 +00:00
TreeHugger Robot
706c23e63f Merge "Add SensorPrivacyManagerInternal api for system server usage" into sc-dev 2021-03-12 01:38:39 +00:00
Evan Severson
57edea38ad Add SensorPrivacyManagerInternal api for system server usage
This adds calls that are easier to use for services and providers which
may multiuser aware.

Bug: 162549680
Test: Added callback to another service

Change-Id: Ie8c5c046cd31ae82b89206849a8983d60f0d66c5
2021-03-11 13:49:59 -08:00
Anthony Stange
8dd9281195 Clear up authorization state docs
- Indicates which int values can be sent via the
EXTRA_CLIENT_AUTHORIZATION_STATE extra

- Explicitly mentions how much time clients have to clean up their state
with a nanoapp so there's no ambiguity.

Fixes: 181350428
Test: presubmits
Change-Id: Id39c233b8678450e3c7687ed2bcb1c1f4516f8d7
2021-03-11 17:39:05 +00:00
Michal Olech
9a49890e69 Merge "[CEC Configuration] Add @SystemApi for all remaining settings" into sc-dev 2021-03-11 15:45:57 +00:00
Beverly Tai
384db6dd05 Merge "Add quickpickup gesture" into sc-dev 2021-03-11 13:35:56 +00:00
Anh Pham
14a8169cbc Fix a typo in the word "permission".
Test: atest CtsSensorRatePermissionTestCases
Bug: 136069189
Bug: 182432102
Change-Id: Iec65c5a7e81cd9f8672d10d2b627f282c11a57b8
2021-03-11 13:08:24 +01:00
Kevin Chyn
9a8cfc21f2 Merge changes from topics "fp-revokeChallenge", "new-revokeChallenge" into sc-dev
* changes:
  Consolidate FingerprintManager revokeChallenge
  Consolidate revokeChallenge methods
2021-03-11 01:14:15 +00:00
Beverly
c0ddb20d17 Add quickpickup gesture
Only registered when:
- udfps enrolled
- AOD is not enabled
- quickpick enabled:
    adb shell settings put secure doze_quick_pickup_gesture 1
Currently by default, quickpickup is not enabled

On gesture trigger, AOD screen will show for 5 seconds

Test: manual
Bug: 176550666
Change-Id: I804a2590c1d95acad62fbfbc85228ecfc8bfa3ed
2021-03-10 19:00:24 +00:00
Jimmy Chen
4a05d13227 Merge "wifidisplay: restrict broadcast by the proper permission" into sc-dev 2021-03-10 15:59:10 +00:00
Kevin Chyn
817be68013 Consolidate FingerprintManager revokeChallenge
Bug: 181977689
Test: inspect logs
Change-Id: Ie26d49b4feda627964358166100f53a41b5fee20
2021-03-09 17:17:45 -08:00
Kevin Chyn
b6d71bb083 Consolidate revokeChallenge methods
Fixes: 181977689
Test: manual
Change-Id: Id26588836535f03566d93f073ef73cde946272b2
2021-03-09 16:29:11 -08:00
TreeHugger Robot
5ef41d061b Merge "Camera: Don't switch image callbacks during extension sessions" into sc-dev 2021-03-09 21:16:39 +00:00
Michal Olech
f27ff73b66 [CEC Configuration] Add @SystemApi for all remaining settings
Bug: 171958586
Test: atest android.hardware.hdmi.cts.HdmiControlManagerTest
Change-Id: I71ec942c6a7f4b28c6d60ee7f4106ed68fdcad3c
2021-03-09 15:51:50 +01:00
Bernardo Rufino
11687fae2c Merge "Annotate obscuring opacity getter/setter w/ @FloatRange" into sc-dev 2021-03-09 14:18:28 +00:00
Jimmy Chen
1d4c97ff47 wifidisplay: restrict broadcast by the proper permission
WIFI_DISPLAY_STATUS_CHANGED event contains the MAC address of peers.
As the MAC address is PII data, this should be restricted by proper
permission.

Bug: 176541017
Test: install PoC in b/176541017 and check PII data is not leaked.
Change-Id: I36b85f44678fe232486702fa009f5f06d1a7af75
2021-03-09 20:34:39 +08: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