Commit Graph

16985 Commits

Author SHA1 Message Date
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
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
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
TreeHugger Robot
d74d9f5871 Merge "Tweak WallpaperManager docs" 2020-01-17 22:53:50 +00:00
Todd Kennedy
b38fdd3d33 Merge "Keep old package manager constructor" 2020-01-17 22:18:51 +00:00
Jeffrey Huang
67ad2e7a55 Delete References to Statsd in StatsManager
Test: adb shell cmd stats pull-source 10000 (chosen randomly)
Change-Id: I9578f84213e6c2787da60ae7e2c20157087d5b6a
2020-01-17 13:28:27 -08:00
Malcolm Chen
c99b83b95f Add HomeVisibilityObserver APIs in ActivityManager.
The new API will be @System which is used by Telephony stk app to
monitor foreground activity change.

Bug: 144351078
Test: manual with a test app that registers HomeVisibilityObserver
and monitor its callback.
Change-Id: I2f250cdd53a667b2d89e84e589b0ae0bc94a8aa3
2020-01-17 20:23:39 +00:00
Hongming Jin
60d32dbf5d Merge "API on AccessibilityService side to support customized system actions." 2020-01-17 19:09:11 +00:00
Srinivas Paladugu
f5639d2d3b Mark set/getProtectedPackages APIs as non-parent aware.
Fixes cts test
com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled

Bug: 135486391
Test: atest DevicePolicyManagerTest
Change-Id: Ic614cb4e9e30bc7a91fad57e7de79cd62ddc34d1
2020-01-17 10:19:13 -08:00
TreeHugger Robot
05ed82b446 Merge "Expose java puller api as @SystemAPI" 2020-01-17 17:39:18 +00:00
Julia Reynolds
bfcda41613 Merge "Addressing conversation info todos" 2020-01-17 17:12:37 +00:00
Julia Reynolds
7c267526a1 Addressing conversation info todos
- Linking the conversation notification to the newly created
channel and triggering a ranking update
- Incorporating the flag for whether notifications/channels with
invalid shortcut ids should be allowed

Test: atest
Bug: 137397357
Change-Id: Ice1d545f2405a6c9b9eefaf1fd5481622ad72d7b
2020-01-17 10:20:19 -05:00
Todd Kennedy
d9d985beb4 Keep old package manager constructor
Bug: 146192772
Test: Manual
Change-Id: I401ab81f85fd33c0a262629f7121e04ebad8c40d
2020-01-17 06:08:05 -08:00
Mathew Inwood
fc3aafdd16 Fix @link tags in @ChangeId docs.
We now have javadoc based docs generated from these comments now. Ensure
the links can be resolved.

Bug: 144927670
Test: See follow-up CLs
Change-Id: I7c3121e062ec82b64a81f3ec00cddb1bf932ffd9
2020-01-17 13:56:18 +00:00
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
Tej Singh
6b9798385b Expose java puller api as @SystemAPI
Also clear calling identity before invoking the pull.

Test: make
Test: atest GtsStatsdHostTestCases
Bug: 146383532
Change-Id: I9a17d88944da0074dbbaffb0c1b99a9ce7743991
2020-01-17 03:45:49 +00:00
Hongming Jin
8302c6cd85 API on AccessibilityService side to support customized system actions.
Test: atest AbstractAccessibilityServiceConnectionTest
      atest AccessibilityServiceTest
      atest AccessibilityManagerServiceTest
Bug: 136286274
Change-Id: I6810cc9d2fff3f81f76b63fb075a68973e9757c8
2020-01-17 01:35:27 +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
Christopher Tate
d24ffee524 Tweak WallpaperManager docs
suggestDesiredDimensions() needed a somewhat different usage note.

Also added some conspicuously absent @see references.

Bug: 130832612
Test: build 'offline-sdk-docs' & inspect the result
Change-Id: Ifb6490e4aa70d84d40b56a985e38f9a3932f7d4e
2020-01-15 13:39:08 -08:00