Commit Graph

7270 Commits

Author SHA1 Message Date
Riddle Hsu
e716d72d40 Add @TestApi to Configuration.assetsSeq
The value of the field will be verified in CTS.

Bug: 112837428
Test: atest CtsActivityManagerDeviceTestCases
Change-Id: I7f8e4b20c75077c77f4d723946d6596737523479
2019-01-09 15:56:46 +08:00
Hai Zhang
1d79232d5f Add intent action for managing the list of special app access.
This intent action will be used by Settings to launched the new
special app access list UI in PermissionController.

Bug: 110557011
Test: build
Change-Id: Ib3570cf8110d75e443e2c3d63eecea0aa6eaee5c
2019-01-08 13:59:11 -08:00
Chad Brubaker
9a4cf62c90 Merge "Add intent for permission usage info learn more" 2019-01-07 20:42:02 +00:00
Chad Brubaker
1bfef2cade Add intent for permission usage info learn more
The manifest permission usage info declarations are limited in what they
allow the applications to specify. Applications can have an activity for
that handles this intent in order to provide free form application
specific details such as privacy policies, specific examples, etc.

Test: API definition, usage will follow
Bug: 111207567
Change-Id: I90b292e4c1cb8847a9a9d7b8071aaff2ee7d11fb
2019-01-04 14:40:33 -08:00
Ruchi Kandoi
d98f84b0d9 Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2 am: d0c8a165d8
am: a33da54c8d

Change-Id: I1eda6b7d5879045e6bd35821ee5368ef72855942
2019-01-04 14:18:15 -08:00
Ruchi Kandoi
a33da54c8d Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2
am: d0c8a165d8

Change-Id: I886941a5011fdf204fe62c1162dd2ad69d466f62
2019-01-04 14:06:55 -08:00
Ruchi Kandoi
96fe50bc1b Deprecate Android beam APIs and create a feature flag to gate them
Test: Test application trying to invoke the API
Bug: 117519147
Change-Id: Icd3187e4f3e0f180cb42d36011f60895fb395002
2019-01-04 21:49:00 +00:00
Ruchi Kandoi
0e1c39bf55 Merge changes from topic "multi-se-support" am: 54502d68ea am: 9c0ec9be9f
am: 650ff88a4c

Change-Id: I562af1c9c1b0c254d8b23466caceb94ef767aa1f
2019-01-04 12:38:53 -08:00
Ruchi Kandoi
650ff88a4c Merge changes from topic "multi-se-support" am: 54502d68ea
am: 9c0ec9be9f

Change-Id: Ieca9b142094c8c568409290fdf690fad529ef604
2019-01-04 12:25:13 -08:00
Ruchi Kandoi
54502d68ea Merge changes from topic "multi-se-support"
* changes:
  Add a mechanism to register AIDs to specific off-host SE
  Add Off-Host Card Emulation Features
2019-01-04 19:56:41 +00:00
Philip P. Moltmann
72401d4f77 Merge "Rename RuntimePermissionPresenter to PermissionController" 2019-01-04 17:32:44 +00:00
TreeHugger Robot
968285a043 Merge "Support fs-verity signature in installer session" 2019-01-04 16:38:47 +00:00
Richard Uhler
9b86c73c45 Merge changes from topic "rollback_systemapi"
* changes:
  Add test for multi-package rollback.
  Fix bug where RollbackManagerService ignores package name.
  Add test for user data rollback.
  Move rollback manager implementation to RollbackManagerServiceImpl
  Don't expose RollbackManagerService's internal Handler.
  Make RollbackManager @SystemApi.
2019-01-04 09:02:21 +00:00
Victor Hsieh
c0cd74839b Support fs-verity signature in installer session
Known files (e.g. base apk, split apks and dex metadata) in installer
session can now be optionally installed with fs-verity signature
(PKCS#7) stored in the corresponding file with addional extension of
".fsv_sig".

For example, fs-verity signature files of foo.apk of foo.dm are
foo.apk.fsv_sig and foo.dm.fsv_sig, respecitvely.

Test: adb install-multiple with .fsv_sig
      # with change in adb to accept .fsv_sig, see the setup happened
Test: adb install-multiple with missing .fsv_sig
      # failed as expected
Test: atest com.android.cts.dexmetadata.InstallDexMetadataHostTest
Test: atest android.appsecurity.cts.SplitTests  # same pass/fail
Test: atest com.android.cts.apkverity.ApkVerityTest  # test WIP
Bug: 112037636
Change-Id: I109f580f637f1f538d0bf0bfacb499702dd72937
2019-01-03 15:55:14 -08:00
Ruchi Kandoi
ebf267a2a4 Add Off-Host Card Emulation Features
Test: CTS test; manual
Bug: 117253962
Change-Id: I7c35b1bffbc57870bb8c67704811a2649854d94e
2019-01-03 23:00:59 +00:00
Philip P. Moltmann
bc054d8436 Rename RuntimePermissionPresenter to PermissionController
As this has already evolved from just presenting data. In the future any
permission related calls to the permission controller will be added here.

As the calls are protected by different permissions the binding will not
require a permission anymore, but each individual call checks the
permission.

Bug: 120221960
Test: Looked at settings UI showing data from this interface
Change-Id: I6b4a5c3b7ee17b145e11e2c1b6e11a8a232bffed
2019-01-03 11:39:43 -08:00
TreeHugger Robot
f2497e52b1 Merge "Introduce android:preferCodeIntegrity, private for now" 2019-01-03 02:43:17 +00:00
TreeHugger Robot
0995402a41 Merge "Refactoring canSuspendPackage to support batch queries" 2019-01-03 02:12:57 +00:00
Victor Hsieh
e7b5a8dbd7 Introduce android:preferCodeIntegrity, private for now
This attribute is default to false, and if set to true, indicates that
the app wants to run with strong integrity guarantee currently the
platform can provide the best.

In this change, this flag implies that on install time,
 1) .dex and .so must be stored uncompressed and aligned to install
 2) android:extractNativeLibs must be false to install

At run time, ART will run from the dex within the APK directly, and NDK
libraries will be mapped directly from the APK.  This way, thest files
stay protected by signature.

The attribute currently stays in private to make development progress.
We plan to make it public once we confirm the demand from some apps.

Test: atest AppIntegrityTest (to be added in ag/5554864 after publicized)
Bug: 112037137
Change-Id: Ifde90cb0666fbb57e8b61f90b4ba1a2dd2a2b4ae
2019-01-02 16:45:49 -08:00
Tobias Thierer
8e19d42270 Merge "Fix @NonNull -> Nullable for Intent.replaceExtras()." am: 645a9d1253 am: a2cc0fbeec
am: 4c6f437438

Change-Id: I0d1179c070d1a3f1cc900de05d7dbaf6889508aa
2019-01-02 15:29:38 -08:00
Tobias Thierer
4c6f437438 Merge "Fix @NonNull -> Nullable for Intent.replaceExtras()." am: 645a9d1253
am: a2cc0fbeec

Change-Id: Idd0c12ea791db459dbba39115c38eae843634bb9
2019-01-02 15:16:07 -08:00
Treehugger Robot
645a9d1253 Merge "Fix @NonNull -> Nullable for Intent.replaceExtras()." 2019-01-02 22:49:30 +00:00
Mathew Inwood
8501ae1763 Merge "Limit access to suspected false positives." am: aeda49d185
am: 152d5a5dcd

Change-Id: I8e10322e69d2d479079df5cf8fec0287c7c117f1
2019-01-02 05:00:54 -08:00
Richard Uhler
c739c8c3f9 Make RollbackManager @SystemApi.
Require callers hold a new MANAGE_ROLLBACKS permission to interact with
the RollbackManager.

Bug: 112431924
Test: atest RollbackTest, with new test for permissions added,
      and with selinux in permissive mode.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: I73f4f3457d85be580670cd69c89066d2cc348186
2019-01-02 09:19:45 +00:00
Richard Uhler
474dffd225 Merge "Add RollbackManagerService" 2018-12-31 18:43:21 +00:00
Richard Uhler
b29f145505 Add RollbackManagerService
This change adds RollbackManagerService as a new system service for
managing apk level rollbacks.

To work properly this requires additional selinux policy changes. Fails
gracefully in case of selinux denials, until we have a chance to sort
out the proper selinux policy.

Bug: 112431924
Bug: 116512606
Test: atest RollbackTest, with selinux enforcement off.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: Id72aae9c4d8da9aaab3922ec9233ba335bc0198f
2018-12-31 12:38:07 +00:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
Remi NGUYEN VAN
708c409598 Merge "Add NetworkStack app" am: d01eaecbd2 am: e1922923fc
am: 5673820f9b

Change-Id: Idcd7b9b6eb50a98bcee67f89b0112b91cd1b40fb
2018-12-25 17:21:18 -08:00
Remi NGUYEN VAN
5673820f9b Merge "Add NetworkStack app" am: d01eaecbd2
am: e1922923fc

Change-Id: Iebe5aa5ea7cd235b8a6e734bde0f9a14dce5acdc
2018-12-25 17:09:42 -08:00
Remi NGUYEN VAN
c094a5402c Add NetworkStack app
The app is not started yet, and does not contain any service for now.

Test: built, booted
Bug: b/112869080
Change-Id: Id5a0fd02c891100e85d86b1040e53beec3581950
2018-12-25 11:42:42 +09:00
Tobias Thierer
139911745d Fix @NonNull -> Nullable for Intent.replaceExtras().
extras == null is documented to result in all extras being
erased, and the implementation handles it correctly. The
@NonNull annotation on Bundle extras is therefore wrong.
This CL replaces it with the correct annotation, @Nullable.

The incorrect annotation was introduced in April 2017
(commit 30e06bb668). I've
looked through the other changes to Intent.java in that
commit but have found no further nullability annotation
errors.

Bug: 121438778
Test: Treehugger
Test: Looked through the other nullability annotations on
      Intent.java introduced by the same commit
      30e06bb668 (Apr 2017)
      but found no further errors.

Change-Id: Iebbe17abc5c97146533e82114fbaf1d7036fd03a
2018-12-23 14:26:08 +00:00
TreeHugger Robot
317288d513 Merge "Add nullability to obtainStyledAttributes methods." 2018-12-21 20:19:34 +00:00
Dario Freni
ce3083dcb4 Merge "Send a broadcast for staged session state changes." 2018-12-21 16:17:41 +00:00
TreeHugger Robot
90a78ef003 Merge "Break shared library adds into populate and modify" 2018-12-21 14:00:54 +00:00
Patrick Baumann
34cf12c02c Break shared library adds into populate and modify
This change breaks current modification of shared lib state in the
system into object creation and a commit step so that multiple packages
may be interrogated before committing anything to the system.

Change-Id: I466d588be3e9690cffc8a04e025145d747fcbb2f
Bug: 109941548
Test: atest StaticSharedLibsHostTests
2018-12-20 11:46:01 -08:00
Dario Freni
e487ea2e0f Send a broadcast for staged session state changes.
Bug: 118865310
Bug: 112669193
Bug: 120487127
Test: wrote small app to receive broadcast, ran adb install --staged
some.apk and verified that the broadcast is received successfully.
Change-Id: Ib8672a03a0e7033bcdc0ffbbbb5c65b8929e8e08
2018-12-20 19:37:20 +00:00
TreeHugger Robot
b444a8b822 Merge "Add a state for Staged Sessions." 2018-12-20 13:19:54 +00:00
Aurimas Liutikas
77acf4bec1 Add nullability to obtainStyledAttributes methods.
Test: Manual inspection of the code and javadocs to make nullability
      annotations reflect the state of these methods.
Change-Id: I0baac0549c274213d99c7169033052c996eab122
2018-12-19 17:31:33 -08:00
Dario Freni
71eee5ef91 Add a state for Staged Sessions.
The state is only kept up-to-date for staged sessions. Clients are in
charge of checking whether the session has the isStaged bit set, before
considering reading the StagedSessionState associated to that session.

Test: retrieved mock staged session from a small app and verified state
is correctly set.
Bug: 118865310
Bug: 112669193
Bug: 120487127
Change-Id: I03590476dc353fee6d6edffb7ae579a9f9664664
2018-12-19 20:36:51 +00:00
Chilun
2ef71f753c Add secondary launcher mechanism (1/3)
Add a new config value for recording the component name of secondary
launcher.
This secondary launcher with corresponding launch mode set in
AndroidManifest could be used on secondary displays that support system
decorations.
OEMs can easily replace their own secondary launcher by overlay it.

Bug: 118206886
Bug: 111363427
Test: atest RootActivityContainerTests
Test: atest ActivityManagerMultiDisplayTests
Change-Id: Iceab096fd369127231f2085313ee617c7cdea226
2018-12-18 11:20:26 +08:00
Kevin Chyn
2ae0e21c34 Merge "Move biometrics into biometric namespace" 2018-12-18 02:01:45 +00:00
Suprabh Shukla
436d093ba3 Refactoring canSuspendPackage to support batch queries
Taking a list of packages to reduce the number of IPCs the
client has to make.

Test: atest GtsSuspendAppsTestCases:SuspendPackagesTest

Bug: 120908380
Bug: 117968270
Change-Id: Ife7a6acfe2f21e7f4419bcf67630e7b8be50a560
2018-12-18 01:32:00 +00:00
Dario Freni
8aeec22e28 Merge "Implement ModuleInfoProvider" 2018-12-17 21:45:29 +00:00
TreeHugger Robot
56208f49dc Merge "Another round of changes on Content Capture." 2018-12-17 17:59:40 +00:00
Michael Groover
f1a5b6e0bf Merge changes from topic "SensorPrivacyMode"
* changes:
  Add SensorPrivacy constants to SettingsBackupTest
  Prototype Spaceship mode qstile
2018-12-15 18:07:26 +00:00
Felipe Leme
aa5088ede6 Another round of changes on Content Capture.
- Get rid of activity-level events.
- Renamed InteractionSessionId and InteractionContext to
  ContentCaptureSessionId and ContentCaptureContext (and made them public)
- Create the explicit concept of ContentCaptureSesssion (and moved notification
  APIs to it).
- Added APIs to let apps create new sessions (not implemented yet).
- Added APIs to remove user data based on some context properties (like URI).

The reasoning behind this change is to let app developers explicitly associate
the captured content with some app-level domain (and also let the app ask the
service to clear such data at user's request). For example, a browser app
(and WebView) can use these APIs to associate the content capture events with
the URL being rendered.

Bug: 117944706
Fixes: 121034139

Test: atest CtsContentCaptureServiceTestCases
Test: m update-api && m

Change-Id: I7841da303b6a39c825651b03a07e3081fbd0bdf5
2018-12-14 18:02:24 -08:00
Chad Brubaker
90f391fe87 Prototype Spaceship mode qstile
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.

Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
2018-12-14 20:46:04 +00:00
Andrew Solovay
ad7477b192 docs: Fixing malformed javadoc
am: 6eaf48ea57

Change-Id: Idf8415ee4fb85e52d74e1f8bec8d0e2f8d1f58f1
2018-12-14 10:50:44 -08:00
Adrian Roos
917791e1d0 Add minAspectRatio
Adds logic to enforce a minimum aspect ratio and a new manifest
attribute for requesting a minimum aspect ratio.

Bug: 120129697
Test: atest AspectRatioTests
Change-Id: Ie714541241dcdfae2bdf3bfd969a4e26829fbb4b
2018-12-14 16:13:27 +01:00