Commit Graph

3657 Commits

Author SHA1 Message Date
raylinhsu
b14bed88c5 DO NOT MERGE Revert "Allow DeviceConfig to change display settings for high zone"
This reverts commit cf55c21064.

Bug: 176018998
Test: atest DisplayModeDirectorTest
Change-Id: Ib576e16257d7903b39efa8015c2af3be8c0d0c40
2021-01-13 14:04:08 +08:00
TreeHugger Robot
cf91d4b9b9 Merge "Camera: Document behavior when cropRegion and zoomRation conflict" into rvc-qpr-dev 2020-12-03 16:46:12 +00:00
TreeHugger Robot
11bee77de6 Merge changes from topic "r3_flicker_high_brightness" into rvc-qpr-dev
* changes:
  Allow DeviceConfig to change display settings for high zone
  Set fixed fps when ambient or display brightness is high
  Add FakeSettingsProviderRule class
2020-12-02 01:05:39 +00:00
Eino-Ville Talvala
bfa0ffbb9f Fix up some camera API javadocs am: 66a993beeb am: 804134ab87
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13061797

Change-Id: I26aa22702b35761b2ec43e11369514aef80ce663
2020-12-01 22:37:40 +00:00
Eino-Ville Talvala
804134ab87 Fix up some camera API javadocs am: 66a993beeb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13061797

Change-Id: Iaa8732c416f259b2bcf12733bd7afd1f707e0639
2020-12-01 22:24:13 +00:00
Shuzhen Wang
dc921d86ad Camera: Document behavior when cropRegion and zoomRation conflict
In case cropRegion == windowboxing and zoomRatio != 1.0f, specify the
camera framework behavior of overriding cropRegion.

Test: Build
Bug: 172873869
Change-Id: Ic7713260cdd5f51e422be330534dd1e5648ba2fc
2020-12-01 09:35:00 -08:00
Michael Wright
cf55c21064 Allow DeviceConfig to change display settings for high zone
Allow DeviceConfig to change the high zone behavior including
refresh rate and brightness thresholds.

Bug: 166581675
Test: atest DisplayModeDirectorTest
Test: adb shell device_config put display_manager refresh_rate_in_high_zone "90"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_display_brightness_thresholds "200"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_ambient_brightness_thresholds "8000"
Change-Id: I2ac8d95f976748d03f6dc2e60725e9ef1213ed6f
Merged-In: I2ac8d95f976748d03f6dc2e60725e9ef1213ed6f
2020-12-01 19:31:52 +08:00
Eino-Ville Talvala
66a993beeb Fix up some camera API javadocs
Test: m offline-sdk-docs
Bug: 173204437
Change-Id: If333d6fd5023d0bc5d778437d1745dcd209ccbd9
Merged-In: If333d6fd5023d0bc5d778437d1745dcd209ccbd9
2020-11-15 23:58:33 +00:00
Emilian Peev
0f1fd8c236 Camera: Track native metadata allocations
Native camera metadata buffers can increase both in size
and count over prolonged periods of camera usage.
Register and track the native buffer allocation in the Java
VM to improve GC.

Bug: 168100424
Bug: 170243539
Test: Camera CTS
Change-Id: I7a10c2f360307a6c1afeecde24dc42184106b872
2020-10-07 18:16:35 +00:00
TreeHugger Robot
55582b0c4a Merge "Camera: Clarify SCALER_CROP_REGION usage" into rvc-dev am: 601e34fdd7 am: 794e42e566
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12586676

Change-Id: Ibf40686e0076d97fe22a970a4695a86fb3cf150a
2020-09-29 17:32:36 +00:00
TreeHugger Robot
794e42e566 Merge "Camera: Clarify SCALER_CROP_REGION usage" into rvc-dev am: 601e34fdd7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12586676

Change-Id: I0ba79c5a129932dd805bb3dbda49f58702631d3d
2020-09-29 17:09:26 +00:00
Shuzhen Wang
477c23ed89 Camera: Clarify SCALER_CROP_REGION usage
1. Document same SCALER_CROP_REGION may map to different aspect
ratio/output size for different sessions.
2. Remove the text in ZOOM_RATIO about using SCALER_CROP to change
aspect ratio.

Test: Build and read docs
Bug: 168493526
Change-Id: I405fe52d0e0a14e6a1cfbec169d33f20715fa4fb
2020-09-16 11:53:38 -07:00
Santos Cordon
91cef65eaa Merge "Allow Power-button to temporarily ignore proximity sensor." into rvc-d1-dev am: fdc35a2491
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12282513

Change-Id: I0ba859b9fdebae7dae046516886eb5594ff779cc
2020-08-07 09:46:30 +00:00
Santos Cordon
31c24e048f Allow Power-button to temporarily ignore proximity sensor.
If a device has an active proximity wakelocks while proximity
is in the "near" state, a press of the power button will temporarily
ignore proximity sensor allowing the screen to turn back on.
It will stop being ignored where there is a change to the
proximity sensor state.

Bug: 162443904
Test: atest PowerManagerServiceTests, atest DisplayManagerTests
Change-Id: I2656cca3e643e278cd5e5fedc2d74d9cbca82c2b
2020-08-03 16:26:51 +00:00
TreeHugger Robot
0fa3c008a7 Merge "Update mandatory concurrent stream docs to specify support for lower resolutions." into rvc-dev am: 83578eaa95 am: 8d514c97e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12230970

Change-Id: I7bcfdc904e81031ea122dd86adf4d323bf5abf38
2020-07-28 02:21:12 +00:00
TreeHugger Robot
83578eaa95 Merge "Update mandatory concurrent stream docs to specify support for lower resolutions." into rvc-dev 2020-07-28 01:47:32 +00:00
Jayant Chowdhary
d537ce04fb Update mandatory concurrent stream docs to specify support for lower resolutions.
Bug: 162110784

Test: make doc-comment-check-docs

Change-Id: I8a2677df320f8f496b185fd80234f04dd9eed97f
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-07-27 17:18:12 -07:00
Kevin Chyn
d24084e95a Update authentication when encrypted or lockout
Fingerprint authentication should not expose accept/reject/lockout
when the user is encrypted or locked out. This is possible with
IBiometricsFingerprint@2.1 since lockout is controlled by the framework.

IBiometricsFace@1.0 does not support this since lockout is controlled
in the HAL (or lower).

Bug: 79776455

Test: On fingerprint device, during encrypted or lockdown, any finger
      works, lockout never occurs
Test: BiometricPromptDemo, normal path is run (e.g. incorrect fingers
      are rejected)
Test: Test no effect on face device
Test: atest KeyguardUpdateMonitorTest

Change-Id: I9ded8efd80d4f8b92ce054262e721853703c6437
Merged-In: I6c9717d1f8ed3e844b3d92727396e2ce2e7fd94f
2020-07-15 21:59:10 -07:00
Curtis Belmonte
29d2bf129a Merge "Update biometric constant docs from tier to class" into rvc-dev 2020-06-26 20:10:50 +00:00
Jayant Chowdhary
d7feae01a5 camera2: Add mandatory stream combinations for depth only cameras.
Bug: 159247271

Test: atest ConcurrentCameraTest.java

Change-Id: I89d6209d36f76aa8ec19aaafd81abf1cfd025463
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-06-23 17:45:23 -07:00
TreeHugger Robot
8b3783c8e5 Merge "Camera: Adjust documentation and comments for insensitive language." into rvc-dev 2020-06-21 22:53:21 +00:00
Eino-Ville Talvala
14c753626e Camera: Adjust documentation and comments for insensitive language.
Test: Builds
Bug: 159480149
Change-Id: I0daadbfa6505339bdcec4a49c6e4577424832f75
2020-06-19 15:26:39 -07:00
TreeHugger Robot
08465447a2 Merge "Camera: Relax physical stream cropping behavior" into rvc-dev 2020-06-19 21:10:22 +00:00
Shuzhen Wang
84a475a20f Camera: Allow reprocessing session to configure physical streams
Do not disallow reprocessable session to use physical streams.

At the same time, we cannot claim reprocessing to/from physical streams
work because:
1. It's undefined behavior to reprocess an input buffer into a physical
stream of different physical camera, or an input physical stream buffer
into an output buffer of different physical camera.
2. If the reprocessing input buffer comes from different physical cameras
with different sizes, because the current HAL API doesn't support sending
different size buffers through input stream, there isn't a
non-vendor-specific solution available.

Bug: 157123506
Test: vendor testing
Change-Id: I1ccf2b3918c1cb475b1baec10d35c6785b25208d
2020-06-19 17:23:52 +00:00
Shuzhen Wang
9c9b1085c3 Camera: Relax physical stream cropping behavior
Allow physical stream's field-of-view to be larger than that of the
logical stream, thus enabling more robust depth-from-stereo or motion
tracking.

Test: Build
Bug: 153583897
Bug: 157676445
Bug: 157138779
Bug: 155393103
Change-Id: Ibc059396e9d5e7db80b6c2632d26f48774aad4d4
2020-06-18 15:53:49 -07:00
TreeHugger Robot
a2dbc3b3ee Merge "Camera: Fix race for onCaptureBufferLost callback (take 2)" into rvc-dev 2020-06-18 22:00:11 +00:00
Kevin Chyn
9cd814be2a Merge "Update biometric/keystore documentation" into rvc-dev 2020-06-17 01:43:09 +00:00
Kevin Chyn
01ab00121b Update biometric/keystore documentation
Fixes: 158883515

Test: Builds
Change-Id: I22aa2345fcb05c2f43344398dd5357dc1874414a
2020-06-16 13:51:33 -07:00
Charles Chen
b28fb721f5 Trust System UI owned display to receive keys
A11y service cannot get focus of bubbles because it's not a
System owned display. This patch makes System UI owned display
a trusted display. Moreover, this patch refactors the logic to
identify a trusted display by introducing FLAG_TRUSTED and
removes the trusted display check along with supportsSystemDecorations()
because the check has been included in supportsSystemDecorations().

fixes: 155823002
Bug: 152416787
Test: atest DisplayContentTests
Test: atest WindowFocusTests
Test: atest TaskDisplayAreaTests
Test: atest MultiDisplaySystemDecorationTests
Test: atest DisplayTest
Change-Id: Ie684c6488904e5aa8cae166a455c6d55455e5f55
2020-06-16 02:10:21 +08:00
Curtis Belmonte
e8aa66a061 Update biometric constant docs from tier to class
Same as ag/11711578, but updates the names of the biometric security
constants in documentation from "Tier 1/2/3" to "Class 1/2/3". This
matches the latest language in the Android 11 CDD.

Test: m -j
Bug: 157266312
Change-Id: Ic5c5674232737f468aa750e60c60dd6a3637a6f8
2020-06-11 11:56:38 -07:00
Shuzhen Wang
e16fed203a Camera: Fix race for onCaptureBufferLost callback (take 2)
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: I56b9bfbe182ba6fc0ec2cb543fc32774ed3f6f1a
2020-06-11 09:59:47 -07:00
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