Commit Graph

5143 Commits

Author SHA1 Message Date
Lee Shombert
9a686c07ba Merge "Prepare PropertyInvalidatedCache for SystemApi" 2022-01-06 23:14:05 +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
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
Ioannis Ilkos
0bde67ab00 Change close guard logged messages
Unless we are looking at stack traces (e.g. from strict mode) it's not
possible to identify which type of object is not being closed (most
methods are 'close' or 'release). Change the logged text to clarify.

Change-Id: Ib90eac716f43c2c2caf8d8c6fb64a7bd90562da9
Test: manual
2021-12-21 11:46:10 +00:00
Arthur Hung
f885746db7 Prevent false touch when folding device (2/2)
This CL will add new api to cancel current touch when fold transition
started.

Bug: 203549969
Test: manual
Change-Id: Id03fbeb05014dcb9f99901c36db1a88cbe110880
2021-12-16 08:39:46 +00:00
Arthur Ishiguro
b04c63a1bc Fix typo on NanoAppState documentation
Bug: 194287786
Test: None
Change-Id: I13c8d06cdae4fd2693d9378fbbbdb05cdc38f218
2021-12-15 23:16:12 +00:00
Arthur Ishiguro
84c6d95084 Merge "Expose NanoAppRpcService from nanoapps" 2021-12-15 22:00:26 +00:00
Bernardo Rufino
3d10fb4b83 Merge "Migrate unsafe parcel APIs in framework-minus-apex" 2021-12-15 19:15:58 +00:00
Bernardo Rufino
90bb3709dc Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
2021-12-15 18:21:38 +00:00
Arthur Ishiguro
3fcc716bdc Expose NanoAppRpcService from nanoapps
Bug: 194287786
Test: Add fake RPC service and verify through logs
Change-Id: I563c6e97d300957179a380b25756ac11f66ab171
2021-12-15 02:19:42 +00:00
Rucha Katakwar
0b77c138ad Merge "Camera: Torch strength control API." 2021-12-14 17:33:33 +00:00
John Reck
20d7333d6d Merge "Reduce SurfaceControl feature gap to NDK API" 2021-12-13 20:00:50 +00:00
Rucha Katakwar
748da4343c Camera: Torch strength control API.
This change contains below new public APIs:
1. Change the torch strength level.
2. Get the torch brightness level.
3. Callback when torch strength level is changed.

Bug: 200174275

Test: atest -c cts/tests/camera on aosp_cf_x86_64_phone-userdebug
Change-Id: I8b2d3a7dd9114986d3171832744a3dd6db092a48
2021-12-10 21:17:14 -08:00
Christine Franks
c74e2e0ee7 Merge "Remote input interfaces, events, and injection" 2021-12-10 23:38:02 +00:00
TreeHugger Robot
b1379e7dfa Merge "Camera: Update JPEG size override condition for MPC13" into sc-v2-dev am: 1efdec0980 am: db5e01949e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16409018

Change-Id: I92bb6aa1441c452c30a7800cdb7e509d3a28c361
2021-12-10 21:39:58 +00:00
TreeHugger Robot
db5e01949e Merge "Camera: Update JPEG size override condition for MPC13" into sc-v2-dev am: 1efdec0980
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16409018

Change-Id: I7e55ac5aa88aee72792fdb91cc78a90e49687c49
2021-12-10 21:15:22 +00:00
TreeHugger Robot
1efdec0980 Merge "Camera: Update JPEG size override condition for MPC13" into sc-v2-dev 2021-12-10 21:08:00 +00:00
Christine Franks
c4cf03b162 Remote input interfaces, events, and injection
Bug: 204081582
CTS-Coverage-Bug: 208247880
Test: atest FrameworksServicesTests:VirtualDeviceManagerServiceTest
and atest FrameworksCoreTests:android.hardware.input

Change-Id: Ic10e62b0d95d563aed59ed9bb8caba6d506176b7
2021-12-10 10:17:31 -08:00
John Reck
7f55b13182 Reduce SurfaceControl feature gap to NDK API
Bug: 200697201
Test: atest android.view.cts.SurfaceControlTest

Change-Id: I1d0cff355714acb5668952b3d7f6fc0c15952523
2021-12-09 17:15:11 -05:00
Arthur Ishiguro
b6f02300a8 Expose ContextHubClient ID
Bug: 194287786
Test: Manual check ID is correct
Change-Id: Ia240a88e5687564fd339da3fab61437e3015da83
2021-12-09 18:34:57 +00:00
Chilun
64123f9899 Add createVirtualDisplay in DisplayManager for VirtualDeviceManager
Bug: 201712607
Test: atest DisplayMnagerServiceTest
      Manual
Change-Id: I161f281fc01efb03b0c2544ae2cefb1b89804629
2021-12-09 13:25:32 +08:00
Joshua Mccloskey
a2d1b70fbd Merge changes from topic "faceCameraSensorPrivacy" into sc-v2-dev am: 698f40caf7 am: fa02344fe0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16285463

Change-Id: I170dc09c786ad552f3d66bb6ec985f5c2e7cfb12
2021-12-08 07:41:12 +00:00
Joshua Mccloskey
fa02344fe0 Merge changes from topic "faceCameraSensorPrivacy" into sc-v2-dev am: 698f40caf7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16285463

Change-Id: I9982667e2035ad3d88a614b4ed5e8d5747c42ed4
2021-12-08 07:26:21 +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
Nate Myren
0f021a16fe Merge "Open SensorPrivacy and WRITE_SECURE_SETTINGS to PC" 2021-12-06 22:43:19 +00:00
Sally Qi
a54976ec22 Merge "Add DataSpace API to convert between ADataSpace and ColorSpace" 2021-12-02 19:02:12 +00:00
Joe Bolinger
beedf62ae3 Merge "Prompt for confirmation when sfps is active and the power button is pressed." 2021-12-02 18:16:52 +00:00
Antony Sargent
fead48301a Merge "Add a flag for allowing always unlocked virtual displays" 2021-12-01 17:12:48 +00:00
John Reck
c76b560102 Merge "Add owners for HardwareBuffer & friends" am: e8c5cf956f am: 200d79d156 am: 8ca80dbdee am: 7be726800b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1906882

Change-Id: If42f3bbf1c483b36b7762d0226585711665def95
2021-12-01 03:07:24 +00:00
John Reck
7be726800b Merge "Add owners for HardwareBuffer & friends" am: e8c5cf956f am: 200d79d156 am: 8ca80dbdee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1906882

Change-Id: I45e75266784750ccde6323320b53a4d03027fb11
2021-12-01 02:54:15 +00:00
John Reck
8ca80dbdee Merge "Add owners for HardwareBuffer & friends" am: e8c5cf956f am: 200d79d156
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1906882

Change-Id: I3a8f958ee96426071190d4b81be7fd44178b18c4
2021-12-01 02:35:45 +00:00
John Reck
200d79d156 Merge "Add owners for HardwareBuffer & friends" am: e8c5cf956f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1906882

Change-Id: I98c2f9f753b1434ab899dfaf5ab8772a3573bb02
2021-12-01 02:13:15 +00:00
Antony Sargent
e5058b0cc3 Add a flag for allowing always unlocked virtual displays
Bug: 201555593
Test: atest ActivityTaskManagerServiceTests DisplayManagerServiceTest
Change-Id: I23ae346b0413603582d2543c576d2542244421f6
2021-11-30 17:48:58 -08:00
John Reck
b7b469bb28 Add owners for HardwareBuffer & friends
Test: this
Change-Id: I36531490b7736bc4ac9d8693fc3feffb4058ad6e
2021-11-30 18:42:52 -05:00
Naomi Musgrave
98f8b55975 [DO NOT MERGE] Revert "[2/n] Display stack provides DisplayInfos" am: 4dfa01a86e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16273545

Change-Id: Ide06de4f8466790e47fd7e99b29cb55ce70b2add
2021-11-30 16:54:01 +00: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
TreeHugger Robot
9205050ae2 Merge "Adding API for creating virtual display with DWPC in system_server" 2021-11-30 12:31:20 +00:00
Chilun
6d1c2e92f5 Adding API for creating virtual display with DWPC in system_server
Bug: 201712607
Test: manual
Change-Id: Idc712c654c59cb38e023a81994a3acf8c5a0b859
2021-11-29 17:10:57 +08:00
Philip Junker
ea142b10f1 Simplify javadocs of KeyCharacterMap#hasKeys() and InputManager#hasKeys()
Test: only javadocs changed
Bug: -
Change-Id: I47f244790e490b049a9286586c237a3af09f804e
2021-11-25 11:39:25 +01:00