Commit Graph

4467 Commits

Author SHA1 Message Date
Kevin Chyn
d01ed12c5d Merge "Revert "Revert "Update face detectInteraction""" into sc-dev 2021-04-13 01:50:59 +00:00
Kevin Chyn
fdcd1a4bc6 Revert "Revert "Update face detectInteraction""
This reverts commit 2a4f86bea0.

Reason for revert: Re-merge with NPE fixed
Fixes: 184672091

Change-Id: I68315310d9c7226584564b3b1eb3861189c7d080
2021-04-12 14:42:55 -07:00
Lais Andrade
d8dc940fc0 Rename CombinedVibrationEffect to CombinedVibration
The change makes the distinction between VibrationEffect and
CombinedVibratio clearer. The later is a combination of the former with
the extra information about the vibrator ids, allowing effects to be
played in one or more vibrators in parallel or in sequence.

The methods create/start synced where also renamed to parallel (together
with respective builder classes), to indicate they perform one or more
effects in parallel on multiple vibrators. This is also a better match
to the sequential combinations.

This change also deprecates the Context.VIBRATOR_SERVICE in favour of
the new VIBRATOR_MANAGER_SERVICE. The default vibrator can be retrieved
from the manager system service.

Same deprecation applied to InputDevice.getVibrator method.

Fix: 184123900
Test: CombinedVibrationTest
Change-Id: I44d8b225098d35fbf7783254acaf6a78f9fb4505
2021-04-12 16:34:54 +00:00
Wei Wang
cc2602452b Merge "Revert "Update face detectInteraction"" into sc-dev 2021-04-10 01:45:35 +00:00
Kevin Chyn
2a4f86bea0 Revert "Update face detectInteraction"
This reverts commit 5b0dd45ad8.

Reason for revert: b/184978217?

Change-Id: Ie92632f0373376f238eac5638aba71a1a31abdcf
2021-04-10 00:21:54 +00:00
Kevin Chyn
a817527343 Merge "Update face detectInteraction" into sc-dev 2021-04-09 19:20:41 +00:00
Beverly Tai
565c79c395 Merge "Enable quick pickup gesture by default" into sc-dev 2021-04-09 18:22:46 +00:00
TreeHugger Robot
0a0ddadab5 Merge "usb: Address some API review comments" into sc-dev 2021-04-09 05:14:47 +00:00
Evan Severson
81a64e22f9 Merge "Update mic/cam toggles to the latest UI mocks" into sc-dev 2021-04-09 03:09:07 +00:00
Kevin Chyn
5b0dd45ad8 Update face detectInteraction
1) Sets the sensor property based on the HAL, instead of hard coding
   false
2) Schedules/cancels detection when requested
3) Updates biometric dumpsys to include internal properties

Test: atest com.android.server.biometrics
Test: adb shell dumpsys biometric
Test: manual
Bug: 184672091

Change-Id: I2fb1db0994f6d2ed235420967d78e70f1b13cdd0
2021-04-07 17:58:52 -07:00
Ady Abraham
db96662e30 Merge "DisplayManagerGlobal: suppress redundant onDisplayChanged events" into sc-dev 2021-04-07 16:45:53 +00:00
Treehugger Robot
1350355d27 Merge "CEC: Remove the TODO in HdmiPlaybackClient class" am: cc62385767 am: f4e1962df0 am: 7c740535b1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1666843

Change-Id: I2d7066701c2eb180f838649eee32df84a3d60871
2021-04-07 15:59:07 +00:00
Treehugger Robot
7c740535b1 Merge "CEC: Remove the TODO in HdmiPlaybackClient class" am: cc62385767 am: f4e1962df0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1666843

Change-Id: I31b84ab1a150b53bcf4ca0f97f4a1bd3d7d5c4ad
2021-04-07 15:31:13 +00:00
Mathew Inwood
4058f5913a Merge "Remove duplicate compat logging." into sc-dev 2021-04-07 14:15:39 +00:00
Kriti Dang
0d4e510467 Merge "add int range on #getManufactureYear and #getManufactureWeek in DeviceProductInfo" into sc-dev 2021-04-07 13:49:36 +00:00
Aravind Angadi
4e891c6e62 CEC: Remove the TODO in HdmiPlaybackClient class
HdmiControlService.oneTouchPlay method is already switching the
long running one touch play process to the service thread from
the UI thread and is also able to handle multiple OTP requests
in parallel. Remove TODO to use PendingResult.

Bug: 159901363
Test: None
Change-Id: Ife8c8268edb8a40255a52dd1eda2ab60020803c8
2021-04-07 12:30:06 +00:00
Kriti Dang
7efe08a2fa add int range on #getManufactureYear and #getManufactureWeek in
DeviceProductInfo

Bug: 182914930
Test: N/A
Change-Id: I1988690c135d8357f6ed55958d2977836006d12f
2021-04-07 11:46:32 +02:00
Ady Abraham
6f1cac9912 DisplayManagerGlobal: suppress redundant onDisplayChanged events
With Frame Rate Override enabled, an app could get an onDisplayChanged
events which seems redundant. An example would be:
1. Display changed refresh rate to 60Hz - onDisplayChanged was called
2. App's frame rate override changed to 60Hz - onDisplayChanged was called

To avoid sending these redundant events, DisplayManagerGlobal caches
the last DisplayInfo that was reported to the app and based on it it
decides whether to send the event or not.

Bug: 184588343
Test: atest SetFrameRateTest
Test: atest FrameRateOverrideHostTest
Change-Id: I97c7b2b9a799424998b1b717a4311d3d08b3178f
2021-04-06 15:33:19 -07:00
Jayant Chowdhary
b2f70b04d4 Merge "getCameraIdListNoLazy : remove system cameras from mTorchStatus as well." 2021-04-06 21:24:12 +00:00
Jayant Chowdhary
db762c7e13 getCameraIdListNoLazy : remove system cameras from mTorchStatus as well.
Bug: 182530469

Test: Make Emulator back camera system camera; atest FlashlightTest.java

Merged-In: I0a149ba3d93a740cfbfdc2d04c1235e648061156
Change-Id: I0a149ba3d93a740cfbfdc2d04c1235e648061156
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit bedb9950c8)
2021-04-06 20:13:25 +00:00
Mathew Inwood
87a7934e7c Remove duplicate compat logging.
The call to Compatibility.isChangeEnabled also logs so no need to
make an explicit call to Compatibility.reportChange().

Bug: 183512729
Test: TH
Change-Id: I062a9cfa364c36868180cce3be49da020dd91341
2021-04-06 10:53:02 +00:00
Jayant Chowdhary
9d350e3a06 Merge "camera2: reduce logspam from cameraIdHasConcurrentStreams." into sc-dev 2021-04-05 22:35:44 +00:00
TreeHugger Robot
44b4d77808 Merge "Camera: Avoid possible NPE when forwarding images" into sc-dev 2021-04-05 21:55:01 +00:00
Jayant Chowdhary
952d8b0a38 camera2: reduce logspam from cameraIdHasConcurrentStreams.
Physical camera ids aren't included in concurrent camera combinations.
The logs aren't real errors. Make them debug logs.

Bug: 184194887

Test: atest LogicalCameraTest#testBasicPhysicalStreaming doesn't show
      unecessary logs while calling getCameraCharacteristics for
      physical camera ids.

Change-Id: I4f6e9030f23c31e0dc796882e6e82964d5a80668
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-04-05 13:39:41 -07:00
Emilian Peev
707d5e5a4b Camera: Avoid possible NPE when forwarding images
Use the local reader argument instead of the member
variable which can get reset.
Additionally, make sure to execute the extension forward
processor 'ImageReader' callback using the extension session
handler.

Bug: 184447319
Test: atest -c
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java#testCloseCaptureSession
--iterations=10
atest -c
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java

Change-Id: Id8f8818ad478b70438cbd18d46ef79263bc4de9d
2021-04-05 13:15:47 -07:00
Jayant Chowdhary
719a693721 Merge "getCameraIdListNoLazy : remove system cameras from mTorchStatus as well." into rvc-qpr-dev am: 3a6b247ec0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14071306

Change-Id: Ie89d317127ad31866256a290899e91acc730cfc6
2021-04-03 06:30:22 +00:00
Kevin Chyn
ea0ed42e8f Merge "Schedule cleanup with the callback that was passed in" into sc-dev 2021-04-03 01:25:29 +00:00
TreeHugger Robot
dd6adbf3f8 Merge "Camera: Add a maximum size flag to MandatoryStreamInformation" into sc-dev 2021-04-02 21:40:22 +00:00
Kevin Chyn
6a0b25111a Schedule cleanup with the callback that was passed in
For the AIDL providers, send the scheduler the callback that
was passed in. Otherwise, the test infrastructure wouldn't know
when cleanup completes. This saves ~20s from each test session
close time.

The added logs do not affect/spam production code.

Bug: 152240892
Test: atest CtsBiometricsTestCases
Change-Id: I047ec8da01b3237e738e4567eb6ef3554f6b868d
2021-04-02 12:19:40 -07:00
Jayant Chowdhary
02622abbe2 getCameraIdListNoLazy : remove system cameras from mTorchStatus as well.
Bug: 182530469

Test: Make Emulator back camera system camera; atest FlashlightTest.java

Merged-In: I0a149ba3d93a740cfbfdc2d04c1235e648061156
Change-Id: I0a149ba3d93a740cfbfdc2d04c1235e648061156
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit bedb9950c8)
2021-04-02 18:55:48 +00:00
Jayant Chowdhary
3f45860e70 Merge "getCameraIdListNoLazy : remove system cameras from mTorchStatus as well." into sc-dev 2021-04-02 08:08:27 +00:00
Evan Severson
a270fc3f96 Update mic/cam toggles to the latest UI mocks
This touches the sensor use dialog and the notification.
Also we shouldn't leak listeners every time the dialg is made.

TODO: Detect when both camera and mic are opened at the same time
TODO: Settings page

Test: Manually open all UI available
Bug: 183985427
Change-Id: Ie743f402835d8fd3e644a0374f03062f0a61c31a
2021-04-01 20:10:57 -07:00
Jayant Chowdhary
bedb9950c8 getCameraIdListNoLazy : remove system cameras from mTorchStatus as well.
Bug: 182530469

Test: Make Emulator back camera system camera; atest FlashlightTest.java

Change-Id: I0a149ba3d93a740cfbfdc2d04c1235e648061156
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-04-01 18:50:19 -07:00
Shuzhen Wang
eba86e45b8 Camera: Add a maximum size flag to MandatoryStreamInformation
The maximum size flag indicates whether the mandatory stream
information contains a maximum size from stream configuration map.

Test: Camera CTS
Bug: 156254356
Change-Id: I197716d4174d6c9630042f8120e0248fec281e50
2021-04-01 16:52:21 -07:00
Beverly
ace350cfde Enable quick pickup gesture by default
Setting is configured in DozeSensors, so no need to double check in
AmbientDisplayConfiguration for the setting.

Test: manual
Bug: 176550666
Change-Id: If194e43ab5834f63e56cd1ca553b48af069d38fa
2021-04-01 17:11:52 +00:00
Jimmy Chen
4f1799e6c8 Merge "wifidisplay: restrict broadcast by the proper permission" into rvc-qpr-dev am: e851fc58d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13824713

Change-Id: I128bd35ad9dea6d9085f746790af2c1bc2344b47
2021-04-01 02:35:18 +00:00
Jimmy Chen
e851fc58d6 Merge "wifidisplay: restrict broadcast by the proper permission" into rvc-qpr-dev 2021-04-01 01:42:28 +00:00
Shuzhen Wang
640011569f Camera: Fix a removal-while-iterate bug
The onStatusChangedLocked removes entries from the ArrayMap. Needs to
iterate in the reverse order.

Test: Vendor testing
Bug: 182876702
Change-Id: I5891f24a25c83f096d23ca5675126889a7d2a61c
2021-03-30 14:42:33 -07:00
Kevin Chyn
46e3d1a3f1 Merge changes from topic "removeall-cts" into sc-dev
* changes:
  Update removeAll test path
  Make FingerprintService/FaceService less chatty
  Update removeAll path
2021-03-30 20:30:23 +00:00
Abhijoy Saha
5c01d600cd Merge "Add User ID parameter to SensorPrivacyManager API." into sc-dev 2021-03-30 16:48:14 +00:00
Kevin Chyn
15e1d3f7e7 Update removeAll path
1) Make the resulting face/fingerprint can be @Nullable. Not all
   removal callers care about the template that was removed, just
   that they were all removed.

2) FingerprintService/FaceService should wait for all providers to
   finish removing before notifying the upper layer of completion

Fixes: 183758063
Test: atest CtsBiometricsTestCases, notice
      testLockoutResetRequestedAfterCredentialUnlock finishes
      10 seconds quicker now (latch in LSS doesn't time out anymore)
Change-Id: I87c50ccf5524fd5440c9a6c2c7a0fd4cc61e684d
2021-03-29 23:06:03 -07:00
Abhijoy Saha
95284cccd6 Add User ID parameter to SensorPrivacyManager API.
This will allow Car System UI to enquire about sensor privacy for
multiple users.

Bug: 182826082
Test: Manual
Change-Id: Ibc4271f095597e3cee5e61c7e930a8365b1312c8
2021-03-30 02:07:49 +00:00
Kriti Dang
518898d9e6 Exposing public API to retrieve current setting of 'Match Content Frame Rate'.
Bug: 182148347
Test: atest MatchContentFrameRateTest
Change-Id: Iaa4364fc868a712fd71a48e6efad0df05eb4a6a4
2021-03-29 16:47:24 +02:00
Kriti Dang
7010f95cb2 Hdr format settings [Backend]
Adding new APIs in display manager to get the user disabled formats, to get the formats
supported by device and get formats reported by display.

Bug: 172905874
Test: N/A
Change-Id: I58a7714f03a3e165bbd22f2fa7a021ad90b41b39
Merged-In: I58a7714f03a3e165bbd22f2fa7a021ad90b41b39
(cherry picked from commit 25f1822005)
2021-03-29 13:21:14 +00:00
Kriti Dang
e713ee6c60 Merge changes from topic "cherrypick-Display settings HDR formats-mumvl547ah" into sc-dev
* changes:
  Handling Number Format Exception in DiscreteValueIntegerListValidator
  Hdr format settings [Backend]
2021-03-28 12:25:32 +00:00
Jayant Chowdhary
76f8061d34 Merge "camera2: Add isUltraHighResolution() to MandatoryStreamInformation." into sc-dev 2021-03-25 20:48:51 +00:00
Kriti Dang
b4775b02a7 Hdr format settings [Backend]
Added new APIs to DisplayManager to set the user disabled HDR formats,
and get/set if user disabled formats should be ignored or not.
These new settings are stored in Settings.Global.
Modified the implementation of Display#getHdrCapabilities to not return
the formats disabled by user.

Bug: 172905874
Test: atest CtsDisplayTestCases
Change-Id: I4841af251ee0e4938614b154d0c5239814ea7cd9
Merged-In: I4841af251ee0e4938614b154d0c5239814ea7cd9
2021-03-25 12:41:35 +00:00
Fiona Campbell
acc5fbcb39 Merge "Store Brightness Per Display" into sc-dev 2021-03-25 08:40:15 +00:00
Jayant Chowdhary
ceaf98edc1 camera2: Add isUltraHighResolution() to MandatoryStreamInformation.
Bug: 152813564

Test: builds; RobustnessTest.java (basic validity)

Change-Id: I16dbf3054d3c4bc23996f6b91b5f51c29c887026
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-03-25 00:40:52 -07:00
Evan Rosky
660eb72df8 Merge "Add reporting to monitor apps incorrectly using getRaw" into sc-dev 2021-03-25 02:10:05 +00:00