Commit Graph

5371 Commits

Author SHA1 Message Date
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
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
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
Shuzhen Wang
9393a69a5f Camera: Improve documentation for 3A regions
Clarify that 3A regions need to consider additional crop for preview
stream due to aspect ratio mismatch.

Test: Build
Bug: 226939029
Change-Id: I660e83bb4aae088dc231827bd9a075879c573538
2022-03-28 13:05:29 -07:00
David Christie
731c34c0e7 Merge "Update location OWNERS files" am: b3249c820f am: d0e5951d42
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2042803

Change-Id: I42ea4af76cb77bc04eeb17837bae95f3ffb0cb4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 19:53:48 +00:00
David
b84bb82fbc Update location OWNERS files
Test: N/A
Change-Id: I4a2871228a179eb80f556719aae0a78fca1616da
2022-03-28 09:25:17 -07:00
Alex Johnston
d919b973cb Update all usb ports in enableUsbDataSignal
Bug: 217859816
Test: atest android.usb.cts.UsbManagerApiTest
      atest com.android.server.usbtest.UsbManagerApiTest
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I1f5b00f993394fc933b56e93913fe7e73ab8b9cc
2022-03-28 10:10:02 +00:00
Nicholas Ambur
4b1a9dbcff add IntRange to KeyphraseRecognitionExtra APIs
added coarseConfidenceLevel IntRange

Bug: 220128045
Test: atest AlwaysOnHotwordDetectorEventPayloadTest
Change-Id: I2b0b7cbb6bc446fdfbb9241eed763fd4f4d33531
2022-03-22 22:53:57 +00:00
David Christie
4a320b3ba9 Merge changes from topic "presubmit-am-db1f62fddd154ef5a414bf17435d37f0" into sc-v2-dev-plus-aosp am: a6984e544a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17183360

Change-Id: I60ff7a2e0a0d59ca65342a5812c5402a29d52c47
2022-03-21 23:26:30 +00:00
John Reck
bb0809e758 Merge "Add setBuffer w/ release callback" into tm-dev 2022-03-19 01:32:25 +00:00
John Reck
f6fb6f6288 Add setBuffer w/ release callback
Also tweak SyncFence#getSignalTime javadocs

Fixes: 220897032
Bug: 222095580
Test: SurfaceControlTest
Change-Id: I83c000e1699c95b73ac7b41815e1798475c1a778
2022-03-18 13:42:09 -04:00
Joe Bolinger
0cab3b4252 Invoke lifecycle callbacks while waiting for cookies.
Operations that wait for cookies (authentication) do not set their lifecycle callback until started. This leaves a small window when failures are not propogated to callers (i.e. fast/immediate failures).

This also adds some additional checking for stale UI events (point up/down) that are delivered after the operation has ended.

Fix: 216071532
Test: atest com.android.systemui.biometrics com.android.server.biometrics
Change-Id: I7f7500db0a42b2ea97e171e26148ee68b15f5ae8
2022-03-17 18:51:40 +00:00
Shuzhen Wang
bba3858a2d Merge "Camera: Make stream use case to be 64 bit" into tm-dev 2022-03-14 22:16:37 +00:00
David Christie
5be4f1c431 [automerge] Update GeofenceHardwareRequestParcelable to match parcel/unparcel format. 2p: e20d8ae710
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17183360

Bug: 216631962
Change-Id: Ifb0a5e2aa0d649e100ada36b8019983a59316bf1
2022-03-14 19:51:59 +00:00
David Christie
e20d8ae710 Update GeofenceHardwareRequestParcelable to match parcel/unparcel format.
Test: manual
Bug: 216631962

Change-Id: I3d6d1be9d6c312fe0bf98f600ff8fc9c617f8ec3
2022-03-14 19:51:40 +00:00
Shuzhen Wang
cc922dacc5 Camera: Make stream use case to be 64 bit
This increases the available bits for OEMs' custom range.

Test: Camera CTS
Bug: 223387965
Change-Id: I4bc1ccc5430a8c54dd753a410155723be890080f
2022-03-10 18:20:36 +00:00
Rucha Katakwar
7073d3bbe8 Merge "Update getHighSpeedVideoFpsRanges API doc." into tm-dev 2022-03-09 20:47:21 +00:00
Austin Borger
1f854ad7c3 Merge "Provide refresh rate range to the window manager based on the maximum frame rate of each camera stream." into tm-dev 2022-03-08 23:26:22 +00:00
Rucha Katakwar
3fe1ef18dd Update getHighSpeedVideoFpsRanges API doc.
bug: 189383363
Change-Id: Idf1eb85a737adc6e6dbd0f007e7e9f311af7db6f
2022-03-08 15:16:01 -08:00
Beverly Tai
f7599ba9ee Merge "Immediately stop HBM & authRipple anim onAcquire" into tm-dev 2022-03-08 13:03:55 +00:00
Beverly
9996e3acab Immediately stop HBM & authRipple anim onAcquire
Previously we only stopped HBM if we receive onAcquired with
info=FINGERPRINT_ACQUIRED_GOOD.

Update the onAcquiredGood method to be more generic (onAcquired,
with an acquiredInfo parameter) so the UdfpsOverlay can turn
off HBM for the appropriate acquiredInfo messages.

Bug: 222117182
Test: manually test on Lock Screen, enroll and biometric prompt
Test: atest SystemUITests
Change-Id: I6b21fbf65a6f38660fe8beab617d17cef3ad50ba
2022-03-07 19:59:51 +00:00
TreeHugger Robot
7517f6d5d5 Merge "Camera: Standard dynamic range profile must not have any extra latency" into tm-dev 2022-03-03 22:25:54 +00:00
Emilian Peev
cb4b1b0230 Camera: Standard dynamic range profile must not have any extra latency
The standard dynamic range profile will always be present as part of the
advertised profiles. Additionally the same profile must never advertise
extra latency due to the format selection.

Bug: 215396395
Test: Camera CTS
Change-Id: I0ad7dd23a1b1f742293b4c52a48a8fca98b7925c
2022-03-03 11:43:11 -08:00