Commit Graph

6978 Commits

Author SHA1 Message Date
Philip P. Moltmann
ae15e11ddd Merge "Deprecate Intent based installation/uninstallation" 2018-10-09 16:15:50 +00:00
Philip P. Moltmann
20dd431f20 Do not allow to revert setForceSafeLabel
Test: Built
Bug: 116798569
Change-Id: I3f26d4466c84d3decb1c4962fb45e900ba35f68e
2018-10-08 16:56:49 -07:00
Philip P. Moltmann
fe460100e7 Deprecate Intent based installation/uninstallation
The android.content.pm.PackageInstaller install + uninstall APIs are
fully functional. No need to try to keep the intent based APIs
feature compatible.

In the future we will be able to restrict app targeting old targetSDK
levels from using the intent-based API. Even further in the future we
can radically simplify the package installer app.

Fixes: 116616700
Test: Built
Change-Id: Ia225d70fbee3fa31a3c1de388dcb05ff1063dccd
2018-10-08 09:03:21 -07:00
TreeHugger Robot
10efed0b49 Merge "Remove SMS access for apps other than current SMS handler" 2018-10-06 20:14:06 +00:00
Eugene Susla
9351985f7a Remove SMS access for apps other than current SMS handler
Bug: 110098858
Test: atest android.telephony.cts.SmsManagerTest#testContentProviderAccessRestrictions
Change-Id: I9da992565b04ca5fa2656801fd2cfe4b196ef9b4
2018-10-05 16:51:13 -07:00
Jeff Sharkey
08a42ed82a Merge "Log when Uris are normalized to help triage." 2018-10-03 21:17:51 +00:00
Michael Groover
a117b0d4bd Add PackageSignatures readXml tests
This fix also refactors PackageParser.SigningDetails to move the
pastSigningCertificatesFlags to be a data member of Signature; this
allows the capabilities of a previous signing certificate to be
accessed directly from the Signature object as opposed to relying
on the 1-1 mapping of the past certs and flags in the SigningDetails.

Fixes: 73927696
Fixes: 73925989
Test: adb shell am instrument -w -e class com.android.server.pm.PackageSignaturesTest \
      com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I635f2d2209350d066d1fa2ef07460071da0c023e
2018-10-03 09:47:14 -07:00
Jeff Sharkey
4a7b6ac0c4 Log when Uris are normalized to help triage.
Bug: 112555574
Test: manual
Change-Id: Iebf7785e93995f1a2a6d688a2b2aa0ec16c790c6
2018-10-03 10:33:48 -06:00
TreeHugger Robot
a4481c9c5c Merge "Fail install if split is missing" 2018-10-01 21:21:35 +00:00
Michael Wachenschwanz
03b9731830 Merge changes from topic "UsageStats2Proto"
* changes:
  Pool Package and Class names when writing UsageStats to disk
  Upgrade UsageStatsDatabase from XML to Protobuf
2018-10-01 21:20:56 +00:00
Michael Wachenschwanz
c8c26365a4 Upgrade UsageStatsDatabase from XML to Protobuf
Add the relevant methods to read from ProtoInputStream to
various classes.

Also add some framework to handle version changes in
UsageStatsDatabase. There is some risk of users losing all their current
UsageStats data, if something goes horribly wrong. The debug flag and a
keep backup files flag are temporarily set in UsageStatsDatabase with
this change. They will both be unset in the future before the Q release.

Some rough number on the impact of this change:
Proto file size on disk reduces to ~47% of XML file size :)
Proto file read time reduces to ~55% of XML file read :)
Proto file write time increases ~17% over the XML file write :(

There will be a follow up CL to address the file write time regression

Bug: 111422946
Fixes: 111449927
Test: atest UsageStatsDatabaseTest
Change-Id: I084aea796ed2163c42947d52396a36cc7c5562a2
2018-09-28 16:48:23 -07:00
Todd Kennedy
29cfa27f69 Fail install if split is missing
An application can declare that it must be installed with at least
one split using the manifest attribute "android:isSplitRequired".
Setting the attribute to 'true' [default is 'false'], the application
can't be installed with a base-only. It must be accompanied by at
least one split [either feature or config].

Change-Id: I42804af34a4209ba5d6726d681ca705ca2c21a39
Fixes: 111391719
Test: atest CtsAppSecurityHostTestCases:SplitTests
2018-09-27 21:43:36 -07:00
Makoto Onuki
8426a06516 Merge "Add API surface for "keep SMS app running"." 2018-09-27 14:30:41 +00:00
Jeff Sharkey
9144b4dd85 We still need userIds to be populated.
Fixes regression from recent security patch.

Bug: 116685315
Test: none
Change-Id: I2105d974a5a77f3a38b887c8459d893639fdffa2
2018-09-26 20:15:23 -06:00
Jeff Sharkey
66768ba664 We still need userIds to be populated.
Fixes regression from recent security patch.

Bug: 116685315
Test: none
Change-Id: I2c2e3976ec7ec2b03ebee052ca8ce11b8f66495d
2018-09-26 20:13:29 -06:00
Makoto Onuki
df7e481b20 Add API surface for "keep SMS app running".
Bug: 109809543
Test: build & boot
Change-Id: Ie9ebf1f34052394a92c3f260413c18596709d3a3
2018-09-26 11:51:06 -07:00
Jeff Sharkey
960165c0d7 Merge "Recover shady content:// paths." 2018-09-25 23:56:56 +00:00
TreeHugger Robot
e224120377 Merge "Add PermissionManager exposing SPLIT_PERMISSIONS" 2018-09-25 22:53:51 +00:00
Nicole Borrelli
2bfca321cc Merge "Fix malformed Javadoc." into pi-dev am: 3ae3f252b4
am: 3d54533e52

Change-Id: I8940755ed359d4fcf6683c59c0e501c11faa4559
2018-09-25 14:24:28 -07:00
Nicole Borrelli
3d54533e52 Merge "Fix malformed Javadoc." into pi-dev
am: 3ae3f252b4

Change-Id: Iea60c213e70a8878baeb59b9247ae4bf0eaf5a8d
2018-09-25 14:06:49 -07:00
Philip P. Moltmann
039678e13f Add PermissionManager exposing SPLIT_PERMISSIONS
The Permission Controller app (a mainline module) needs to be able to
read the SPLIT_PERMISSIONS. Hence this array needs to be exposed at
least as system-api. We need to make sure that the PackageParser,
PackageManager and Permission Controller app agree on which permissions
are split, hence it is best to define them at a single location.

I think exposing the split permissions to developers is useless and
potentially confusing. The app should never request a permission that
was split. The app should just behave as if split permissions do not
exist. The Permission Controller / Package Manager deal with the
split permissions and add them when needed. Hence I don't think we
should expose this data to 3rd parties.

Bug: 110953302
Test: requested permissions
Change-Id: I6951c52979c89ee5c13a4a14da125e1a01f2e234
2018-09-25 13:48:11 -07:00
Jeff Sharkey
c4156e0ec4 Recover shady content:// paths.
The path-permission element offers prefix or regex style matching of
paths, but most providers internally use UriMatcher to decide what
to do with an incoming Uri.

This causes trouble because UriMatcher uses Uri.getPathSegments(),
which quietly ignores "empty" paths.  Consider this example:

    <path-permission android:pathPrefix="/private" ... />

    uriMatcher.addURI("com.example", "/private", CODE_PRIVATE);

    content://com.example//private

The Uri above will pass the security check, since it's not
technically a prefix match.  But the UriMatcher will then match it
as CODE_PRIVATE, since it ignores the "//" zero-length path.

Since we can't safely change the behavior of either path-permission
or UriMatcher, we're left with recovering these shady paths by
trimming away zero-length paths.

Bug: 112555574
Test: atest android.appsecurity.cts.AppSecurityTests
Test: atest FrameworksCoreTests:android.content.ContentProviderTest
Change-Id: Ibadbfa4fc904ec54780c8102958735b03293fb9a
2018-09-25 14:10:15 -06:00
Kevin Chyn
05c21508fd 3/n: Add BiometricManager, hasEnrolledBiometrics()
Fixes: 112570477

Test: BiometricPromptDemo works
Test: Able to get/use BiometricManager
Test: Tested with enrolled and non-enrolled biometrics

Change-Id: I26231894eccc87c42b5b3007aa0b7c6f09830452
2018-09-21 17:08:49 -07:00
Kevin Chyn
352adfec61 2/n: Rename BiometricPromptService to BiometricService
This is in preparation for BiometricManager. Each Manager should have its
own Service.

Bug: 112570477

Test: BiometricPromptDemo works
Change-Id: Ibbbd499a0fd5a2050b329ee038776c6c9f49cdb2
2018-09-20 23:51:40 -07:00
kopriva
b7b399ed76 Merge "docs: fixing several minor documentation bugs" into pi-dev am: 82b0d17b39
am: f6b27fbff0

Change-Id: I14f98e023001c75719ab8b891db6abf3f0fd4564
2018-09-20 17:12:29 -07:00
kopriva
f6b27fbff0 Merge "docs: fixing several minor documentation bugs" into pi-dev
am: 82b0d17b39

Change-Id: Ieb1447c0d7cda629338de8d6e03f46670d8ed0b0
2018-09-20 16:55:47 -07:00
Nicole Borrelli
8a5f04a6a7 Fix malformed Javadoc.
Bug: 114244716
Change-Id: I316e5fcbe742a57bbf997617f3afe01484f7d8a0
Test: manual testing
2018-09-20 23:33:20 +00:00
kopriva
f07a46058c docs: fixing several minor documentation bugs
Test: make ds-docs

Bug: 36949243
Bug: 116169695
Bug: 37001248
Bug: 37044885
Bug: 37053166

Change-Id: I844a8978518cd7214bf9d068d602902dfa7e8246
Exempt-From-Owner-Approval: Docs-only change
2018-09-20 11:20:27 -07:00
TreeHugger Robot
87a97a47eb Merge "Update Context documentation to indicate that KEYGUARD_SERVICE is unavailable for Instant Apps." 2018-09-19 23:06:33 +00:00
Donald Chai
ee4c91c6a6 Update Context documentation to indicate that KEYGUARD_SERVICE is
unavailable for Instant Apps.

Bug: 116021320
Bug: 67614964
Test: N/A
Change-Id: I94275ad51aec13acfe15ede3a5fb9a80aa57d977
2018-09-19 14:47:09 -07:00
TreeHugger Robot
f9d779d51d Merge "Allow apps to write to the clipboard without input focus" 2018-09-19 21:35:17 +00:00
Philip P. Moltmann
e854a65a78 Merge changes I74745f89,Ia70f966c
* changes:
  Grant permissions to updated system packages
  Revert "Revert "Reduce coupling between DefaultPermissionGrantPolicy and PM""
2018-09-19 20:16:40 +00:00
Philip P. Moltmann
1a771ca6ce Merge "Add documentation to recently added system API" 2018-09-19 19:56:59 +00:00
Philip P. Moltmann
6af221c01b Add documentation to recently added system API
Test: Built
Change-Id: I014cc1e1088e409abb33d61c8d69d51e6a1e7045
2018-09-19 15:42:59 +00:00
Philip P. Moltmann
b0be05c5cb Revert "Revert "Reduce coupling between DefaultPermissionGrantPolicy and PM""
This reverts commit fa894222e6.

Reason for revert: Resubmitting in a topic with the fix for the bug that required the revert

Change-Id: Ia70f966c8757f340ceb14f187e9726c12457403a
2018-09-18 19:48:53 -07:00
Philip P. Moltmann
fa894222e6 Revert "Reduce coupling between DefaultPermissionGrantPolicy and PM"
This reverts commit 47e8820816.

Reason for revert: 115854330

Bug: 115854330
Change-Id: I44edb7863daa12352935ffdbed701d4772e93132
2018-09-19 02:30:28 +00:00
Philip P. Moltmann
192e1c6476 Merge changes from topic "SettingsLibRestrictedLockUtils"
* changes:
  Make methods used by PermissionController @SystemApi
  Make restricted lock icon system-api
2018-09-18 15:27:36 +00:00
Josh Gao
7b9617dcf2 Merge "Fix typo in IntentFilter documentation." am: ada39fe63d am: 5c775ffdc8
am: 39510ef3d2

Change-Id: I32f695532dbf0549f418e61345818635e9508e5a
2018-09-17 20:20:23 -07:00
Josh Gao
39510ef3d2 Merge "Fix typo in IntentFilter documentation." am: ada39fe63d
am: 5c775ffdc8

Change-Id: Iae760087190441702f01e91115da0c9e52061ff7
2018-09-17 20:11:58 -07:00
Josh Gao
5c775ffdc8 Merge "Fix typo in IntentFilter documentation."
am: ada39fe63d

Change-Id: I9da782211b8a6766ceb6b17fdec3b31e2e884676
2018-09-17 19:59:26 -07:00
Treehugger Robot
ada39fe63d Merge "Fix typo in IntentFilter documentation." 2018-09-18 01:44:46 +00:00
Yiwei Zhang
d5cd5e1621 Merge "Revert "pm: Exposing Vulkan 1.1 does not guarantee AHB extension support"" 2018-09-17 23:04:43 +00:00
TreeHugger Robot
2105ec5fe8 Merge "Keep app in high memory adjust if moving from TOP to FGS" 2018-09-15 04:38:29 +00:00
Amith Yamasani
e5bfeee745 Keep app in high memory adjust if moving from TOP to FGS
If an app was in the TOP state and immediately moved
to a foreground service state, then try harder to keep it
in memory for another 20 seconds before releasing the
memory to bound foreground services. Using an oom_adj value
of 50 which is between "fore" and "vis". So BFGS apps might
get killed ("vis") before this recently FGS'ed app. That
way any app that has a lot of state in memory that it needs
to persist before getting killed has a chance to do so.

Also bind NotificationListeners with a special bind flag
to rank them below FGS (perceptible adj) so that they
can be killed before any other foreground services or
bound services get killed.

Bug: 110969183
Test: Manual for now. Take a bunch of portrait
      pictures and hit home, while being under memory
      pressure with a bunch of notification listeners.
Change-Id: Ie8934c2331afe6450c582b209869aeca7272f58a
2018-09-14 15:52:40 -07:00
Eugene Susla
79a85ae200 Merge "Reduce coupling between DefaultPermissionGrantPolicy and PM" 2018-09-14 20:36:51 +00:00
Philip P. Moltmann
3c44c6c925 Merge "Describe paramter to PackageInstaller.Session#commit" 2018-09-14 19:13:38 +00:00
Philip P. Moltmann
2fe7dee1cf Describe paramter to PackageInstaller.Session#commit
Test: Built
Change-Id: I4c20b54070ba5345e0c95429fbf0700fe9b2f7d2
Fixes: 115609562
2018-09-14 10:59:33 -07:00
Mathew Inwood
db0657a4f4 Merge "Move some members to the "Q blacklist"." 2018-09-14 13:54:28 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

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: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
kopriva
f0ca62a3eb Merge "docs: fixed mistaken reference to NotificationManager" into pi-dev am: 206a50673d
am: bb252836e5

Change-Id: If12876c83c191b91235e16a69d7dad66fc682b80
2018-09-13 20:06:12 -07:00