Commit Graph

4213 Commits

Author SHA1 Message Date
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
Bernardo Rufino
923f09730a Merge "Block untrusted touches in enforcing mode" 2020-12-17 13:50:54 +00:00
Chris Ye
1d29b4c087 Add feature for inputdevice sensor manager.
Add support of sensor manager in InputDevice and allow user to obtain
SensorManager object to query supported sensor types and register sensor
event listeners.

Bug: 161634265
Test: atest InputDeviceSensorManagerTest

Change-Id: Ia7a04a0fcf7e026c49a4fb1a9009b132ff84cf7c
2020-12-16 15:41:32 -08:00
Prabir Pradhan
a90ec162c9 Merge "SyncPointerCapture (6/n): Move Pointer Capture to InputDispatcher" 2020-12-16 18:37:01 +00:00
Bernardo Rufino
d86481e650 Block untrusted touches in enforcing mode
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: Verify untrusted touches are blocked via logcat but no toast.
Change-Id: Ic66ce0dc273fae3f1d974dd46d383f046f78e485
2020-12-16 14:05:06 +00:00
Prabir Pradhan
eb90ca88b3 SyncPointerCapture (6/n): Move Pointer Capture to InputDispatcher
This CL relays requests to enable or disable Pointer Capture in
InputManagerService to InputDispatcher.

Windows now request Pointer Capture using their InputChannel token
instead of their IWindow tokens.

Bug: 141749603
Test: manual: flash crosshatch, test pointer capture.

Change-Id: Ic6fc01eae0068dfbba496051d988a71bcabcd0b3
2020-12-15 15:47:10 -08:00
Michal Olech
fafb66fb86 Merge "[CEC Configuration] Rename 1_4_b to 1_4_B" 2020-12-15 13:53:33 +00:00
Michal Olech
989204e09b [CEC Configuration] Rename 1_4_b to 1_4_B
SystemApi complains:
error: Constant field names must be named with only upper case characters:
`android.hardware.hdmi.HdmiControlManager#HDMI_CEC_VERSION_1_4_b`,
should be `HDMI__CEC__VERSION_1_4_B`

Bug: 174731501
Bug: 172637440
Test: atest com.google.android.gts.hdmicec.HdmiControlManagerHostTest
Change-Id: Ia1bfdb44e704c99fa574663f658a2173f6b48d21
2020-12-15 12:25:13 +01:00
Nicolas Geoffray
e6db6b21e6 Merge "Remove FastNative annotations on synchronized methods." 2020-12-14 13:41:06 +00:00
Nicolas Geoffray
498aa12949 Remove FastNative annotations on synchronized methods.
FastNative doesn't work on synchronized methods.

Bug: 175016705
Test: 004-JniTest
Change-Id: I1e34c78a8438c67e5a1bedb83eb977389ee9a82d
Merged-In: I1e34c78a8438c67e5a1bedb83eb977389ee9a82d
(cherry picked from commit 7c4c101a7b)
2020-12-13 17:44:59 +00:00