Commit Graph

5182 Commits

Author SHA1 Message Date
Emilian Peev
5e32d1ae91 Merge "Camera: Enable 10-bit output camera API" 2022-01-19 19:21:30 +00:00
Thiébaud Weksteen
1acb7b93dd Merge "Transition SerialManager to @EnforcePermission" am: dd9db63692 am: ada390bead am: ed7e6f6bdf am: a233ce9dc7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1946227

Change-Id: Iac629eab14a50b09549b92386aa6ca3265c75c3e
2022-01-19 01:16:02 +00:00
Thiébaud Weksteen
a233ce9dc7 Merge "Transition SerialManager to @EnforcePermission" am: dd9db63692 am: ada390bead am: ed7e6f6bdf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1946227

Change-Id: Id09a90dcc98540e1ad09947dceac9afd8be91e83
2022-01-19 01:01:51 +00:00
Thiébaud Weksteen
ed7e6f6bdf Merge "Transition SerialManager to @EnforcePermission" am: dd9db63692 am: ada390bead
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1946227

Change-Id: I0e5fb34d0a93f0d0ac695d6ba3a46846171b7b70
2022-01-19 00:50:34 +00:00
Thiébaud Weksteen
dd9db63692 Merge "Transition SerialManager to @EnforcePermission" 2022-01-19 00:28:57 +00:00
Emilian Peev
146945464b Camera: Enable 10-bit output camera API
Allow camera clients to query and select a specific 10-bit
dynamic range profile when initializing camera capture
sessions.

Bug: 195946346
Test: Camera CTS
Change-Id: If46c16a7ea95b772dcaa3ae36807ed73d197749f
2022-01-18 14:30:20 -08:00
Brian Duddie
796fa1f02d Expose new head tracker sensor type
Bug: 210156629
Test: n/a
CTS-Coverage-Bug: 214618172
Change-Id: I766f41d78bd3619cdd25849b46912f23ac8427a7
2022-01-18 17:52:56 +00:00
Yan Han
d708555b3b Merge changes I958029a4,I45653246,I49161c8f,I1c862e86,I5e8c0bbe, ...
* changes:
  Add action to query <Set Audio Volume Level> support
  Add feature action for sending <Give Features>
  Update CEC network with feature support on receiving <Report Features>
  Create class for building and parsing <Report Features>
  Validate all messages on construction
  Keep DeviceFeatures updated in local devices.
  Add CEC feature tracking to HdmiDeviceInfo
  Refactor HdmiDeviceInfo construction to use a builder
2022-01-17 10:22:16 +00:00
Eric Laurent
d7ca91507b Merge "Sensor: expose sensor UUID to sytem and audio users" 2022-01-15 10:33:44 +00:00
David Zeuthen
d1fdef6927 Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d am: 62c776a7c2 am: 2bf36b756d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: I3ab418b52a3915ac324baa59f38fb936e2eee5b4
2022-01-14 22:14:15 +00:00
David Zeuthen
2bf36b756d Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d am: 62c776a7c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: Idb4d1ddd89a5ca58ccc852c67f098dad04cb1c5c
2022-01-14 21:56:18 +00:00
David Zeuthen
62c776a7c2 Merge "identity: Add multi-document presentation support." am: 91b96e3454 am: ae0d53c78d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1824674

Change-Id: I8b5ade103c4275871e990369c36480013f47f129
2022-01-14 21:39:07 +00:00
David Zeuthen
91b96e3454 Merge "identity: Add multi-document presentation support." 2022-01-14 21:07:03 +00:00
Joe Bolinger
0cc4a29f4a Merge changes Ifb73b014,Idd1485f1
* changes:
  Check current user when the operations runs for fingerprint hidl.
  Revert "Revert "Fix enrollment cancelation race conditions.""
2022-01-14 19:21:03 +00:00
Yan Han
2af8848d69 Update CEC network with feature support on receiving <Report Features>
Test: atest HdmiCecMessageValidatorTest
atest DeviceFeaturesTest
Bug: 199144863

Change-Id: I49161c8fd5ff2295b8654c8903cc548859d62664
2022-01-14 18:36:12 +01:00
Yan Han
23181eb8a6 Add CEC feature tracking to HdmiDeviceInfo
HdmiDeviceInfo now contains an object for tracking features
whose support is communicated in the [Device Features] operand.

Bug: 204854610
Test: atest DeviceFeaturesTest
Change-Id: Id2e19fb2e4480b5ed88529fd15012c7abad5d3a7
2022-01-14 18:36:11 +01:00
Yan Han
8bd2ec2f22 Refactor HdmiDeviceInfo construction to use a builder
The builder makes it easier to copy a HdmiDeviceInfo with a few parameters changed.

All HdmiDeviceInfo constructors are replaced by static factory methods:
- The factory methods for MHL devices and hardware port devices retain their original parameters and use the builder internally.
- The factory method for CEC devices returns a builder; most parameters
are optional and are set individually.

Change-Id: I488cc76570eaa5433ae1d723dc19d65600d20319
Bug: 204854539
Test: atest com.android.server.hdmi
2022-01-14 18:36:06 +01:00
Kriti Dang
1774563ec0 Merge "Runtime resolution changes" 2022-01-14 08:28:12 +00:00
Joe Bolinger
446644041b Revert "Revert "Fix enrollment cancelation race conditions.""
This reverts commit f4dc031e6c.

Reason for revert: Reapplying with additional change to fix the issue that broke HIDL clients.

Change-Id: Idd1485f182cf841b96ced1dab4b8330ff3b57c2a
2022-01-13 09:54:55 -08:00
Arthur Ishiguro
9ee529d8e0 Merge "Make ContextHubClient.getId() return a 16-bit value" 2022-01-13 17:06:28 +00:00
Eric Laurent
c4399988e8 Sensor: expose sensor UUID to sytem and audio users
Allow privileged UIDs (system and audioserver) access to
the complete UUID of dynamic sensors.

Bug: 210803914
Test: atest SensorTest
Change-Id: Ib03532a9ee58206cb5e94a330cdc87efb5618527
2022-01-13 16:15:53 +01:00
Kriti Dang
ecf14412d3 Runtime resolution changes
Changed the names of existing display mode APIs.
Added similar APIs in Display class, so that
resolution and refresh rate settings can be pesisted for each display.
The APIs can now be used to set display mode (or only resolution or
refreshRate).

Bug: 206911689
Test: atest DefaultDisplayModeTest

Change-Id: I19655fc347d36e45b5664e2b6faa3d58b5d7004c
2022-01-13 13:47:59 +01:00
bsears
8ba50e5ce4 Merge "Revert "Fix enrollment cancelation race conditions."" 2022-01-13 06:38:54 +00:00
Daniel Chapin
f4dc031e6c Revert "Fix enrollment cancelation race conditions."
This reverts commit c7a7ee892a.

Reason for revert: Droidfood blocking bug: 213962104

Change-Id: I370cafcac7e70febbb77a05647a3fd5d0a158abd
2022-01-13 02:43:44 +00:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Arthur Ishiguro
71c765985b Make ContextHubClient.getId() return a 16-bit value
Limit the return value range based on feedback to reflect the 16-bit
value returned from the framework.

Fixes: 214028356
Test: None
Change-Id: Idaecebd9219e38fd5e04122043274b8a524d8bae
2022-01-12 18:43:04 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
Thiébaud Weksteen
c4895c4aa6 Transition SerialManager to @EnforcePermission
Use the new @EnforcePermission annotation for SerialService.

Test: Manually inspect ISerialManager.java, the permission checks are
      correctly generated.
Test: Run SerialChat app as regular app, SecurityException triggered
      when launching the app.
Test: Run SerialChat as priv-app. Access is granted, the app executes
      normally.
Bug: 197828948
Change-Id: Ide1d2809f2226f7cd84efa0d364dc78da726f294
2022-01-12 16:26:09 +11:00
Bernardo Rufino
c6ebb14b7d Merge "Migrate unsafer parcel APIs [2]" 2022-01-11 19:20:36 +00:00
David Zeuthen
6fc37331a6 identity: Add multi-document presentation support.
This new PresentationSession interface enables an application to do a
multi-document presentation, something which isn't possible with the
existing API. As a practical example of this consider presenting both
your Mobile Driving License and your Vaccination Certificate in a single
transaction.

Also update the documentation for IdentityCredential to clarify that
the same AuthKey is used for multiple getEntries() calls on the same
credential.

Also deprecate existing IdentityCredential.getEntries() method and
related methods and classes.

Bug: 197965513
Test: New CTS tests and new screen in CtsVerifier
Change-Id: I74534969143882552407917a82f44d43da12711c
2022-01-11 10:40:51 -05:00
Leon Scroggins
a8693ecd42 Merge "DisplayManager: Add an API to query for DISPLAY_DECORATON" 2022-01-07 17:11:47 +00:00
Leon Scroggins III
c66a2ac732 DisplayManager: Add an API to query for DISPLAY_DECORATON
Tunnel through SurfaceControl to determine whether the HWC has this
capability. This allows clients (i.e. SystemUI) to know whether they can
use Composition.DISPLAY_DECORATON. If so, they may want to render
differently (i.e. in A8). See Ib948c38ee189877eda675a6342cb70099f66122b
for an example.

Bug: 193170859
Test: manual
Test: TODO
Change-Id: I9904452b6408199bb1f86de9e21132e4d4444e1a
2022-01-07 09:41:01 -05:00
TreeHugger Robot
b1866650e5 Merge "Remove BLOCK_FLAG_SLIPPERY constant" 2022-01-07 03:44:42 +00:00
Joe Bolinger
ec41e351d3 Merge "Fix enrollment cancelation race conditions." 2022-01-06 23:51:49 +00:00
Rucha Katakwar
a94b166036 Merge "camera: allow GPU usage for isSurfaceForHwVideoEncoder" 2022-01-06 23:39:38 +00:00
Lee Shombert
9a686c07ba Merge "Prepare PropertyInvalidatedCache for SystemApi" 2022-01-06 23:14:05 +00:00
Bernardo Rufino
74ee11c3f4 Migrate unsafer parcel APIs [2]
Manually migrate the few cases of:
* readArray()
* readParcelableArray()

To the new parcel APIs that take the expected type as the last
parameter. This enhances security because it prevents unexpected types
*before* running unparcelling code. More details at go/safer-parcel.

Owners, please check that the type of the objects expected is always a
subtype of the type provided as the 3rd parameter. This is usually easy
to verify due to casts that happen shortly after.

These changes often allowed further transformations but I decided to
avoid them to keep this change small and targeted.

This was manual since it's tricky to get lint to infer the type in
those cases and it was only a few.

Bug: 195622897
Test: TH passes
Change-Id: I262ed7cd6d3bc15b32e9296e88a8a67fdb59e880
2022-01-06 18:35:31 +00:00
Siarhei Vishniakou
131bd82f10 Remove BLOCK_FLAG_SLIPPERY constant
We are no longer logging this information, so this constant / bug number
can be deleted.

Bug: 157929241
Test: none
Change-Id: I6238737fe101415a87b231208fd99a388deb82fc
2022-01-06 04:38:19 -08:00
Joe Bolinger
c7a7ee892a Fix enrollment cancelation race conditions.
This applies the same request/cancel mechanism as commit bdd477a5d1.

Refactor the scheduler into smaller components and add missing test coverage.

Fix: 210090299
Bug: 208303000
Test: atest UserAwareBiometricSchedulerTest BiometricSchedulerTest BiometricSchedulerOperationTest  SensorTest Face10Test
Test: manual (enroll and quickly tap "add another" and then "do it later")
Change-Id: I0c7e4006e6ac6e6c3dc115046fa80d9e60f4bd95
2022-01-06 00:33:24 +00:00
Treehugger Robot
88a15c822e Merge "Fix deadlock issue." am: 6619bac824 am: cadcd9c225 am: acc96efcfa am: efcdf5b5a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918077

Change-Id: I3eb16c525fa951590ea0d90aa95127acd9185265
2022-01-04 18:37:25 +00:00
Treehugger Robot
efcdf5b5a4 Merge "Fix deadlock issue." am: 6619bac824 am: cadcd9c225 am: acc96efcfa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918077

Change-Id: Icb20857776295337f74496b85fa1dc9a36f8e537
2022-01-04 18:12:45 +00:00
Treehugger Robot
acc96efcfa Merge "Fix deadlock issue." am: 6619bac824 am: cadcd9c225
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918077

Change-Id: I1a1c9b2d437ea87c4eeecbd9ac5f2c1357cfcd17
2022-01-04 17:49:56 +00:00
Treehugger Robot
6619bac824 Merge "Fix deadlock issue." 2022-01-04 17:08:52 +00:00
Lee Shombert
0cece3898b Prepare PropertyInvalidatedCache for SystemApi
Bug: 152453213
Tag: #refactor

This commit prepares PropertyInvalidatedCache to function as a system
api.  Specifically, the methods recompute() and bypass() which may be
overridden by clients are now public (instead of protected).  This
forces an update to all existing clients, to accommodate the change in
method visibility.

Two small changes have been made as cleanup:

 1. The awkwardly named debugCompareQueryResults() is now
    resultEquals(), which is more or less consistent with how other
    equality tests are named in Android.  This name change affects two
    clients.

 2. PackageManager has changed to use resultEquals() instead of
    maybeCheckConsistency().  This provides a simpler and more
    consistent use of the APIs.  maybeCheckConsistency() has been made
    private.

Test: atest PropertyInvalidatedCacheTests

Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
2022-01-04 08:13:59 -08:00
jiayongqiang
d2280b8107 Fix deadlock issue.
It might cause deadlock sometimes:

The locking order of setEventsMask is:
    registerDisplayListener -> <DMG.mLock> -> setEventsMask -> <class lock>;

The Locking order of handleMessage is:
    Looper.loop -> Looper.loopOnce -> Handler.dispatchMessage -> handleMessage -> <class lock>;

Therefore, when the registerDisplayListener is called by client,
the DisplayListenerDelegate.handleMessage also called by DMS's callback,
at this time, if the method with DMG.mLock is called in handleMessage(),
it will lead to deadlock.

Test: (For example)
Thread A:
DisplayListenerDelegate.handleMessage() -> <class lock>
DisplayListener.onDisplayChanged() -> DMG.getCompatibleDisplay() ->
DMG.getDisplayInfo() -> <DMS.mLock>

Thead B:
DMG.registerDisplayListener() -> <DMS.mLock> -> DisplayListenerDelegate.setEventsMask() -> <class lock>

Signed-off-by: jiayongqiang <jiayongqiang@xiaomi.com>
Change-Id: Ie1a8728339c16fa8f4c4f5c758821c836fa1c96b
2022-01-04 18:29:45 +08:00
Michael Groover
a052fa6c8e Mark SystemSensorManager receiver as not exported
Bug: 161145287
Test: Build
Change-Id: If84dbc83fd13bf531e3d5c36bbaf3bc9c90da286
2021-12-30 01:09:07 +00:00
Lajos Molnar
959bb219da camera: allow GPU usage for isSurfaceForHwVideoEncoder
Modern video encoders rely on GPU for some of their preprocessing, so video
encoder buffers will be allocated with GPU usage set.

Bug: 193772557
Bug: 204504047
Change-Id: I84b60fdd3f9d511b39185c1a31799f2b1514e166
2021-12-23 09:41:19 -08:00
Arthur Ishiguro
d7d39a881b Improve ContextHubClient.java documentations
- Remove IllegalExceptions @throws for getId()
- Add <p> markers

Bug: 210923723
Test: None, doc only
Change-Id: Ie7804429b7f183754e7f8a85782e91f123c0f054
2021-12-22 01:11:46 +00:00
TreeHugger Robot
66eca70ab0 Merge "Change close guard logged messages" 2021-12-21 15:55:19 +00:00
Arthur Hung
2c84c29d3d Merge "Prevent false touch when folding device (2/2)" 2021-12-21 15:07:41 +00:00