- Don't use reverse-JNI to access metadata ptr, pass it as an arg instead
- Use @FastNative since the calls are short and bounded in time
Performance improvement:
- On a 10-second trace of camera app running on sargo, percentage of
time used in CameraMetadataNative.get went from 4.36% to 3.77%, a 15%
reduction in time.
Test: atest CtsCameraTestCases
Bug: 150214459
Change-Id: I28d9428beaa7eada6292e24fe6ca1dbd9c2ff153
attach() may throw various kinds of runtime exceptions, and since there
is no way to represent them in attach() other than returning null (it
is not supposed to throw), we should catch them here and log them.
Bug: 153332815
Change-Id: Icbb7643c3abf6c6b0edc9d1eb9a74c38c731acdf
* changes:
Check for null HAT and add logging
6/n: Move logging into AuthSession
5/n: Remove requireConfirmation round trip
4/n: Remove unused parameter
3/n: Add AuthSession#STATE_AUTH_PAUSED_RESUMING
2/n: AuthSession should manage its own state
1/n: Move confirmationRequired logic into sub-modules
<Biometric>Service(s) only need to know about requireConfirmation
for FrameworkStatsLog logging. On the same note, AuthSession is the
source of truth for requireConfirmation, so <Biometric>Service(s) do
not need to pass the value back.
Bug: 149067920
Test: atest com.android.server.biometrics
Change-Id: I5212da7db4fde0bec84eaee83fd25ed0f0225b9a
Using byte for display port is error prone since ports
are in the range [0, 255] and bytes have the range [-128, 127].
This way we need to downcast from int to byte in order to write a
value to display port and also we need to call Byte.toUnsignedInt
every time we want to consume it.
Test: m services
Bug: 153334857
Change-Id: I4dce87c0a411c5d447f62cc5564eb4b8a8fb75f0
Add API (backed by Setting) to enable/disable volume changes via HDMI
CEC for HDMI CEC source devices.
This state is persisted via Settings.
If volume control is disabled, no incoming HDMI CEC commands related to
volume will be processed. If disabled, no HDMI CEC volume control
messages will be sent by the device.
Test: atest com.android.server.hdmi
Bug: 149800547
Merged-In: I83ae9b423122b540b9adb156fb1c6f5964dd6105
Change-Id: I83ae9b423122b540b9adb156fb1c6f5964dd6105
Due to a binder limitation (b/150808347), any unexpected exception
thrown by a binder service while processing an RPC call, will be
silently discarded and the client will get back a default-initialized
result parcelable (i.e. in most cases, won't know that anything wrong
happened).
We work around this issue by throwing a ServiceSpecificException,
which does get delivered, having a special code to designate an
internal error. Errors resulting from a HAL malfunctions will result
in a HAL reboot, which leads to recovery.
Bug: 154089179
Test: Manual verification of basic error recovery scenarios by
injecting HAL error codes and crashes.
Change-Id: Ib5dbe08a362e545501c04204bebad5ab95f5d632
Add API (backed by Setting) to enable/disable volume changes via HDMI
CEC for HDMI CEC source devices.
This state is persisted via Settings.
If volume control is disabled, no incoming HDMI CEC commands related to
volume will be processed. If disabled, no HDMI CEC volume control
messages will be sent by the device.
Test: atest com.android.server.hdmi
Bug: 149800547
Change-Id: I83ae9b423122b540b9adb156fb1c6f5964dd6105
Using arrays in Objects.hash() is error prone. Instead we
call Arrays.hashCode().
Test: m services
Bug: 154302664
Change-Id: Icf00fbaa465ef60951998659ae0333b2faf7042b
1) State calculation, updating, side-effects, outputs are moved
within AuthSession
2) StatusBarService invocations are all within AuthSession
3) PendingSession and CurrentSession are merged into CurrentSession.
PendingSession was mostly the same as CurrentSession, with the
two considerations:
A) It's only ever valid in STATE_AUTH_CALLED (waiting for sensors
to become ready)
B) It's possible for new authentication to be requested while
CurrentSession is in-progress.
Previously, the PendingSession would request <Biometric>Service(s)
to prepare for auth, which would cancel any existing authentications
and send ERROR_CANCELED to BiometricService, ending the CurrentSession
lifecycle. With this change, if authentication is requested while an
existing AuthSession is in progress, it will immediately send
ERROR_CANCELED to the previous caller and cancel sensors if necessary.
ERROR_CANCELED that are received from the sensors will not affect
the new AuthSession (as expected), since the cookies will no longer
match.
Bug: 149067920
Test: atest com.android.systemui.biometrics
Test: atest com.android.server.biometrics
Change-Id: Ia89920d2225eb9a71f25a5b9fbbd36f92a550127
Align physical camera request key documentation with the
camera service implementation. Specifically remove any
repeating request limitations.
Bug: 154673381
Test: Successful doc build
Change-Id: I563542e819ef57a99f762d7cfd653cced2423ebb
When taking the screenshot, passing the width and height
of the display, and the rotation according to the current
device orientation.
Bug: 153173726
Test: a11y CTS & unit tests
Test: manual test
Change-Id: I19eea2046da282155719b1dfdf9a3f53ad95e13b
When taking the screenshot, passing the width and height
of the display, and the rotation according to the current
device orientation.
Bug: 153173726
Test: a11y CTS & unit tests
Test: manual test
Change-Id: I19eea2046da282155719b1dfdf9a3f53ad95e13b
Fixing the typo by removing the parameter in the javadoc.
@CallbackExecutor will automatically generate documentation for this
parameter
Test: n/a
Change-Id: Ie78028d0b1fb1b48ee7b07585734a2301135636b
KeyphraseEnrollmentInfo is used for testing the system enrollment
application support within GTS.
Bug: 153264697
Test: gts-tradefed run gts-dev -m GtsAssistIntentTestCases \
-t com.google.android.assist.gts.KeyphraseModelManagerTest# \
testAllSystemKeyphrasesAndLocales
Change-Id: I66558cf849f2815f2c917d128f9f9cc0673750ef
Merged-In: I66558cf849f2815f2c917d128f9f9cc0673750ef