Commit Graph

4250 Commits

Author SHA1 Message Date
Anthony Stange
d87dacf865 Merge changes I7b0ba9a9,I37e475a1 into sc-dev
* changes:
  Add attribution tag parameter to createClient
  Add new callback / intent type to ContextHub APIs
2021-02-01 21:14:36 +00:00
Bernardo Rufino
bf1903d277 Merge "Open IM.getMaximumObscuringOpacityForTouch() and update docs." into sc-dev 2021-02-01 09:55:38 +00:00
Lorenzo Colitti
dcd9397730 Merge "Allow RNDIS and NCM to be enabled at the same time." am: 2836d8b703 am: 9db81cadec am: 677fbbbedc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1559090

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia613275665e90be3e8fa00c0baa3d25823b61bd5
2021-02-01 09:18:59 +00:00
Lorenzo Colitti
677fbbbedc Merge "Allow RNDIS and NCM to be enabled at the same time." am: 2836d8b703 am: 9db81cadec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1559090

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia7e6e4698f80bc70112e9338c5c5ff27cbd248ce
2021-02-01 08:40:49 +00:00
Anthony Stange
b6b7b42358 Add attribution tag parameter to createClient
Attribution tags allow clients to denote if they are providers of
specific data in the system which can be useful when noting permissions
operations later.

Bug: 166846988
Test: compile
Change-Id: I7b0ba9a9ffc6a49f79f80e8078f50625404ddafe
2021-01-29 18:18:05 +00:00
Joshua Mccloskey
c8f8ad2f54 Merge "Added debug parameter to FaceService" into sc-dev 2021-01-29 06:24:34 +00:00
Anthony Stange
818d2dac54 Add new callback / intent type to ContextHub APIs
Updates the ContextHub APIs to support notifying clients (either through
traditional callbacks or via PendingIntent) that their ability to
communicate with nanoapps has changed.

Also, adds the ability for clients to discover the permissions required
to communicate with nanoapps so they know whether their initial or
subsequent nanoapp messages will successfully be delivered.

Bug: 166846988
Test: compile
Change-Id: I37e475a1457a031890693d2858b5d5f7de34de26
2021-01-28 18:57:08 +00:00
Bernardo Rufino
03ec50d528 Open IM.getMaximumObscuringOpacityForTouch() and update docs.
Bug: 158002302
Test: atest WindowUntrustedTouchTest
Change-Id: I735169e0508678e07431704f184a938ffada53cc
Exempt-From-Owner-Approval: Approved on main branch
2021-01-28 15:30:54 +00:00
Sean Stout
35ca6c8129 Add DisplayGroupListener interface
This interface can be used to listen for addition, removal, or
modification of DisplayGroups.

Bug: 138328918
Test: make
Change-Id: I3a2f39838ab00808816366d2484190b401aabed0
2021-01-27 20:42:42 +00:00
Joshua Mccloskey
db778a5e9c Added debug parameter to FaceService
Bug: 177244088
Test: Verified debug parameter is correctly sent to the hal.
Change-Id: If71d86528f1bd9c6d0b75cdff36ec9fdbee47fa6
2021-01-27 12:36:41 -08:00
Michal Olech
dc2e424cdd [CEC Configuration] Add 'tv_send_standby_on_sleep' option
This ports Settings.Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED to
HdmiCecConfig.

Bug: 166433775
Test: atest HdmiCecLocalDevicePlaybackTest HdmiCecLocalDeviceTvTest
Change-Id: I27fe562d7d15f7a049e41a060179bf0d2fafdf9c
2021-01-27 13:24:08 +00:00
Kevin Chyn
7f668ac2c5 Send enrollment signals to SystemUI
Fixes: 178147339
Test: UdfpsAnimationEnroll logs are seen
Change-Id: Ifdaa58ab75662606fd0e46683448750843795249
2021-01-26 22:21:54 -08:00
Christine Franks
e8f6e92fe0 Merge "Add configurable mapping between color modes" 2021-01-26 23:16:12 +00:00
Christine Franks
b776313816 Add configurable mapping between color modes
There are two categories of color modes: the standard color modes, which
are defined and implemented in AOSP, and a reserved range of vendor color
modes, which are defined and implemented by the vendor. Currently, there
is no way to distinguish between two vendor's color modes that use the
same value within the reserved range. This will allow OEMs to specify a
hint as to which vendor's color mode definitions were used on the
original device. If the hint from the restored device matches the hint
on the new device, the color mode from the restored device can still be
considered valid for the new device if it is within the vendor reserved
range. If it does not match, the restored device's color mode value is
invalid on the new device, and must be replaced by the default on the
new device.

Bug: 167449433
Test: builds
Change-Id: Ie5ac0a2d783e1ea703e0342f5cdb41dca07d04d4
2021-01-26 12:12:32 -08:00
Nathalie Le Clair
e1675c3ac3 Add setting for main RC profile
For TV panel and source devices.

Bug: 169121289
Test: atest HdmiCecLocalDevicePlaybackTest and HdmiCecLocalDeviceTvTest

Change-Id: I6e870a35bcaf55153eaa2274c9f2d8b8f7bf1dda
2021-01-26 13:02:08 +01:00
Michal Olech
8d5fa098aa Merge changes I5ac00d59,I41a59081,I63c7cf35
* changes:
  [CEC Configuration] Fix race condition with listeners
  [2.0] Disable sending <User Control Pressed> in attempts to change the active source to a 2.0 device
  [CEC Configuration] Add 'tv_wake_on_one_touch_play' option
2021-01-26 10:51:23 +00:00
TreeHugger Robot
af68bebbaa Merge "Camera: Initial support for Camera2 extension" 2021-01-25 23:16:30 +00:00
Kevin Chyn
4c3c2792fe Merge "Pass detailed reason to UdfpsView, split animation logic" 2021-01-25 18:31:52 +00:00
Emilian Peev
9c778e19e1 Camera: Initial support for Camera2 extension
Add the necessary APIs that will allow Camera2 clients to access
and work with existing CameraX extensions.

Bug: 170481080
Test: Camera CTS

Change-Id: Iaa22fea69ebe01599b3f2e66c1b46ca92015cdc5
2021-01-25 09:59:26 -08:00
Michal Olech
e656e5cbe1 [CEC Configuration] Add 'tv_wake_on_one_touch_play' option
This ports the Settings.Global.HDMI_CONTROL_AUTO_WAKEUP_ENABLED to
HdmiCecConfig.

Bug: 166433775
Test: atest HdmiCecLocalDeviceTvTest
Change-Id: I63c7cf35b9769da193e950f362f51a0f79898a5f
2021-01-25 13:36:20 +01:00
Lorenzo Colitti
79c9c9e365 Allow RNDIS and NCM to be enabled at the same time.
Currently, UsbManager#setCurrentFunctions takes a bitmask of
functions to enable, but will only allow callers to enable one
function at a time.

Allow it to enable both RNDIS and NCM together as well. This is
because from the user's point of view the two functions are the
same (i.e., USB tethering).

Android has historically used RNDIS for tethering. NCM performs
better, but it doesn't work on older OSes like Windows 8.1.

Also change the import order to keep the linter happy.

Bug: 172793258
Test: added unit test for UsbManager.areSettableFunctions
Change-Id: I51b6752781528b09f8929e1fb3b1fa7e4ac36aae
2021-01-23 11:30:29 +00:00
Kevin Chyn
a65ce74e53 Pass detailed reason to UdfpsView, split animation logic
Bug: 177931181

Test: AOD anti-burn-in offsets still applied
Test: Auth on keyguard
Test: Enroll
Test: Auth in settings
Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics

Change-Id: I3638fe02d72caf1911f6b4919b62ca5b25e4b0ea
2021-01-22 18:23:08 -08:00
Kelvin Zhang
b074f7a0a3 Merge "Revert "PM#goToSleep and PM#wakeUp only affects default display group"" 2021-01-22 23:20:53 +00:00
Kelvin Zhang
1431b8c32e Revert "PM#goToSleep and PM#wakeUp only affects default display group"
This reverts commit e2f209d260.

Reason for revert: b/178215050

Change-Id: Ie2de678eda2cc633a5f18cc14b155c56b8c633ca
2021-01-22 20:05:01 +00:00
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
Michael Wright
cd89ac9062 DO NOT MERGE "Allow DeviceConfig to change display settings for high zone" am: 58515946ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13345659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia563c3ff4128d22f1451b304b217de7473fffafd
2021-01-19 04:02:10 +00:00
Michael Wright
58515946ac DO NOT MERGE "Allow DeviceConfig to change display settings for high zone"
Allow DeviceConfig to change the high zone behavior including
refresh rate and brightness thresholds.

Bug: 177636374

Test: atest DisplayModeDirectorTest
Test: adb shell device_config put display_manager refresh_rate_in_high_zone "90"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_display_brightness_thresholds "200"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_ambient_brightness_thresholds "8000"
Change-Id: I1463d6c5daaee46a87a193e98e7f63cad9274b49
2021-01-19 01:07:01 +00: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
raylinhsu
75a0fb1b01 DO NOT MERGE Revert "Set fixed fps when ambient or display brightness is high" am: b4bf83a773
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13330027

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5c71048af659fc9cbcd90a4d56f5c0aa9b1fe998
2021-01-14 19:16:05 +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
raylinhsu
b14bed88c5 DO NOT MERGE Revert "Allow DeviceConfig to change display settings for high zone"
This reverts commit cf55c21064.

Bug: 176018998
Test: atest DisplayModeDirectorTest
Change-Id: Ib576e16257d7903b39efa8015c2af3be8c0d0c40
2021-01-13 14:04:08 +08:00
Kevin Chyn
f4abdc48df Merge "3/n: Add most remaining plumbing for authenticatorId invalidation" 2021-01-12 22:01:01 +00:00