Commit Graph

16949 Commits

Author SHA1 Message Date
Stanislav Zholnin
f85aaad615 Merge "Prevent Historical AppOps from returning empty data." 2020-01-17 12:53:38 +00:00
Rubin Xu
41bdd9713d Add device policy API to toggle Common Criteria mode
Common Criteria mode puts device into a state where certain
funtionalities are tuned or turned on to meet the higher security
requirement from Common Criteria certification. Device Owner
can use the new device policy API to toggle Common Criteria mode.

Bug: 137937540
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest SettingsProviderTest
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testCommonCriteriaMode
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testCommonCriteriaMode
Change-Id: If07c053437e980ed3317d3838cc74e5bfd44efce
2020-01-17 10:20:21 +00:00
TreeHugger Robot
64259a3b43 Merge "Simplify the activity lifecycle from START to STOP" 2020-01-17 05:03:28 +00:00
Andrii Kulian
2b3b20c388 Merge changes from topic "app_config_compat"
* changes:
  Update resource config for default display
  Override process config to match activity config
  Set parent for WindowProcessController
2020-01-17 04:56:41 +00:00
TreeHugger Robot
0622f20959 Merge "Expose NotificationChannel#setBlockableSystem as SystemApi" 2020-01-17 01:28:03 +00:00
Nate Myren
739e946f87 Merge "added methods to @TestApi" 2020-01-16 22:31:26 +00:00
Nate Myren
3f26271da4 added methods to @TestApi
Added ActivityManager.switchUser(UserHandle),
Context.startActivityAsUser, and UserHandle.of to
@TestApi

Test: None
Bug: 135282431

Change-Id: Iefbaa3c8f02649dd7d01be3093fa47104b077f58
2020-01-16 22:31:02 +00:00
Julia Reynolds
3bd8c209b1 Merge "Allow conversations to be demoted out of the conversation space" 2020-01-16 22:23:08 +00:00
Julia Reynolds
dcd70d6ec6 Allow conversations to be demoted out of the conversation space
Also default the flag to allow more notifications into that
space to on.

Test: atest
Bug: 137397357
Change-Id: I225f462879bdb28411cc631a3e259b4c71ba7394
2020-01-16 14:39:46 -05:00
Hall Liu
7c4dd3a5ef Expose NotificationChannel#setBlockableSystem as SystemApi
Expose setBlockableSystem as a module-apps-only SystemApi.

Bug: 138401571
Test: atest android.app.cts.NotificationChannelTest
Change-Id: I0b6a14360e9278a092476ada6533e63a46d4e4fe
2020-01-16 10:03:27 -08:00
Jason O'Brien
6f2978c9fc Add instrumented app to JAR path (isolated splits)
The base APK is loaded during normal execution even when isolated splits
are requested. This preserves that behavior during instrumented tests,
which previously skipped the base APK (causing class loading errors).

Test: tested on device with a trivial automated instrumented test
Bug: 146183755
Change-Id: Ia54072ee91b7c06cb4a787a8954ad2e69b322cac
2020-01-16 15:28:15 +00:00
Stanislav Zholnin
0d9499c40c Prevent Historical AppOps from returning empty data.
At every filtering level (uid -> packageName -> featureId -> op)  it is possible that lower level filter would filter out all available data. In such case higher level entity should also be removed.

Test: manual verification
Change-Id: Ibd1b08da5b501c1ecabac7158d70414d955203d7
2020-01-16 13:39:50 +00:00
TreeHugger Robot
f70990753d Merge "Starts a new request on switching back to the existing app" 2020-01-16 11:18:12 +00:00
TreeHugger Robot
a98a0c6f46 Merge "Make the method for finding out if a device is org-owned public." 2020-01-16 01:58:08 +00:00
Danning Chen
8f0903ae74 Merge "Add a new method queryEventsForUser() to UsageStatsManagerInternal for People Service to call" 2020-01-15 22:55:15 +00:00
Andrii Kulian
946e8df660 Update resource config for default display
When a launched application doesn't occupy the entire screen space,
there is a mismatch between the configuration of the process and the
configuration of activities. This leads to compatibility issues with
apps that don't expect this, read display metrics from Application
resources and try to apply them in activities.

The platform may apply a compatibility mode, in which the process
configuration will match the config of the top running activity. This
means that the process configuration may change and runtime and
result in display adjustments that are different from the default
values. This CL propagates resource configuration updates even for
default display to make sure that the config changes are reflected
for non-activity contexts.

Test: CtsWindowManagerDeviceTestCases:AppConfigurationTests
Change-Id: I91cadc83a82a3be8c8dee810bbd1aa97cbe4e97f
2020-01-15 12:22:46 -08:00
TreeHugger Robot
458fbcba7f Merge "Add conversation-centric inline controls" 2020-01-15 19:09:53 +00:00
TreeHugger Robot
bcc07fc3b9 Merge "Minor fixes for devices without WallpaperService." 2020-01-15 19:04:57 +00:00
Evan Severson
4e49a5d0b3 Merge "Add new api to get the button label for background permission" 2020-01-15 17:59:34 +00:00
Julia Reynolds
12ba4cf7a8 Add conversation-centric inline controls
Round one - needs polish, and actions may be added or removed
in the future, and demote isn't working yet.

Bug: 137397357
Test: atest
Change-Id: Ia52598bec58fc54b8bde29168cd419a24d1e4dab
2020-01-15 10:20:29 -05:00
Eran Messeri
41c2aed9c1 Make the method for finding out if a device is org-owned public.
Make isOrganizationOwnedDeviceWithManagedProfile a public method, as
there is no reason to keep this information hidden from apps.

Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedProfileOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedDeviceOwnerTest#testIsDeviceOrganizationOwnedWithManagedProfile
Bug: 143518237
Bug: 144978467
Bug: 147340575
Bug: 146123237
Change-Id: Iab45f20c9150a6b8bd48eea610484f36f199d3d7
2020-01-15 14:26:48 +00:00
TYM Tsai
8839835d27 Starts a new request on switching back to the existing app
The response may be old and incorrect when leave the app then go back. To
avoid using the wrong response, going back to the app will trigger a new
request.

Bug: 146903532
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ibab426183d39e3c51fb0f89ec6ba6ea48012b6a8
2020-01-15 21:12:19 +08:00
Al Sutton
f7f94e34bf Merge "Add "No New Data" flag for Key/Value Backups" 2020-01-15 11:35:07 +00:00
Jacky Kao
873cbc0e14 Merge "Implementing new API : takeScreenshot()" 2020-01-15 08:29:49 +00:00
Jacky Kao
09789e4168 Implementing new API : takeScreenshot()
Implementing the new API for A11y services to take the screenshot
of the specified display.
Bitmap takeScreenshot(int displayId)
1. The main codes is moved from the UiAutomationConnection class and
let the UiAutomation change to use this API.
2. Add a capability at metadata to check whether the A11y services could use this
API or not.
3. This API is a async one for A11y services, but is a sync one for
UiAutomation.

Bug: 10931661
Test: a11y CTS & unit tests
Change-Id: I478bd93c60d4742bef20ae0e423ca9de1bda55d2
2020-01-15 16:23:52 +08:00
Automerger Merge Worker
0dcf43d1fe Merge "DevicePolicyManager: annotate SystemApi" am: d63ebcf807 am: 5016cf0263 am: 14dee43669
Change-Id: I88cb20e9c283993cda6be98d73f0fbfdc3f4ce54
2020-01-15 07:28:57 +00:00
Automerger Merge Worker
14dee43669 Merge "DevicePolicyManager: annotate SystemApi" am: d63ebcf807 am: 5016cf0263
Change-Id: I27c2aa961fce4d7ee19ded54e4e3cc3172bec850
2020-01-15 07:14:27 +00:00
Treehugger Robot
d63ebcf807 Merge "DevicePolicyManager: annotate SystemApi" 2020-01-15 06:37:55 +00:00
TreeHugger Robot
cac0014a95 Merge "Add IActivityManager.stopUserWithDelayedLocking" 2020-01-15 05:40:06 +00:00
Wu Ahan
d5b8f0590d Merge "Make some apis @TestApi and @hide for usage in tests" 2020-01-15 03:33:41 +00:00
Felipe Leme
8ac0d0d54a Minor fixes for devices without WallpaperService.
- Fixed constructors so DisabledWallpaperManager doesn't throw exception
- Fixed SystemServiceRegistry.get(WallpaperManager.class) for instant apps

Bug: 138939803
Test: atest --instant CtsPermissionTestCases:android.permission.cts.ServicesInstantAppsCannotAccessTests#cannotGetWallpaperManager

Change-Id: I7cd6c65e9a693f3f1c4d5232420cc3f881d398c1
2020-01-15 03:32:46 +00:00
TreeHugger Robot
71e50f5199 Merge "Check mIncludeCode before building appComponentFactory" 2020-01-15 00:56:49 +00:00
Danning Chen
6a5982f300 Add a new method queryEventsForUser() to UsageStatsManagerInternal for People Service to call
Change-Id: I4baf755a3dc1af421ea755ed2f4cfe3440741290
Test: Build and run on a test device
Bug: 146522621
2020-01-14 16:21:57 -08:00
Evan Severson
cfae44aeec Add new api to get the button label for background permission
This allows apps to get the string used so they can properly instruct
the user on how to grant a background permission.

Test: Manual, multiple languages
Bug: 147440267
Change-Id: Ibdc6563e85cae930c25a9338513f747440fee8b4
2020-01-14 14:39:12 -08:00
Keun young Park
4cb993318b Add IActivityManager.stopUserWithDelayedLocking
- Only allow delayed locking for the explicit call, stopUserWithDelayedLocking()
  or for implicit user stopping caused by user switching.
- All other explicit user stopping should immediately lock the user. This allows
  immediate locking from component like DevicePolicy.
- Product still should enable delayed locking explicitly and if it is disabled,
  IActivityManager.stopUserWithDelayedLocking will behave the same with
  IActivityManager.stopUser.
- Once user is stopped in delayed locking mode, one of following steps can completely
  lock the user (this is not a complete list):
  1. User is asked to be stopped with IActivityManager.stopUser call.
  2. User is restarted through IActivityManager.restartUserInBackground call.
  3. UserManager.evictCredentialEncryptyionKey (involves restartUserInBackground call)
  4. When user is removed (involves IActivityManager.stopUser call).

Bug: 131757355
Test: run unit tests
      check user locking in car device where delayed locking is enabled.

Change-Id: I663ffde3a5b74738a6f59b4282ff562146f22662
2020-01-14 13:56:28 -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
Automerger Merge Worker
0b23099611 DO NOT MERGE Don't throw exception in AppOpsManager.checkOp am: 892ded1e8a
Change-Id: I929325ddb54bd6a7ffd256b1b3327c98dc85bc18
2020-01-14 19:56:11 +00:00
Philip P. Moltmann
73e2690ede DO NOT MERGE Remove unnecessary internal APIs.
Test: Built
Bug: 146463528
Bug: 146590200
Bug: 147649036
Change-Id: I5391ac4989d7d5712982f5608f9fc28cf7935b00
2020-01-14 19:42:44 +00:00
Neil Fuller
872d3504ec Merge "Expose time / time zone system apis for telephony" 2020-01-14 15:56:15 +00:00
Al Sutton
4bc966c007 Add "No New Data" flag for Key/Value Backups
Currently we have no method of telling transports that we have
attempted to make a Key/Value backup, but there was no data to
back up. This means that for apps with K/V backups their last
backup timestamp becomes older and older causing confusion for
users about whether the app data hasn't changed or whether the
app is failing to back up.

By introducing this flag we create a signal for the framework
to tell transports that, if there was any changed data, the
data would have been backed up, but the apps has not indicated
any changes have been made. This allows us to provide a UX
based on last non-erroring attempt rather than last data
change.

Bug: 147481066
Test: No code introduced in the CL.
Change-Id: Id832c7173da6341c6dc7b77fb72c289f2e1da624
2020-01-14 10:06:01 +00:00
Eran Messeri
3662019068 Merge "Disable provisioning in COMP mode" 2020-01-14 07:22:57 +00:00
Automerger Merge Worker
995211c840 Merge "Add NETWORK_STACK_SERVICE to SystemServiceRegistry" am: 55962277bf am: c5dfc3ca1b
Change-Id: I230c75de4f9f9f79b3583aace860957c83b0586d
2020-01-14 04:36:00 +00:00
Mark Chien
78231e9282 Merge "Add NETWORK_STACK_SERVICE to SystemServiceRegistry" 2020-01-14 03:06:45 +00:00
Remi NGUYEN VAN
fe1ce1e047 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
Merged-In: I940c62064466c3b3b8d2a195b810e90eaade7e6c
2020-01-14 02:17:54 +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