Commit Graph

5391 Commits

Author SHA1 Message Date
TreeHugger Robot
4d2ae2655e Merge "Camera: Propagate extension results in case of dropped frames" into tm-dev 2022-05-05 23:11:58 +00:00
Prabir Pradhan
dd2c72a65d Merge changes from topics "presubmit-am-e1ccffb4201944be9e638acb9f6f4dfc", "presubmit-am-e6236e948fb14688bc4afb3adb9e745b" into tm-dev
* changes:
  Synchronize pointer display change requests
  Make virtual input device creation synchronous
2022-05-05 19:21:40 +00:00
Evan Severson
7935bf8b27 Merge "Make the authentication requirement configurable for toggles" into tm-dev 2022-05-05 16:28:13 +00:00
Prabir Pradhan
d4fd3a112b Synchronize pointer display change requests
Previously, when InputManagerService requests for PointerController to
change the pointer display, there was no way to know when the request
was completed or whether it succeeded. This could lead to a few issues:

- WM's MousePositionTracker's coordinates would not be updated until the
  next mouse event was generated, meaning the position would be out of
  sync.
- The creation of a virtual mouse device moves the pointer to a specific
  displayId. In order to test this behavior, we would need to sleep in
  the test code to wait for the system to update the pointer display and
  position, resulting in generally flaky tests.

Here, we add a way to synchonize changes to the pointer display so that
InputMangerService can know the current pointer display with certainty.
PointerController, which is updated in the InputReader thread, is the
source of truth of the pointer display. We add a policy call to notify
IMS when the pointer display changes.

When the pointer display is changed, the cursor position on the updated
display is also updated so that the VirtualMouse#getCursorPosition() API
is synchronized to the pointer display change.

Bug: 216792538
Test: atest FrameworksServicesTests:InputManagerServiceTests
Test: atest PointerIconTest
Change-Id: I578fd1aba9335e2e078d749321e55a6d05299f3b
Merged-In: I578fd1aba9335e2e078d749321e55a6d05299f3b
2022-05-05 14:20:45 +00:00
Ilya Matyukhin
de84e3f019 Merge "Respect halControlsIllumination provided by the HAL" into tm-dev 2022-05-05 00:09:00 +00:00
Shuzhen Wang
b1d13ce6bd Merge "Camera: Fix typos and bad format in docs" into tm-dev 2022-05-05 00:01:18 +00:00
Ilya Matyukhin
59d49a4238 Respect halControlsIllumination provided by the HAL
Bug: 224573604
Test: atest SystemUITests:com.android.systemui.biometrics
Change-Id: I665b8c6a131ff3fd66701fea7ca6368e33b39c13
Merged-In: I665b8c6a131ff3fd66701fea7ca6368e33b39c13
2022-05-04 21:35:42 +00:00
Shuzhen Wang
2e3e00ee63 Camera: Fix typos and bad format in docs
Test: Build
Bug: 231252657
Change-Id: I3006f124baab76aa011c5b91d346b871ed6eea22
2022-05-04 12:07:47 -07:00
Evan Severson
75821bfd72 Make the authentication requirement configurable for toggles
Test: Manual && CtsSensorPrivacyTestCases
Fixes: 227517111
Change-Id: Id7ee5d8ca9ee264c18d2f7e1975e0d4fcb6210ab
2022-05-03 21:04:35 +00:00
Emilian Peev
ceb6591e53 Camera: Propagate extension results in case of dropped frames
Capture results can be present and can be safely passed back to
client in case of frame drops within the source image reader.
Detect cases where results will get discarded, filter the tags
and notify clients accordingly.

Bug: 230790669
Test: Camera CTS
Change-Id: Ia3f77d9398165663073c01bdf8d3421fd86a67c4
2022-05-03 13:16:14 -07:00
TreeHugger Robot
0927574f3f Merge "Remove the usage of device_config flag: DisplayManagerService.KEY_ALLOW_ALWAYS_UNLOCKED_VIRTUAL_DISPLAYS." into tm-dev 2022-05-03 19:29:34 +00:00
Shuzhen Wang
c1a0dc2c61 Merge "Camera: Update timestamp base doc for SurfaceTexture" into tm-dev 2022-04-29 17:27:23 +00:00
Zixuan Qu
0fce6f2150 Remove the usage of device_config flag: DisplayManagerService.KEY_ALLOW_ALWAYS_UNLOCKED_VIRTUAL_DISPLAYS.
Test:  atest  DisplayManagerServiceTest
Bug: 227384335
Change-Id: I125761acfd6f91a362484abacd6bc92cdfbd9a52
2022-04-27 11:36:55 +00:00
Joe Bolinger
50941f8b9c Merge "Do not clear calling identify when using BiometricPrompt from FingerprintService." into tm-dev 2022-04-22 19:16:48 +00:00
Ilya Matyukhin
559244bd5e Merge "Enable RRS (FHD<->QHD) support for UDFPS" into tm-dev 2022-04-21 05:55:03 +00:00
Emilian Peev
50a87aa8b1 Merge "Camera: Add support for client requests&results for advanced extensions" into tm-dev 2022-04-20 22:36:16 +00:00
Ilya Matyukhin
84438ca22b Enable RRS (FHD<->QHD) support for UDFPS
UDFPS position and assets are configured in pixels in native
resolution. This CL adds a mechanism to detect a runtime resolution
change and scale the UDFPS coordinates accordingly.

Bug: 223342274
Test: atest SystemUITests:com.android.systemui.biometrics
Change-Id: Iaa1f3d633b50019d06bdecb5063490ad6eb11272
2022-04-20 21:15:14 +00:00
Shuzhen Wang
96619bc7c5 Camera: Update timestamp base doc for SurfaceTexture
Test: Build
Bug: 195025014
Change-Id: Idff78a881fa5575f4ffea85408529a930d3b247a
2022-04-19 10:24:08 -07:00
Ilya Matyukhin
861744dde9 Refactor FingerprintStateListener to BiometricStateListener
This will allow to reuse the logic around onEnrollmentsChanged for face.

Face doesn't have a mechanism to cache the enrollment state, and there
is nothing fingerprint-specific in FingerprintStateListener, so it's an
obvious choice the refactor this class to support all biometrics.

Bug: 221037350
Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics
Test: atest KeyguardUpdateMonitorTest
Test: com.android.server.biometrics
Change-Id: Id039136c8fb01627de5a0f3e92d2f9fd89500539
2022-04-14 20:08:52 +00:00
Shuzhen Wang
9f832f33c0 Merge "Camera: Add user tag field to CameraActionEvent" into tm-dev 2022-04-14 01:50:57 +00:00
TreeHugger Robot
7af7fcbeb0 Merge "Camera: Improve documentation for 3A regions" into tm-dev 2022-04-12 23:38:05 +00:00
Shuzhen Wang
1d6b7ec2bc Camera: Add user tag field to CameraActionEvent
Test: ./out/host/linux-x86/bin/statsd_testdrive 227
Bug: 223671217
Change-Id: Ia3af0ba5f249a0cabbbdc8668a041632342fc8b6
2022-04-12 13:25:48 -07:00
Emilian Peev
d6b3ab77a0 Camera: Add support for client requests&results for advanced extensions
Allow camera clients to query for any orthogonal camera parameters that
can be applied during advanced extension capture sessions.
Enable capture result callbacks in the same scenario as well as single
catpure requests to the preview client surface.

Bug: 198447410
Test: Camera CTS

Change-Id: Ia51cc0813a93963d628ea73beb54ed080f4696e7
2022-04-11 15:33:31 -07:00
Prabir Pradhan
6b3c6cae3f Revert "Change input injection security model to require INJECT_..."
Revert "Update WindowInputTests after changing injection permiss..."

Revert "Change input injection security model to require INJECT_..."

Revert submission 17125748-require-inject-events-permission

Reason for revert: b/228203157, b/228194124, b/228583652
Reverted Changes:
Ib0d66eff3:Change input injection security model to require I...
Ief1a2f10c:Update WindowInputTests after changing injection p...
Ie2d8d0c3d:Change input injection security model to require I...

Change-Id: I4e77238f00ccd6379486ba77613430fbf166821c
2022-04-08 17:49:17 +00:00
TreeHugger Robot
94bba02785 Merge "Check that InputDevice isn't null and add annotations" into tm-dev 2022-04-07 00:20:58 +00:00
Joe Bolinger
9b3c3a949b Do not clear calling identify when using BiometricPrompt from FingerprintService.
Bug: 214261879
Test: atest AuthControllerTest FaceAuthenticationClientTest FingerprintAuthenticationClientTest
Test: Manually verify with test apps in bug
Change-Id: I8ae9f2b8a970bf7e5d32121dc358f7d0f0d060b8
2022-04-06 23:21:18 +00:00
Shuzhen Wang
868bff5d75 Merge "Camera: Validate physical setting map in OutputConfiguration.writeParcel" into tm-dev 2022-04-06 17:37:45 +00:00
Shuzhen Wang
231f7b67ff Camera: Validate physical setting map in OutputConfiguration.writeParcel
If the physical camera settings map doesn't contain a key for the
logical camera id, throws an exception.

Test: LogicalCameraDeviceTest
Bug: 220730433
Change-Id: I716fa4b81a6e48538aebfac41b96d5d21fdb6a2e
2022-04-05 23:13:51 +00:00
Prabir Pradhan
0df8e9cedd Merge "Change input injection security model to require INJECT_EVENTS permission" into tm-dev 2022-04-05 11:04:50 +00:00
Alex Buynytskyy
b1b99c28cf Temporary NPE mitigation.
To unblock failing presubmit. The team is working on the real fix.

Bug: 223905476
Test: presubmit
Change-Id: I713eac26f375ced798c9d02a47841645e39c907e
2022-04-04 23:22:43 +00:00
Prabir Pradhan
edff385132 Change input injection security model to require INJECT_EVENTS permission
Previously, any app could inject input events into the system via the
IInputManager#injectInputEvent API. The injection was only allowed if
the input event targeted a window owned by the same UID as that of the
process calling the API. This had drawbacks metioned in the bug.

Here, we change the input injection security model so that the signature
permission INJECT_EVENTS is required to inject events. This permission
is given to the system and the shell, so input injection can still be
done through the 'adb shell input' command. We also allow injection from
instrumeted processes where the instrumentation source has the
permission. For exmaple, running a test from the shell allows for the
test to inject events.

We also add support for a targeted injection mode, where the input
injection succeeds only if the target window for the event is owned by
the provided UID. This allows us to support injection from the
Instrumentation class, which only allows for injection into windows
owned by the same UID. In contrast to this, injection from the
UiAutomation class will target all windows, including system and spy
windows.

Bug: 207667844
Bug: 194952792
Test: atest inputflinger_tests
Test: atest WindowInputTests
Test: manual with test app: app cannot inject navigation gestures
Change-Id: Ib0d66eff3fc2f061e7c0d3b7e139a841a9bcebc7
2022-04-04 19:22:51 +00:00
Siarhei Vishniakou
8970010a5e Check that InputDevice isn't null and add annotations
The API 'getDevice' can return null. Let's make sure null isn't
dereferenced. Also, add nullability annotations to make it easier to
follow.

Bug: 227733127
Test: build only
Change-Id: Ice514f27d4347528d009969174f09078dfa2afac
2022-04-04 17:30:09 +00:00
Grace Cheng
3c984e8bf5 Merge "Remove all GHBM logic" into tm-dev 2022-04-04 16:07:33 +00:00
Yuri Ufimtsev
b27e211943 Merge "Provide a valid ComponentName for testing Parental Controls" into tm-dev 2022-04-04 10:33:09 +00:00
TreeHugger Robot
c7daca4990 Merge "Asynchronous the resetUsbPort" into tm-dev 2022-04-02 01:12:15 +00:00
Joe Bolinger
3bc43d4396 Merge "Run biometric cleanup on user switch." into tm-dev 2022-04-02 00:01:38 +00:00
Yuri Ufimtsev
97836424fc Provide a valid ComponentName for testing Parental Controls
Test: manual

Bug: 222339681
Change-Id: I934c4fa195bfcdcf8956d709093e0c3390c6a2ea
2022-04-01 21:26:24 +00:00
Joe Bolinger
eab24acdb4 Run biometric cleanup on user switch.
This will force the new to user start on the scheduler, open a new session, and close the old user's session in the HAL.

Add a similar user swtich hook to keyguard to refresh the lockout state. Note that lockout behavior is still ill-defined (b/225986544) and HALs may not support a lockout state per user.

Bug: 205908931
Test: manual (unlock, cause lockout, & switch users)
Test: atest KeyguardUpdateMonitorTest

Change-Id: I89d3d7454894bc5caa0cac33e96d7fd0d61e9083
2022-04-01 12:56:35 -07:00
Prabir Pradhan
baf0f20718 Merge "Remove injectInputAfterTransactionsApplied from WMS" into tm-dev 2022-04-01 19:39:15 +00:00
Ricky Niu
dc74aff111 Asynchronous the resetUsbPort
Modify the resetUsbPort be asynchronous

Bug: 217369748
Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I5d799691f2f3fce4df97a960c8628194236d9f81
2022-04-01 18:13:32 +00:00
Grace Cheng
c532376c60 Remove all GHBM logic
Removing GHBM logic from codebase since it has been replaced by LHBM.
This will simplify the current implementation, and assist with future
refactors and the transition to Kotlin.

Fixes: 227229729
Test: atest UdfpsViewTest
Test: atest DisplayModeDirectorTest
Change-Id: I0d1e7ffb610154f4d56afab8385883a0389f89db
2022-03-31 22:53:16 +00:00
Nathalie Le Clair
121a209ae9 Merge changes I46fb8cfe,I4181b465,I99e1ca1d,I66b09693 into tm-dev
* changes:
  Only invoke listener once physical address becomes known
  Don't remove devices on onHotplug()
  Assign local device portId 0
  Set device type on first message received
2022-03-31 16:45:49 +00:00
Prabir Pradhan
603fea1fab Remove injectInputAfterTransactionsApplied from WMS
Since we already have IWindowManager#syncInputTransactions, we can
remove the need to have an input injection API in the window manager
interface.

Bug: 227356680
Test: presubmit
Change-Id: I730d05eec85978d8813e0924ddb4dba26922ea9f
2022-03-31 15:01:15 +00:00
Matt Gilbride
336b6a1577 Merge "Add attribution tags to FingerprintService" into tm-dev 2022-03-31 14:24:03 +00:00
Nathalie Le Clair
900536cf9a Don't remove devices on onHotplug()
This CL affects TV panels and Audio Systems only.
Before HdmiCecNetwork existed: devices were removed when
HotplugDetectionAction detected a hotplug out, and TIF was informed.
Before this CL: devices were removed from the CEC network onHotplug,
but the listener to inform TIF wasn't invoked. This was causing
multiple issues.
After: on TV panels and Audio Systems, only remove devices when
HotplugDetectionAction detects a hotplug out,
just like before HdmiCecNetwork existed.

Test: atest
Bug:213417037

Change-Id: I4181b4650b70101da44fd205e4df9eb566f74496
2022-03-31 07:59:51 +00:00
Louis Chang
97c8cee1a3 Merge "Add an API to disable/restore doze settings" into tm-dev 2022-03-31 06:41:05 +00:00
Matt Gilbride
f8d398ab11 Add attribution tags to FingerprintService
FingerprintManager picks up the client app's attribution tag and sends
it to FingerprintService, which uses it in calls to
AppOpsManager#noteOp.

Bug: 226171374
Test: FingerprintManagerTest
Test: FingerprintServiceTest
Change-Id: Ieb2393b5d8d2f9103f044bd598e9a401ad7ef4c1
2022-03-30 19:48:36 +00:00
Alex Johnston
f353ff4dc4 Merge "Update all usb ports in enableUsbDataSignal" into tm-dev 2022-03-29 18:24:54 +00:00
David Christie
c80684b7c1 Merge "Update location OWNERS files" am: b3249c820f am: d0e5951d42 am: 731c34c0e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2042803

Change-Id: Ia817c9d3e70e11f1e15861e272ea7d861ce996af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 15:31:34 +00:00
Ed Savage-Jones
38c73670a4 Add an API to disable/restore doze settings
This adds an API to disable/restore doze settings.
This is needed by CTS in order to have a known doze
state when running certain tests.

Test: atest ActivityVisibilityTests
Test: atest InputMethodStartInputLifecycleTest

Bug: 140367074
Bug: 216182288
Change-Id: I112c37a90c5b528c4e64e18b06e57024ea277287
2022-03-29 17:10:23 +08:00