Commit Graph

4738 Commits

Author SHA1 Message Date
Joshua Mccloskey
c9786ca681 Merge "Add ignoreEnrollmentState to prompt info" into sc-v2-dev 2021-11-10 18:09:27 +00:00
Joshua Mccloskey
288f4b5784 Add ignoreEnrollmentState to prompt info
Test: Verified with a seperate APK that the API works as expected.
Bug: 201205443
Change-Id: Ic933b850a4230caf8811fd1029b52bd9a161d615
2021-11-09 11:04:07 -08:00
Joe Bolinger
7f6ff9092f Do not show side fingerprint sensor overlay when used from settings.
This is an alternative to ag/16124814 with the additional fix for udfps.

Fix: 203789357
Test: atest SidefpsControllerTest
Test: manual (open settings and verify no overlay shown with list of fingerprint)
Test: manual (open settings and verify overlay shown during enrollment)

Change-Id: Iee33cbb66d86d4f033d6acc9cf2284a3845f22de
2021-11-06 00:14:00 +00:00
Lucas Dupin
51e71dc946 Revert "Do not show side fingerprint sensor overlay when used from settings."
This reverts commit 42004250c2.

Reason for revert: b/204524711 

Change-Id: I57ff00e30e72852a4eb894d3302730616a22ae8e
2021-10-29 18:00:28 +00:00
Joe Bolinger
42004250c2 Do not show side fingerprint sensor overlay when used from settings.
Fix: 203789357
Test: atest SidefpsControllerTest
Change-Id: I2b0bb3b38edeeec08e93706784b0a53bd77d32a3
2021-10-26 13:10:36 -07:00
Beverly
1905cf9110 Update DozeSensors and DozeBrightnessSensor on posture changes
If the posture changes while AOD is running, make sure
sensors are unregistered + registered properly.

Test: manual, enable AOD and then close/open and check that
correct sensors are registered (dumpsys sensorservice)
Test: atest DozeScreenBrightnessTest DozeSensorsTest
Fixes: 192805135
Fixes: 199344667

Change-Id: I5093dc43e062144adca757c94fa708f51be57a44
2021-10-18 11:19:55 -04:00
Emilian Peev
a8a33c88f2 Merge "Camera: Handle ISE when device state manager is absent" into sc-v2-dev 2021-10-13 22:42:18 +00:00
Emilian Peev
47cae0f093 Camera: Handle ISE when device state manager is absent
The device state manager doesn't seem to be present on all
devices.
Catch any ISEs and handle this corner case appropriately.

Bug: 202597641
Test: atest
CtsGraphicsTestCases:android.graphics.cts.CameraVulkanGpuTest#testCameraImportAndRendering
-- --module-parameter instant_app

Change-Id: I6e6c7266b268835f3138cbb22a6f2df606742300
2021-10-12 22:25:19 +00:00
Emilian Peev
1a1461e5ae Camera: Rename DeviceStateOrientationMap
Use "DeviceStateSensorOrientationMap" to avoid possible
association with other common orientation states such as
Portrait and Landscape.

Bug: 202832229
Test: atest -c
cts/tests/camera/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java#testDeviceStateSensorOrientationMapCharacteristics
Change-Id: I6fc9d452f0bb4099389e30d0404e1c6c20dff8ff

Change-Id: Icde1a8eb25b15b237812f583de8f7a46b6576772
2021-10-12 14:01:30 -07:00
Eino-Ville Talvala
fed7243e56 Merge "Camera: Fix wrong wasImageCaptured flag" into sc-qpr1-dev am: 0f6c1c9d24
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16009383

Change-Id: I086f7400f1a7faba2eacb6e05c61a927ef768ce9
2021-10-08 20:26:18 +00:00
Eino-Ville Talvala
0f6c1c9d24 Merge "Camera: Fix wrong wasImageCaptured flag" into sc-qpr1-dev 2021-10-08 20:10:28 +00:00
TreeHugger Robot
86d2205d1d Merge "Camera: Avoid possible deadlock when closing advanced extension session" into sc-qpr1-dev am: 00c890cda7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15976219

Change-Id: I7ed63423fb9d1c6a58d52bb6a62d6716c6f5db84
2021-10-08 20:05:08 +00:00
TreeHugger Robot
00c890cda7 Merge "Camera: Avoid possible deadlock when closing advanced extension session" into sc-qpr1-dev 2021-10-08 19:49:12 +00:00
Emilian Peev
dd55b3dee5 Camera: Avoid possible deadlock when closing advanced extension session
The advanced extension session request processor must not hold the
'mInterfaceLock' when calling the camera device implementation as it
could result in a deadlock with the camera device close that can
run at the same time and try to acquire the same locks in reverse order.
The request processor will only read from 'mCameraConfigMap' which is
initialized only once during session setup and will not change during
the session lifetime.
A sample stack trace will look like this:
Service thread:
1) android.hardware.camera2.impl.CameraCaptureSessionImpl.stopRepeating
2) android.hardware.camera2.impl.CameraAdvancedExtensionSessionImpl$RequestProcessor.stopRepeating

Client thread:
1) android.hardware.camera2.impl.CameraAdvancedExtensionSessionImpl.release
2) android.hardware.camera2.impl.CameraDeviceImpl.close


Bug: 202074988
Test: Manual using application,
Camera CTS

Change-Id: If992667a7d7e54be5bea1fcc4b1d71ec1b895ca0
2021-10-08 19:48:12 +00:00
Shuzhen Wang
8af9bbaeed Camera: Fix wrong wasImageCaptured flag
CaptureFailure is created with a "dropped" parameter. But what's passed
in is mayHaveBuffers, which is opposite of "dropped".

Test: Camera CTS, GoogleCamera
Bug: 201967385
Change-Id: I42eb2daa78f116502cb1c5943015ea3f4af3f1e3
2021-10-08 16:26:14 +00:00
Emilian Peev
01d8df412d Merge "Camera: Keep sensor orientation consistent with device fold state" into sc-v2-dev 2021-10-07 22:53:24 +00:00
Emilian Peev
2bf82bbfef Camera: Keep sensor orientation consistent with device fold state
Allow foldable devices to advertise the mapping between device fold
state and sensor orientation.
Additionally return the current  sensor orientation
based on the specific device fold state.

Bug: 201005727
Test: Manual using AOSP Camera2 application,
Camera CTS

Change-Id: Idc76903da22567d29cc55d991b41df7e19490aa3
2021-10-07 11:29:21 -07:00
Daniel Solomon
4ec2eb536b Merge changes from topic "b200851199" into sc-qpr1-dev am: 250448c0bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15909960

Change-Id: Icaa01be38637089e703e322e083a52a97dddd771
2021-10-05 23:01:16 +00:00
Beverly
e4a1d0e422 Add posture support for prox sensor
Some postures don't need to register for a prox sensor

Test: manual, atest PostureDependentProximitySensorTest
Bug: 192805135
Change-Id: I5c5fbed6d3faff6ba690f67f592bb0b8082062d5
2021-10-05 15:57:16 +00:00
Daniel Solomon
13d3dffa66 Make DisplayModeDirector aware of whether HBM is active
Currently DisplayModeDirector casts Vote.PRIORITY_HIGH_BRIGHTNESS_MODE
based on whether High Brightness Mode (HBM) is allowed, rather than
based on whether HBM is actually active. This can lead to cases where
the HBM refresh rate vote is cast when HBM is allowed but not actually
used.

This change corrects this behavior, and makes DisplayModeDirector check
that HBM is both allowed (enabled) and actually in use (active).

Bug: 200851199
Test: atest DisplayModeDirectorTest
    BrightnessLevelPreferenceControllerTest
    HighBrightnessModeControllerTest
Change-Id: I8cb8f023a6bca11de976866259032143f43d9a4f
2021-10-03 16:59:21 -07:00
Daniel Solomon
a49b90befe Change DisplayModeDirector's brightness source to DisplayListener
Currently, DisplayModeDirector listens to brightness changes from Settings.
However, brightness value in Settings is overridden for various reasons
inside DisplayPowerController before being propagated to HALs. As a
result, the brightness value that DisplayModeDirector is acting on isn't
always the brightness value that gets applied to the display.

This change,
- Changes DisplayPowerController so that the final brightness value (after all
modifications) is saved.
- Changes DisplayModeDirector to use DisplayManager.DisplayListener to
observe brightness changes and then retrieve and act on the final
brightness value saved in DisplayPowerController.

Bug: 199955532
Test: atest DisplayModeDirectorTest
Change-Id: Ia6dd7d194b6913d2942bea9c29a2011b8058beef
2021-09-30 17:18:03 -07:00
Beverly
541b6f8ea4 Add dual-display support for aod brightness sensor
Depending on the posture, SystemUI can register for
different brightness sensors on AOD.

Test: manual, atest DozeSensorsTest
Bug: 192805135
Change-Id: I85e458623ae9cf868af80e0c02154fb0be11c615
2021-09-30 21:01:13 +00:00
Beverly
c8d3d1adf7 Add support dual display support doze tap gesture
Test: manual, atest DozeSensorsTest
Bug: 192805135
Change-Id: I08a98bf16753631afd31cb750c541c7443df1b9e
2021-09-30 10:21:06 -04:00
TreeHugger Robot
51b865a0ec Merge "Separate refresh rate restrictions for different High Brightness Modes" into sc-qpr1-dev am: af5c64f76f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15937366

Change-Id: I9dcfe5d51a3c48a39b3e06ce42d2b88368a08b8d
2021-09-29 13:37:41 +00:00
Daniel Solomon
448dd444ad Separate refresh rate restrictions for different High Brightness Modes
Allow setting a different refresh rate for High Brightness Mode for HDR
and for Sunlight.

Bug: 196691596
Test: atest DisplayModeDirectorTest
Test: Manual:
      1. Ensure HBM for HDR takes presedence over HBM for Sunlight
      2. Ensure app refresh rate votes override bothHBM for Sunlight
Change-Id: I4a29c47f218046d0852178ad5dc7484a86ef8607
2021-09-29 03:55:26 +00:00
TreeHugger Robot
d1af9bd2ef Merge "Camera: Switch the jpeg orientation when using the native encoder" into sc-qpr1-dev am: 6e60223a63
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15899922

Change-Id: I84842741ff61e590cdf46ab7c62f234864ab9538
2021-09-27 15:53:14 +00:00
TreeHugger Robot
ff2ce8ac2d Merge "Wait for camera extensions service during initialization" into sc-qpr1-dev am: 2f68a663a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15838336

Change-Id: I6342a11b144b8e55765c5fa900f40a852a7db47c
2021-09-25 02:23:04 +00:00
Emilian Peev
b233caa56d Camera: Switch the jpeg orientation when using the native encoder
The native Jpeg encoder expects rotation in counter
clockwise direction. However according to the Camera2 specification
clients need to pass the Jpeg rotation in clockwise direction.
Flip the client rotation value before passing to the Jpeg encoder.

Bug: 200890552
Test: Manual using sample application,
atest -c
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java

Change-Id: Ib70a8f5b5165d8319d89c2ed4b7509929c2faa71
2021-09-23 13:22:32 -07:00
Curtis Belmonte
bbbca8b27f Merge "Support configurable multi-stage UDFPS enrollment" into sc-qpr1-dev 2021-09-22 17:52:47 +00:00
Curtis Belmonte
2f2a86282a Support configurable multi-stage UDFPS enrollment
Implements multi-stage enrollment for UDFPS. This implementation
supports both highlighting the progress bar when a help message is
received and configuring the progress thresholds between enroll stages
via an XML resource.

Test: Manual

Bug: 198928407
Bug: 200076382
Change-Id: I6f6111ab0ed29ca7f1be01303f0457764d5afe01
Merged-In: I6f6111ab0ed29ca7f1be01303f0457764d5afe01
2021-09-20 22:45:07 -07:00
Curtis Belmonte
cc50932c4f Support configurable multi-stage UDFPS enrollment
Implements multi-stage enrollment for UDFPS. This implementation
supports both highlighting the progress bar when a help message is
received and configuring the progress thresholds between enroll stages
via an XML resource.

Test: Manual

Bug: 198928407
Bug: 200076382
Change-Id: I6f6111ab0ed29ca7f1be01303f0457764d5afe01
2021-09-20 21:07:40 -07:00
Diego Wilson
0cde32dbf2 Wait for camera extensions service during initialization
During Camera2 Extensions initialization we need to check
if the Camera Extensions Proxy service supports advanced
extensions. Now we're not only waiting
for the service to connect but were also waiting for
the query for advanced extensions to finish.

Fixes: 198818625
Change-Id: I8040eab80a4b97f77b551152b3f76f93f9b8af88
2021-09-20 18:35:32 +00:00
Naomi Musgrave
aca03a172c [2/n] Display stack provides DisplayInfos
For all possible states a device can assume, the DisplayManagerService
provides the DisplayInfo associated with that layout of the logical
display. WindowManager applies each possible rotation to these
DisplayInfo. This, in turn, is used to calculate the possible max
WindowMetrics on the device.

Done:
* Display stack builds collection of DisplayInfo, for all
 possible display states (folded, unfolded on jumbo)
* Display stack pushing set of DisplayInfos to WindowManager
* WindowManager calculates max bounds for all possible
  (display layouts x rotations)

Not started:
* WindowManager calculates insets for each rotation

Bug: 181127261
Test: atest DeviceStateManagerGlobalTest
Test: atest DeviceStateManagerServiceTest
Test: atest LogicalDisplayMapperTest
Change-Id: I3a407262e755cb57c506b7255eb5c067523381d3
2021-09-17 14:56:33 +00:00
Joe Bolinger
6b60bde8b1 Merge "Do not show side fingerprint sensor overlay on keyguard." into sc-v2-dev 2021-09-16 19:36:42 +00:00
Joe Bolinger
b13dc6a105 Do not show side fingerprint sensor overlay on keyguard.
Bug: 197265282
Test: atest SidefpsControllerTest
Test: manual (lock device and verify no overlay on keyguard)
Change-Id: I7ff487e3d15d68ea1b182c6c7e7fd255801e4dea
2021-09-16 09:48:55 -07:00
Joe Bolinger
bb7bd1873c Merge changes from topic "sfps-updates" into sc-v2-dev
* changes:
  Update side fsp sensor position via overlay.
  Update side fingerprint sensor overlay assets.
2021-09-16 01:28:17 +00:00
Joe Bolinger
bf5ad9066a Merge "Consolidate fingerprint overlay controllers." into sc-v2-dev 2021-09-15 22:10:51 +00:00
Rucha Katakwar
f8cd5af72e Merge "Camera:Fix the memory leak caused during HFR mode." into sc-qpr1-dev am: 4881b7d690
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15828855

Change-Id: I80102e8eb0967c6a73945ea6e4d98ed7f3d4146d
2021-09-15 17:48:45 +00:00
Joe Bolinger
f2e41730bb Update side fsp sensor position via overlay.
This is a temporary workaround and the overlay properties can be removed
when the information is available from the HAL.

Bug: 174868353
Fix: 188690214
Test: manual (enroll and verify icon location)
Change-Id: I2b6826756814727368007e55bfc88d28c4a78bea
2021-09-15 09:57:16 -07:00
Rucha Katakwar
2d99c9f930 Camera:Fix the memory leak caused during HFR mode.
During high speed recording mode, it was observed that there was a
memory leak due to too many nodes at mPendingFrameNumbersWithOtherType
list. After ag/1962479 added batching for HFR it only updates the
FrameNumberTracker every 4 or 8 frames during high speed recording. This
change fixes that by updating every frame. A map is used to store
requestIds which have batchOutput. For every such requests we update
each frame in the batch in a for loop.

bug: 194618660

Test: 1. Did validity check with the change. Now frameNumber is incremented
by 1 instead of every 4 or 8 in FrameNumberTracker.
2. The mPendingFrameNumbersWithOtherType for otherType is empty during
HFR recording.
3. Verified using other modes of camera and did not observe any
crashes.
4. CTS tests Pass.

Change-Id: I2638e6663e7b70e4ef7a29dfeb27d423c9c7137d
(cherry picked from commit 236ed73e26)
2021-09-14 18:42:01 +00:00
Joe Bolinger
dce40910b1 Consolidate fingerprint overlay controllers.
Prevent duplication in side/udfps sensor handling for common
operations (i.e. show, hide) and remove static boilerplater helpers.

Bug: 197265282
Test: atest SensorOverlaysTest
Test: atest com.android.systemui.biometrics
Change-Id: I9a5bad5d19f044f4292eeda1ae666cf5b807f7eb
2021-09-13 08:19:07 -07:00
Kevin Chyn
1b28a2e7f0 Merge "Add callback for when enrollment state changes" into sc-qpr1-dev am: ada5e05660
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15730868

Change-Id: Iea60534ff6f373cb022d2a43e138e73442b28443
2021-09-07 22:47:27 +00:00
Naomi Musgrave
dce45ccae5 Merge "[MediaProjection] Store WindowContext in VirtualDisplay" into sc-v2-dev 2021-09-03 10:35:11 +00:00
Kevin Chyn
f7a019f584 Add callback for when enrollment state changes
Bug: 195663312

(New tests):
Test: manual, FingerprintManager no longer shows up in strict
      mode logs when changing keyguard states
Test: atest FingerprintStateCallbackTest

(Existing cases below):
Test: atest com.android.server.biometrics
Test: atest CtsBiometricsTestCases
Test: atest com.android.systemui.biometrics
Test: atest KeyguardUpdateMonitorTest

Change-Id: I57304f9ed938cbe4ec63683b826ead086cc33a5b
2021-09-02 16:11:04 -07:00
Naomi Musgrave
065f4d876e [MediaProjection] Store WindowContext in VirtualDisplay
Follow on from ag/15684817, where the WindowContext is cached in
MediaProjection. To allow multiple VirtualDisplays to be created
from the same MediaProjection, instead create a new WindowContext
for each one, and associate with that VirtualDisplay.

As before, the WindowContext must be stored in a field to prevent
it from being garbage collected.

Bug: 197579637
Bug: 198415847
Test: manual
Change-Id: If3f84b3778104bf12617d224876700f8ee3b2b45
2021-09-02 13:08:24 +00:00
Joe Bolinger
c346dab881 Merge changes from topic "more-cancel-sc-qpr1-dev" into sc-qpr1-dev am: 16a7d2e7bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15727904

Change-Id: Id8fb1fac31177116d974bd99f1056f6565d986ea
2021-09-01 22:23:23 +00:00
Joe Bolinger
a77a337eda Merge "Add a default string for failures." into sc-qpr1-dev am: 7d26092122
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15671476

Change-Id: I4cabc454b70f147a1fad609ad5c5d1c9f92036f0
2021-09-01 22:22:46 +00:00
Joe Bolinger
16a7d2e7bd Merge changes from topic "more-cancel-sc-qpr1-dev" into sc-qpr1-dev
* changes:
  Add requestId to authentication entry points.
  Check cancel status whenever cookies are received.
2021-09-01 22:06:13 +00:00
Joe Bolinger
7d26092122 Merge "Add a default string for failures." into sc-qpr1-dev 2021-09-01 22:05:34 +00:00
Joe Bolinger
bdd477a5d1 Add requestId to authentication entry points.
The CancellationSignal passed into the authentication methods is not
associated with the request and can be used to cancel the current
operation, even if it is more recent. The new id prevents outdated
signals from being using.

Note that there are still issues with the Callbacks that are not
addressed (see bug for details).

Bug: 194405579
Bug: 189451155
Bug: 191716671
Test: atest com.android.systemui.biometrics com.android.server.biometrics

Change-Id: Id71be912cc88ae90df8087eb8f1a6fc3e110f883
2021-09-01 08:49:26 -07:00