Commit Graph

7643 Commits

Author SHA1 Message Date
TreeHugger Robot
30579cd805 Merge "Introduce ApplicationInfo.getAllApkPaths()." 2019-03-08 16:32:07 +00:00
Philip P. Moltmann
c87cf2cb9e Merge changes from topic "userSensitive"
* changes:
  Small issues with FLAG_PERMISSION_USER_SENSITIVE_*
  Introduce and populate PackageManager.FLAG_PERMISSION_USER_VISIBLE
2019-03-08 15:24:56 +00:00
TreeHugger Robot
a7010101dc Merge "Rename downgrade-related install flags" 2019-03-08 11:53:21 +00:00
TreeHugger Robot
e0894ab25d Merge "Add Context.bindService with executor parameter" 2019-03-08 02:08:51 +00:00
Philip P. Moltmann
7659769d3c Small issues with FLAG_PERMISSION_USER_SENSITIVE_*
Add them to the "all flags" mask. We cannot change the value of a
constant in the API, hence need to deprecate it. This change does
not create a new API with the new value to not have the same problem
again.

Register the flag type in the IntDef and toString methods.

Test: Set permission flags, rebooted and verified that flags get
      restored.
Bug: 124317989
Change-Id: Ia68053a937be7dc47af6e313e66e87f3228a2d14
2019-03-07 16:23:11 -08:00
Eugene Susla
21fc69e827 Introduce and populate PackageManager.FLAG_PERMISSION_USER_VISIBLE
Bug: 124317989
Test: adb shell dumpsys package com.google.android.apps.messaging
and ensure permissions without flag GRANTED_BY_DEFAULT have flag USER_VISIBLE
Change-Id: Ie3129a87a4391cb5a52ccda1b84fa46585850432
2019-03-07 16:23:11 -08:00
Torne (Richard Coles)
1aaae10e77 Introduce ApplicationInfo.getAllApkPaths().
Add an internal method to ApplicationInfo to get all APK files that may
be required by an application. This moves assumptions about how apps are
constructed out of Zygote.allowAppFilesAcrossFork and into a more
appropriate place where it can be shared.

Bug: 124116212
Test: atest android.webkit.cts.WebViewTest
Change-Id: I79add98c4922c4f97263bff78cf808bc38274755
2019-03-07 13:59:45 -05:00
TreeHugger Robot
6f42bb2e8b Merge "Mark getStagedSessionErrorMessage as @NonNull." 2019-03-07 17:42:50 +00:00
Dario Freni
aa796c19d1 Mark getStagedSessionErrorMessage as @NonNull.
Change-Id: I269175f24ef84e7e8b053528ab1074dad84bb6fe
Fix: 126698886
Test: n/a
2019-03-07 15:09:20 +00:00
Philip P. Moltmann
a3e79d624c Merge "Add annotations and finals to PermissionInfo" 2019-03-06 23:43:05 +00:00
TreeHugger Robot
3c37379061 Merge "Added LocusId support to Shortcut and Notification." 2019-03-06 21:49:46 +00:00
Philip P. Moltmann
a4844d1fb9 Add annotations and finals to PermissionInfo
... and deprecate constructors that should not be called anymore.

Test: Looked at permissions (incl 3rd party) in UI
Fixes: 126701534
Change-Id: Ic5ceb522ca75d130001add47a1a3dcb2ea8f7e8f
2019-03-06 13:00:25 -08: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
Nikita Ioffe
b1d60f1b01 Rename downgrade-related install flags
Renaming according to the comment in ag/6614840

Test: RollbackTest on user build
Bug: 127322579
Fixes: 127322579
Change-Id: I14abc9cf8fa41bd8ca7802a6b241f59c8f468400
2019-03-06 19:14:41 +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
Jeff Sharkey
715b34be65 Merge "Add trivial nullability annotations." 2019-03-06 16:17:56 +00:00
Jeff Sharkey
ba4acd5575 Add trivial nullability annotations.
Bug: 126702077, 126701263, 126700858, 126700497
Test: manual
Change-Id: Ic6599f59e6e079097a35cb2bf24c59a87627c8b7
Exempt-From-Owner-Approval: Trivial API annotations
2019-03-05 19:48:55 -07:00
Adam He
70ebc5a508 Check for empty arguments in setWhitelist().
Bug: 125348180
Test: atest CtsContentCaptureServiceTestCases
Test: atest FrameworksCoreTests:com.android.internal.infra.WhitelistHelperTest
Change-Id: I9c2296ebe2762e97f03350b365b148429b15ab60
2019-03-05 14:51:30 -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
4876191cad Merge "Checks for null id on LocusId constructor." 2019-03-05 21:05:38 +00:00
Philip P. Moltmann
06f309c1c0 Merge "Add annotations and finals to PermissionGroupInfo" 2019-03-05 19:26:54 +00:00
TreeHugger Robot
48636daaf8 Merge "Add new permission to guard Intent.REVIEW_ACCESSIBILITY_SERVICES." 2019-03-05 17:51:36 +00:00
Felipe Leme
85e2b01aeb Checks for null id on LocusId constructor.
Test: atest CtsContentTestCases:LocusIdTest

Bug: 126945732

Change-Id: Ifbffae6cc287861f78d19921b35a26e624038168
2019-03-05 09:41:22 -08:00
Varun Shah
af597830ff Merge "Allow only Recents to query app usage limit info." 2019-03-05 05:23:57 +00:00
Joel Galenson
3f5c6995fd Add new permission to guard Intent.REVIEW_ACCESSIBILITY_SERVICES.
Fixes: 126944474
Test: Boot.
Change-Id: I90c5a9732469ba206d83d301390d52d3d2ad9518
2019-03-04 21:09:05 -08:00
TreeHugger Robot
f5fa919ac6 Merge "Allow RollbackManager to downgrade apks on user builds" 2019-03-05 02:00:21 +00: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
Felipe Leme
7e7357515f Minor changes on LocusId APIs.
- Uses a String instead of URI for the main id.
- Uses FLAG_IS_PREFIX instead of isRecursive for UserDataRemovalRequest.

Test: m update-api
Test: atest CtsContentCaptureServiceTestCases CtsContentTestCases:LocusIdTest \
            FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest
Bug: 126945732

Change-Id: I34ae42678aa4021ea53ed66279cad4049ac2dcb3
2019-03-04 14:02:37 -08:00
Nikita Ioffe
a1111ffe95 Allow RollbackManager to downgrade apks on user builds
- If running on a debug build, same behaviour is preserved.
- In case of a user build, INSTALL_ALLOW_DOWNGRADE flag is respected
  only if it's system_server who commits the session.

Test: atest RollbackTest on user build
Test: manually tried to downgrade apk on a user build, it failed.
Bug: 125657835
Change-Id: I469f6513831cc727fc7e62ce1ff4f6ef472ab5e9
2019-03-04 21:28:03 +00:00
Andrei-Valentin Onea
52f7220a06 Merge "Add @UnsupportedAppUsage annotations" 2019-03-04 12:42:01 +00:00
TreeHugger Robot
79eb65c3b0 Merge "Context: Fix nullability issues" 2019-03-03 22:07:29 +00:00
Philip P. Moltmann
0635dab0df Add annotations and finals to PermissionGroupInfo
... and deprecate constructors that should not be called anymore.

Test: Looked at permissions (incl 3rd party) in UI
Fixes: 126701532
Change-Id: I646c814baa98524f27511a151b8ff2cda0422e8f
2019-03-02 11:43:30 -08:00
TreeHugger Robot
ec995b8df7 Merge "Add nullability annotation to Theme#getAttributeResolutionStack" 2019-03-01 21:26:35 +00:00
TreeHugger Robot
1fa00a503f Merge changes from topic "staged_userdata_restore"
* changes:
  Followup cleanup after refactoring rollback states.
  Use a single list for available and committed rollbacks.
2019-03-01 18:23:42 +00:00
TreeHugger Robot
abc2a7d55c Merge "Mark role related APIs as test API." 2019-03-01 18:23:06 +00:00
Aurimas Liutikas
6c15bc08ea Add nullability annotation to Theme#getAttributeResolutionStack
Bug: 126700353
Test: None
Change-Id: I50979abbdffbf347f8ee2ac85df119fe76abf841
2019-03-01 10:04:21 -08:00
Jeff Sharkey
a09312df67 Merge "All Parcelable CREATOR fields are @NonNull." 2019-03-01 14:58:28 +00:00
Richard Uhler
6f8a33bf2f Use a single list for available and committed rollbacks.
So that there is a single source of truth for pending backups and
pending restores. This fixes rollback of userdata for staged rollbacks.

Included in this change:
* Distinguish between PENDING_AVAILABLE, AVAILABLE, and COMMITTED
  rollback states.
* Separate completeEnableRollback from makeRollbackAvailable.
* Make timestamp @NonNull and set it when rollback is made available.
* Don't listen for SESSION_UPDATED broadcasts.
* Factor out common code for ignoring saveRollbackData IOException.
* Other minor cleanups.

Test: atest RollbackTest
Test: atest StagedRollbackTest
Test: atest AppDataRollbackHelperTest
Bug: 124044231

Change-Id: I654a7827e9ed15659d0cb80e5a2c29c2660aea08
2019-03-01 13:53:43 +00:00
Martijn Coenen
20ee3dc94f Merge "Add PARSE_IS_SYSTEM_DIR when parsing /system APEXes." 2019-03-01 10:43:50 +00:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Jeff Sharkey
cb4dd2791a Merge "Translate selection arguments that are paths." 2019-03-01 06:28:24 +00:00
TreeHugger Robot
b5544cd8e7 Merge "Added NPE check on verifySameType()." 2019-03-01 04:42:45 +00:00
Felipe Leme
50a8c75b49 Merge "Autofill, Content Capture, and Augmented Autofill API fixes:" 2019-03-01 02:04:30 +00:00
TreeHugger Robot
92be54d329 Merge "Call into role controller asynchronously when holding mPackages." 2019-03-01 00:03:47 +00:00
Jeff Sharkey
bffd25082c Translate selection arguments that are paths.
Also migrate MediaProvider logging to more general-purpose location
on the ContentProvider.Transport, where we can log exact input/output
values to aid debugging.

Bug: 124347872
Test: manual
Change-Id: I6aba60879ded4e0892d2d1cdd717c23cebaaabd8
2019-02-28 16:39:30 -07:00
Adam He
c78e5d7152 Added NPE check on verifySameType().
Fixes: 120240686
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ic7fe6e04d67e661e18a4c0e970bbaf5c22f74815
2019-02-28 12:55:26 -08:00
Felipe Leme
ce6877b0e4 Autofill, Content Capture, and Augmented Autofill API fixes:
- Added @Nullable / @NonNull on some returned values.
- Removed APIs that won't be implemented for Q.
- Made Builders final.

Test: m update-api

Bug: 123100695
Fixes: 126702168
Fixes: 126701052
Fixes: 126702191
Fixes: 126700602
Fixes: 126700135
Fixes: 126700413
Fixes: 126698817
Fixes: 126698792

Change-Id: I20710537c02051361da18370bc5cc642cc3c26e1
2019-02-28 09:25:12 -08:00
Adrian Roos
ebc927c382 Context: Fix nullability issues
Fixes: 126701488
Fixes: 126701488
Test: make checkapi
Change-Id: I9b61d833a68528f168611c83a8539eb095a42e01
2019-02-28 16:41:52 +01:00
TreeHugger Robot
639e1e74ee Merge changes Iae43f695,I6ca164ad,I4f579393,Icbb67c3c
* changes:
  Rename saveAvailableRollback to saveRollbackData.
  Have RollbackData reuse RollbackInfo.
  Miscellaneous cleanup in RollbackStore.
  Rename RollbackData.inProgress to restoreUserDataInProgress.
2019-02-28 13:35:00 +00:00
Kevin Rocard
a9c3a3a47b Merge changes from topic "APC-PackageManagerNative"
* changes:
  Allow to project audio from a Screen capture MediaProjection
  Expose allowAudioPlaybackCapture to PackageManagerNative
  Introduce playback capture application manifest flag
2019-02-28 05:19:58 +00:00