Commit Graph

4709 Commits

Author SHA1 Message Date
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
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
Ady Abraham
c1d91ef5d2 Merge "DisplayManagerGlobal: fix native refresh rate callback registration" into sc-qpr1-dev am: c265f32026
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15689742

Change-Id: I1f37e1e8c0c3a6ced87634d195e795284578e3de
2021-08-31 00:31:42 +00:00
Ady Abraham
0ee31107ed DisplayManagerGlobal: fix native refresh rate callback registration
When AChoreographer is the only callback registered with
DisplayManagerGlobal and there are no other display listeners,
DisplayManagerGlobal incorrectly skips callback registration with DMS.

Bug: 193945763
Test: atest DisplayManagerGlobalTest
Change-Id: I4b737fa0a91541fe331edcf3454724200e2db971
2021-08-27 20:26:46 +00:00
Joe Bolinger
1cf97a94e0 Add a default string for failures.
Test: N/A
Fix: 196639965
Change-Id: I3db7c4e0837641ad6aa7094894df92d5b2581b0e
2021-08-25 02:48:16 +00:00
Kenneth Ford
1f70abe98d Allow top focused activities to call requestState
Previously you could only modify the device state
if you held the CONTROL_DEVICE_STATE permission. This
change allows top focused activities to do the same

Bug: 192671754
Test: atest DeviceStateManagerTests
Change-Id: Iba0c1800a1fb17024020e657b76a54eec9c89348
2021-08-20 22:58:36 +00:00
Darryl L Johnson
7dde391fc1 Allow override requests to outlive the requesting process.
This change introduces a flag, FLAG_CANCEL_STICKY_REQUESTS, on the
device states that are provided by the DeviceStateProvider. If the flag
is set on a device state it indicates that the device state should
cancel any outstanding sticky requests when entered. If at least one
device state is configured to be a terminal device state (has the flag
set) the service will be configured to allow sticky requests, otherwise
requests will continue to be cancelled when the requesting process dies.

Fixes: 192671286

Test: atest DeviceStateManagerServiceTest
Test: atest DeviceStateProviderImplTest
Test: atest DeviceStateTest
Test: atest OverrideRequestControllerTest
Change-Id: I7a6bdc9334342fa818920b56a4f0c22629bb101f
2021-08-20 20:59:05 +00:00
Fiona Campbell
ec29aa264b Merge "Add display specific brightness configurations" into sc-v2-dev 2021-08-17 10:08:57 +00:00
Joe Bolinger
ff3686f0c1 Merge "Add a generic error message for missing vendor error strings." into sc-dev am: 922fe0da54 am: 8d74548cba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15564960

Change-Id: Ice430cd383c5b3ce6132c04201b0dc9fe3cccc7a
2021-08-14 04:03:09 +00:00
Joe Bolinger
5d5d9eb812 Add a generic error message for missing vendor error strings.
The message is empty, instead of null, to prevent apps from crashing but it will be changed to a more meaninful string in a future change.

Fix: 196176475
Test: N/A
Change-Id: I7823084238a87cb1b8892b8550c472cd8b40f556
2021-08-13 16:03:54 -07:00
TreeHugger Robot
3ed6fed8cf Merge "Camera: Initialize the forward processor along with the repeating pipeline" into sc-dev am: 7949cf90ac am: bff3df9ae8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15523913

Change-Id: I40b724d44cfa4a3bba286ae5ef033f6777022f96
2021-08-13 17:42:23 +00:00
Jayant Chowdhary
be0289f360 Merge "camera2: Documentation updates for ultra high resolution sensors." into sc-dev am: 115b62decc am: f2381fea39
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15507831

Change-Id: Ib968e558933e3ed8f11daae9daf8cef1a3b53a2f
2021-08-13 17:42:11 +00:00
TreeHugger Robot
c5ef0ab8dd Merge "Camera: Return sequence id for advanced extension requests" into sc-dev am: 1ce567e28f am: 2f01685e4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15522464

Change-Id: I27e5038382116986a32a3a26d78fe5c3343c21fe
2021-08-13 17:41:59 +00:00
TreeHugger Robot
7949cf90ac Merge "Camera: Initialize the forward processor along with the repeating pipeline" into sc-dev 2021-08-13 17:29:14 +00:00
Jayant Chowdhary
115b62decc Merge "camera2: Documentation updates for ultra high resolution sensors." into sc-dev 2021-08-13 17:11:23 +00:00
Jayant Chowdhary
1f3071d540 camera2: Documentation updates for ultra high resolution sensors.
Bug: 195987968

1) Document mininum pixel array size restriction for ultra high resolution sensors.
2) Add docs explaining mandatory stream combinations for ultra high resolution sensors.

Change-Id: Ic630259a57906c475210465588eda1a5cc3f68ec
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-08-11 20:12:41 +00:00
Emilian Peev
a0ced2aa9e Camera: Initialize the forward processor along with the repeating pipeline
Some preview extensions of the image processor type expect to recevive
'onOutputSurface' calls before the session is enabled by 'onEnableSession'.

Bug: 187341271
Test: atest -c
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java

Change-Id: I67147ec24553cf87d23e33c63692fa7e59c57e5f
2021-08-11 00:42:34 +00:00
Emilian Peev
5cf033ccb7 Camera: Return sequence id for advanced extension requests
Allow 'IRequestProcessorImpl' to return the camera sequence id
in response to capture requests.

Bug: 196090349
Test: atest -c
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java

Change-Id: I3d67e4ba1b4503cf71c31751920e916d014ef3ab
2021-08-10 15:26:24 -07:00
TreeHugger Robot
3e5e27f2b6 Merge "MediaProjection captures DisplayArea" into sc-v2-dev 2021-08-10 14:03:05 +00:00
Naomi Musgrave
fd5715bb31 MediaProjection captures DisplayArea
MediaProjection is used by apps to capture the contents of
a display. Apps consume the content from a surface passed
in to MediaProjection#createVirtualDisplay. The images
written out to the surface can be used for saving
screenshots of the current display, screen recording,
or casting to a different display.

MediaProjection is currently tied to capturing a physical
display. This change instead captures the DisplayArea
the app is launched on. This is consistent with Display API
sandboxing, which returns the DisplayArea bounds rather
than the physical display bounds.

Note that apps use the Display APIs to size the
VirtualDisplay and output surface.

Verified: screenshots, screen recording, and casting

Bug: 180624777
Bug: 195280234
Test: atest WmTests:DisplayContentTests

Change-Id: I086fa1ae668dbdf0f25252c13614445af04d86f3
2021-08-09 15:20:32 +00:00
Evan Severson
eaed206891 Merge "Don't show sensor use dialog for system uid" into sc-dev 2021-08-07 17:34:45 +00:00
Emilian Peev
aae08711e8 Merge "Camera: Release extension resources after closing handler thread" into sc-dev 2021-08-06 18:18:41 +00:00
Jayant Chowdhary
4eeeee0f14 Merge "camera2: Fix backward compatibility breakage for setting metering regions." into sc-dev 2021-08-05 18:03:45 +00:00
Shuzhen Wang
c0a3b39617 Merge "Camera: Fix typos in API doc" into sc-dev 2021-08-05 00:26:18 +00:00
Emilian Peev
2543bb488b Camera: Release extension resources after closing handler thread
To avoid possible concurrency issues, always quit the handler
thread before releasing any extension resources.
In case camera is still running, camera callbacks can still
be handled during release which can result in concurrency
exceptions.

Bug: 195595369
Test: atest -c
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java

Change-Id: I473a4cb04e5ea27b5c8f8221a2390219a7915e73
2021-08-04 17:12:36 -07:00
Shuzhen Wang
91db1773dd Camera: Fix typos in API doc
Test: Build
Bug: 195574631
Change-Id: Idf1e6f4390146055cdb7df41d63ab010df5ad1a1
2021-08-04 13:39:15 -07:00
Evan Severson
f1de4ee934 Don't show sensor use dialog for system uid
If the system uid is being noted for mic or camera op, it will have to
be explicitely accounted for to show the user any sort of UI to unmute
the mic or camera.

Test: Add some logcat statements to verify the correct code paths are
          being hit when placing and answering phone calls and when
	  trying to trigger hotword.
Bug: 195122900
Change-Id: I601458ea2dd7557e4a557eab32c2da15828ae4a7
2021-08-03 17:27:30 -07:00
Emilian Peev
a72b3e92e9 Camera: Don't override extension surface native format
Avoid overriding the native extension surface format when
retrieving the surface parameters.
The native surface format can later be used to configure
the device extension so the original value must be known.

Bug: 195366395
Test: atest -c
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java

Change-Id: I52d091fd782dc9ca2af60ba42ec1c5bbe080c1ca
2021-08-03 13:13:03 -07:00
Jayant Chowdhary
d3c86632f8 camera2: Fix backward compatibility breakage for setting metering regions.
With the new entries in sSetCommandMap, the private functions for
setting metering regions cast the input value to MeteringRegion[], which
can break some existing clients which pass in Object[] to
CameraMetadata.set(). We revert to the old behavior of letting Marshaler
handle conversion from Object[] -> MeteringRectangle[] internally.

Bug: 195095702

Test: GCA with different zoom (basic validity)
Test: ITS scene1_1
Test: Camera CTS

Change-Id: Iea372adf76d1c6f81f1c63ff2bd3553ab39f30e4
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-08-03 12:38:37 -07:00
Naomi Musgrave
da38617955 Revert "MediaProjection captures DisplayArea"
This reverts commit 45dd2a3202.

Reason for revert: b/195280234 is blocking droidfood

Bug: b/195280234
Change-Id: I09593dffb797d1e4c60cff52e7901ed6c00f719c
2021-08-03 09:19:23 +00:00
Evan Severson
705c7539eb Merge "Check the current user in the system server for SensorPrivacyManager" into sc-dev 2021-07-30 15:55:22 +00:00