Commit Graph

15196 Commits

Author SHA1 Message Date
Michael Wachenschwanz
a232a7abe6 Merge "Change registerUsageSessionObserver to take Duration for timelimits" 2019-03-13 20:35:49 +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
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
Julia Reynolds
6570d94901 Merge "Address api council feedback" 2019-03-08 15:17:00 +00:00
TreeHugger Robot
3b69cd317b Merge "Add NonNull annotation in ActivityManager." 2019-03-08 13:33:33 +00:00
wilsonshih
402854484f Add NonNull annotation in ActivityManager.
Add NonNull annotation at isActivityStartAllowedOnDisplay.

Fix: 126698001
Test: build pass.

Change-Id: I46b10aeb6b83de284de35863197665da8949928f
2019-03-08 07:15:32 +00:00
Hai Zhang
26f37d35f6 Use RoleControllerService for role related APIs.
Move isApplicationQualifiedForRole() and isRoleVisible() from
PermissionControllerService to RoleControllerService.

Bug: 127691087
Test: manual
Change-Id: Ic9277f9e737e59dceafffabbf1e19526db609e78
2019-03-07 22:02:55 -08:00
Hai Zhang
a4959e569d Add RoleControllerManager for role controller service.
This allows us to expose both system-only and app available APIs for
role in RoleControllerService.

Bug: 127691087
Test: manual
Change-Id: I86fe3736fc28516aae25d48efe3ba599ffdf45d5
2019-03-07 21:33:12 -08:00
TreeHugger Robot
e0894ab25d Merge "Add Context.bindService with executor parameter" 2019-03-08 02:08:51 +00:00
Hui Yu
80a8b4678d Add new UsageStats event DEVICE_STARTUP
As a counterpart to DEVICE_SHUTDOWN event, DEVICE_STARTUP records the
device startup event and timestamp.

Bug: 126529272
Test: adb shell dumpsys usagestats | grep DEVICE
Change-Id: Ia977658f9a1f701ad802dc943e9eff71171e9957
2019-03-07 15:00:43 -08:00
TreeHugger Robot
736539647f Merge "Revert "Allow transitioning through lifecycle when finished"" 2019-03-07 22:29:40 +00:00
Mady Mellor
cf8f1b2a58 API review: annotate everything
Fixes: 126698822
Fixes: 126699172
Fixes: 126701240
Test: none - this is all annotations; existing test pass (atest NotificationTest)
Change-Id: Ia3bc14922fb6784e287586650a90ea0041b8d992
2019-03-07 14:21:49 -08:00
Julia Reynolds
cbc45e7164 Address api council feedback
Fixes: 127282522
Fixes: 126702741
Fixes: 126699773
Test: make, cts
Change-Id: I06e78d4c7067835017c5326f1d53923776d3fc42
2019-03-07 16:43:40 -05:00
Andrii Kulian
c10482ff3c Revert "Allow transitioning through lifecycle when finished"
This reverts commit 76ea768bd3.

Reason for revert: b/127738408

Change-Id: I09eb93a255310c3749d25d31db77126c6133aa0c
2019-03-07 18:09:28 +00:00
Julia Reynolds
a3e9952ee5 Merge "API changes for NAS" 2019-03-07 00:59:56 +00:00
TreeHugger Robot
3c37379061 Merge "Added LocusId support to Shortcut and Notification." 2019-03-06 21:49:46 +00:00
Andrii Kulian
132f0b3100 Merge "Allow transitioning through lifecycle when finished" 2019-03-06 20:24:36 +00:00
Michal Karpinski
b5e5c90800 Merge "Rename BroadcastOptions.setAllowBackgroundActivityStarts() to setBackgroundActivityStartsAllowed()" 2019-03-06 20:23:45 +00:00
Bo Liu
58a57667e4 Add Context.bindService with executor parameter
Allow app to control the thread where ServiceConnection methods are
called on.

Bug: 111434506
Test: Used new bindContext method in chrome and checked callbacks
are on the correct thread.

Change-Id: I480e5bd6773a530fb9e8e73e3a2a2a88b76569ec
2019-03-06 20:21:45 +00:00
Ashley Rose
0be2720c5b Merge "Add @InspectableProperty annotations to LayoutParams" 2019-03-06 18:38:18 +00:00
Adam He
682ea3ccfd Merge changes from topic "aa_whitelist"
* changes:
  Check for empty arguments in setWhitelist().
  Implemented a WhitelistHelper for whitelisting packages/activities for Augmented Autofill and Content Capture.
2019-03-06 18:31:59 +00:00