Commit Graph

4422 Commits

Author SHA1 Message Date
Kriti Dang
7010f95cb2 Hdr format settings [Backend]
Adding new APIs in display manager to get the user disabled formats, to get the formats
supported by device and get formats reported by display.

Bug: 172905874
Test: N/A
Change-Id: I58a7714f03a3e165bbd22f2fa7a021ad90b41b39
Merged-In: I58a7714f03a3e165bbd22f2fa7a021ad90b41b39
(cherry picked from commit 25f1822005)
2021-03-29 13:21:14 +00:00
Kriti Dang
e713ee6c60 Merge changes from topic "cherrypick-Display settings HDR formats-mumvl547ah" into sc-dev
* changes:
  Handling Number Format Exception in DiscreteValueIntegerListValidator
  Hdr format settings [Backend]
2021-03-28 12:25:32 +00:00
Jayant Chowdhary
76f8061d34 Merge "camera2: Add isUltraHighResolution() to MandatoryStreamInformation." into sc-dev 2021-03-25 20:48:51 +00:00
Kriti Dang
b4775b02a7 Hdr format settings [Backend]
Added new APIs to DisplayManager to set the user disabled HDR formats,
and get/set if user disabled formats should be ignored or not.
These new settings are stored in Settings.Global.
Modified the implementation of Display#getHdrCapabilities to not return
the formats disabled by user.

Bug: 172905874
Test: atest CtsDisplayTestCases
Change-Id: I4841af251ee0e4938614b154d0c5239814ea7cd9
Merged-In: I4841af251ee0e4938614b154d0c5239814ea7cd9
2021-03-25 12:41:35 +00:00
Fiona Campbell
acc5fbcb39 Merge "Store Brightness Per Display" into sc-dev 2021-03-25 08:40:15 +00:00
Jayant Chowdhary
ceaf98edc1 camera2: Add isUltraHighResolution() to MandatoryStreamInformation.
Bug: 152813564

Test: builds; RobustnessTest.java (basic validity)

Change-Id: I16dbf3054d3c4bc23996f6b91b5f51c29c887026
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-03-25 00:40:52 -07:00
Evan Rosky
660eb72df8 Merge "Add reporting to monitor apps incorrectly using getRaw" into sc-dev 2021-03-25 02:10:05 +00:00
Jayant Chowdhary
fc314c712b Merge "camera2: Add support for quad bayer sensors." into sc-dev 2021-03-24 21:37:01 +00:00
Fiona Campbell
9320191858 Store Brightness Per Display
This changes stores a brightness value per display.

Add brightness value item to persistent data store.
Add BrightnessSettingController to save and retrieve brightnesses.
It is indexed by primary display device of the concerned logical display.
Add method in DisplayManager to expose this.

Bug: 176985835
Bug: 147415200
Bug: 175286226

Test: manual, check "adb shell dumpsys display | grep -A10 Persistent" shows brightness values for each display attached.
Change-Id: Ib8557f8a0f45a5bfb0810967f678015d3f121bb9
2021-03-24 19:34:36 +00:00
Evan Rosky
8b82086722 Add reporting to monitor apps incorrectly using getRaw
getRawX/Y are implementation specific and are always display
relative. If any apps are using this, they should stop unless
the app is specifically trying to handle raw events.

Usage of getRaw will break under: multi-window, size-compat,
letterbox, display-areas, and independent window rotation.

Bug: 179274888
Test: adb shell dumpsys platform_compat
Change-Id: I2d87d0a62d7a28e15811dda7f9d16996e8159f69
2021-03-24 12:17:02 -07:00
Jayant Chowdhary
a69b1bc58b camera2: Add support for quad bayer sensors.
Bug: 152813564

Test: Camera CTS

Change-Id: Ia598aa39768e5f1e7f60705f190be4122fedbe51
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-03-24 04:22:54 -07:00
TreeHugger Robot
54580409da Merge "Fix ContextHubManager docs" into sc-dev 2021-03-19 22:08:13 +00:00
TreeHugger Robot
3d345db0a4 Merge "Add nullability annotations and imports" into sc-dev 2021-03-19 22:00:53 +00:00
Shuzhen Wang
71ca7dff7e Merge "Camera: Fix a removal-while-iterate bug" am: 171249e857 am: f1f504042a am: 7b8379f55d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1643703

Change-Id: I16a4e5430872102f2650845d29f4a7ee7a4c7580
2021-03-19 20:20:07 +00:00
Haining Chen
18e3b6aa9c Add nullability annotations and imports
Bug: 156024031

Test: m -j
Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics
Test: atest CtsBiometricsTestCases
Change-Id: I46a38b6c02452a77c65c3bcb707c5db31c3a4ece
2021-03-19 12:43:57 -07:00
Shuzhen Wang
7b8379f55d Merge "Camera: Fix a removal-while-iterate bug" am: 171249e857 am: f1f504042a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1643703

Change-Id: Ib5a8d564723118065ef7a2b9e971f588f086ea2f
2021-03-19 19:35:38 +00:00
TreeHugger Robot
c3acebab45 Merge "Add eventMask to DM.registerDisplayListener" into sc-dev 2021-03-19 17:39:54 +00:00
Kevin Chyn
2fc40ea719 Merge "Add BiometricPrompt.Builder#setAllowBackgroundAuthentication TestApi" into sc-dev 2021-03-19 17:26:18 +00:00
Anthony Stange
dc7c374c62 Fix ContextHubManager docs
EXTRA_CLIENT_AUTHORIZATION_STATE currently wouldn't have its docs
generated correctly (if they ever need to be). Modify the doc comment to
properly link to the authorization state constants.

Fixes: 181350428
Test: presubmits
Change-Id: Ieee8ecbc4af153e4f42bb47c734c4f042361b332
2021-03-19 16:53:17 +00:00
Marin Shalamanov
204eba6cdc Add eventMask to DM.registerDisplayListener
Add a new parameter to DisplayManager.registDisplayListener
which clients can use to specify in which events
they are interested.

Test: atest DisplayManagerServiceTest
      atest DisplayManagerGlobalTest

Bug: 171240622
Change-Id: Icc71bdd9ddb390bc5406b298a557c84194a53c00
2021-03-19 16:15:11 +01:00
Haining Chen
82a38b099e Merge "Add biometric component info and face type into SensorPropertiesInternal" into sc-dev 2021-03-19 03:49:10 +00:00
Kevin Chyn
8115bfc791 Add BiometricPrompt.Builder#setAllowBackgroundAuthentication TestApi
By default, auth via BiometricPrompt is not allowed unless the
caller is foreground. However, for cases like CTS, which may request
auth from the test itself (and not a test activity, which has no
way of getting access to protected TestApis), auth is requested
from background.

This would also allow us to easily add regression tests for the
security bug b/159249069

Bug: 163058911
Test: atest CtsBiometricsTestCases
Test: atest com.android.server.biometrics
Change-Id: I74bfdcd7989aa9256d1bf10eefae354983b42e6c
2021-03-18 18:52:00 -07: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
Shuzhen Wang
3759c1623d Camera: Fix a removal-while-iterate bug
The onStatusChangedLocked removes entries from the ArrayMap. Needs to
iterate in the reverse order.

Test: Vendor testing
Bug: 182876702
Change-Id: I5891f24a25c83f096d23ca5675126889a7d2a61c
2021-03-17 16:56:43 -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