Commit Graph

15159 Commits

Author SHA1 Message Date
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
TreeHugger Robot
e0894ab25d Merge "Add Context.bindService with executor parameter" 2019-03-08 02:08:51 +00:00
TreeHugger Robot
736539647f Merge "Revert "Allow transitioning through lifecycle when finished"" 2019-03-07 22:29:40 +00: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
Leland Miller
2293da2467 Mark manage holder flag as test API
RoleManager methods that use this flag are marked as test APIs, this
marks the flag that they can accept as well.

Bug: 122852169
Test: Test package using test_current sdk using this flag builds
Change-Id: I6b5219d851b83f3392d668aa560b7fec5152f496
2019-03-04 15:08:00 -08:00
TreeHugger Robot
5ee812a499 Merge "Update #registerAppUsageLimitObserver to accept time remaining." 2019-03-04 23:00:22 +00:00
Ashley Rose
de3b4a78cd Add @InspectableProperty annotations to LayoutParams
Change-Id: I69eb71bec8bbf36564e178a3ddf4be9e00e2d531
Fix: 126913705
Test: m framework
2019-03-04 16:46:15 -05:00
Beverly
b0989653b6 Add annotations to new APIs
Test: atest ZenPolicyTest
Test: atest AutomaticZenRuleTest
Fixes: 126698794
Fixes: 126700812
Change-Id: Ifed34452faed6de3330663cec8ef19ea002b90ff
2019-03-04 14:41:17 -05:00
Zak Cohen
28bfe37108 Merge "ContentSuggestions - mark request builder returns as NonNull." 2019-03-04 19:33:09 +00:00
Zak Cohen
5749c76b11 Merge "ContentSuggestions - make extras in request @NonNull." 2019-03-04 19:33:03 +00:00
TreeHugger Robot
b1b4a4fc14 Merge "Improve documentation of secure lock screen feature." 2019-03-04 19:08:56 +00:00
Varun Shah
9f58b7c007 Update #registerAppUsageLimitObserver to accept time remaining.
UsageStatsManager#registerAppUsageLimitObserver now accepts the time
remaining in addition to the total time limit.

The API now also uses java.time.Duration instead of long+TimeUnit for
the total time and remaining time.

Bug: 124272203
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: I6f85ca9295cad46e10a30035b67e6210ae5c1886
2019-03-04 19:06:32 +00:00
Svetoslav Ganov
2a980300bc Merge "Slice and dice app ops - framework" 2019-03-04 17:22:20 +00:00
Andrei Onea
4b2116ca79 Add @UnsupportedAppUsage annotations
For packages:
  android.accounts
  android.app

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I65c961e3f59b9868156b3ee6a3b1cab81b0e9d25
2019-03-04 16:29:55 +00:00
Andrei-Valentin Onea
52f7220a06 Merge "Add @UnsupportedAppUsage annotations" 2019-03-04 12:42:01 +00:00
Julia Reynolds
10b6c6d10e Merge "Add @Nullable and @NonNull to new Notification API" 2019-03-03 21:07:47 +00:00
Svet Ganov
af189e3371 Slice and dice app ops - framework
Appops can be peformed by an app on its behalf and also on
behalf of another app, i.e. an app can perform a proxy op
and blame the work on another app. The proxy mechanims is
for apps doing work on behalf of other apps where GCore is
one example since the app doing the work needs to check if
the caller has access to the functionality - specifically
the app op backing a runtime permission in case the calling
app does not support runtime permissions.

Apps being able to blame work on other apps is a problem now
that we would be using historical op data to show permission
usage in the UI as apps can start blaming each other to gain
a competitive advantage.

To address the issue we are adding APIs for querying portions
of the app op data - last and historical. One can now get
the ops for work the app did for itself, work the app blamed
on other apps if the app is trusted, work the app blamed on
other apps if the app is not trusted, work other trusted apps
blamed on the app, work other untrusted apps blamed on the app.
A trusted app is one holding the permisison to update app op
stats which is privileged.

The data slicing API allow us to show in the UI only the trusted
poriton of the data which is work the app did for itself, work
trusted apps balmed on the app, and work the app if untrusted
blamed on other apps.

Test: atest CtsAppOpsTestCases

bug:111061782

Change-Id: I9a2bcaea272cb06f38ba742cf601a6dc3b287d5e
2019-03-01 21:12:16 -08:00