Commit Graph

3626 Commits

Author SHA1 Message Date
Ytai Ben-tsvi
3917b729a6 Merge changes Ibf4ecdb4,I1e4adf9f into rvc-dev
* changes:
  Correctly propagate service state change
  Support null audio format in recognition event
2020-06-10 19:31:42 +00:00
TreeHugger Robot
8aa60f69e9 Merge "Camera: clarify eviction behavior within the same application" into rvc-dev 2020-06-10 18:17:42 +00:00
TreeHugger Robot
a27465258a Merge "Revert "Camera: Fix race for onCaptureBufferLost callback"" into rvc-dev 2020-06-10 16:33:37 +00:00
Greg Kaiser
22abb8d0c1 Revert "Camera: Fix race for onCaptureBufferLost callback"
Revert submission 11415576-bufferErrorLossFix

Reason for revert: Breaks Camera on at least the wembley device
Reverted Changes:
I12b716acc:Camera: Fix race for onCaptureBufferLost callback
I43f0f5ea1:Camera: Add lastCompletedFrameNumber in CaptureRes...

Bug: 158622719
Change-Id: Id95d0f157c0f940cc80d0fb3c8f95d62968a4745
Test: Locally tried this revert on rvc-dev on a wembley, and now the Camera works
2020-06-10 05:41:44 +00:00
Ytai Ben-Tsvi
46d87b7927 Correctly propagate service state change
Due to a surprising behavior of Handler.obtainMessage(), the argument
that indicated whether the service is available was always read as 0
(enabled), and we never correctly handled the service being
unavailable (due to concurrent capture).

Bug: 157496890
Test: Enabled debug logging and verified that the message is now
      passed correctly and that indeed that models get inactivated
      when capture starts and reactivated when it stops.
Change-Id: Ibf4ecdb4e4dd0f5a02d5a388afddb205c29eb2ea
2020-06-09 16:05:25 -07:00
Ytai Ben-Tsvi
7caef40ad0 Support null audio format in recognition event
The audio format doesn't always make sense in recognition events, for
example in a failure or abort event, so we allow it to be null.
However since the SoundTrigger.java API doesn't allow that, we inject
a default if it is not available.

Bug: 157496890
Test: Simulated a device that doesn't support concurrent capture,
      reproduced the bug, applied the fix, verified.
Change-Id: I1e4adf9f3ccdc0f62cb9ca5e8c07df3c40a9d2cd
2020-06-09 16:05:19 -07:00
Yin-Chia Yeh
92256e773a Camera: clarify eviction behavior within the same application
Test: build (doc only change)
Bug: 153699385
Change-Id: Ic2d9a72e9aad71f4b47583900f1093a1c7a0f4f8
2020-06-09 14:31:46 -07:00
TreeHugger Robot
918942f462 Merge "Camera: Fix race for onCaptureBufferLost callback" into rvc-dev 2020-06-08 19:28:31 +00:00
Shuzhen Wang
db97350aa1 Camera: Fix race for onCaptureBufferLost callback
The callback holder was removed when the capture sequence is
completed, which is too soon because the buffer loss callback could
potentially arrives later than the capture sequence completion.

Defer the deletion of the callback holder to when the native inflight
request is removed, which takes into consideration of error
notifications.

Test: Camera CTS
Bug: 155353799
Change-Id: I12b716acc9fbaa9791f0498ac77d4470a7448d5a
2020-06-04 18:28:44 -07:00
Amy Zhang
e151e60843 Expose necessary SystemApi as test API for CEC CTS
This CL annotates multiple APIs in the HdmiControlManager as Test APIs.
Also creates a Test api wrapper for aidl interface IHdmiControlService.
HdmiPortInfo is the param under test that is also annotated as Test API.

Test: atest android.hardware.hdmi.cts
Bug: 155113872
Change-Id: I58b483eaaa5fe08f90415a7e044c30a28dc7d7c2
2020-06-04 13:47:37 -07:00
Nick Chalko
75ef06daa5 Merge "CEC: Add listener for HDMI CEC volume control feature" into rvc-dev 2020-06-04 19:03:05 +00:00
TreeHugger Robot
a3aac62786 Merge "Update tier names in biometric constants documentation" into rvc-dev 2020-06-03 01:25:11 +00:00
Curtis Belmonte
43825ac301 Update tier names in biometric constants documentation
Adds references to the new security tier names (Tier 1/2/3) in the
documentation for the corresponding biometric authenticator constants:
- Strong -> Tier 3
- Weak -> Tier 2
- Convenience -> Tier 1

Test: Builds
Fixes: 157266312
Change-Id: I80965e8e5c53f049d91f18f0e114d89f18593400
2020-06-02 16:58:08 -07:00
Marvin Ramin
7ddbb62ccd CEC: Add listener for HDMI CEC volume control feature
Adds a listener to receive updates to the state of the HDMI CEC volume
control features.

Interested parties can register and unregister to get notified about
state updates which are sent on every change to the value.

Test: atest HdmiControlServiceTest
Bug: 152018314
Change-Id: I342d748114bae99b3c3f236502d73bfeac9e9ac5
Merged-In: I342d748114bae99b3c3f236502d73bfeac9e9ac5
2020-06-01 20:13:54 +00:00
Kevin Chyn
20534dcc8d Merge "Send callingUserId from AuthService -> BiometricServiceBase" into rvc-dev 2020-06-01 15:57:00 +00:00
Kevin Chyn
5433cd4070 Send callingUserId from AuthService -> BiometricServiceBase
Since authenticatorIds are collected from AuthService, which is
system_server, we need to get the callingUserId before the code
enters system_server, which clears calling identity.

Test: 1) Set up work profile, install BiometricPromptDemo
      2) Enroll work profile fingerprint
      3) Open work profile version of BiometricPromptDemo
      4) Create biometric-bound keys and authenticate with fingerprint
      Before this change, key was unusable. After this change,
      the key can be used

Fixes: 157486161
Change-Id: I4ec89b9cb13caff397b1a1acd844962736290040
Merged-In: I4ec89b9cb13caff397b1a1acd844962736290040
2020-05-29 23:21:57 +00:00
Nicholas Ambur
779a8966f5 Merge "add SoundTrigger TestApis" into rvc-dev 2020-05-29 03:17:09 +00:00
TreeHugger Robot
aaec0d4ac3 Merge "Generate ACTION_CANCEL event when screen turned off by proximity sensor." into rvc-dev 2020-05-28 18:35:08 +00:00
TreeHugger Robot
5bc3e56a51 Merge "Ensure Java code verifies hinge angle sensor is wakeup" into rvc-dev 2020-05-27 23:54:07 +00:00
Anthony Stange
373eca4301 Ensure Java code verifies hinge angle sensor is wakeup
Previously, only the NDK enforced the default sensor type was wakeup and
if an app called the Java APIs it'd get a null value if there was only a
wakeup version of the hinge sensor.

Bug: 157581504
Test: Run on emulator and verify that getDefaultSensor returns the
sensor instance

Change-Id: Ica13c70a456780891f366394848e4c649f6ea70b
2020-05-27 16:02:16 -04:00
TreeHugger Robot
4586885a63 Merge "Camera: Query default display size from display manager" into rvc-dev 2020-05-21 16:12:40 +00:00
Emilian Peev
46e7450670 Camera: Query default display size from display manager
The current Android API will trigger strict mode
violations in case a context not bound to any
particular display tries to connect to the window
manager service.
To avoid such violations query the default display size
directly from the display manager.

Bug: 157167435
Test: Camera CTS
Change-Id: Icad19ec0227b4945da9e6fcacaec916c5799877f
2020-05-20 17:18:02 -07:00
TreeHugger Robot
d220792d6b Merge "camera2: Add some more docs to getConcurrentCameraIds" into rvc-dev 2020-05-21 00:15:00 +00:00
Jayant Chowdhary
9c8fe18534 camera2: Add some more docs to getConcurrentCameraIds
- specifying the order of camera open and session configuration.
- explaining the use of CONTROL_ZOOM_RATIO with concurrent operation of cameras.

Bug: 151891611

Test: make doc-comment-check-docs

Change-Id: I3ee3f114f7295570aa6af5dbe35bb32db555811b
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-05-20 15:43:47 -07:00
Chris Ye
d6d3559b4d Generate ACTION_CANCEL event when screen turned off by proximity sensor.
When using PROXIMITY_SCREEN_OFF_WAKE_LOCK and screen was turned off by proximity sensor,
input service should generate ACTION_CANCEL, same as display turned off by pressing power button.
Add power state in display view port and notify input service for
display power state change.

Bug: 154074380
Test: atest libgui_test
Change-Id: Icb65aead4b5544182c46101f4ba535f5955ebd6c
Merged-In: Icb65aead4b5544182c46101f4ba535f5955ebd6c
2020-05-19 11:34:37 -07:00
Nicholas Ambur
f39409edaf Merge "fix SoundTrigger.ModuleProperties equals" into rvc-dev 2020-05-18 17:12:46 +00:00
Nicholas Ambur
add0956c25 add SoundTrigger TestApis
Test APIs are added to CTS to use for SoundTrigger system API test
coverage.

Bug: 152354427
Test: cts-tradefed run cts -m CtsSoundTriggerTestCases
Change-Id: Iea8d5f3095481a54520873b5c5e6976dc272b09c
2020-05-18 10:11:02 -07:00
Nicholas Ambur
ba749f87d4 fix SoundTrigger.ModuleProperties equals
Bug: 152354427
Test: atest SoundTriggerTest
Change-Id: I715ecb51e78bcb45f4b3384c0551297289fe30f9
2020-05-18 10:11:02 -07:00
TreeHugger Robot
48105b5c6e Merge "Camera: Docs: Improve info on key removal in CameraCharacteristics" into rvc-dev 2020-05-15 18:17:04 +00:00
Eino-Ville Talvala
1a66adcc56 Merge "Camera: Update documentation for rolling shutter skew" into rvc-dev 2020-05-14 16:49:42 +00:00
TreeHugger Robot
f30c225fcb Merge "Add OWNERS for display, haptics, input and power" into rvc-dev 2020-05-12 20:17:39 +00:00
Michael Wright
2e7e81c950 Add OWNERS for display, haptics, input and power
Bug: 156349083
Test: N/A
Change-Id: Ia8afccfc2e470095ae3d52c827c0ac78b7c120ae
2020-05-12 19:11:13 +01:00
Eino-Ville Talvala
ab3438ec1f Merge "Camera: Fix minor doc formatting error" into rvc-dev 2020-05-12 17:25:11 +00:00
Eino-Ville Talvala
b79cde632a Camera: Docs: Improve info on key removal in CameraCharacteristics
Test: m offline-sdk-docs
Bug: 143565873
Change-Id: I559cf028ec3540df7a851ab344072b7637913550
2020-05-11 14:29:41 -07:00
Eino-Ville Talvala
3a639682b7 Camera: Update documentation for rolling shutter skew
Existing definition was inconsistent, so update it to be consistent
and match what implementations have actually done.

Test: Builds
Bug: 150331548
Change-Id: Ied8e78a36685f3f6416e431307970db3b6191497
2020-05-11 10:24:54 -07:00
Eino-Ville Talvala
403ea08d18 Camera: Fix minor doc formatting error
Test: Builds
Bug: 150331548
Change-Id: Id7b2306486d1a57e0226f641602609debabf7ff9
2020-05-11 10:18:10 -07:00
Alec Mouri
00f681a582 Merge "Dispatch refresh rate callbacks from DMS" into rvc-dev 2020-05-08 23:54:17 +00:00
Alec Mouri
cf3ad873dd Dispatch refresh rate callbacks from DMS
AChoreographer will consume these callbacks in lieu of going through SF
for the callbacks. This is so that DMS can update its view of display
configs before apps receive the refresh rate callback so that apps can
get consistent information.

Bug: 154874011
Test: ChoreographerNativeTest
Test: Manually verify that HWUI is receiving callbacks
Change-Id: I992c247fd16ef414f94a259bbd300bea3e4c9467
2020-05-07 19:19:23 -07:00
Yin-Chia Yeh
ab59e9af27 Merge "Camera: add proper null check for mRemoteDevice" into rvc-dev 2020-05-01 18:05:49 +00:00
Eino-Ville Talvala
2a4de9cf21 Merge "Camera: Improve metadata access JNI performance" into rvc-dev 2020-04-30 22:19:13 +00:00
Eino-Ville Talvala
d95058f1cd Camera: Improve metadata access JNI performance
- 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
2020-04-30 12:59:06 -07:00
Ytai Ben-Tsvi
b6f88a7af7 Handle exceptions on attach
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
2020-04-29 14:54:29 -07:00
TreeHugger Robot
77576fe964 Merge "CEC: Make HDMI CEC volume control configurable" into rvc-dev 2020-04-27 12:26:23 +00:00
Marvin Ramin
da665a67f1 CEC: Make HDMI CEC volume control configurable
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
2020-04-27 12:35:56 +02:00
Ytai Ben-Tsvi
458930753d Deliver internal server errors to the client
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
2020-04-24 16:39:36 -07:00
TreeHugger Robot
f0de93d7b2 Merge "Use Arrays.hashCode in DeviceProductInfo" into rvc-dev 2020-04-24 14:24:25 +00:00
Marin Shalamanov
90fd0b19f8 Use Arrays.hashCode in DeviceProductInfo
Using arrays in Objects.hash() is error prone. Instead we
call Arrays.hashCode().

Test: m services
Bug: 154302664
Change-Id: Icf00fbaa465ef60951998659ae0333b2faf7042b
2020-04-24 13:02:35 +00:00
TreeHugger Robot
1a17016c70 Merge "Camera: Update physical camera request keys documentation" into rvc-dev 2020-04-23 16:39:11 +00:00
Emilian Peev
b30f4ef874 Camera: Update physical camera request keys documentation
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
2020-04-22 09:11:01 -07:00
Jacky Kao
538ee89f2b Merge "Obtain correct screenshot based on device orientation" into rvc-dev 2020-04-22 00:19:35 +00:00