Commit Graph

17048 Commits

Author SHA1 Message Date
Yuliya Kamatkova
56f7c7f37c Merge "Add Activity#setLocusContext API. Plumb LocusID to the System Server. Add locus update event to the Usage Stats. Test: Build and run on a test device with a test app. Bug: 147594233, 147100454" 2020-01-24 21:10:54 +00:00
Ying Xu
4b0dec268d Merge "[Telephony Mainline] Remove hidden API usages in CarrierAppUtils" 2020-01-24 20:55:31 +00:00
Yuliya Kamatkova
48c38076ef Add Activity#setLocusContext API. Plumb LocusID to the System Server.
Add locus update event to the Usage Stats.
Test: Build and run on a test device with a test app.
Bug: 147594233, 147100454

Change-Id: I1e058ac87244d47719606d8dcfaea2df4bff43d2
Signed-off-by: Yuliya Kamatkova <yuliyak@google.com>
2020-01-24 11:19:10 -08:00
Pavel Grafov
1559c076a3 Merge "Add API to limit maximum time the profile can be turned off." 2020-01-24 13:42:58 +00:00
Pavel Grafov
746e1341c3 Add API to limit maximum time the profile can be turned off.
If this policy is set:
* Whenever work profile gets turned off or system boots, timer is
  started, so theat unless the profile is unlocked in time, apps
  will be suspended.
* when the user is unlocked, alarm is discharged.

Currently there is no upfront warning notification, will be addressed
in a follow-up.

Bug: 143517719
Test: manual, using TestDPC
Change-Id: Ib0f936b6d1414f65ae8c86367b7059c14862827d
2020-01-24 11:50:42 +00:00
Automerger Merge Worker
54b1d34fc0 Merge changes from topic "add-ikev2-vpn-types" am: adb79e3b39 am: 1ebbd0bb6b am: bb3d6e2e9c
Change-Id: I4ff406efcaada5a9306afc79290cb37bdeef71f2
2020-01-24 07:59:53 +00:00
Jeffrey Huang
4329c0d2ed Merge changes I9ea3677d,I0a59dce8
* changes:
  Migrate away from using ServiceManager
  Migrate StatsManager to apex
2020-01-24 02:04:06 +00:00
Peter Wang
09014f1048 [Telephony Mainline] Remove hidden API usages in CarrierAppUtils
Bug: 146904426
Test: Build
Change-Id: Ib307e565b85e7d9a142efc7e3348b823dc46643d
2020-01-24 09:22:25 +08:00
Jeffrey Huang
f58800b66a Migrate away from using ServiceManager
Create a wrapper class to access binder objects
published by statsd mainline module

Bug: 147923515
Test: atest com.google.android.statsd.gts.StatsdHostTestCases
Change-Id: I9ea3677d88c790c856e4e89318ae2ce67ac7df1e
2020-01-23 15:47:08 -08:00
TreeHugger Robot
296afcc029 Merge "Expose system update related API to corp-owned managed profile" 2020-01-23 21:41:39 +00:00
Jeffrey Huang
38330a0833 Migrate StatsManager to apex
Link frameworks-statsd.jar against framework-all
since it is currently infeasible to to link against stubs

Linking against stubs in frameworks/base cannot be done because
we still have StatsLog that calls StatsEvent.getBytes which
is a hidden API.

We can't move StatsLog to the apex because of hidden APIs in the
autogenerated code which is currently being migrated.

Test: m -j
Bug: 147923515
Change-Id: I0a59dce83a8075bdde3e72d1d8eceef2ed572791
2020-01-23 13:21:53 -08:00
Alex Johnston
371edb56f3 Merge "Modify setApplicationHidden and isApplicationHidden APIs" 2020-01-23 18:42:54 +00:00
Rubin Xu
ca00dd4900 Expose system update related API to corp-owned managed profile
Allows profile owner of corporate-owned managed profile to call
the following APIs:
* setSystemUpdatePolicy
* installSystemUpdate

The following APIs can already be called by regular profile owners
so no changes are needed:
* getSystemUpdatePolicy
* getPendingSystemUpdate

Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSystemUpdatePolicy
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testInstallUpdate
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSystemUpdatePolicy
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testInstallUpdate
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testInstallUpdateLogged
Bug: 147414327
Change-Id: I7224eb208f665ca7cb301daa7d17cce5126f7858
2020-01-23 17:35:41 +00:00
Alex Johnston
a552dd65fa Modify setApplicationHidden and isApplicationHidden APIs
* Introduced new logic that allows the profile owner of an
  organization-owned device (COPE PO) to hide/unhide system
  apps in the personal profile.
* Modified both APIs to be callable on the parent profile
  instance if called by the COPE PO.
* When called by the COPE PO, the package provided
  must be a system package, otherwise an IllegalArgument
  Exception is thrown.

Bug: 147413198
Test: manual testing
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testApplicationHidden
      atest com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled

Change-Id: I4fae8acee9f00e3b9c805f29cf826f917cda6abd
2020-01-23 17:05:58 +00:00
Ivailo Karamanolev
1a6fad470a Merge changes from topics "add-lights-manager", "lights-aidl-hal"
* changes:
  Add LightsManager implementation to LightsService
  Add Lights AIDL HAL support to LightsService
  Rename Light to LogicalLight to avoid namespace conflicts when adding AIDL HAL lights support.
2020-01-23 16:05:07 +00:00
Pavel Grafov
31c7fe0459 Merge "Add DPM methods to allow org owned PO to suspend personal apps" 2020-01-23 15:22:45 +00:00
Eran Messeri
d474dcd54f Merge "Prevent auto-granting of location permission via DPM" 2020-01-23 14:38:56 +00:00
Pavel Grafov
499f005e3d Add DPM methods to allow org owned PO to suspend personal apps
* When personal apps are suspended, only dialer, IMEs, a11y, launcher
  are some other critical apps are exempted.
* User is presented with notification, clicking on which invokes an
  activity in the DPC.

Bug: 147414651
Test: manual via TestDPC
Change-Id: I09f8dad08e54b0ce8201cd5c76b3f34342e0da8f
2020-01-23 13:33:39 +00:00
Adrian Roos
d7d9c3e354 Merge "Introduce WindowContext API" 2020-01-23 13:19:08 +00:00
Benedict Wong
1ebbd0bb6b Merge changes from topic "add-ikev2-vpn-types"
am: adb79e3b39

Change-Id: I205121bbd8ef8adbe5e7a5ea1c57bbcac0efae0e
2020-01-22 22:09:41 -08:00
Automerger Merge Worker
b864dc150e Merge changes from topic "connectivity-diagnostics-system-server" am: 9cd249c11a am: 45e0caf5dc am: 1544e76f76
Change-Id: If70281f2989778896eb34ac65bcfe0215393ef60
2020-01-23 03:41:09 +00:00
Benedict Wong
50b444359e Add VpnManger API surface
This change adds the VpnManager, which will be used by apps to install
profiles for all platform VPN types (currently only IKEv2).

Bug: 143325939
Test: Compiles, FrameworksNetTests passing.
Change-Id: I57f854d0a5b18358f3541c24ca0cd8aed03fd7a1
2020-01-22 19:24:24 -08:00
Cody Kesting
45e0caf5dc Merge changes from topic "connectivity-diagnostics-system-server"
am: 9cd249c11a

Change-Id: I48a9f1f734b5e2dd4f7ed91c052cec5c8c62c076
2020-01-22 19:10:05 -08:00
Andrii Kulian
4a31697319 Introduce WindowContext API
Test: atest WmTests CtsWindowManagerDeviceTestCases
Bug: 128338354
Change-Id: I9c9dfc5e7f4edd4c968e60d2ffcbb19b5c72a853
2020-01-22 18:30:29 -08:00
Hall Liu
36f8b83e45 Merge "Expose OPSTR_READ_DEVICE_IDENTIFIERS" 2020-01-23 01:56:42 +00:00
Cody Kesting
9cd249c11a Merge changes from topic "connectivity-diagnostics-system-server"
* changes:
  Add ConnectivityDiagnosticsManager to System Server.
  Make DataStallReport Parcelable.
  Make ConnectivityReport Parcelable.
2020-01-23 01:56:33 +00:00
Shu Chen
24c495fa51 Merge "Adds more flags for cursor control features." 2020-01-23 01:24:15 +00:00
Hall Liu
6b06a38e3a Expose OPSTR_READ_DEVICE_IDENTIFIERS
Expose the constant for use in Telephony.
Also replace a usage of a hidden UserHandle API with a systemapi
equivalent.

Bug: 146834818
Test: atest SmsApplicationTests
Change-Id: I569d921abf923c384d7e771e2fc28f54e0dbfdd1
2020-01-22 16:20:23 -08:00
Ivailo Karamanolev
090d02ca84 Add LightsManager implementation to LightsService
Includes backend code to support LightsManager binder calls and route
them to the HALs.

Bug: 144979010
Bug: 144978691
Bug: 142715294
Fix: 142230898
Test: atest LightsManagerTest
Test: atest LightsServiceTest
Change-Id: I2db7f2caa432cd1e2389ea5ca6544200ada18675
Exempt-From-Owner-Approval: Reviewed in OOO OWNERS's stead.
2020-01-22 23:49:02 +01:00
Santiago Etchebehere
0ec06391e2 Merge "[Zoom-out 1/N] Add API in WallpaperManager" 2020-01-22 22:35:43 +00:00
TreeHugger Robot
3d004d168c Merge "Rewrite R constants before creating Application" 2020-01-22 22:08:41 +00:00
TreeHugger Robot
c4035ef38d Merge "Show RemoteInput images in notification history." 2020-01-22 22:05:00 +00:00
Kweku Adams
881254f4cb Merge "Creating new RESTRICTED bucket." 2020-01-22 21:21:09 +00:00
Aran Ink
2e3cc4169d Show RemoteInput images in notification history.
For cases where we can't show images, show "Image inserted" text instead. This will happen for work profile notifications, and for notifications that don't use MessagingStyle.

Test: Updated unit tests for NotificationRemoteInputManagerTest to use new RemoteInputHistoryItem structure, and to ensure support for URIs and mime types. Manual testing to ensure images appear in notification history for MessagingStyle notifications under the primary user, and that "Image inserted" appears for work-profile and non-messaging notifications.

Change-Id: I254b579aa710337039a7def6880f14a61bbd4d53
2020-01-22 15:22:19 -05:00
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
Perumaal Shanmugam
9f22c5356f Merge "Change provideContextImage() API to accept Bitmap" 2020-01-22 18:19:34 +00:00
TreeHugger Robot
177318a092 Merge "Change method to PackageManager#getBackgroundPermissionOptionLabel" 2020-01-22 18:06:29 +00:00
Kweku Adams
c6a9b341e4 Creating new RESTRICTED bucket.
This new bucket sits between RARE and NEVER and will have more severe
restrictions than RARE. Jobs, alarms, background services, and more will
be affected. For now, we just create the bucket. Changes to the various
subsystems will be done in separate CLs. This bucket is not meant to be
used if the user has used the app recently, so there are safeguards in
place to make sure that doesn't happen. A new system-internal API is
added so it's easier to track internal calls and so that other
subsystems can provide explicit reasons for forcing an app into the
bucket.

Bug: 145551233
Test: atest AppIdleHistoryTests
Test: atest AppStandbyControllerTests
Test: atest UsageStatsTest
Change-Id: I8ae2e6fd2353111f6bcc176a5a1929551db01e0f
2020-01-22 09:27:49 -08:00
TreeHugger Robot
f3f7580965 Merge "Clarify lockNow usage from a managed profile" 2020-01-22 16:10:11 +00:00
Alex Kershaw
4b0197d8ba Reset unset app-ops when the admin sets cross-profile packages.
When the admin unsets cross-profile packages, reset the
INTERACT_ACROSS_PROFILES app-op back to the default if it is no longer
configurable by the user.

Other minor changes:
- Remove the explicit app-op permission check from
setInteractAcrossProfilesAppOp, since AppOpManager performs that check
when required.
- Fix the broadcasting logic in CrossProfileAppsServiceImpl to correctly
set the component and flags.

Bug: 136249261
Bug: 148010178
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.ManagedProfileCrossProfileTest
Change-Id: Ib8b5f331fb92fc475bc95ad039adf93fac04da37
2020-01-22 13:20:24 +00:00
Eran Messeri
d0d2a86995 Merge "Mark storage encryption functions as deprecated." 2020-01-22 10:25:12 +00:00
Shu Chen
9d744e58c8 Adds more flags for cursor control features.
- The delta height & opacity for the insertion handle.
 - The zoom factor & aspect ratio for the new magnifier.

Test: m -j & manual tested.
Bug: 145558249, 145550493, 145545591, 145555868
Change-Id: Ie69bd606ff738b19f3af166e7beeac2c32c705ba
2020-01-22 15:48:39 +08:00
Benedict Wong
418b97e5db Merge "Add new appop for Platform VPNs"
am: b8dd5bcc23

Change-Id: Ia44f9491f3951e3f7dda2c03e5d33452bb2e94d3
2020-01-21 20:39:02 -08:00
Benedict Wong
d040b254c5 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
Merged-In: I609e87e688432f957751058b09f350fa641753d7
2020-01-22 04:30:23 +00:00
Perumaal S
3c78cc58c7 Change provideContextImage() API to accept Bitmap
provideContextImage currently takes in taskId which works for the
Recents screen.
In Android QPR2 timeframe, content suggestions also powers Screenshots
feature which requires passing an explicit Bitmap.
This change adds a Bitmap parameter to the 'provideContextImage'.
Launcher/Recents will continue using the taskId-based API to obtain a
fresh snapshot using the Activity/Window Manager; or obtain an on-disk one for paused tasks.

Bug: 147324195
Test: atest ContentSuggestionsManagerTest
  in separate CL ag/10146598
Change-Id: I686eb8d90a4a44fdd80403ef2df58020c82ca69a
2020-01-21 18:44:38 -08:00
Evan Severson
d60c78511d Change method to PackageManager#getBackgroundPermissionOptionLabel
Feedback advised renaming getBackgroundPermissionButtonLabel to
getBackgroundPermissionOptionLabel. Also update javadoc for this
method.

Fixes: 147907758
Test: Compile
Change-Id: Iaafef7c6e70538fe878db82c900d87ac668591bf
2020-01-21 16:23:51 -08:00
Yvonne Jiang
b7024a251c Adding API for displaying a DO/PO controlled secondary lock screen post initial system lock screen.
The new DPM API allows DP/POs to set whether the keyguard needs to show a secondary lockscreen after the primary locking mechanism is dismissed. If enabled, the keyguard will check for a service handling ACTION_BIND_SECONDARY_LOCKSCREEN_SERVICE and request the secondary lockscreen content from it.

Bug: 136085151
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest KeyguardUpdateMonitorTest
Test: atest AdminSecondaryLockScreenControllerTest
Change-Id: If82921b4fc2d78c0522a20ef91b48f9a93dd8b61
2020-01-21 15:52:57 -08:00
Mady Mellor
0e12abac38 Merge "Bubble API: Allow developers to create BubbleMetadata from a shortcut id" 2020-01-21 23:31:22 +00:00
Bernardo Rufino
8aa39acf60 Merge "Use IBinder token for indexing toasts instead of ITransientNotification" 2020-01-21 21:52:32 +00:00
Jay Aliomer
1d8df2ad91 Merge "Custom dark theme scheduling" 2020-01-21 21:27:28 +00:00