Commit Graph

16906 Commits

Author SHA1 Message Date
Santiago Etchebehere
44a2831560 [Zoom-out 1/N] Add API in WallpaperManager
Add an API in WallpaperManager (client and server) and
WallpaperService to pass a wallpaper zoom value to the
wallpaper service and engine.

Bug: 146387434
Test: (added testDeliversZoomChanged)
Test: atest WallpaperServiceTest
Change-Id: Idd9ea2aefb845ad1d330cbdd6e088b926bcfece7
2020-01-22 10:51:04 -08:00
Shuo Qian
8b4325f86c Merge "Introduce system API for ActivityManager.updateMccMncConfiguration for Mainline" 2020-01-14 21:29:08 +00:00
TreeHugger Robot
1a61c8aa9d Merge "Clarify forced reason usage." 2020-01-14 20:51:10 +00:00
Neil Fuller
872d3504ec Merge "Expose time / time zone system apis for telephony" 2020-01-14 15:56:15 +00:00
Eran Messeri
3662019068 Merge "Disable provisioning in COMP mode" 2020-01-14 07:22:57 +00:00
Mark Chien
78231e9282 Merge "Add NETWORK_STACK_SERVICE to SystemServiceRegistry" 2020-01-14 03:06:45 +00:00
Kweku Adams
c182d5e864 Clarify forced reason usage.
Forced was meant to mean "forced by the user." Renaming the constant and
clarifying the comment so it doesn't get used incorrectly. Also
introducing a "forced by the system" constant and fixing the code so the
correct reason is used.

Bug: 145551233
Test: atest AppIdleHistoryTests
Test: atest AppStandbyControllerTests
Test: atest UsageStatsTest
Change-Id: I0d258d83141670728b758a3ef0056b19fde4a88b
2020-01-13 16:13:25 -08:00
TreeHugger Robot
83a1f6a98c Merge "Add new Factory reset protection policy APIs" 2020-01-13 19:21:11 +00:00
Sarah Chin
6be7ecd54d Merge "Make MmsManager public and @SystemService" 2020-01-13 18:53:31 +00:00
Ryan Mitchell
0252b862de Merge changes from topic "shared-lib-tele-res"
* changes:
  Allow for overlaying dynamic shared libraries
  Assign shared libraries stable package ids
2020-01-13 15:15:57 +00:00
Eran Messeri
6ad0e194d7 Disable provisioning in COMP mode
Restrict adding a managed profile when the device has a device owner.

This mode is no longer supported, in favour of Corporate Owned,
Personally Enabled mode (Organization-Owned device with Managed Profile).

The restriction on adding managed profiles is now added by default when
a device owner is set, and is removed when the device owner is removed,
to avoid other system copoments from creating a managed profile when
there's a device owner.

Additionally, the method for checking whether pre-provisioning
conditions are met has been modified to return an error if the
restriction is set.

Bug: 145271440
Test: atest FrameworksServicesTests:DevicePolicyManagerTest

Change-Id: Ife25f4e2faffe84d85ab7786407c14997b4cf069
2020-01-13 14:56:33 +00:00
Automerger Merge Worker
9930eea1bd [SP03] support registerNetworkStatsProvider API am: 80831d2ff3 am: 358de94645 am: aa1242109c
Change-Id: Iaedbf1f8bbe8128ca2631efff24048b97ce9d909
2020-01-13 14:48:01 +00:00
Automerger Merge Worker
aa1242109c [SP03] support registerNetworkStatsProvider API am: 80831d2ff3 am: 358de94645
Change-Id: I16130e06129e985fab33b5caf904477bf241e1b2
2020-01-13 14:28:05 +00:00
Automerger Merge Worker
f68f1f383d [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull am: 232b2edcfb am: adf6c4eaff
Change-Id: I872285f988905d6707109ab3c7e6a419df47d39b
2020-01-13 14:28:02 +00:00
Neil Fuller
2be7ac4531 Expose time / time zone system apis for telephony
Expose system apis / permissions needed by the telephony module to
communicate with the system server for time and time zone detection.

There are also small improvements for @Nullable.

Bug: 147012511
Test: build only
Change-Id: I27e5aa4c594d5fbad0b6f043afb9e910dcba4349
2020-01-13 13:56:54 +00:00
Alex Johnston
011f5c6ea5 Add new Factory reset protection policy APIs
Historically, FRP behaviour was built on top of the application restrictions
infrastructure. This CL introduces new behaviour, as the profile owner of an
organization-owned device needs to be able to control FRP behaviour and
cannot set application restrictions on user 0.

- Introduced a new FactoryResetProtectionPolicy object
  - Added it as a field to ActiveAdmin
  - Created a default value
- Added setFactoryResetProtectionPolicy to DPM which is used to set a
  factory reset protection policy. If the policy is null, the current
  policy is cleared and set back to the default value.
- Added getFactoryResetProtectionPolicy to DPM to retrieve the current
  factory reset protection policy. If this is the default value, then
  no policy is set.
- Both these APIs are callable by the device owner or profile owner of
  an organization-owned device.

Bug: 143517230
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.server.devicepolicy.FactoryResetProtectionPolicyTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testFactoryResetProtectionPolicy
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testFactoryResetProtectionPolicy

Change-Id: I72c4d06ec8a27741a1956d082969573077937726
2020-01-13 10:55:28 +00:00
Remi NGUYEN VAN
05f7b5c621 Add NETWORK_STACK_SERVICE to SystemServiceRegistry
The service is already registered in ServiceManager. It needs to be
accessible from SystemServiceRegistry so that other mainline modules
can communicate with it.

Bug: 147255753
Test: Dependent CLs using the service
Change-Id: I940c62064466c3b3b8d2a195b810e90eaade7e6c
2020-01-13 14:44:56 +08:00
junyulai
80831d2ff3 [SP03] support registerNetworkStatsProvider API
This change provides an API that allow external modules to
register a custom provider of NetworkStats to merge the
network statistics that cannot be seen by the kernel to system.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: atest NetworkPolicyManagerServiceTest
Test: m doc-comment-check-docs
Bug: 130855321

Change-Id: I265bc637c40666cde505fde5056d2d9bfc5fb204
2020-01-13 14:43:03 +08:00
junyulai
232b2edcfb [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
Extracted from ag/9990011 to make NetworkStatsManager sync with internal
line, given that it is missing in aosp/1198084.

Bug: 126528330

Test: Treehugger
Change-Id: I77f50326869799f51d4636cb7c6d7c97daf531e6
Merged-In: I42117ebfb640e3b0b133183e5e146860bed8471a
2020-01-13 14:42:37 +08:00
Yanli Wan
0c581ec46d Merge "Add support to start financed device provisioning" 2020-01-11 05:24:17 +00:00
Sarah Chin
4affb51cc9 Make MmsManager public and @SystemService
Test: manually verify can send/receive MMS
Bug: 144004293
Change-Id: I39cde852252e18f71f98e328354df66611c9db60
2020-01-10 20:02:08 -08:00
Benedict Wong
d6d1c3aa3e Merge "Add new appop for Platform VPNs" 2020-01-11 02:31:14 +00:00
Yanli Wan
01c9255ec4 Add support to start financed device provisioning
* Add intent action used to trigger financed device provisioning
* Add financed device provisioning precondition check

Bug: 135486391
Test: atest DevicePolicyManagerTest
Change-Id: Id0f65816026cd195481022b6b75c3232996ec6e7
2020-01-10 16:14:57 -08:00
Ryan Mitchell
ee4a564d4f Allow for overlaying dynamic shared libraries
Overlays targeting shared libraries should be loaded into the
resources of every target that depends on the shared library.

Static shared libraries are currently not supported because overlays
should override all versions of static shared libraries and there is
not currently support for an overlay targeting multiple APKs.

Also created a test instrumentation and host test suite for testing
overlays and packages on the system image.

Bug: 140790224
Test: atest OverlayRemountedTest
Change-Id: I20a217b6368d6cf92b2b9f46908fd58012933f72
2020-01-10 23:20:19 +00:00
Collin Fijalkovich
88e9459989 Merge "Added verification mode to PropertyInvalidatedCache" 2020-01-10 23:01:56 +00:00
TreeHugger Robot
d8468f82fe Merge "Adding additional listeners (onNotificationVisibilityChanged, onPanelHidden, onPanelRevealed) to NotificationAssistantService." 2020-01-10 20:59:29 +00:00
Rob Carr
57b072545f Merge "Introduce TaskOrganizer" 2020-01-10 20:27:27 +00:00
Ruchir Rastogi
3b0b4dff97 Merge "Migrate puller registration to StatsManagerService" 2020-01-10 19:00:05 +00:00
Kholoud Mohamed
a69be11929 Merge "Give INTERACT_ACROSS_PROFILES parity with _USERS for bindServiceAsUser API" 2020-01-10 18:54:02 +00:00
Benedict Wong
3eb9520d1a Add new appop for Platform VPNs
This change introduces a new appop, ACTIVATE_PLATFORM_VPN, that is a
subset of the ACTIVATE_VPN appop. VPN apps that have been granted the
more dangerous ACTIVATE_VPN appop should be allowed to use platform
VPNs, as they are more restricted, and safer. However, the opposite
must not be true.

Bug: 144246835
Test: Compiles, FrameworksNetTests passing
Change-Id: I609e87e688432f957751058b09f350fa641753d7
2020-01-10 18:05:29 +00:00
TreeHugger Robot
0df353738f Merge "Add support for conversation notification channels" 2020-01-10 17:46:58 +00:00
Julia Reynolds
0f76734e36 Add support for conversation notification channels
Bug: 137397357
Test: atest, cts
Change-Id: I3d8f9ec2f318ba8a16e6b82f656884cf142adf9c
2020-01-10 16:01:03 +00:00
Automerger Merge Worker
aa58c0d5c3 Merge "Rename android.util.TimestampedValue to android.os" am: 641fa6730a am: fee904a5fb
Change-Id: Ib439759dbee692a624491267d07f72b0d754779d
2020-01-10 09:18:38 +00:00
Neil Fuller
641fa6730a Merge "Rename android.util.TimestampedValue to android.os" 2020-01-10 08:11:14 +00:00
TreeHugger Robot
f9ace3f8aa Merge "Add can interact/request to interact across profiles APIs" 2020-01-10 04:25:31 +00:00
Shuo Qian
b9c9bfa6e8 Introduce system API for ActivityManager.updateMccMncConfiguration for Mainline
Test: treehugger
Bug: 147381728
Bug: 138545688
Change-Id: Ieef1dbbab3b05fc166c3dbc53ed2507ef45d09d7
2020-01-10 00:02:59 +00:00
Ruchir Rastogi
13b7796a64 Migrate puller registration to StatsManagerService
The code path to register and uregister pullers now goes through
StatsManagerService as opposed to StatsCompanionService. Pullers are
also now cached in StatsManagerService.

Test: m -j
Test: atest GtsStatsdHostTestCases (passes even when the RVC check is
removed from relevant tests)
Bug: 147010937
Change-Id: I6549a41e2059c5fc9e57d861b751760ef165f879
2020-01-09 14:56:37 -08:00
Robert Carr
8a2f913ac4 Introduce TaskOrganizer
A first take at the TaskOrganizer API for allowing SysUI to control task presentation.
In this CL we introduce the first two primitives:
        1. The interface itself for implementation by SysUI
        2. Support for organizing a given windowing mode (but atm really only PIP)
We include a sample app that manages the PIP from an APPLICATION_OVERLAY window.

Bug: 139371701
Test: wmtests/TaskOrganizerTests. TaskOrganizerPipTest
Change-Id: I44a8ed311bc5f06285bba2c6ff3b37a7d19a9190
2020-01-09 13:04:18 -08:00
Collin Fijalkovich
0dce8bb6cf Added verification mode to PropertyInvalidatedCache
Created a compile-time flag VERIFY that when enabled will compare
any answer returned out of the cache with the true server response.
If the answers differ and the invalidation nonce has not changed,
the cache will log which query induced the response.

Bug: 146018074
Test: Manually flashed and verified that the cache captures invalid
responses.

Change-Id: I716b6aad5c4dac975e96fa05f0e18829f76c8636
2020-01-09 09:18:17 -08:00
Automerger Merge Worker
b615fa46c9 Merge "Use new UnsupportedAppUsage annotation." am: 70129fc863 am: fe3063fb71
Change-Id: Iea82f97f0ba766ce3f435630175aea48ca47f12f
2020-01-09 16:15:31 +00:00
kholoud mohamed
946df39c29 Add can interact/request to interact across profiles APIs
Add CrossProfileApps#canRequestInteractAcrossProfiles,
and CrossProfileApps#canInteractAcrossProfiles public APIs.
This provides apps the ability to check if they can interact across profiles,
or can they request that from the user if not.

BUG: 136249261
Test: in progress

Change-Id: Ifd561d5d5efcd167e24a5f05c22496d1fe9c81fc
2020-01-09 16:01:45 +00:00
Neil Fuller
35cc296228 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Merged-In: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
(cherry picked from commit d159015e54)
2020-01-09 15:34:43 +00:00
TreeHugger Robot
b22fc1bea4 Merge "Use START/STOP messages to update visibility" 2020-01-09 14:30:37 +00:00
Artur Satayev
d9b11b058c Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
Merged-In: I8789f8499d4dca08580672e9e45ed9a7026dd686
2020-01-09 13:56:05 +00:00
kholoud mohamed
67ac7c6760 Give INTERACT_ACROSS_PROFILES parity with _USERS for bindServiceAsUser API
INTERACT_ACROSS_PROFILES should work as a replacement for INTERACT_ACROSS_USERS so we don't have to give privileged system components a permission that is more powerful than is necessary.
Javadoc and annotations of the bindServiceAsUser API will be modified in a subsequent CL.
Unlike INTERACT_ACROSS_USERS, calling an API for a user in a different profile group will throw a SecurityException.

BUG: 140807471
BUG: 136249261
Test: atest ContextCrossProfileHostTest
Test: tested locally that granting the permission allows access to
bindServiceAsUser

Change-Id: I2878067bb2369d26a9ac5504ddd8c0e753f67898
2020-01-09 12:04:04 +00:00
Jeff Sharkey
b8c30b3449 Merge changes from topic "jan7"
* changes:
  Respond to API council feedback.
  Final push to build against SDK.
2020-01-09 06:11:04 +00:00
Andrii Kulian
b9faa03b90 Use START/STOP messages to update visibility
Activity visibility messages simply move the activity to STOPPED or
STARTED state. We can use the lifecycle messages to do the same and
simplify the logic/remove duplicated code.

This CL also removes the option to send STOP message without making
the client invisible and actually calling onStop(). This option
caused a mismatch of the state between server (STOPPED) and client
(PAUSED). Also, in cases when the device was going to sleep, STOP
message was always followed by SLEEP message, which called onStop()
anyway.

Bug: 137329632
Bug: 129750406
Test: AM/WM CTS and unit tests
Change-Id: I487575520ce301bb2f65519f0c0a30b6b9edac0c
2020-01-08 15:29:57 -08:00
Automerger Merge Worker
655ad4a8f5 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" am: f428f58080 am: 33d3e85975 am: e219088375
Change-Id: Ie4ede0037ee0c209e31c572c805948a17a83a6e4
2020-01-08 22:41:08 +00:00
TreeHugger Robot
22f2eb7208 Merge "Update Add/Remove Configuration" 2020-01-08 22:28:35 +00:00
Automerger Merge Worker
e219088375 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" am: f428f58080 am: 33d3e85975
Change-Id: Id3ea80c30e149588a6d97f02df978f258dda3495
2020-01-08 21:13:09 +00:00