Commit Graph

17266 Commits

Author SHA1 Message Date
Evan Rosky
bed2d1b57c SystemUI Split via TaskOrganizer
Use the early TaskOrganizer concepts to implement Split-screen
in system-ui.

This includes changes to both FW and SystemUI. The changes to
FW involve removing the use of split-screen specific behavior (like
minimize dock and direct ordering) and also reducing things that
care about primary vs secondary. It also changed ActivityStack
to inherit bounds from parent** when in split-mode so that sysui
only needs to manipulate the tile and/or reparent stacks to
effect their geometry.

This means a lot of layout logic moves to SystemUI. The bulk of
the work done in ActivityStack which is split-screen related is
moved into SplitDisplayLayout. This basically takes a snapshot of
display configuration and manages the sizes of splits and their
snap targets.

Intermediate dragging of divider bar now only moves root task leashes
around rather than talking to WM. This includes position as well
as crop (which used to be stack crop). Once the user releases
the divider bar, it will calculate (based on snaps) the new
root task sizes and update their configurations via
WindowContainerTransaction. Because the interim updates are only
on the leashes, no configuration updates occur until the end.

Entering/Exiting split-mode is now handled by SplitScreentaskOrganizer#
onTaskInfoChanged. This is effectively a state-machine that
looks at the current split task membership vs. previous and then decides
when to move things into/out-of split tasks and how to coordinate with the
DividerView.

Minimized dock is relegated to a purely system-ui concept. To
accomplish this, **the home *stack* is set to the minimizedhomebounds
by systemui. This means that it's relative position to its parent is
negative! This allows us to leave the split sizes constant, have
their children inherit the "actual" split sizes, but keep the
home stack unchanging in its minimized size. We just adjust the crop
negative to reveal it.

IME handling is done through the same mechanism as app-driven IME
animation... only Divider receives the control instead of the app.
This allows synchronized animation of split tasks with IME. To
account for insets, though, when IME is opened, the bottom stack
will be repositioned in WM.

Bug: 133381284
Test: Manual, use split-screen, rotate device, launch unresizable
      apps in split, use divider snap to close/maximize apps, etc.
Change-Id: I103f68030a170e2fd3d8f2125b81cf33af412793
2020-02-14 09:25:43 -08:00
TreeHugger Robot
1a2d75ebad Merge "No need to grab lock for single read" 2020-02-13 23:45:44 +00:00
TreeHugger Robot
4e21e319cd Merge "Obfuscate visibility of notification-related events." 2020-02-13 22:46:52 +00:00
Etan Cohen
ee9f12795b Merge "[WIFICOND] Rename to nl80211" 2020-02-13 22:34:09 +00:00
Varun Shah
0cbb6b63ee Obfuscate visibility of notification-related events.
UsageStats will return obfuscated NOTIFICATION_SEEN or
NOTIFICATION_INTERRUPTION events to callers of #queryEvents
and #queryEventsForUser if they don't hold the MANAGE_NOTIFICATIONS
permission.

Additionaly, refactor the query API in UsageStats to take in flags as
defined in UsageEvents to make future obfuscation/visibility parameters
cleaner.

Also, add the MANAGE_NOTIFICATIONS permission to shell for CTS test.

Bug: 144724524
Test: atest android.app.usage.cts.UsageStatsTest
Test: atest com.android.server.people.data.UsageStatsQueryHelperTest
Test: atest android.content.pm.cts.shortcutmanager.ShortcutManagerUsageTest
Change-Id: I118de7e589ac8dd5924d3740c70903fa484b79b5
2020-02-13 12:01:13 -08:00
Automerger Merge Worker
ec47b48311 Merge "Update InCallService API docs." am: 11e7b55ea9 am: 040db280fa am: 01bb7cef0e
Change-Id: Ie50b8f5173a16f34d9a9674a081ce62a45687656
2020-02-13 19:48:37 +00:00
Automerger Merge Worker
01bb7cef0e Merge "Update InCallService API docs." am: 11e7b55ea9 am: 040db280fa
Change-Id: Id6df82c6284b2cc027dba1d2b355806888185761
2020-02-13 19:26:10 +00:00
Automerger Merge Worker
040db280fa Merge "Update InCallService API docs." am: 11e7b55ea9
Change-Id: Ica011ce75760d1d7338c3accdf29dc7505fd9949
2020-02-13 19:09:01 +00:00
Tyler Gunn
11e7b55ea9 Merge "Update InCallService API docs." 2020-02-13 18:48:00 +00:00
Kweku Adams
d088856bfb Merge "Make apps active when charging." 2020-02-13 18:37:44 +00:00
Alex Johnston
c39e9b2e25 Merge "Modify DPM KEYGUARD_DISABLE_SECURE_CAMERA restriction" 2020-02-13 17:50:29 +00:00
Alex Johnston
af0aa258a1 Modify DPM KEYGUARD_DISABLE_SECURE_CAMERA restriction
* Introduced new logic that allows the profile owner of an
  organization-owned device (COPE PO) to set the restriction
  KEYGUARD_DISABLE_SECURE_CAMERA on the parent profile.
* Modified the API setKeyguardDisabledFeatures to be callable
  on the parent profile for restriction KEYGUARD_DISABLE_SECURE_CAMERA.

Bug: 148656201
Test: Manual testing with TestDPC
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetKeyguardDisabledFeatures
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyguardDisabledFeatures
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetKeyguardDisabledFeatures
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyguardDisabledFeaturesLogged

Change-Id: I13984193e24b8745686e48c9c58ebee40a204fc7
2020-02-13 16:08:06 +00:00
Alex Johnston
7ab8a28306 Merge "Rename lockdown admin configured networks API" 2020-02-13 09:51:00 +00:00
Amy Zhang
8527147b3d Merge changes from topic "tuner-rm"
* changes:
  Add a TunerResourceManagerService as an Android System Serivce.
  Add Lnb related APIs into the TunerResourceManager interface
  Add Cas related APIs into the Tuner Resource Manager
  Adding ITunerResourceManagerService interface into android.media.tv
2020-02-12 23:48:29 +00:00
Kweku Adams
f35ed37018 Make apps active when charging.
This undoes part of the work to remove parole windows from
AppStandbyController. In the past, UsageStatsManager.isAppInactive would
return false when the device was charging. This wasn't documented
behavior, but was intentional, so removing it was the wrong thing to do.
I've updated the documentation to explicitly call out the behavior and
added it back so that the behavior is consistent with previous versions.

Bug: 148988544
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest AppIdleHistoryTests
Test: atest AppStandbyControllerTests
Change-Id: If5cad80b693a1e043ae64b8206e28abb60f83853
2020-02-12 11:52:28 -08:00
Philip P. Moltmann
0946037764 Merge "Revert "Revert "Activity start: Send featureId from context->AppOpsManager""" 2020-02-12 18:52:23 +00:00
Philip P. Moltmann
ee29509ecd Revert "Revert "Activity start: Send featureId from context->AppOpsManager""
This reverts commit e7421e92d9.

Exempt-From-Owner-Approval: revert-revert and only piping anyway
Test: 1:1 revert-revert
Bug: 136595429
Change-Id: I44e5fa2019f5604c6e2c08bdd1967129c64a90a7
2020-02-12 18:51:53 +00:00
Alex Johnston
12a4461733 Merge "Modify Screen Capture Disabled APIs" 2020-02-12 16:55:36 +00:00
Alex Johnston
8e935f7737 Modify Screen Capture Disabled APIs
* Previously, setScreenCapturedDisabled and getScreenCaptureDisabled
  did not support explicitly querying the parent profile.
* This CL allows the COPE profile owner call these APIs on the parent
  profile to disable screen capture device-wide.

Bug: 149006854
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testScreenCaptureDisabled
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testScreenCaptureDisabled
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testScreenCaptureDisabled_assist
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testScreenCaptureDisabled_allowedPrimaryUser
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testCreateAdminSupportIntent

Change-Id: I64469af190577f66f48052c7f0df20067101aac4
2020-02-12 11:52:59 +00:00
TreeHugger Robot
c228e1d88a Merge "Add manifest broadcasts for profile (un-)available." 2020-02-12 11:39:12 +00:00
TreeHugger Robot
5f212d0010 Merge "Revert "enable dynamic binding in AppPredictionSession"" 2020-02-12 08:05:03 +00:00
Pierre Barbier de Reuille
1858482e49 Add manifest broadcasts for profile (un-)available.
This mean both switch on/off and add/remove profiles.

The broadcasts already exists for registered receivers, this adds them
for manifest receivers with INTERACT_ACROSS_PROFILES permission and
crossProfile attribute.

The MANAGED_PROFILE_REMOVED broadcast is sent to all application with
android:crossProfile="true". Any cross profile app may be impacted, and
there is no possible transfer of information as the account is already
deleted at the time the signal is emitted.

Change-Id: I17fb9a01b70b28845c5d6aacdcdd497a82391474
Fix: 145135525, 145598120
Test: Demo-app using Digital Wellbeing (automated test underway).
Test: atest com.android.cts.devicepolicy.CrossProfileAppsPermissionHostSideTest
Test: atest 'com.android.cts.devicepolicy.QuietModeHostsideTest#testBroadcastManagedProfileAvailable_withCrossProfileAppsOp'
Test: atest 'com.android.cts.devicepolicy.QuietModeHostsideTest#testBroadcastManagedProfileAvailable_withoutCrossProfileAppsOp'
2020-02-12 07:44:23 +00:00
Amy
06a551ee7b Add a TunerResourceManagerService as an Android System Serivce.
This service is used to interact with TunerHAL interface and the Tuner
framework to manage the Tuner resources currently used on the device.
Tuner framework claims resource from this service. The service will
handle the requests from multiple applications based on their priority.

Sepolicy changes are in https://android-review.googlesource.com/c/platform/system/sepolicy/+/1161873
Test: cuttlefish
Bug:
Change-Id: Ifedc4e6f120e711aadffdf715d8720e0b64fbe16
2020-02-11 19:39:44 -08:00
TreeHugger Robot
07e850a979 Merge "Add new permission / appop for reading loader data" 2020-02-12 01:56:31 +00:00
Philip P. Moltmann
e276c35a5c No need to grab lock for single read
The read is atomic anyway.

Test: Built
Change-Id: I0d62248913c2c702b62852ced5d1e60b8502d9dc
2020-02-11 17:04:59 -08:00
Todd Kennedy
b0948d4cec Add new permission / appop for reading loader data
Bug: 148374455
Test: Manual
Test: Create three packages; 1) only request PACKAGE_USAGE_STATS, 2) only request LOADER_USAGE_STATS, 3) request both
Test: Go to Settings -> Apps & Notifications -> Special app access
Test: See that there is only a single entry for "Usage access"
Test: Under "Usage access", see all three test apps appear
Test: Disable access for each application and verify that only the appop for the declared permisson is flipped using
Test: adb shell cmd appops get <<PACKAGE_NAME>>
Test: atest CtsPermission2TestCases
Change-Id: I7741a703fd4494832347e51e113adf974cc31d2b
2020-02-11 15:46:43 -08:00
Pinyao Ting
5052796bf0 Revert "enable dynamic binding in AppPredictionSession"
This reverts commit 6b172567d5.

Reason for revert: Unexpected Crash

Bug: 149282975
Change-Id: I674397398ae40d106f84e6a650f75e77769e9de1
2020-02-11 22:30:42 +00:00
Julia Reynolds
3f39de97d0 Merge changes from topic "jr-hist-snooze"
* changes:
  Add tracing for notification history actions
  Optionally exclude snoozed notifs from dismissal archive
2020-02-11 21:54:58 +00:00
Automerger Merge Worker
f0b9f042de Merge "Add HomeVisibilityObserver APIs in ActivityManager." am: cb47d86158 am: c1363ad2b9
Change-Id: If7b65fd40532a8868463a5d545da5c197676ffe8
2020-02-11 21:34:57 +00:00
Automerger Merge Worker
c1363ad2b9 Merge "Add HomeVisibilityObserver APIs in ActivityManager." am: cb47d86158
Change-Id: Ib48d687e8da2941fa3385aa5066e4d490b1d3ad8
2020-02-11 21:10:48 +00:00
Xiangyu/Malcolm Chen
cb47d86158 Merge "Add HomeVisibilityObserver APIs in ActivityManager." 2020-02-11 21:00:16 +00:00
Fiona Campbell
004e36da64 Merge "Add support for brightness as a float" 2020-02-11 18:51:02 +00:00
Julia Reynolds
27e26448ff Optionally exclude snoozed notifs from dismissal archive
Test: manual
Bug: 137396965
Change-Id: I9238b3edc89a0c0821bcee38612dcb81b2f3f69c
2020-02-11 11:31:35 -05:00
Alex Johnston
57ec80939f Rename lockdown admin configured networks API
* Renamed 'isLockdownAdminConfiguredNetworks'
  to 'hasLockdownAdminConfiguredNetworks'
* Renamed 'setLockdownAdminConfiguredNetworks'
  to 'setConfiguredNetworksLockdownState'

Bug: 148853269
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAdminConfiguredNetworks
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testAdminConfiguredNetworks

Change-Id: I6bef862b4ef7e5a7997378efcff08477da9de6dc
2020-02-11 12:43:21 +00:00
Etan Cohen
b9f28bc805 [WIFICOND] Rename to nl80211
per API council feedback.

Bug: 149105833
Bug: 148680192
Test: atest android.net.wifi
Test: atest com.android.server.wifi
Change-Id: I1d6bbd126ae0eb06068ff962573021fdec590735
2020-02-10 20:36:51 -08:00
TreeHugger Robot
8eaa866603 Merge "Enable App Prediction for Work Profile" 2020-02-11 03:49:50 +00:00
Pinyao Ting
ac68aac0ac Enable App Prediction for Work Profile
call to different instance of AppPredictionPerUserService based on
calling context.

Bug: 148230574
Test: Manual
Change-Id: I5987ed6a80155a8aed7c1985e8edd1ba98e51149
2020-02-10 17:13:32 -08:00
Fiona Campbell
d4eb295196 Add support for brightness as a float
Change the framework to handle brightness as a float rather than an int.

Test: AutomaticBrightnessControllerTest
BrightnessConfigurationTest
BrightnessMappingStrategyTest
BrightnessUtilsTest
DevicePolicyManagerTest
DisplayManagerServiceTest
DisplayTest
DozeScreenBrightnessTest
PowerManagerTest
PowerManagerVrTest
SettingsProviderTest

Exempt-From-Owner-Approval: Changing param from int to float

Change-Id: I413641cd987c5ec8f82753c0388a33f85a9682de
2020-02-10 23:44:40 +00:00
Evan Rosky
825f041a0c Merge "Add utility to get all root tasks on a display" 2020-02-10 21:52:08 +00:00
Automerger Merge Worker
0f7945a435 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3 am: 5d3e5fb3b5 am: 4c0d1a02b6
Change-Id: I5da9a24dac34cea069906337b8d39cbe43c20213
2020-02-10 21:50:00 +00:00
Automerger Merge Worker
4c0d1a02b6 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3 am: 5d3e5fb3b5
Change-Id: Ie1963bb7965827d9f9985b08c78e70b2de3319a7
2020-02-10 21:35:05 +00:00
Automerger Merge Worker
5d3e5fb3b5 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3
Change-Id: I701ef53dada696ee5f6e45d8539ca385a08ffc29
2020-02-10 21:24:31 +00:00
Treehugger Robot
05fb4434f3 Merge "Add TEST_MAPPING for gating and logging" 2020-02-10 21:12:10 +00:00
TreeHugger Robot
530d3e4982 Merge "Pass PictureInPictureParams in TaskInfo." 2020-02-10 20:17:31 +00:00
Soonil Nagarkar
ad1c960744 Merge "Add location notification and target sdk checks" 2020-02-10 19:43:06 +00:00
Andrei Onea
1a0195349b Add TEST_MAPPING for gating and logging
The tests included are unit tests for the implementation (under
FrameworksServicesTests), for the corresponding TestRule
(PlatformCompatGating) and CTS tests.

Bug: 137821288
Test: cd frameworks/base/core/java/android/app/compat && atest
Test: cd frameworks/base/services/core/java/com/android/server/compat \
          && atest
Change-Id: I1a652775715f1a9738cc72725303bc78dfa17d03
2020-02-10 18:25:06 +00:00
Automerger Merge Worker
826a1848bc Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6 am: 00f11fe5fd am: 912f8487d2
Change-Id: I8dc566e8d2fb1c8604f686298867f5a451e480b9
2020-02-10 16:52:00 +00:00
Automerger Merge Worker
912f8487d2 Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6 am: 00f11fe5fd
Change-Id: I90fd68462e5967cfe7eef2c3b86dbec78a124f72
2020-02-10 16:35:29 +00:00
Philip P. Moltmann
41308eced1 Merge "Revert "Activity start: Send featureId from context->AppOpsManager"" 2020-02-10 16:31:33 +00:00
Automerger Merge Worker
00f11fe5fd Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6
Change-Id: I803ed8ac7035295d819130d1b19c9585fe0edb65
2020-02-10 16:23:49 +00:00