Commit Graph

7292 Commits

Author SHA1 Message Date
Issei Suzuki
9178eee8b1 Merge "Add inheritShowWhenLocked System API to activity." 2019-01-14 14:34:45 +00:00
Issei Suzuki
74e1eb2220 Add inheritShowWhenLocked System API to activity.
Let an activity show on top of the lock screen if the activity behind
this can be shown on top of the screen. This is pre-requisite for
showing permission dialog on top of the lock screen only when it makes
sence.

Bug: 109754623
Test: atest server.am.KeyguardTests
Change-Id: Ideaa2b77519649a70c682bc95277e451e149adad
2019-01-14 13:42:24 +01:00
TreeHugger Robot
fd1e036205 Merge "Add EXTRA_PERMISSION_GROUP_NAME" 2019-01-12 04:29:33 +00:00
Eugene Susla
40335c1be9 Merge "Mirgate default SMS app handling to RoleManager" 2019-01-11 21:23:34 +00:00
Winson Chung
fb922e9bac Merge changes from topic "prediction_suggestion_services"
* changes:
  Initial commit of Content Suggestions (overview long press) Manager.
  Adding initial implementation of Prediction client/service API
2019-01-11 20:21:19 +00:00
TreeHugger Robot
e433ab6ee8 Merge "Add ApplicationInfo.isEncrpytionAware() as a system API." 2019-01-11 19:57:48 +00:00
Dianne Hackborn
5d55a4c907 Merge "Fix issue #122615120: Add bind flag to require associations" 2019-01-11 17:09:10 +00:00
Zhi An Ng
a8f68e24b1 Merge "Do not load xml metadata for unchanged packages in RegisteredServicesCache" 2019-01-11 17:05:47 +00:00
TreeHugger Robot
cbdbc4d9c6 Merge "Add a privileged API for capturing and consuming bugreports" 2019-01-11 12:37:33 +00:00
Chalard Jean
fc758be231 Merge changes from topic "IPMS1" am: 3627deac88 am: 54d91e605c
am: 2304c7c508

Change-Id: I6908f68b1b9e7079384c4cc9f11c4e46cce694ce
2019-01-11 04:13:38 -08:00
Chalard Jean
2304c7c508 Merge changes from topic "IPMS1" am: 3627deac88
am: 54d91e605c

Change-Id: I2541996b9bfe338acabac858fdea0ad89d55df5b
2019-01-11 03:53:57 -08:00
Chalard Jean
8c141bdb8f [MS01] Add the IP memory store service.
Bug: 116512211
Test: Added initial tests
Change-Id: I9d9af4097e3e2d7afd9956b9cbfa29a9f9558ae0
2019-01-11 15:00:36 +09:00
Hai Zhang
14ea9efdfe Add ApplicationInfo.isEncrpytionAware() as a system API.
applicationInfo.isDirectBootAware() ||
applicationInfo.isPartiallyDirectBootAware() was used by Settings
to determine whether to show a confirmation message for setting a
direct boot unaware app to be some default app (e.g. SMS). Since
we are moving default app into roles in PermissionController, we
need this as a system API.

Bug: 110557011
Bug: 122270890
Test: build
Change-Id: I8bfc2b4e07239b6b9b1b9948dede3748b6ae974c
2019-01-11 02:02:11 +00:00
Dianne Hackborn
c390aa8d3c Fix issue #122615120: Add bind flag to require associations
Add the bind flag, use it for the text classifier.

Bug: 122615120
Test: manual
Change-Id: I20f066cab0cbe34e9afe22303eaf04f831aa5f79
2019-01-10 16:47:11 -08:00
Winson Chung
3fb0f258d3 Initial commit of Content Suggestions (overview long press) Manager.
Test: compile
Bug: 120865921
Change-Id: I9f8310112bedc883406f0f50a99041f542036fd9
2019-01-10 16:35:13 -08:00
Sunny Goyal
54e91344e2 Adding initial implementation of Prediction client/service API
Test: Build sample app, ensure that app prediction service gets client
      requests
Bug: 111701043
Change-Id: I33aceb2de31552b2d740dc333559d68728753e40
Signed-off-by: Winson Chung <winsonc@google.com>
2019-01-10 15:53:25 -08:00
Eugene Susla
4ab9511993 Mirgate default SMS app handling to RoleManager
This includes laying down some groundwork to make the remaining migrations
more straightforward

Bug: 110557011
Test: atest RoleManagerTest && atest SmsManagerTest
Change-Id: Ie96abd73751d10f521756c9dcdab2a5710ca2045
2019-01-10 10:41:10 -08:00
Nandana Dutt
d11850cd44 Add a privileged API for capturing and consuming bugreports
The API is mostly implemented; except for hooking up the listener
and handling an already running bugreport.

BugreportManager is the handle to the new API exposed to apps.

Generating bugreports requires root privileges. To limit the footprint
of the root access, the actual bugreport generation in Dumpstate binary,
is accessed as a oneshot service and dies after it finishes
running.

System server accesses Dumpstate via a binder interface since it does
not have root privileges.

Starting a oneshot service is done via setting a system property, which
needs to be done from system server. BugreportManagerService is the
new system server service that does this. BugreportManager calls into
BugreportManagerService via a binder interface, since the former is in
the app's process.

Both app to system server as well as system server to native service
calls are via implementations of IDumpstate binder interface.

Bug: 111441001
Test: builds. Flashed & verified it boots.
Test: wrote a test client (not included) and verified invoking
startBugreport works.

Change-Id: I4abeb753388c055c36ae0dd916af1ec8d40b7bf0
2019-01-10 17:33:58 +00:00
TreeHugger Robot
6f5717ccf7 Merge "Flip default of extractNativeLibs if targets Q+" 2019-01-10 17:32:18 +00:00
Victor Hsieh
4e54b521bc Flip default of extractNativeLibs if targets Q+
Test: Local in-progress CTS
Test: CtsDynamicLinkerTestCases
Bug: 112037137
Change-Id: I41289ec6bdfff13ef4aa551bf0a98bad73c9371e
2019-01-09 16:49:20 -08:00
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
Joel Galenson
029aac7d7f Add EXTRA_PERMISSION_GROUP_NAME
Allow passing the name of the permission group to
REVIEW_PERMISSION_USAGE.

Bug: 121256299
Test: Pass permission group to an intent.
Change-Id: Ifb7e4f086ceae3513cd6d378c58d026948b4021e
2019-01-07 11:10:50 -08: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
Ng Zhi An
36de60dc32 Do not load xml metadata for unchanged packages in RegisteredServicesCache
RegisteredServicesCache caches services in an xml, so the system doesn't
have to scan all the apks. Whenever a package is changed
(add/remove/replaced), the broadcast receiver in RegisteredServicesCache
will refresh this cache by quering all matching services and reading their
xml metadata. There is extra work done here, because only the changed package
will have services added/removed.

This change changes RegisteredServicesCache to only get the service info of changed packages.

Bug: 117755076
Test: atest RegisteredServicesCache
Change-Id: I2d9e7980fcd651617e450ff12e1588601de4ef6c
2018-12-27 18:27:34 -08:00