Commit Graph

4853 Commits

Author SHA1 Message Date
Evan Severson
bb7d3f8e6d Merge "Don't show sensor use dialog for system uid" into sc-dev am: eaed206891 am: fadf286088
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15456307

Change-Id: I83d3a3e53724f16c0acac3de09a7833cd7e11ece
2021-08-07 17:59:36 +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
e70ebf462e Merge "Camera: Release extension resources after closing handler thread" into sc-dev am: aae08711e8 am: 41e5128844
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15463697

Change-Id: I69fbcbecc25ee14667374be74729823febff06d9
2021-08-06 18:59:05 +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
5148e13d15 Merge "camera2: Fix backward compatibility breakage for setting metering regions." into sc-dev am: 4eeeee0f14 am: a995813cbc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15451329

Change-Id: Ia200d517ac70a568a517a3adf8b8798c89157359
2021-08-05 18:32:17 +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
6dea0cecb7 Merge "Camera: Fix typos in API doc" into sc-dev am: c0a3b39617 am: 9dad59378d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15463817

Change-Id: Ib5c467598a2bc71a3669229a136f1ed0f21c4186
2021-08-05 00:50:01 +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
Emilian Peev
bedeb6e396 Merge "Camera: Don't override extension surface native format" into sc-dev am: 4b68ed1fe0 am: 18e04fff3f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15456451

Change-Id: I48c0f4dfbc8500188ca326b1365f6095ef265825
2021-08-04 01:17:29 +00: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
0ee8ae0de9 Merge "Revert "MediaProjection captures DisplayArea"" into sc-v2-dev am: 93a74ca03b am: 657edec50f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15432520

Change-Id: If741ec02955e5b926aa2efaacb1c4e6f08e90917
2021-08-03 12:58:44 +00:00
Naomi Musgrave
93a74ca03b Merge "Revert "MediaProjection captures DisplayArea"" into sc-v2-dev 2021-08-03 12:19:43 +00: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
6bc27dc147 Merge "Check the current user in the system server for SensorPrivacyManager" into sc-dev am: 705c7539eb am: 8df2c049f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15420286

Change-Id: I03518db26b65921a61ae4beb000cf3fbb6f5bbf7
2021-07-30 16:16:54 +00:00
Evan Severson
76e817ae0b Merge "Check the current user in the system server for SensorPrivacyManager" into sc-dev am: 705c7539eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15420286

Change-Id: I2b4618d07ce9f957623a72d4da7d9f35bf09b581
2021-07-30 16:08:12 +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
Naomi Musgrave
140ea00402 Merge "MediaProjection captures DisplayArea" into sc-v2-dev am: a4bd8de95c am: 659ae92051
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14843819

Change-Id: I9fe435874d2dee7ecc43369b39dd871f3f614d07
2021-07-30 13:17:54 +00:00
Naomi Musgrave
45dd2a3202 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
Test: atest WmTests:DisplayContentTests
Change-Id: I909e9d32f573aec33869d9f49d6caffc8d7420aa
2021-07-30 09:48:42 +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
2668020d76 Merge changes from topic "b194508189" into sc-dev am: e922ec31aa am: 3c9ba5dc2e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15376189

Change-Id: I43976b3ebaeafaedfbe8c4ed02e59a37038b2f69
2021-07-29 00:49:56 +00: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
667755fd97 Merge "camera2: Add fwk-only tags for SCALER_CROP_REGION and metering regions." into sc-dev am: 782b4e9e08 am: 685f822393
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15349267

Change-Id: Iacded446d4261832f993b06973a2d2e4c0591694
2021-07-28 23:25:17 +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
be617d0031 Merge changes from topic "facemanager-bypassflag" into sc-dev am: 88a506aad4 am: b3dcd737a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15377220

Change-Id: Icecc60228efabb593c1ad35851ffbeee5a1a1d56
2021-07-26 18:41:49 +00: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
Yan Han
0686c5283d Merge changes from topic "Remove HdmiCecLocalDevice#mAddress"
* changes:
  CEC: Remove HdmiControlManager#mLocalPhysicalAddress variable
  CEC: Update port info on hotplug events.
  CEC: Remove duplicate storage of logical address.
2021-07-26 10:15:49 +00:00
Evan Severson
e1c2a3f6d0 Merge "Update mic/cam quicksetting toggles when user changes" into sc-dev am: 4e09234999 am: f24fd234bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15365189

Change-Id: I5f6f44ed972d72d2ed59d99310a0e1b8d7aba4f4
2021-07-24 03:08:27 +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
Aravind Angadi
9f5ec0c7d0 CEC: Remove HdmiControlManager#mLocalPhysicalAddress variable
Remove the cached physical address variable and use physical address
returned by the service when HdmiControlManager is queried for physical
address.

Bug: 159806029
Test: atest CtsHdmiCecHostTestCases
Test: atest FrameworksServicesTests:com.android.server.hdmi
Change-Id: I6c51521ce39df8d1be3f9923c9430112c0cfc584
2021-07-22 11:52:38 +02:00
Ilya Matyukhin
ba2306125f Merge "Fix enrollment preview surface leak" into sc-dev am: 2151a28c7c am: 5075d8d623
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15246716

Change-Id: I7991c66f5c486acaa3e2d5017e3510cb6645ed3d
2021-07-21 18:17:16 +00:00
Ilya Matyukhin
2151a28c7c Merge "Fix enrollment preview surface leak" into sc-dev 2021-07-21 17:41:34 +00:00
Shuzhen Wang
8bab52a783 Merge "Camera: Improve logical camera RAW capture docs" into sc-dev am: 3e72b3e16f am: 53a6b7de48
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15114380

Change-Id: I0cce2ba453917c60ab427bd4c616b4d9da97bff2
2021-07-21 00:44:46 +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
b878370842 Merge "Revert "wifidisplay: restrict broadcast by the proper permission"" into rvc-dev am: 30c6383d1d am: 17d1be8efc am: 5cb13bbebf am: a8fd5a822e am: 89d3ca0141
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15287612

Change-Id: I79d718aef2f9fd69ce6591201b69d6f28ffcf701
2021-07-20 03:28:06 +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
TreeHugger Robot
58a70958aa Merge "Remove LOCATION_HARDWARE from ContextHubManager/Client APIs" 2021-07-20 01:30:51 +00:00
Arthur Ishiguro
bef1b62ac0 Remove LOCATION_HARDWARE from ContextHubManager/Client APIs
Fixes: 191483162
Test: Run PTS tests on existing CHRE devices
Test: Flash on device, verify no security exception is observed
Change-Id: I405423c0981ae2618faa35fd2df9c068d6ead94a
2021-07-19 23:55:37 +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
Arthur Ishiguro
0b577cfbd3 Throw exception for immutable PendingIntents
Fixes: 193833333
Test: Compile
Change-Id: I2ba9e19f8962ef172ecb8defa77a352ad7073ca2
2021-07-16 11:37:45 -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