Commit Graph

17024 Commits

Author SHA1 Message Date
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
Cody Kesting
45e0caf5dc Merge changes from topic "connectivity-diagnostics-system-server"
am: 9cd249c11a

Change-Id: I48a9f1f734b5e2dd4f7ed91c052cec5c8c62c076
2020-01-22 19:10:05 -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
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
Tim Murray
7901f7f177 Merge "Binder cache for hasSystemFeature(). System features are build-time constants, so the cache is invalidated only when the system server restarts." 2020-01-21 21:08:19 +00:00
Xiangyu/Malcolm Chen
b058ae4698 Merge "Add HomeVisibilityObserver APIs in ActivityManager." 2020-01-21 20:58:47 +00:00
Mady Mellor
2ac2d3aafc Bubble API: Allow developers to create BubbleMetadata from a shortcut id
Adds an option to specify a bubble via a shortcutId. If the builder had
icon / intent previously specified, the shortcutId will clobber those
and vice versa.

Unfortunately, this means that BubbleMetadata#getIcon and #getIntent may
return null when previously they were non-null. I've deprecated these
getters and introduced new ones along with new setters so that the naming
remains consistent.

NoMan will check if that shortcut exists before applying FLAG_BUBBLE.

Update SystemUI to use BubbleMetadata builder with shortcut id for the
shortcut experiment.

Adds test to ensure the launcher apps callback is added / removed
appropriately & that notifs with shortcut bubbles are properly flagged
or unflagged.

Test: atest NotificationManagerServiceTest
Test: atest NotificationTest NotificationManagerTest (see CTS CL)
Bug: 138116133
Bug: 144352570
Change-Id: I2e8155edc7fd70d6978fc80310f071bf6510e0d2
2020-01-21 12:51:04 -08:00
Jay Aliomer
15d855465b Custom dark theme scheduling
allows the use to set the start and end automatic dark theme
activation within a day.
Fixes: 147649309
Test: atest UiModeManagerServiceTest UiModeManagerTest
Change-Id: Iaa3593d4e8863412e3703ce9f089b88dd4df1225
2020-01-21 14:13:23 -05:00
Julia Reynolds
73bc1e84e8 Merge "Fix notification history ordering" 2020-01-21 18:58:20 +00:00
Alex Johnston
35a650b9fd Merge "Add new APIs to control modification of admin configured networks" 2020-01-21 18:33:02 +00:00
Lee Shombert
72635f677a Binder cache for hasSystemFeature().
System features are build-time constants, so the cache is invalidated only
when the system server restarts.

Bug: 140788621

Test: A special build that puts the PropertyInvalidatedCache in
verification mode was loaded on the device.  Then one iteration of MPTS was
executed.  No cache inconsistencies were found and no SELinux violations
(associated with the binder cache) were found.  The number of cache misses
was approximately 15% of the total binder calls.  98.5% of all binder calls
went through the cache.

Change-Id: Icd23283512ab648ed589d461d2a86e1c3807b45a
2020-01-21 10:21:12 -08:00
Hui Yu
89582facba Merge "Add new foreground service type camera and microphone." 2020-01-21 18:02:02 +00:00
Julia Reynolds
1cc5f842e4 Fix notification history ordering
Newest first!

Test: atest
Bug: 137396965
Change-Id: I83f8ddde5e5f929dff2bcafe55e26a51f82f90f5
2020-01-21 12:24:03 -05:00
Eran Messeri
da412f19d0 Clarify lockNow usage from a managed profile
lockNow can be used by the profile owner of a managed profile both to
lock all users and evict the encryption key of the managed profile.

However, the order of calls is important. Document the order in which
lockNow need to be called on the parent DevicePolicyManager instance so
that the profile owner isn't stopped prior to locking all users.

Bug: 148067606
Test: m docs
Change-Id: I3e29e8cb02b74d41ef4f5d96467937149282cc07
2020-01-21 16:55:09 +00:00
Eran Messeri
d4e25d49b0 Mark storage encryption functions as deprecated.
The setStorageEncryption/getStorageEncryption methods do nothing and
never have they had any impact on the system.

All setStorageEncryption does is store a value that can be retrieved by
getStorageEncryption. Otherwise, it calls setEncryptionRequested
internally which has an empty body.

Mark them as deprecated so they could be removed in the future.

Test: that it compiles
Bug: 144412716
Change-Id: I007a1acf80ddb7cba9717f2e541f029c5f379d11
2020-01-21 16:38:57 +00:00
Cody Kesting
b125776009 Add ConnectivityDiagnosticsManager to System Server.
ConnectivityDiagnosticsManager should be accessed through
Context#getService. In order for this to be possible, it needs to be
defined as a service inside SystemServiceRegistry.

Bug: 146444622
Test: compiles.
Test: CTS testing in aosp/1211164
Change-Id: I6fe29441ecc9967a04ceb394b3bbe54830bef079
2020-01-21 08:31:56 -08:00
Alex Johnston
f13a6fb624 Add new APIs to control modification of admin configured networks
* Historically, only the device owner could prevent the user from modifying
  networks that have been configured by the device owner.
* In New COPE mode, the COPE profile owner should now be able to prevent the
  user from modifying networks as well as the device owner.
* This CL adds new APIs which are callable by the device owner or profile
  owner of an organization-owned managed profile. These new API can be used
  to toggle the global setting WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN, instead of
  setting the global setting directly.
* This CL only affects networks configured by the admin, is does not prevent
  the user from creating more network configurations.

Bug: 147476790
Test: manual testing with TestDPC
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAdminConfiguredNetworks
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testAdminConfiguredNetworks

Change-Id: Ia16e639922bb08cdacd9a3766d978ac150b693c5
2020-01-21 15:51:47 +00:00
Bernardo Rufino
52af6db212 Use IBinder token for indexing toasts instead of ITransientNotification
In preparation for text toasts, which won't contain a
ITransientNotification object associated with them, indexing toasts
by an IBinder token provided by the app.

Bug: 144754526
Bug: 128611929
Test: atest android.widget.cts.ToastTest
Change-Id: I8ec649066154f59bc28bcb49bb6f156eadb796d8
2020-01-21 15:22:45 +00:00
TreeHugger Robot
6c647b896e Merge "Mark set/getProtectedPackages APIs as non-parent aware." 2020-01-21 01:59:24 +00:00
Hall Liu
6392e2548d Merge "Add system service for accessing SystemConfig" 2020-01-20 21:34:28 +00:00
Mathew Inwood
04f320e301 Merge "Fix @link tags in @ChangeId docs." 2020-01-20 11:28:39 +00:00
Jing Ji
e423f7601e Add an api to schedule app killings on imperceptible.
Bug: 142676371
Test: atest CtsAppTestCases:ActivityManagerTest
Change-Id: Ibf515ddcf384bc643c568243b675efb61f0bbd66
2020-01-19 12:35:42 -08:00
Jing Ji
8055a3a446 Add support to get historical app process exit reason
Apps can call ActivityManager.getHistoricalProcessExitInfos() to
get the historical process exit reason now.

Also add the below command to support dumping of the information
$ adb shell dumpsys activity exit-info [package name]

Bug: 136036078
Test: atest ApplicationExitInfoTest
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: I634f247e42a7e8e4535eedd76cf84089abdf1129
2020-01-17 20:47:53 -08:00
Grace Jia
d40012f278 Merge "Fix hidden API usages in LocationAccessPolicy and add API in ActivityManager" 2020-01-18 02:59:38 +00:00
Hui Yu
85679b4d19 Add new foreground service type camera and microphone.
To be used to configure foreground service camera/microphone
while-in-use permission.

For apps with targetSdkVersion R and above, a foreground service
will not be able to access camera/microphone if the foreground service
type is not specified in the manifest and in
android.app.Service#startForeground().

Bug: 136219221
Test: atest android.app.cts.ActivityManagerProcessStateTest

Change-Id: I75c62efca5f07ba1239e21d9a6f6673f822eabba
2020-01-17 16:58:20 -08:00
Grace Jia
15b4c26024 Fix hidden API usages in LocationAccessPolicy and add API in ActivityManager
Bug: 146355892
Test: Cts test, atest TeleServiceTests
Change-Id: I91bf8a05383f29feaa26b03d6a03ed7de2d79061
2020-01-17 15:51:04 -08:00
Jeffrey Huang
7149f4dfc3 Merge "Delete References to Statsd in StatsManager" 2020-01-17 23:33:06 +00:00