Commit Graph

5451 Commits

Author SHA1 Message Date
Felipe Leme
ac37a2a1ff Merge "Revert "Temporary NPE mitigation."" 2022-05-04 04:33:51 +00:00
TreeHugger Robot
0b2526c846 Merge "Remove the usage of device_config flag: DisplayManagerService.KEY_ALLOW_ALWAYS_UNLOCKED_VIRTUAL_DISPLAYS." into tm-dev am: 0927574f3f am: f98c4708b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17943723

Change-Id: I54d5d3f5b7891ce98257f3bc6c9de9b7601ef439
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 20:08:51 +00: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
Felipe Leme
9520c4642d Revert "Temporary NPE mitigation."
This reverts commit b1b99c28cf.

Test: atest com.android.server.pm.CrossProfileAppsServiceImplTest#startActivityAsUser_profile_notExported
Fixes: 223905476
Change-Id: Ic97b81257bdada9f42f0a9f209fb3d14190f61fb
2022-05-03 19:22:24 +00:00
Prabir Pradhan
1b41b330dd Merge changes I578fd1ab,I3b893d23
* changes:
  Synchronize pointer display change requests
  Make virtual input device creation synchronous
2022-05-03 14:24:17 +00:00
Shuzhen Wang
12d44e14c5 Merge "Camera: Update timestamp base doc for SurfaceTexture" into tm-dev am: c1a0dc2c61 am: b7aa5d065a am: 05ebc0b331 am: 7a430d6c0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17824805

Change-Id: I17cc87e5dc87eb821a8d74ed030e74f39f0df68a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 10:55:03 +00:00
Shuzhen Wang
b7aa5d065a Merge "Camera: Update timestamp base doc for SurfaceTexture" into tm-dev am: c1a0dc2c61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17824805

Change-Id: I4e27b2b6c15dc236b28facfbfb816f1c21a987c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:05:38 +00:00
Shuzhen Wang
c1a0dc2c61 Merge "Camera: Update timestamp base doc for SurfaceTexture" into tm-dev 2022-04-29 17:27:23 +00:00
Hani Kazmi
42e5b7014b Cleanup: Block untrusted touches in InputDispatcher
This change removes the BlockUntrustedTouchesMode enum, and related
code, as block_untrusted_touches is now always enforced. Removed code and policy to display a toast when an untrusted touch occurs, as it's no longer used.

Fix: 169067926
Test: atest WindowUntrustedTouchTest
Change-Id: I1f8407f523eb845a7c50a2788553bdb2616a394b
2022-04-29 11:32:32 +00:00
TreeHugger Robot
259aad666f Merge "Add Face acquire strings." into tm-d1-dev am: cbc9a7105c am: d015de73c8 am: 53edd6192e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17878565

Change-Id: Iae40c436a4b1fa24f9d3d390f4316f890e96cf31
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 23:39:25 +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
TreeHugger Robot
cbc9a7105c Merge "Add Face acquire strings." into tm-d1-dev 2022-04-26 19:40:44 +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
6c7cd10ce3 Merge "Enable RRS (FHD<->QHD) support for UDFPS" into tm-dev am: 559244bd5e am: 0ea20eac6f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17844871

Change-Id: I21fcfbd34acf15528d5c0fc855b64923aba99da1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 06:25:23 +00:00
Ilya Matyukhin
559244bd5e Merge "Enable RRS (FHD<->QHD) support for UDFPS" into tm-dev 2022-04-21 05:55:03 +00:00
Joshua McCloskey
f50c184528 Add Face acquire strings.
Test: Verified the correct acquire messages show during face auth.
Fixes: 229582991
Change-Id: I392cef27886e7d423507a194a0638e5d933c7e09
2022-04-21 03:54:53 +00:00
Emilian Peev
24d33b6b9a Merge "Camera: Add support for client requests&results for advanced extensions" into tm-dev am: 50a87aa8b1 am: d47227ef10
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17113806

Change-Id: Ib0df7a588e769a99689cb6e5494e4aec0e2a1a20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 23:01:34 +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
Philip Junker
0bc83104be Merge "Add more debug logs for input devices." 2022-04-20 10:44:33 +00:00
Joe Bolinger
f7c1e00df6 Merge "Do not clear calling identify when using BiometricPrompt from FingerprintService." 2022-04-20 01:30:44 +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
Philip Junker
f1c029d2e6 Add more debug logs for input devices.
Make InputManagerService and InputManager logging runtime-available.

Test: manual
Change-Id: I8c881278d59c5c766152661030ce0ca364cb0bbe
2022-04-19 15:43:58 +02:00
Ilya Matyukhin
b1949ae77d Refactor FingerprintStateListener to BiometricStateListener am: 861744dde9 am: 40d0cb1b65
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17697407

Change-Id: I0ac9cac188e2f01b1b59773755f059ca1deaa3a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 20:28:50 +00: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
Prabir Pradhan
0e3d66523d 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
2022-04-14 18:56:49 +00:00
Shuzhen Wang
4b7fc86729 Merge "Camera: Add user tag field to CameraActionEvent" into tm-dev am: 9f832f33c0 am: 3e3438903b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17113649

Change-Id: I7fb7ebe6483f7023bc08aac3e06d5bde36e2326b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 02:48:54 +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
e693b1bb1d Merge "Camera: Improve documentation for 3A regions" into tm-dev am: 7af7fcbeb0 am: 9d5ab9660b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17450512

Change-Id: I3442b9a003a61adaee812bce33323fc6685498cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 01:13:58 +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
d36d93155f [automerge] Revert "Change input injection security model to require INJECT_..." 2p: 6b3c6cae3f am: ba0a46d68b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17591529

Change-Id: Id975cf4890f543fa5214f05690078481168aa3c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 19:39:10 +00: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
Siarhei Vishniakou
3d7833776c Add nullability annotations to some InputDevice APIs
In a previous CL, we fixed a null dereference bug. Here, we add the
nullability annotations.

Bug: 227733127
Test: build only
Change-Id: I8db92e6c95993d0e1715632fac55f3d30e3c4d37
2022-04-07 16:55:58 -07:00
TreeHugger Robot
19296b2160 Merge "Check that InputDevice isn't null and add annotations" into tm-dev am: 94bba02785 am: 14fed02ecd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17546183

Change-Id: I90035df169287799b08ec97f342a52f37004d397
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 00:57:37 +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
b8f074004c Merge changes from topic "presubmit-am-877e172c4fa74f85876fa80ed0ef9e2b" into tm-mainline-prod am: c1748393c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17491592

Change-Id: Ic6852eccd9b7f06ffb95fef4a249a6acf660d6d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 17:50:58 +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
Joe Bolinger
aebed0f8a7 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 00:53:36 +00:00
Presubmit Automerger Backend
2c5834274a [automerge] Camera: Validate physical setting map in OutputConfiguration.writeParcel 2p: 231f7b67ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17491592

Bug: 220730433
Change-Id: I6a3dd77ace4d36f77fd2c436eeaba681e53f7dfc
2022-04-05 23:14:05 +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
Siarhei Vishniakou
3291866eb4 Merge "Store VelocityTracker strategy in ViewConfiguration" 2022-04-05 16:58:28 +00:00
Prabir Pradhan
c871d04d38 Merge "Change input injection security model to require INJECT_EVENTS permission" into tm-dev am: 0df8e9cedd am: 38d4db43db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17125748

Change-Id: I7655e9669c579001c40ec935d26268f31d5cb1b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 11:35:06 +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
TreeHugger Robot
6e6998d4a3 Merge "Temporary NPE mitigation." into tm-dev am: 08009d5e02 am: 908fb05fc5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17571865

Change-Id: If283b353e110b26f6088e2a282b4024cf8bc05a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 02:04:54 +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