Commit Graph

4222 Commits

Author SHA1 Message Date
Kevin Chyn
7a707810e7 9/n: Add BiometricScheduler proto dump
1) Adds biometrics.proto definition for BaseClientMonitor subtypes
2) Adds BiometricScheduler proto dump

When dumping the scheduler, the caller may request for the recent
operation queue to be cleared after dumping or not.

Note that we don't need BiometricScheduler.Operation#STATE_*
in the dump, since (for now) we just want to know what operations
have been run.

We can always add additional state, success/failure, etc in the
future if needed.

Bug: 159667191
Test: atest com.android.server.biometrics
Test: atest CtsBiometricsTestCases
Change-Id: I7d2350f00aaeef03ab7d74013b476af053240320
2021-01-21 16:59:59 -08:00
Sean Stout
99170bffd3 Merge "PM#goToSleep and PM#wakeUp only affects default display group" 2021-01-21 21:04:58 +00:00
Sean Stout
e2f209d260 PM#goToSleep and PM#wakeUp only affects default display group
This CL changes the behavior of PM#goToSleep to instead turn off the
power for the default display group. PM#wakeUp turns on the default
display group.

If all display groups are turned off, the device will go to sleep. If
any display group is on, the device will remain interactive.

This results in no behavior change if there is a single display group.
However if there are multiple display groups then it will be possible to
interact with ones that are on while others are off.

Bug: 138328918
Bug: 170935083
Bug: 175919649
Test: atest PowerManagerServiceTest
Change-Id: I8b475c38886eda3e43d6e8da7e68102a25da1584
2021-01-21 10:17:02 -08:00
Philip P. Moltmann
85712bdfeb Merge "Fine tune what sensor use UI to show" 2021-01-21 00:26:50 +00:00
Kevin Chyn
c3a35738c1 Merge "Add onUdfpsPointer* callbacks to FingerprintManager" 2021-01-21 00:01:57 +00:00
Philip P. Moltmann
6cc4906547 Fine tune what sensor use UI to show
Sometimes we want to show a dialog, sometimes a notification, sometimes
nothing.

- Also some minor UI tuning to match mocks.
- Also suppress dialog while dialog is visible and shortly after. This
  avoids a dialog directly after closing previous dialog.

Test: Triggered dialog. Needs exhaustive test of all
      cases though.
Bug: 162549680
Change-Id: I52ccd22858969823d8670a9e345d3da994ec1c19
2021-01-20 10:20:42 -08:00
Marvin Ramin
e672a8809f Migrate CEC enabled value to CEC configuration
Read value whether HDMI CEC is enabled from HdmiCecConfig and cache it
in HdmiControlService. This changes the type from boolean to int.

Adapt the @hide listener for a change of this value to return integers
instead of booleans as well.

Bug: 171870477
Test: atest com.android.server.hdmi

Change-Id: I6275fe1b3e1ca62c210019e1df216f8731a0b5ab
2021-01-20 09:24:58 +01:00
Kevin Chyn
9c49488206 Add onUdfpsPointer* callbacks to FingerprintManager
Fixes: 175717879
Test: manual
Change-Id: Ib1091ae1f0fc2d661a7fafba2aa804a257e7413b
2021-01-19 15:14:09 -08:00
Marvin Ramin
34d7ea867d Move CEC volume control setting to CEC config
Migrate HdmiControlManager#(get|is)HdmiCecVolumeControlEnabled to use
the new HdmiCecConfig.

This config is backed by an integer, the volume control enabled states
are migrated from boolean values to a new IntDef. Listeners also return
these integer values.

Bug: 172819080
Test: atest com.android.server.hdmi
Change-Id: I0e1fb46886f89f143bb830494ab23602301e3d8e
2021-01-19 15:21:17 +01:00
TreeHugger Robot
3ac7938f7d Merge "Input device sensor manager event preallocation" 2021-01-16 00:57:01 +00:00
TreeHugger Robot
6caaa61609 Merge "Camera: Collect capture latency histogram" 2021-01-15 17:19:03 +00:00
TreeHugger Robot
b62a9139ab Merge changes I8a56b70c,I0f159034
* changes:
  Add MANAGE_SENSOR_PRIVACY to shell permissions
  Make the sensor privacy calls testable
2021-01-15 02:03:04 +00:00
TreeHugger Robot
894acd9114 Merge "[CEC Configuration] Add listener system API" 2021-01-14 17:23:11 +00:00
Shuzhen Wang
9e5d9a1046 Camera: Collect capture latency histogram
For each camera session, collect capture latency histogram for all streams.

Test: Camera CTS, and observe statsd output
Bug: 154159000
Change-Id: I7741371ca8540cdf9c9a47246c0ef0f0f82df32a
2021-01-14 09:11:44 -08:00
TreeHugger Robot
f65debad48 Merge "Update sensor posision for O6" 2021-01-14 04:08:12 +00:00
TreeHugger Robot
a49fe859e6 Merge "Plumb UDFPS overlay "show reason" from FingerprintService to SysUI" 2021-01-14 03:30:56 +00:00
TreeHugger Robot
a7cf2f79e8 Merge "[CEC Configuration] Add @SystemApi for CEC Configuration" 2021-01-14 01:27:14 +00:00
Evan Severson
f28937b0b5 Make the sensor privacy calls testable
Test: Build
Bug: 162549680
Change-Id: I0f159034690a1a802cae89c67ab8f68258aea702
2021-01-13 16:14:56 -08:00
Kevin Chyn
59707e2189 Plumb UDFPS overlay "show reason" from FingerprintService to SysUI
Enables SysUI to draw enroll/auth-specific affordances

If the UI diverges, we can consider enroll or auth specific
UdfpsView subclasses(?) but currently enrollment just shows
an extra circle.

Fixes: 177275693
Test: atest com.android.systemui.biometrics

Change-Id: I5b2aaf00c55279a81348ec7a5dc387b6e62751c0
2021-01-13 14:24:19 -08:00
Bernardo Rufino
b57d8d8a26 Merge "Document go/untrusted-touches" 2021-01-13 14:41:04 +00:00
Bernardo Rufino
e5215b4853 Document go/untrusted-touches
The only public API (that I know!) that let touches pass-through is
FLAG_NOT_TOUCHABLE, so I've put the rules that relate to app-developers
there.

Please let me know if there are any other public APIs that makes a
window let touches pass-through. The other one I know of is
ViewTreeObserver.addOnComputeInternalInsetsListener() that let's you
specify the touchableRegion, but that's not public.

(The feature works regardless of the API used to make the window
pass-through)

The docs are a shorter version of the "Rules" section of
go/untrusted-touches.

Bug: 158002302
Fix: 173022596
Test: Build
Change-Id: Ic7ba68f03587112db2cc93128ac41cb09d443127
2021-01-13 09:22:26 +00:00
Kevin Chyn
f4abdc48df Merge "3/n: Add most remaining plumbing for authenticatorId invalidation" 2021-01-12 22:01:01 +00:00
Kris Chen
313d2ad91c Update sensor posision for O6
Bug: 177108379
Test: Enroll fingerprint.
Change-Id: Ibce98395b33d466a3bab110685d15428377af41e
2021-01-12 15:33:09 +08:00
Treehugger Robot
9fa3198744 Merge "Add additional biometrics OWNERS" am: 08763cddab am: 56d15d2c25 am: ab0359a7e3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1546368

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3c4dcf4d38df857fe18dfc7f22b802afea537fc4
2021-01-12 03:40:46 +00:00
Treehugger Robot
ab0359a7e3 Merge "Add additional biometrics OWNERS" am: 08763cddab am: 56d15d2c25
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1546368

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If33fcc4b7eb88b169c4fc217b427c3d1d84f95e2
2021-01-12 01:15:21 +00:00
Kevin Chyn
775a9a3796 3/n: Add most remaining plumbing for authenticatorId invalidation
1) Adds BiometricManager#invalidateAuthenticatorIds
2) Adds IBiometricAuthenticator#invalidateAuthenticatorId
3) Adds ServiceProvider(s)#invalidateAuthenticatorId
4) Finishes InvalidationRequesterClient implementation

A subsequent CL will implement the invalidation plumbing on
FaceProvider/FingerprintProvider.

Bug: 159667191
Test: atest InvalidationTrackerTest

Exempt-From-Owner-Approval: OWNERS not propagated through yet
Change-Id: I86eb6a6d37b0d6616422d57c696cd1c9a553847e
2021-01-11 16:53:07 -08:00
Kevin Chyn
835f50b21a Add additional biometrics OWNERS
Test: Builds
Change-Id: Ief8ea06dcc5803298294c639956cdfa97fa8be10
2021-01-11 13:43:29 -08:00
Evan Severson
6e5db47ac4 Remove userId from sensor privacy api
Use context's getUserId instead.

Test: Build
Bug: 162549680
Change-Id: I6c75e03f19a0cce7f870c56b504aaf701712300e
2021-01-11 10:32:29 -08:00
Evan Severson
6c25f003b8 Merge changes from topic "CameraMicToggleListeners"
* changes:
  Add listeners for individual camera and microphone toggles
  Make the sensor privacy state per user
2021-01-09 01:49:09 +00:00
Evan Severson
1f1e8d72ab Add listeners for individual camera and microphone toggles
Test: Manually add a listener in another serviec and change state with
          `adb shell cmd sensor_privacy enable 0 microphone`.
Bug: 162549680

Change-Id: I4a77bc2bba4405b2ba962e767005ca443a2d732f
2021-01-08 14:50:40 -08:00
Evan Severson
2e3ba7cd30 Make the sensor privacy state per user
For the spaceship mode this is purely an internal refactorization since
all the apis remain the same and the state is kept in sync across users.
For the individual controls there's new calls to set the state of the
toggle per user or per profile group.

Test: Manually change state with `adb shell cmd sensor_privacy enable 0
          microphone`
      Manually upgrade from old persistence to new persistence form
      Manually check that the persisted state remains when rebooted.
Bug: 162549680

Change-Id: I0a5eac7a5c3beb272a456790d999a0282d77bf09
2021-01-08 14:50:39 -08:00
Joshua Mccloskey
446802707f Merge "Updated Fingerprint enrollment logging" 2021-01-08 19:11:50 +00:00
Treehugger Robot
55ab07fd18 Merge "Add team members to biometric OWNERS" am: 80df223aed am: 2dc1d17689 am: 68ba39f6d7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543964

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id5432d058c9e67f1a83f03c82159661c2c0e1502
2021-01-08 10:44:55 +00:00
Treehugger Robot
68ba39f6d7 Merge "Add team members to biometric OWNERS" am: 80df223aed am: 2dc1d17689
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543964

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0cdd444845e2f484e26045c04facbce2e33c95ba
2021-01-08 10:14:06 +00:00
Kevin Chyn
8777a4dda3 Add team members to biometric OWNERS
Test: Presubmit
Change-Id: I0b503756a60fc8dcaaf8bcd1f1fa13628b2b9b75
2021-01-07 17:56:19 -08:00
joshmccloskey
84a6a53b22 Updated Fingerprint enrollment logging
Test: Verified regular fingerprint enrollment correctly logged
enrollment.
Test: Verified that the find fingerprint sensor activity no longer
falsely reports a failed enrollment.
Bug: 175316123

Fingerprint enrollment shows a find sensor screen which makes a call to
FingerprintManager.enroll(), the purpose is to get the user to locate
the sensor. The consequence was that logging built into the framework
was incorrectly logging a failed enrollment after cancellation.

Change-Id: I2ec27120943e1ce3d70f5ca2f3221a4b3b571c39
2021-01-07 15:47:52 -08:00
Jayant Chowdhary
00336bac7f Merge "camera2 docs: fix CONTROL_AWB_MODE documentation." 2021-01-07 17:37:39 +00:00
Jayant Chowdhary
30f6a80e98 camera2 docs: fix CONTROL_AWB_MODE documentation.
Bug: 123166531

Test: build

Change-Id: I122ed8253c8417a5b6e0c494e0a9e891fde2b069
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-01-06 16:59:35 -08:00
TreeHugger Robot
09b2ae9923 Merge "[Attempt #2] Block untrusted touches in enforcing mode" 2021-01-05 23:36:03 +00:00
Michal Olech
d54dbf9869 [CEC Configuration] Add listener system API
Bug: 174731501
Bug: 172637440
Bug: 172905515
Test: atest com.google.android.gts.hdmicec.HdmiControlManagerHostTest
Change-Id: I830f3e312d5cf70fc84e389a12ecd50c2e1bfae6
2021-01-05 16:47:38 +01:00
Michal Olech
ecf20a8565 [CEC Configuration] Add @SystemApi for CEC Configuration
Bug: 172637440
Bug: 174731501
Test: atest com.google.android.gts.hdmicec.HdmiControlManagerHostTest
Change-Id: I0877bacd6170c908400ed2742a5dd6bbf1f149fb
2021-01-05 16:47:38 +01:00
Jayant Chowdhary
36ad891fe0 Merge "camera2: Avoid boxing primitives while unmarshalling primitive arrays." 2020-12-29 22:22:54 +00:00
Jayant Chowdhary
1a29434234 camera2: Avoid boxing primitives while unmarshalling primitive arrays.
Bug: 174742989

Test: GCA (basic validity)

Test: Without this CL, capture many images with GCA, profile with
      simpleperf, stack traces with java.lang.Float.valueOf in
      mm_fault_count kprobes : 21% (most of them coming from
      MarshalQueryableArray.unmarshal)

Test: Without this CL, capture many images with GCA, profile with
      simpleperf, stack traces with java.lang.Float.valueOf in
      mm_fault_count kprobes : 3.92%

Test: camera CTS, no new failures.

Change-Id: If359c828a231df41ba7b586bdda36255656a5a76
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-12-29 11:37:25 -08:00
Bernardo Rufino
51a3a37b1b [Attempt #2] Block untrusted touches in enforcing mode
ag/13253804 fixes test we broke in attempt #1 (ag/13228932).

-- Original CL description (update "Test:" line):

After getting enough feedback from dogfooders, the issues left open that
we know of (that will still be addressed ofc) either don't hurt dogfood
experience (eg. b/172627742 touch is blocked only during AGSA's -1
screen <> launcher side animation) or are 3p apps that will have to
change their code at some point. So, turning the feature on in its final
enforcing mode.

Also removing toast since at this point this is more noise than signal.
We're seeing many duplicate bugs (many of which are WAI) that the
dogfooder would likely not notice if it wasn't for the toast. If there
is a real issue the user will still notice by the unresponsiveness and
given a bugreport we will be able to check via logcat.

However, I have not removed the code completely and left that as part
of b/169067926 since we may decide to turn it back on before or on
DP/Beta.

Bug: 158002302
Test: atest WindowUntrustedTouchTest WindowInputTests inputflinger_tests
      inputflinger_benchmarks libinput_tests libgui_test
Test: Verify untrusted touches are blocked via logcat but no toast.
Change-Id: I709711e60f5f4f563e018ee079ef89418e161d14
2020-12-23 09:59:45 +00:00
Chris Ye
fa41c8ecb5 Input device sensor manager event preallocation
Preallocate sensor event for listener to avoid allocating for each
sensor event notification and garbage collection.

Bug: 161634265
Test: atest InputDeviceSensorManagerTest
Change-Id: I9ef32d57116d0ee4fe7e7b331cb0b2b35d43806f
2020-12-18 09:45:24 -08:00
Darryl Johnson
05d899901a Merge "Revert "Block untrusted touches in enforcing mode"" 2020-12-17 21:42:44 +00:00
TreeHugger Robot
6656f0fc5c Merge changes from topic "SensorManager"
* changes:
  Add feature for inputdevice sensor manager.
  Add motion sensor configuration for Sony DS4.
2020-12-17 20:26:17 +00:00
Darryl Johnson
ec345dad07 Revert "Block untrusted touches in enforcing mode"
This reverts commit d86481e650.

Reason for revert: Possible cause of b/175877133

Change-Id: Iedbb835c6daeb95b337f0db699160c5ce037013e
2020-12-17 19:02:43 +00:00
Nathalie Le Clair
6110f06565 Merge "Determine if CEC stack should handle KEYCODE_TV_POWER" 2020-12-17 16:14:51 +00:00
Nathalie Le Clair
d0df8698c4 Determine if CEC stack should handle KEYCODE_TV_POWER
Bug: 157402294
Test: atest HdmiCecLocalDevicePlaybackTest and atest
HdmiCecLocalDeviceTvTest

Change-Id: I1ffc246ff25354d3d61548d10756f1088850d367
2020-12-17 17:12:21 +01:00