Commit Graph

4751 Commits

Author SHA1 Message Date
TreeHugger Robot
1efdec0980 Merge "Camera: Update JPEG size override condition for MPC13" into sc-v2-dev 2021-12-10 21:08:00 +00:00
Joshua Mccloskey
698f40caf7 Merge changes from topic "faceCameraSensorPrivacy" into sc-v2-dev
* changes:
  Added sensor privacy message to biometric prompt
  Add SensorPrivacy error message to FaceService.
2021-12-08 07:01:56 +00:00
Joshua Mccloskey
27db3c0af9 Added sensor privacy message to biometric prompt
Bug: 201045056
Test: Verified that BiometricPrompt shows an error message if the user
is using face authentication and camera privacy is enabled.

Change-Id: Idc2140062c4aa87e0bcffb14e07336dc6cd7d955
2021-12-07 13:57:23 -08:00
Shuzhen Wang
5c67b950b2 Camera: Update JPEG size override condition for MPC13
The JPEG size override is done only when the
android.os.Build.VERSION_CDOES.MEDIA_PERFORMANCE_CLASS is set to
31 or larger, and not necessarily for every MPC13 devices.

Bug: 209622756
Test: Build
Change-Id: I4d76db1780e0d777e8da68a06829ce0e424905d5
2021-12-07 17:40:02 +00:00
Joshua Mccloskey
9d3f1be63c Add SensorPrivacy error message to FaceService.
If the camera privacy sensor is enabled, show an error message
on Keyguard.

Test: Verified that the sensor privacy error is shown when privacy sensor is enabled.
Bug: 201045056
Change-Id: Ib7709596d378caa690a782294197a5b26e55857f
2021-12-06 16:03:28 -08:00
Naomi Musgrave
4dfa01a86e [DO NOT MERGE] Revert "[2/n] Display stack provides DisplayInfos"
This reverts commit aca03a172c.

Reason for revert: remove from sc-v2
Test: manual
Bug: 206649452

Change-Id: I1ce3c567eb1203edc7f22c568eeb15e85c643134
2021-11-30 13:32:08 +00:00
Louis Chang
fcfd7e1a79 Merge "Checking Settings config for quick pick-up gesture" into sc-v2-dev 2021-11-24 01:31:47 +00:00
TreeHugger Robot
d0d3b02874 Merge "Camera: Try to recover from failing stopRepeating requests" into sc-v2-dev 2021-11-24 00:40:57 +00:00
Louis Chang
4267ff2f20 Checking Settings config for quick pick-up gesture
...in order to turn it off while running tests

Bug: 204145453
Test: atest ActivityVisibilityTests
Change-Id: I8dcba88f6d0dc3370cb189034ca4bc2935103233
2021-11-23 14:43:40 +08:00
TreeHugger Robot
b17c10f621 Merge "Make quickPickup gesture depend on liftToWake" into sc-v2-dev 2021-11-18 15:33:18 +00:00
Kenneth Ford
3ad9ba7351 Notifies correct device state callback on cancellation
Previously was calling onRequestSuspended for cancellation notifications

Bug: 205886628
Test: DeviceStateManagerGlobalTest
Change-Id: I63e44f5c9a7a333ce9ba5bffe8e103834d9f468d
2021-11-16 20:40:14 +00:00
Emilian Peev
caa1a65588 Camera: Try to recover from failing stopRepeating requests
In case the camera client disconnects from an output surface referenced
by an active repeating request, a race could occur between the client
and camera service. Camera service will notify the client about the
failed repeating request and will reset the request id internally.
During this time period the client can also try to call "stopRepeating"
which will trigger an IAE, reset the client repeating request id value
and return immediately. Once the "onRepeatingRequestError" gets
scheduled or unblocked, the framework will just ignore it since it
doesn't have any information about an active repeating request.
The framework will be unable to track the last frame id in the repeating
sequence. The sequence will never complete and the 'onClosed' callback
will not get triggered as well.
To mitigate this, cache the request id in case of IAE during
"stopRepeating" and try to resume the last frame id sequence tracking
once "onRepeatingRequestError" arrives.

Bug: 205895636
Test: Camera CTS
Change-Id: I5da4a82d156227568aaebe74a5e0b2400de1d01e
2021-11-11 17:40:16 -08:00
Beverly
5deab1f755 Make quickPickup gesture depend on liftToWake
If lift to wake is disabled, also disable quickPickup.

Test: manual
Fixes: 204676931
Change-Id: I2c918fb706b24c77f1e74160052e5caae51144cd
2021-11-11 16:28:30 -05:00
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