* 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
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
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
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
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
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
- 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
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
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
Feedback advised renaming getBackgroundPermissionButtonLabel to
getBackgroundPermissionOptionLabel. Also update javadoc for this
method.
Fixes: 147907758
Test: Compile
Change-Id: Iaafef7c6e70538fe878db82c900d87ac668591bf
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
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
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
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
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
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
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
* 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
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
Prevent the device policy client from granting the location permission
via explicit grant (setPermissionGrantState).
Unless on a managed, unattended kiosk device, the user has to explicitly
grant location-related permissions.
Location-related permissions can still be denied automatically.
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testLocationPermissions
Bug: 147650798
Change-Id: I5a1099a15b94a287414e42e174735dc87f930c6f