Commit Graph

15172 Commits

Author SHA1 Message Date
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
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
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
TreeHugger Robot
4e6d0182c7 Merge "Add @NonNull annotation to ZygotePreload API." 2019-03-06 15:21:34 +00:00
Andrei-Valentin Onea
94aeae08c0 Merge "Add @UnsupportedAppUsage annotations" 2019-03-06 15:06:05 +00:00
Julia Reynolds
d0ceefa989 API changes for NAS
- make NAS @SystemApi and guard with permission
- Add missing Nullable/NonNull annotations

Fixes: 126699678
Fixes: 127146476
Test: make, gts
Change-Id: Ie024983f7c440d5b4d3065af031b27958395f2f1
2019-03-06 09:40:36 -05:00
Michal Karpinski
ca5437cab8 Rename BroadcastOptions.setAllowBackgroundActivityStarts() to
setBackgroundActivityStartsAllowed()

Per the feedback from the API council.

Bug: 127465469
Test: make -j update-api && make -j
Change-Id: If6c343dc86829aa9f3d919caf27c4e1ab907ec72
2019-03-06 13:08:20 +00:00
Issei Suzuki
d23038e5b9 Merge "Made inheritShowWhenLocked() API public." 2019-03-06 11:05:43 +00:00
TreeHugger Robot
dd823c03d2 Merge "Add APIs to notify and restart activity in size compatibility mode" 2019-03-06 08:05:30 +00:00
Weien Wang
e3e3b3c030 Fix getSettingsSliceUri API review issues
1. Permissions for wallpaper settings Slice.
    2. Return value must be marked either @NonNull or @Nullable.

Solution:
    1. Add more explanation for settingsSliceUri API usage in javadoc.
    2. Follow the public API annotation rule.

Bug: 119118548
Bug: 126699851
Test: atest tests/Internal/src/android/app/WallpaperInfoTest.java

Change-Id: I5db88ce35ba11b018abe42f2192afed44a19fea5
2019-03-06 03:04:35 +00:00
Andrii Kulian
76ea768bd3 Allow transitioning through lifecycle when finished
When finish was requested for an activity, certain
lifecycle transitions were blocked to avoid delivering
invalid callbacks in the past. The checks and early
returns that were left from the old way of resolving
lifecycle cancelled delivering STARTED, RESUMED and
PAUSED state if an activity called finish().
This is no longer required with Lifecycler infrastructure
that takes care of ensuring validity of all transition
sequences.

Bug: 127106719
Bug: 126693030
Test: ActivityLifecycleTests#testFinishInOn*
Change-Id: Ia9e76dae2f2b5cede046140ef0f196a07accb8c3
2019-03-05 13:39:16 -08:00
Felipe Leme
90205ef423 Added LocusId support to Shortcut and Notification.
Test: atest FrameworksCoreTests:android.app.NotificationTest#testBuilder_setLocusId
Test: atest CtsShortcutManagerTestCases:android.content.pm.cts.shortcutmanager.ShortcutManagerClientApiTest
Test: atest CtsShortcutManagerTestCases # sanity check; some tests are failing, but pass individually

Test: m update-api
Bug: 126945732

Change-Id: Ib819a63aa008ab952b02da8c0be1b528814dfb00
2019-03-05 13:38:57 -08:00
TreeHugger Robot
d6f7187db3 Merge "Annotate Notification.Action.Builder building methods with @NonNull." 2019-03-05 19:51:41 +00:00
Yueming Wang
707b4655d1 Merge "Improve javadoc for cross-profile calendar." 2019-03-05 19:29:54 +00:00
Kevin Chyn
81ebf42e2e Merge "Update BiometricPrompt API naming" 2019-03-05 18:25:27 +00:00
Julien Desprez
8b19677c30 Fix test mapping conflit of class vs. package
Temporarily fix the test mapping conflict of class vs
package due to two differents modules including different
types of filters.

Test: none
Bug: 127470443
Change-Id: I3dbf0012177b858655c0c29f52404eb51a9364b2
2019-03-05 10:15:29 -08:00
Riddle Hsu
7b766fd31b Add APIs to notify and restart activity in size compatibility mode
- Notify listeners about whether the resumed activity is using the
  native screen configuration.
- Able to restart foreground activity with saved state.

Bug: 112288258
Test: atest ActivityRecordTests#testRestartProcessIfVisible
Test: atest ActivityDisplayTests#testHandleActivitySizeCompatMode

Change-Id: I0b916b25f187e9406154afced0214a41c02c761a
2019-03-06 01:16:57 +08:00
TreeHugger Robot
c4b4aaab27 Merge "Add temporary packageName-based whitelist for allowing background activity launches" 2019-03-05 17:06:05 +00:00
yuemingw
9be5a694fe Improve javadoc for cross-profile calendar.
Bug: 120860474
Bug: 123625889
Test: manual
Change-Id: I81215a8f20a49cbcb48536456ddda611f8928fd9
2019-03-05 16:29:33 +00:00
Issei Suzuki
7c09f0b81a Made inheritShowWhenLocked() API public.
Bug: 126354499
Test: atest android.server.am.KeyguardTests
Change-Id: Ie6c485ddcb59a640be48322a0e8f388ef49cb154
2019-03-05 16:53:22 +01:00
Leland Miller
e4099d58ae Merge "Mark manage holder flag as test API" 2019-03-05 15:41:59 +00:00
Michal Karpinski
666631b28e Add temporary packageName-based whitelist for allowing
background activity launches

Necessary for early stages of enabling the feature in
enforcing mode - we'll need to temporarily whitelist
apps like Duo, so dogfooders can still use them.

Bug: 123354556
Test: atest WmTests:ActivityStarterTests
Test: adb shell settings put global background_activity_starts_package_names_whitelist com.ejc.bbc:com.whatever.dude
Change-Id: I2515b8ba334e87e7f201569ba5a6bb1b79395354
2019-03-05 14:30:43 +00:00
Nicolas Geoffray
5735cc7a11 Remove calls to VMRuntime methods that are no-ops.
Test: m
Change-Id: Ibe849f56f5fe8af1415dc6c85b484d0edca518ec
2019-03-05 09:26:43 +00:00
TreeHugger Robot
1cfb214c96 Merge "Add annotations to new APIs" 2019-03-05 09:08:40 +00:00
Kevin Chyn
e64d74ecaf Update BiometricPrompt API naming
Fixes: 126190552

Test: make -j56 update-api
Test: make -j56
Change-Id: I1c0700106e46b8dbfb825df341a8196a33f8bc83
2019-03-04 22:34:07 -08:00
Adam He
6240eab185 Implemented a WhitelistHelper for whitelisting packages/activities for Augmented Autofill and Content Capture.
Fixes: 125348180
Test: atest android.contentcaptureservice.cts.LoginActivityTest
Test: atest android.autofillservice.cts.augmented.AugmentedLoginActivityTest
Test: atest FrameworksCoreTests:com.android.internal.infra.WhitelistHelperTest
Change-Id: I59c32d5a05c9c1ee813395545507fc8eaee47745
2019-03-04 16:15:32 -08:00