Commit Graph

15214 Commits

Author SHA1 Message Date
Zak Cohen
bc996c3cd1 Merge "ContentSuggestionsManager - API updates." 2019-03-15 16:09:39 +00:00
Rubin Xu
2665fc079f Merge "Add metric logging for new delegated APIs" 2019-03-15 15:55:59 +00:00
Ricky Wai
ea5c64806d Merge "Change get/setAppDetailsActivityEnabled to get/setSyntheticAppDetailsActivityEnabled" 2019-03-15 12:31:06 +00:00
TreeHugger Robot
92512d5f18 Merge "Adds nullability annotation and java docs to App Prediction APIs" 2019-03-15 01:49:11 +00:00
Hyunyoung Song
0eb76cc3af Merge "ApplicationPackageManager should fetch Resource from non system context" 2019-03-14 23:38:51 +00:00
Rubin Xu
8b17ad02b7 Add metric logging for new delegated APIs
Add metric logging to:
 * Delegated cert selection
 * Delegated network logging access
 * Delegated silent package installation and removal

Bug: 122639711
Test: manual
Change-Id: I0655b742937b6413bc5c10474e4fd4559a8eaf92
2019-03-14 22:12:23 +00:00
Zak Cohen
4834e9f02c ContentSuggestionsManager - API updates.
Adds isEnabled for the manager.
Manager also requires a user for construction, this is the user for
query for suggestions, not the calling user.

Bug: 125912329
Test: compile and CTS

Change-Id: I07145681fdf792965fee868b65f31d2978df7599
2019-03-14 14:44:56 -07:00
Issei Suzuki
97056bbb37 Merge "Acivity to rethrow an exception from AMS." 2019-03-14 20:55:46 +00:00
Issei Suzuki
ae7b4937bc Acivity to rethrow an exception from AMS.
Bug: 128414194
Test: Check if existing tests pass. Should be no-op for normal cases.
Change-Id: Ib9428c34fba8315d5208fa9427e095066aeff4fa
2019-03-14 13:41:13 -07:00
Hyunyoung Song
013f062d02 ApplicationPackageManager should fetch Resource from non system context
Test: builds and manually verified on device
Test: change theme inside ThemePicker and default icon color changes

Bug: 128445995
Bug: 128447895

Change-Id: I184534c9ecea52fa381ffa6cd1e9ba53134766ca
2019-03-14 13:27:34 -07:00
TreeHugger Robot
4719ffe555 Merge "DPM API review: Remove "ForUser" method" 2019-03-14 13:34:52 +00:00
Eran Messeri
48085ae1f9 Merge "API Review: Private DNS host can be null" 2019-03-14 12:29:09 +00:00
TreeHugger Robot
e570a42083 Merge "Don't tie getPasswordComplexity to secure lock screen." 2019-03-14 10:16:25 +00:00
Eran Messeri
be84edb9ab API Review: Private DNS host can be null
Mark getGlobalPrivateDnsHost as @Nullable since it can return null
(in the case of a host not set).

Bug: 126699845
Test: That it builds
Change-Id: I4680a8fa59815f62a74c14c149124d4cda567cca
2019-03-14 10:05:37 +00:00
Eran Messeri
518a01a26a DPM API review: Remove "ForUser" method
Replace the setProfileOwnerCanAccessDeviceIdsForUser with
setProfileOwnerCanAccessDeviceIds that takes the DPM's user ID.

Per automated API review, new methods that target a specific user (by
taking in a UserHandle) are discouraged.

Instead, the caller should get the user-specific service from the user
context.

Bug: 126700461
Bug: 126699845
Test: Manually, flashed a device and set-up TestDPC on it straight to
work profile, then verified it can do Device ID attestation.
Test: atest FrameworksServicesTests:DevicePolicyManagerTest

Change-Id: I13f20f4a434394f266a3dc2373152cb1b9ea2d2b
2019-03-14 09:38:21 +00:00
Mehdi Alizadeh
387c7cb14a Adds nullability annotation and java docs to App Prediction APIs
Also rethrows RemoteExceptions in AppPredictor class.

Test: Builds successfully
Bug: 126701214
Bug: 126699210
Bug: 126701563
Bug: 126180215
Bug: 126701789
Bug: 126701213
Bug: 126178969
Bug: 126179771
Bug: 126700116
Bug: 126180255

Change-Id: I3c76a71abbb8fdc9cadfaa4c6289ded4de379bd8
2019-03-13 14:28:29 -07:00
Michael Wachenschwanz
a232a7abe6 Merge "Change registerUsageSessionObserver to take Duration for timelimits" 2019-03-13 20:35:49 +00:00
Ricky Wai
a52e426200 Change get/setAppDetailsActivityEnabled to get/setSyntheticAppDetailsActivityEnabled
Bug: 127713970
Test: atest com.android.cts.devicepolicy.LimitAppIconHidingTest
Change-Id: I4e6fc84757731462b28119f3c38c87b0f2a57b4f
2019-03-13 17:41:56 +00:00
Benedict Wong
c328b263c8 Merge "Integrate testNetworkService and Manager with Connectivity stack" 2019-03-13 16:48:07 +00:00
Dimuthu Undupitiya Gamage
a5916fb66f Merge "Removing STOPSHIP b/111407095 lines." 2019-03-13 14:12:57 +00:00
TreeHugger Robot
00d3b38e34 Merge "Update #registerAppUsageLimitObserver to take time used." 2019-03-13 07:23:27 +00:00
Mathieu Chartier
1f99f64c9c Merge "Call notifyStartupCompleted from reportFullyDrawn" 2019-03-13 03:23:19 +00:00
Benedict Wong
99a4841954 Integrate testNetworkService and Manager with Connectivity stack
This change adds TestAPIs for tests to retrive an instance of
ConnectivityManager, allowing it to build test TUN interfaces, as well
as test networks.

This also integrates the TestNetwork types with ConnectivityManager,
creating virtual networks if the network agent is a test agent.

Bug: 72950854
Test: Compiles, CTS tests using this passing correctly
Change-Id: I741ef9cdf4bd4125d9129af3a030edf32f438e4f
2019-03-12 19:21:28 -07:00
Michael Wachenschwanz
d3cb998981 Change registerUsageSessionObserver to take Duration for timelimits
Old version of the api will be removed in a follow up CL

Fixes: 123939205
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForRegisterObserver
Test: atest com.android.cts.devicepolicy.ProfileOwnerTest#testAppUsageObserver
Change-Id: I06340c13dd93a17c4480327fb9eff16575928c35
2019-03-12 18:40:25 -07:00
TreeHugger Robot
dcd431b6cb Merge "Don't check pkg<->uid when called from internal" 2019-03-12 21:03:34 +00:00
Mathieu Chartier
63e14c10b3 Call notifyStartupCompleted from reportFullyDrawn
ART will now know when startup is startup is finished.

Test: manual
Bug: 120671223
Bug: 123377072

Change-Id: I1134f66792bddc9ab33606fa4c2807b3918d5261
2019-03-12 12:50:50 -07:00
TreeHugger Robot
f9b3d8093b Merge "Handle WebView assets correctly when multiple APKs are used." 2019-03-12 19:09:41 +00:00
Varun Shah
4f76a1e091 Update #registerAppUsageLimitObserver to take time used.
Update the time remaining parameter of #registerAppUsageLimitObserver to
time used to avoid confusion between time limit and time remaining.

Bug: 128414428
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForRegisterObserver
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForUnregisterObserver
Test: manual (mmma frameworks/base/tests/UsageStatsTest/)
Change-Id: Ied8e4ca0b8636bb9efc4d85dcae46ac6cf1ef5f7
2019-03-12 11:46:10 -07:00
Rubin Xu
9c3f325c64 Merge "Tweak DelegatedAdminReceiver API surfaces" 2019-03-12 17:49:32 +00:00
Philip P. Moltmann
724150d8ce Don't check pkg<->uid when called from internal
The PermissionManagerService calls AppOpsService before the package
manager is up. Hence AppOpsService cannot verify package properties.
This is not needed in the calls from PermissionManagerService as this
component can be trusted to provide correct data.

Fixes: 127470436
Test: Upgraded from P->Q with a pre-M installed
Change-Id: Ide529f13ab2cc3b7551e99c94935c0cb537a817b
2019-03-12 17:16:20 +00:00
Eran Messeri
c7f498fe0b Merge "Private DNS API: Follow-up on review" 2019-03-12 16:37:15 +00:00
TreeHugger Robot
794d22d0a7 Merge "Update screen lock complexity permission to password complexity" 2019-03-12 16:22:11 +00:00
Rubin Xu
9df5cd4afd Merge "Clarify the behaviour of isActivePasswordSufficient" 2019-03-12 16:01:42 +00:00
Torne (Richard Coles)
527fa8f4de Handle WebView assets correctly when multiple APKs are used.
Add all splits and shared libraries used by the WebView implementation
to the application's asset path, instead of just the base APK. Fix the
asset manipulation code path in WebViewFactory to reuse the modern
implementation in WebViewDelegate (using appendLibAssetForMainAssetPath)
instead of relying on addAssetPathAsSharedLibrary.

Add a new variant of appendLibAssetForMainAssetPath which accepts
multiple paths at once, to make it more efficient.

Bug: 124116212
Test: atest CtsWebkitTestCases
Change-Id: Ie55525d78089a4595c5b0b126e4ff1530303afe8
2019-03-12 11:41:09 -04:00
Fabian Kozynski
40a3958d69 Merge "Added Nullable annotations to NotificationManager API" 2019-03-12 15:06:38 +00:00
Eran Messeri
ff9c10593e Private DNS API: Follow-up on review
To follow up on the previous review, rename the success constant from
"success" to "no error" since the enum it's associated with now refers
to error codes.

Bug: 124301971
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testPrivateDnsPolicy
Change-Id: I6b82dd44cbf2c18fb8c1673a272f22f0e8b39dbb
2019-03-12 13:40:14 +00:00
Rubin Xu
72623f6d5c Tweak DelegatedAdminReceiver API surfaces
* Add nullability annotaitons to new and existing (DeviceAdminReceiver) APIs
* Make onReceive() final
* Javadoc for uid paramater
* Throw exception if method is not implemented

Bug: 123926441
Test: make -j32 update-api
Change-Id: Ib068b1d7f8f5abe903720b8e247c5e00bf8161c2
2019-03-12 13:24:15 +00:00
Rubin Xu
b36e753f77 Clarify the behaviour of isActivePasswordSufficient
Bug: 123620877
Test: make -j32 ds-docs
Change-Id: Ied91e8f44e07894449aa15902fe6b5e0fbc408d4
2019-03-12 11:50:33 +00:00
Mady Mellor
64d8e5cdc7 Merge "API review: annotate everything" 2019-03-12 01:05:02 +00:00
TreeHugger Robot
835282ec29 Merge "Address DPM Private DNS API Review" 2019-03-11 21:05:55 +00:00
Fabian Kozynski
5747d63059 Added Nullable annotations to NotificationManager API
Test: build
Test: atest passes
Fixes: 126701384
Change-Id: I3e9d758871ad23827a3d11a68139cb87ad7a99e4
2019-03-11 17:04:16 -04:00
TreeHugger Robot
73fde4b2fc Merge "Remove onSmsKillSwitchToggled() from system API." 2019-03-11 18:53:50 +00:00
Hui Yu
041b3ebe56 Merge "Add new UsageStats event DEVICE_STARTUP" 2019-03-11 17:37:59 +00:00
bernardchau
7ac9a71880 Update screen lock complexity permission to password complexity
This is to match the method name "getPasswordComplexity" as requested by API review feedback

Bug: 128030136
Test: N/A
Change-Id: I999657f88ed425333adbe97b9ecc33da3769ba90
2019-03-11 16:37:44 +00:00
Eran Messeri
3df6695dd7 Address DPM Private DNS API Review
Changes:
* Split setGlobalPrivateDNS to setGlobalPrivateDNSModeOpportunistic
  and setGlobalPrivateDNSModeSpecifiedHost as the original method had a
  potentially unused parameter.
* Annotated return value.
* Annotated with @WorkerThread the method that shouldn't be called on
  the main thread.

Bug: 124301971
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testPrivateDnsPolicy
Change-Id: Iace4de642bcf02ad6ee3a02804643890a5017d89
2019-03-11 15:18:00 +00:00
Lenka Trochtova
0dc2b7b150 Don't tie getPasswordComplexity to secure lock screen.
BUG: 128283074
Test: make

Change-Id: I55a9d02c05c4e4f949f276441e347566157ceb00
2019-03-11 14:38:28 +01:00
Hai Zhang
c33c55b26b Remove onSmsKillSwitchToggled() from system API.
We plan to remove this method before final release, but API freeze is
coming soon. This is an abstract method so hiding it will
automatically continue to work fine.

Bug: 127691087
Test: manual
Change-Id: I1730c70c7c2a8ac9aa469bfddc59e32de73c7c2c
2019-03-08 15:51:08 -08:00
Hai Zhang
f5e8ccd88f Use a boolean Consumer instead of RoleManagerCallback.
And use RemoteCallback for it under the hood. This removes one AIDL
interface and allows using lambda, while aligning with what
PermissionControllerService does.

Bug: 127691087
Test: manual
Change-Id: Ia94e5bac59773380b2a4764d766bf6ff1dd5b7ff
2019-03-08 15:51:02 -08:00
TreeHugger Robot
65f7350b33 Merge "Use RoleControllerService for role related APIs." 2019-03-08 21:51:25 +00:00
TreeHugger Robot
d1bd765392 Merge "Add RoleControllerManager for role controller service." 2019-03-08 21:32:00 +00:00