Commit Graph

4673 Commits

Author SHA1 Message Date
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
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
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
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
Evan Severson
6abae2a070 Check the current user in the system server for SensorPrivacyManager
Instead of querying for the current user application side we can just
pass UserHandle.CURRENT_USER, this eliminates an IPC and the need for
INTERACT_ACCROSS_USERS permission which should not be needed for these
APIs.

Test: CtsSensorPrivacyTestCases
Bug: 194806109
Change-Id: I3a0aed0c403338aaebdfb4e2791a84b4e7e3cb3a
2021-07-29 11:23:43 -07:00
Emilian Peev
e922ec31aa Merge changes from topic "b194508189" into sc-dev
* changes:
  Camera: Support common outputs between regular and extension sessions
  Camera: Include the parceled image dimensions
2021-07-29 00:20:06 +00:00
Jayant Chowdhary
782b4e9e08 Merge "camera2: Add fwk-only tags for SCALER_CROP_REGION and metering regions." into sc-dev 2021-07-28 22:45:01 +00:00
Jayant Chowdhary
5c2a840de8 camera2: Add fwk-only tags for SCALER_CROP_REGION and metering regions.
Default sensor mode capture requests would have their scaler crop
regions set to the default active / pre-correction array coordinate
system. Cameraserver needs to correct this for max res sensor pixel mode CaptureRequests.
In order to facilitate the correction, we add fwk-only CaptureRequest tags which are set when camera
clients set SCALER_CROP_REGION / metering regions.

Bug: 194143991

Test: CTS

Change-Id: I66393a1e6310f149138be4799f20ced377b11eb4
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-07-26 17:06:51 -07:00
Kevin Chyn
88a506aad4 Merge changes from topic "facemanager-bypassflag" into sc-dev
* changes:
  12/n: Send bypassEnabled to AuthenticationClient
  11/n: Enable CoexCoordinator advanced logic by default
  10/n: Always send feedback if capacitive (or unknown) sensor
2021-07-26 18:12:28 +00:00
Kevin Chyn
4443159caf 12/n: Send bypassEnabled to AuthenticationClient
Adds this flag via FaceManager#authenticate (instead of other other
potential ways, such as reading the settings/config values from
system_server directly). This allows for a single source of truth.

Stores this flag in AuthenticationClient, which can then be retrieved
from the CoexCoordinator.

Also removes unnecessary FaceManager#authenticate method, as keyguard
is really the only supported client

Bug: 193089985
Test: atest KeyguardUpdateMonitorTest
Test: atest com.android.server.biometrics
Change-Id: I647c2e5926d1bb964b12dc580d2cd2178c30a790
2021-07-23 17:26:11 -07:00
Evan Severson
8f7f7ab98a Update mic/cam quicksetting toggles when user changes
On a secondary/guest user the mic/cam toggles show for user 0. We want
the user-free calls to reflect the state of the current user so things
like the UI is accurate. Before this change the user free calls always
checked for user 0 since the context was cached in SensorPrivacyManager.

This change also fixes some issues with removing listeners.

Test: use toggles on main, work profile, and secondary user
      atest CtsSensorPrivacyTestCases --user-type secondary_user
Fixes: 178751362
Change-Id: Ieb90ea7ba4074446eb01d1093e280ac7018f9e73
2021-07-23 15:31:53 -07:00
Emilian Peev
83eb162a5d Camera: Support common outputs between regular and extension sessions
Camera clients must be able to re-use the same output/outputs between
regular capture and extension sessions.
Re-shuffle the extension logic so that user registered outputs are
always accessed/connected to after the camera device configures its
streams.
Additionally disconnect any user registered outputs as soon as the
client requests a new regular capture session.

Bug: 194508189
Test: Partner testing,
Camera CTS

Change-Id: I112ad916e5d019d313767d3a0b0454165a6feb12
2021-07-23 11:26:18 -07:00
Emilian Peev
aee0d658d6 Camera: Include the parceled image dimensions
All parceled images need to include valid and correct
dimensions.

Bug: 194324683
Test: Manual using extensions sample application,
Camera CTS

Change-Id: I5ba90757e6edb0bb6bf1756d158c7ee402ce54ca
2021-07-22 13:40:26 -07:00
Ilya Matyukhin
2151a28c7c Merge "Fix enrollment preview surface leak" into sc-dev 2021-07-21 17:41:34 +00:00
Ilya Matyukhin
3662a98bbd Fix enrollment preview surface leak
Bug: 189057897
Test: adb shell dumpsys SurfaceFlinger | grep -A 10 Offscreen | grep EnrollActivity
Change-Id: I9e11d0f1efc4428f2181370cb8be1b933aa5f548
2021-07-20 17:33:42 -07:00
Shuzhen Wang
3e72b3e16f Merge "Camera: Improve logical camera RAW capture docs" into sc-dev 2021-07-21 00:09:26 +00:00
TreeHugger Robot
5cb13bbebf Merge "Revert "wifidisplay: restrict broadcast by the proper permission"" into rvc-dev am: 30c6383d1d am: 17d1be8efc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15287612

Change-Id: I67a349870a799a1cdf3df9577786a326901d65e5
2021-07-20 02:44:02 +00:00
TreeHugger Robot
17d1be8efc Merge "Revert "wifidisplay: restrict broadcast by the proper permission"" into rvc-dev am: 30c6383d1d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15287612

Change-Id: I2fba182703b7e2362a0cd0934903c6a2af849751
2021-07-20 02:31:53 +00:00
Shuzhen Wang
252b7958bb Camera: Improve logical camera RAW capture docs
- Clarify raw capture behavior for logical camera with backward
compatible approach and MultiResolutionImageReader.
- Some logical camera devices may have identical physical cameras with
different focal length. Allow such logical camera to switch physical
cameras when outputing raw.

Bug: 182217158
Test: Build
Change-Id: I64458683f4eb8be6fc1e35270a8c22864d962be9
2021-07-16 12:56:46 -07:00
Jimmy Chen
955b64a6e7 Revert "wifidisplay: restrict broadcast by the proper permission"
This reverts commit cff8340c84.

Reason for revert: Remove from July 2021 Android Security Bulletin due to break existing applications.

Bug: 176541017
Change-Id: Iacef744056630e85fb43d838a72abfae331cbaf4
Test: install WFD application and check whether it works normally.
2021-07-15 00:56:19 +00:00
Arthur Ishiguro
14c466a999 Add additional clarification regarding nanoapp loading APIs
Fixes: 190533027
Test: None, comment only
Change-Id: If54e4093092be697845a53fbd617f6b2b46f420f
2021-07-14 17:30:29 +00:00
Evan Severson
41ff39a156 Merge "Update the sensor use dialog if more sensors are accessed" into sc-dev 2021-07-13 23:35:32 +00:00
Joshua Mccloskey
b7020910d3 Merge "Enable vendor error/acquire messages on user build" into sc-dev 2021-07-13 06:15:50 +00:00
Joshua Mccloskey
27f49c34b9 Enable vendor error/acquire messages on user build
Test: It builds.
Bug: 184591799
Change-Id: I81d19610e39998e4815da62c21068f4850c41c1e
2021-07-12 15:15:26 -07:00
Evan Severson
85d7336db0 Update the sensor use dialog if more sensors are accessed
If another sensor is accessed after the dialog has been shown we now
update the dialog to reflect all accessed sensors.

Test: Wrote app which opens mic/cam at different times
Fixes: 187139024
Fixes: 187132341
Change-Id: I178bb4f6ea1913e3ee0e2153cf8ac3b2f24e4623
2021-07-09 13:38:47 -07:00
Rucha Katakwar
4f83d813d6 Revert "Camera: Restore FastNative annotation."
Bug: 193176503

This reverts commit 99ebd95ef1.
Reason for revert: Recent flakiness as mentioned in b/193176503.This cl was merged in build:7532561. Any test failures post this build shows exception linked to CameraMetadataNative.Reverting this cl to find and fix the issue.

Change-Id: If9fe3ce69f013b842a47745d976942aa71dfb8f6
2021-07-09 17:20:57 +00:00
TreeHugger Robot
d377029798 Merge "Camera: Clarify zoom and crop behavior for capture result" into sc-dev 2021-07-08 20:40:03 +00:00
Emilian Peev
07d8600a35 Camera: Set metadata vendor id in extension proxy service
Set the appropriate vendor id for any native metadata
instantiated within the camera extension proxy service.

Bug: 187341271
Test: Partner verified,
Camera CTS

Change-Id: I07e0be304baac017d44606c1612a24c520bed588
2021-07-08 11:51:56 -07:00
Pyuli Naithani
cd40c7406f Merge "Add statsd logs for Sensor Privacy." into sc-dev 2021-07-08 17:24:53 +00:00
Rucha Katakwar
8893160900 Merge "Camera: Restore FastNative annotation." into sc-dev 2021-07-08 17:17:17 +00:00
Pyuli Naithani
76be38c05c Add statsd logs for Sensor Privacy.
BUG: 192269258

Test: ran statsd_testdrive 381

Change-Id: I6f1f2bfe13889f7b3a39684769715cbd4f6009e3
2021-07-07 22:26:45 +00:00
Rucha Katakwar
99ebd95ef1 Camera: Restore FastNative annotation.
FastNative annotations were removed from native methods since it can't
be used with 'synchronized'. These methods need not be synchronized.
As per comments in ag/13184856, when the annotations were added first
effect was that ART did the fast native calls but because synchronized
fast native methods are not supported it was not doing the synchronized
nor the unlock at exit.So FastNative but not synchronized.

Removing synchronized and restoring FastNative annotation to optimize.
Did sanity testing like open/close camera,taking photos,clear all apps.

bug:175396433

Test: Camera ITS scene0 Pass, All Camera CTS tests Pass.
Change-Id: Ib7acd363120ee0bf2a1dea92628b4697f3b211bb
2021-07-07 22:20:27 +00:00
Evan Severson
83ed960b96 Update documentation about the SensorPrivacyManager
Remove information about system api methods so they don't end up in the
public documentation.

Test: None
Fixes: 193049421
Change-Id: Iff2bae46f935b63366c737dab6610da7b3ffff39
2021-07-07 12:50:13 -07:00
Shuzhen Wang
6ae7bfcf02 Camera: Clarify zoom and crop behavior for capture result
Test: Build
Bug: 191317747
Change-Id: I403a1019be8c0cdcd69519bf4b17142c3b1726b2
2021-07-07 10:51:29 -07:00
Jayant Chowdhary
f9158d2217 Merge "camera2: Update mandatory streams for ultra high resolution sensors." into sc-dev 2021-07-03 05:35:54 +00:00
Jayant Chowdhary
53be09b2df camera2: Update mandatory streams for ultra high resolution sensors.
The updated mandatory streams include default sensor pixel mode targets
in addition to maximum resolution sensor pixel mode targets, in the same
camera capture session. This is so that sensor pixel mode can be
switched per CaptureRequest without creating a new session.

Bug: 184574750

Test: Camera CTS

Change-Id: Idc2c23f4942942fb81f243dc7ffea5dcbf94dec5
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-07-02 12:04:59 -07:00
Joshua Mccloskey
55ffd5b10c Merge "Added rate limiter for calibration notification" into sc-dev 2021-07-02 14:14:09 +00:00
Curtis Belmonte
80cfdd10db Merge "Don't attempt caching for BiometricManager.Strings" into sc-dev 2021-07-01 20:47:01 +00:00