Commit Graph

4618 Commits

Author SHA1 Message Date
Joshua Mccloskey
7580fad2fd Added fingerprint acquired too bright
Test: Manually verified too too bright acquired message appears
on keyguard.
Bug: 191954958

Change-Id: I679acf4f4fd07f0a6d7d8f05a89bc239ff117fbe
2021-06-29 12:15:18 -07:00
TreeHugger Robot
efb3fafeff Merge "Camera: Disallow concurrent extension sessions" into sc-dev 2021-06-28 18:31:16 +00:00
Joshua Mccloskey
c3ecb5fffb Added fingerprint bad calibration notification
Test: Verified notification shows upon receiving error message and
disappears after enrollment.
Bug: 189133688

Change-Id: I6552326c9d9d2078fc39163be45524b3da7d00d8
2021-06-24 16:32:59 -07:00
Emilian Peev
876e6afd6c Camera: Disallow concurrent extension sessions
Support for concurrent extension processing sessions
is not yet mandated. To avoid inconsistent behavior
across devices, explicitly document and disallow
concurrent extension sessions at the framework level.

Bug: 187341271
Test: Manual using test application,
Camera CTS

Change-Id: Ibff194c58bbb37e884c27151a2a27fb21e3db928
2021-06-24 15:33:35 -07:00
Anh Pham
3e244be4e9 Merge "Update API doc w/ high-rate permission requirement" into sc-dev 2021-06-24 06:22:24 +00:00
TreeHugger Robot
81419f4be3 Merge "Camera: Switch camera extension proxy service package name" into sc-dev 2021-06-23 18:55:59 +00:00
Anh Pham
629ba4958e Update API doc w/ high-rate permission requirement
Test: Build successfully
Bug: 191301110
Change-Id: I653036036bea0e2889807ec44ed98206a427dfb8
2021-06-23 19:49:50 +02:00
TreeHugger Robot
64e22ca06d Merge "Added fingerprint acquire immobile message" into sc-dev 2021-06-22 19:28:04 +00:00
TreeHugger Robot
55a8db6450 Merge "Split long vibration composition using HAL limits" into sc-dev 2021-06-22 16:08:22 +00:00
Lais Andrade
a1167c2a06 Split long vibration composition using HAL limits
Load composition and pwle limits from the HAL and apply them on
VibrationThread to split long vibrations in multiple calls.

This ensures that long vibration will be performed by the HAL.

Bug: 188431691
Fix: 183517124
Test: VibrationThreadTest & VibrationInfoTest
Change-Id: I09a04c7b1de331320d453899f59b01e4bbb42ac3
2021-06-22 15:36:23 +01:00
Santos Cordon
410dd5be58 Merge "High Brightness Mode (HBM) Refresh Rate Limiting." into sc-dev 2021-06-22 11:23:02 +00:00
Joshua Mccloskey
ef9f87c635 Added fingerprint acquire immobile message
Test: Verified string shows up during enrollment.
Fixes: 189803387
Change-Id: Ia7f2308b368091cbbe299ec3845de8957ed56fd6
2021-06-21 21:02:28 -07:00
Joshua Mccloskey
95b8d4bc80 Merge "Added fingerprint_bad_calibration." into sc-dev 2021-06-21 20:41:01 +00:00
Santos Cordon
816b80e883 High Brightness Mode (HBM) Refresh Rate Limiting.
Defines refresh-rate limits for high-brightness-mode in display-config
xml files. DisplayModeDirector listens to HBM status changes from
DisplayManager and applies the pre-defined refresh-rate limits when HBM
is enabled.

Test: Manual, verify a Refresh Rate vote when HBM is enabled, and a
      null-vote when disabled.
Test: atest com.android.server.display
Bug: 181955334
Change-Id: Id642cbff96fca9ce79a50d6cd97e75cd6061ac74
2021-06-18 20:23:56 +01:00
Joshua Mccloskey
acf6fdf0ff Added fingerprint_bad_calibration.
Test: Verified error message shows up during enrollment.
Bug: 189133688
Change-Id: I36737bd3b8ab5f445eac98ec40e7c9ba8e2dd2ee
2021-06-18 11:42:14 -07:00
TreeHugger Robot
4ed9ab51ff Merge "Camera: Pass an executor during the extension characteristics service bind call" into sc-dev 2021-06-18 00:15:36 +00:00
Santos Cordon
fa51515513 Merge "Specify refresh rate limits for sensors in config." into sc-dev 2021-06-18 00:05:09 +00:00
Diego Wilson
b4d7c251cd Merge "Add an option for vendors to provide a camera extensions proxy" into sc-dev 2021-06-17 23:16:34 +00:00
TreeHugger Robot
59239bf794 Merge "Camera: Pass targetSdkVersion to camera service APIs" into sc-dev 2021-06-17 22:51:39 +00:00
Karthik Bharadwaj
5f9e20b375 Merge "Update code comments to mention sensor name uniqueness." into sc-dev 2021-06-17 21:41:18 +00:00
Santos Cordon
8a3115ba6e Specify refresh rate limits for sensors in config.
Some sensors can limit the range of supported refresh rate when
enabled. This change adds a way to specify that limit withing the
display device config file.

Bug: 175793106
Test: Verify that when sensor is enabled, there is an additional
      refresh rate vote for the rate specified in config file.
Test: atest DisplayModeDirectorTest, LocalDisplayAdapterTest
Change-Id: Id210c25fe56cd5353a2436b9b97f2ad01980e465
2021-06-17 21:34:05 +01:00
Diego Wilson
f10bf6d66e Add an option for vendors to provide a camera extensions proxy
Test: build and run Camera2ExtensionsBasic
Bug: 183533362
Change-Id: I250db33288f62808a9a8d883c0a5f27e9c425f6e
2021-06-17 19:55:02 +00:00
karthik bharadwaj
8f886322ae Update code comments to mention sensor name uniqueness.
Bug: 179076515
Test: N/A
Change-Id: I906000864a14acd1dcd364ad71c4dde5233dd700
2021-06-17 12:18:48 -07:00
Kevin Chyn
c3e64b14c5 Merge "Add BiometricActionDisabledByAdminController" into sc-dev 2021-06-17 01:27:03 +00:00
Kevin Chyn
4e84b8849a Add BiometricActionDisabledByAdminController
1) Adds UserManager#DISALLOW_BIOMETRIC. We actually need to
   pass a restriction from settings to ActionDisabledByAdmin area,
   otherwise the biometric-specific dialog would be shown outside of
   biometric flows.
2) Adds an interface to ActionDisabledByAdminController to return a
   optional OnClickListener for the positive dialog button
3) Returns an instance of the biometric controller when conditions
   are met
4) Adds string interfaces to DeviceAdminStringProvider to retrieve
   biometric-specific strings

Bug: 188847063
Bug: 191306258
Test: manual

Change-Id: Iaeffdeb1336d5db56d464104cdc7677b9021f609
2021-06-16 16:41:14 -07:00
Kevin Chyn
5c7cdbb8f5 Merge "Refactor/Move isTestModeEnabled to frameworks/base" into sc-dev 2021-06-16 07:55:01 +00:00
Kevin Chyn
ffc5989fd3 Merge "Move non-settings-specific logic to frameworks/base" into sc-dev 2021-06-16 06:13:17 +00:00
Kevin Chyn
c0c3e583c1 Refactor/Move isTestModeEnabled to frameworks/base
ActionDisabledByAdminControllerFactory is also in frameworks/base,
and should take test mode into consideration.

Bug: 188847063
Test: atest ParentalControlsUtilsTest
Change-Id: I0195478606361aa8b6406376d96b2fc219d9cc4d
2021-06-15 17:14:49 -07:00
Emilian Peev
a250cbc60f Camera: Switch camera extension proxy service package name
The current service package name is somewhat generic. To avoid
any potential name clashes, include the word 'extensions'.

Bug: 191192321
Test: Camera CTS
Change-Id: Ib89c455bcadc2c7c888ababd077d4deebe3e8d14
2021-06-15 16:16:31 -07:00
Emilian Peev
0b0c9dc844 Camera: Pass an executor during the extension characteristics service bind call
Camera extensions characteristics will bind to the camera extensions
proxy service without passing a dedicated executor for the connection
callbacks. In this case, the callbacks will be called in the main thread
which can be problematic for clients using the same thread.

Bug: 191192317
Test: Camera CTS
Change-Id: Ic952edd766d26016b6203c84d067a6b1061ed090
2021-06-15 16:14:46 -07:00
Kevin Chyn
e35911fad6 Move non-settings-specific logic to frameworks/base
The dialog that's shown when admin disables functionality lives in
frameworks/base. This change extracts common logic required there
into frameworks/base.

Bug: 188847063
Test: atest ParentalControlsUtilsTest
Change-Id: I9aa9f5664e04a226d2c30a72585bebeb8645494b
2021-06-15 12:02:31 -07:00
TreeHugger Robot
39e1e04a04 Merge "Disable screenOffUdfps by default" into sc-dev 2021-06-15 17:42:50 +00:00
TreeHugger Robot
280db03351 Merge "Camera: Add black test pattern mode for privacy" into sc-dev 2021-06-15 17:29:19 +00:00
Jayant Chowdhary
a0c39535ac Merge changes from topic "OutputConfigurationParcel" into sc-dev
* changes:
  OutputConfiguration: fix CREATOR readList for sensor pixel modes.
  camera2: Fix exception swallowing in params classes createFromParcel
2021-06-15 00:49:30 +00:00
TreeHugger Robot
88be1435e1 Merge "Camera: Various Camera2 extension updates" into sc-dev 2021-06-14 18:29:34 +00:00
Anh Pham
e55a9d9036 Merge "Throw Exception only if sensors are in capped set." into sc-dev 2021-06-14 08:04:42 +00:00
Shuzhen Wang
0317ae8469 Camera: Pass targetSdkVersion to camera service APIs
This is needed to filter out small JPEG sizes based on targetSdkVersion
to maintain backward compatibility.

Test: Camera CTS
Bug: 187913092
Change-Id: I75bbb4d6130df62c32b01de862ad1b79fcdb7b63
2021-06-11 12:14:05 -07:00
Ady Abraham
00eb127ef0 Don't call setFrameRate if refresh rate switching is disabled
When refresh rate switching is set to SWITCHING_TYPE_NONE, DisplayManager
limits the refresh rate to a single value. Calling setFrameRate to SF
is redundant and causes unnecessary duplicate events.

Bug: 189174620
Bug: 189191861
Test: atest SetFrameRateTest
Test: atest FrameRateOverrideHostTest
Test: atest ChoreographerNativeTest
Test: atest FrameRateSelectionPriorityTests
Change-Id: I77ca430555c57c13a6e36707b344537deee5c2d7
2021-06-11 15:30:20 +00:00
Ady Abraham
71b6267599 DisplayManagerGlobal: suppress redundant AChoreographer_refreshRateCallback calls
With Frame Rate Override enabled, an app could get an
AChoreographer_refreshRateCallback callbacks which seem redundant.
An example would be:
1. Display changed refresh rate to 60Hz - callback
2. App's frame rate override changed to 60Hz - callback

To avoid sending these redundant callbacks, DisplayManagerGlobal caches
the last DisplayInfo that was reported to the app and based on it, it
decides whether to send the event or not.

Bug: 184588343
Bug: 189174620
Test: atest SetFrameRateTest
Test: atest FrameRateOverrideHostTest
Test: atest ChoreographerNativeTest
Change-Id: Ia0278e98d06bc790810c31dcda8244181e8e1d5d
2021-06-11 15:30:13 +00:00
Anh Pham
e8d18853de Throw Exception only if sensors are in capped set.
Test: atest CtsSensorTestCases CtsSensorRatePermissionTestCases
Bug: 190567703
Change-Id: Ic35228c1d2e244c2dcaf252ae106f5d4f693b35b
2021-06-11 16:17:18 +02:00
Jayant Chowdhary
ebbb0ce800 OutputConfiguration: fix CREATOR readList for sensor pixel modes.
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>
2021-06-10 23:52:37 -07:00
Jayant Chowdhary
6b0bcd60c8 camera2: Fix exception swallowing in params classes createFromParcel
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>
2021-06-10 11:44:27 -07:00
Emilian Peev
715da5dd93 Camera: Various Camera2 extension updates
Update Camera2 extensions to:
 - Query advanced API support
 - Be able to query latency ranges when using
   legacy extensions
 - Trigger the camera extension initializer
   for both the legacy and advanced cases

Bug: 188579227
Test: Camera CTS

Change-Id: I8db505d0c649f6c664f60c1c1e3cd17de54abe3a
2021-06-09 16:11:03 -07:00
Beverly
70b67c0390 Disable screenOffUdfps by default
- By default, udfps cannot be triggered from screen off (aod disabled)
- To enable udfps to be triggered from screen off, use the following adb
command: `adb shell settings put secure screen_off_udfps_enabled 1` and
re-enter doze

- On AOD: on udfps failure, stay in AOD 2 (do not go to the lock
screen). This reverts ag/14021076. The cancelAodInterrupts were
redundant, since these are taken care of by
FingerprintAuthenticationClient.

Fixes: 190526395
Fixes: 189956809
Test: manual
Change-Id: Ife8aa2ce5f509b6923b8e8dbe229653cd285b852
2021-06-09 18:23:09 +00:00
Joe Bolinger
9f685a9fa7 Fix feedback and animations for face to fingerprint fallback authentication.
Bug: 189164072
Test: atest com.android.systemui.biometrics com.android.server.biometrics
Change-Id: I7fe8085dc4a4994c591bb4be20309ffb46bb06e9
2021-06-03 14:41:29 -07:00
Kevin Chyn
bc77821e7d Merge changes I2eebe329,I81f1dfc1 into sc-dev
* changes:
  Turn off HBM when AcquiredInfo#GOOD
  Do not handle requests on system_server thread
2021-06-02 20:06:11 +00:00
TreeHugger Robot
1cdc8379a8 Merge "camera2: Fix parcelling of sensor pixel modes." into sc-dev 2021-06-02 19:10:53 +00:00
Kevin Chyn
f6ff170d53 Turn off HBM when AcquiredInfo#GOOD
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
2021-06-02 09:29:35 -07:00
Eino-Ville Talvala
db73d5d6ba Camera: Add black test pattern mode for privacy
Add an enum value for test pattern BLACK, to be used with
camera muting on devices that can't implement the full
SOLID_COLOR test pattern API.

Also include it in test API to ensure correct behavior can
be tested.

Test: Camera CTS continues to pass
Bug: 189507251
Change-Id: Ie9449f722fdc356c690f1513d4cb25a43a14e4c8
2021-05-27 18:11:38 -07:00
Jayant Chowdhary
e1a464e141 camera2: Fix parcelling of sensor pixel modes.
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>
2021-05-27 10:56:47 -07:00