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
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
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
The advanced extension session request processor must not hold the
'mInterfaceLock' when calling the camera device implementation as it
could result in a deadlock with the camera device close that can
run at the same time and try to acquire the same locks in reverse order.
The request processor will only read from 'mCameraConfigMap' which is
initialized only once during session setup and will not change during
the session lifetime.
A sample stack trace will look like this:
Service thread:
1) android.hardware.camera2.impl.CameraCaptureSessionImpl.stopRepeating
2) android.hardware.camera2.impl.CameraAdvancedExtensionSessionImpl$RequestProcessor.stopRepeating
Client thread:
1) android.hardware.camera2.impl.CameraAdvancedExtensionSessionImpl.release
2) android.hardware.camera2.impl.CameraDeviceImpl.close
Bug: 202074988
Test: Manual using application,
Camera CTS
Change-Id: If992667a7d7e54be5bea1fcc4b1d71ec1b895ca0
CaptureFailure is created with a "dropped" parameter. But what's passed
in is mayHaveBuffers, which is opposite of "dropped".
Test: Camera CTS, GoogleCamera
Bug: 201967385
Change-Id: I42eb2daa78f116502cb1c5943015ea3f4af3f1e3
Currently DisplayModeDirector casts Vote.PRIORITY_HIGH_BRIGHTNESS_MODE
based on whether High Brightness Mode (HBM) is allowed, rather than
based on whether HBM is actually active. This can lead to cases where
the HBM refresh rate vote is cast when HBM is allowed but not actually
used.
This change corrects this behavior, and makes DisplayModeDirector check
that HBM is both allowed (enabled) and actually in use (active).
Bug: 200851199
Test: atest DisplayModeDirectorTest
BrightnessLevelPreferenceControllerTest
HighBrightnessModeControllerTest
Change-Id: I8cb8f023a6bca11de976866259032143f43d9a4f
Currently, DisplayModeDirector listens to brightness changes from Settings.
However, brightness value in Settings is overridden for various reasons
inside DisplayPowerController before being propagated to HALs. As a
result, the brightness value that DisplayModeDirector is acting on isn't
always the brightness value that gets applied to the display.
This change,
- Changes DisplayPowerController so that the final brightness value (after all
modifications) is saved.
- Changes DisplayModeDirector to use DisplayManager.DisplayListener to
observe brightness changes and then retrieve and act on the final
brightness value saved in DisplayPowerController.
Bug: 199955532
Test: atest DisplayModeDirectorTest
Change-Id: Ia6dd7d194b6913d2942bea9c29a2011b8058beef
Allow setting a different refresh rate for High Brightness Mode for HDR
and for Sunlight.
Bug: 196691596
Test: atest DisplayModeDirectorTest
Test: Manual:
1. Ensure HBM for HDR takes presedence over HBM for Sunlight
2. Ensure app refresh rate votes override bothHBM for Sunlight
Change-Id: I4a29c47f218046d0852178ad5dc7484a86ef8607
The native Jpeg encoder expects rotation in counter
clockwise direction. However according to the Camera2 specification
clients need to pass the Jpeg rotation in clockwise direction.
Flip the client rotation value before passing to the Jpeg encoder.
Bug: 200890552
Test: Manual using sample application,
atest -c
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java
Change-Id: Ib70a8f5b5165d8319d89c2ed4b7509929c2faa71
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
Merged-In: I6f6111ab0ed29ca7f1be01303f0457764d5afe01
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
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)
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
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
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
(cherry picked from commit 5cf033ccb7)
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
(cherry picked from commit 5d5d9eb812)