Commit Graph

6745 Commits

Author SHA1 Message Date
Alan Stokes
0a0559c0ce Merge "DexLoadReporter needs to handle arbitrary class loaders." am: f2d5ace011
am: 1e29264790

Change-Id: I41caab25c48d496722ac4d044908dd781df1705d
2018-11-09 03:20:40 -08:00
Alan Stokes
b6c3a604b0 DexLoadReporter needs to handle arbitrary class loaders.
Also made sure we can handle null classpaths.

Test: atest -p services/core/java/com/android/server/pm/dex
Bug: 111336847
Change-Id: Idabf3fb9a09a0764e805679ac29cd8455e8dc267
2018-11-07 12:00:42 +00:00
Nathan Harold
41e2d7494f Merge "Move some members to the "Q blacklist"." am: f5cf9f24ed
am: 13c9e7e2f3

Change-Id: Ia2419cce28d26d9464da2a5172cb332b629e943e
2018-10-24 16:14:06 -07:00
Steven Moreland
71ac2676b6 Merge "pm: Disallow HIDL libs from boot jars >= Q." am: 06182b0764
am: 7430f3e6fd

Change-Id: I0f2fa1c1571283d247fb6ac344b0dc5b6085d3aa
2018-10-24 14:44:14 -07:00
Nathan Harold
f5cf9f24ed Merge "Move some members to the "Q blacklist"." 2018-10-23 21:53:51 +00:00
Mathew Inwood
45d2c252b1 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
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07:00
Treehugger Robot
06182b0764 Merge "pm: Disallow HIDL libs from boot jars >= Q." 2018-10-22 07:08:10 +00:00
Steven Moreland
ae88825916 pm: Disallow HIDL libs from boot jars >= Q.
These two libraries:
android.hidl.base-V1.0-java
android.hidl.manager-V1.0-java

were removed from BOOT_JARS. This change disallows them to be used on
the classpath >= Q. They are still allowed to be used <= P for legacy
reasons.

Test: atest android.content.pm.AndroidHidlUpdaterTest
Test: build & boot Pixel 2
Fixes: 77307025

Change-Id: I7752812318030cbaa15f42301c168371ceade901
2018-10-17 18:17:33 -07:00
Chen Xu
6169b04385 Merge "refactor data/voice roaming states" am: 6bd29ab2df
am: 652ec06948

Change-Id: I1f82195e5477401f3216db92bbdac388bbe16c7f
2018-10-12 11:32:19 -07:00
Chen Xu
652ec06948 Merge "refactor data/voice roaming states"
am: 6bd29ab2df

Change-Id: Iac8184fe2dfdb7ff4c3d93ecb7c0c9dd9a7a46a5
2018-10-12 11:20:18 -07:00
Chen Xu
6bd29ab2df Merge "refactor data/voice roaming states" 2018-10-12 18:02:17 +00:00
Jeff Sharkey
83e5229ab7 Merge "Recover shady content:// paths." into pi-dev
am: 7402d7611c

Change-Id: I499e0086df06d77d1fce3afaa86bb19a136b1ca2
2018-10-11 21:22:04 -07:00
TreeHugger Robot
7402d7611c Merge "Recover shady content:// paths." into pi-dev 2018-10-12 03:59:38 +00:00
chen xu
0281169e6d refactor data/voice roaming states
1. migrate set/get roamingType from ServiceState to
NetworkRegState.set/get roamingType
2. migrate set/get roamingStateFromRegstate from ServiceState
to NetworkRegState.regState
3. new System API for neworkRegistration.isRoaming().

Bug: 116127096
Test: ServiceStateTest, ServiceStateProviderTest

Change-Id: Ib89744089c98713819c8d313240d629ddb77d0bf
2018-10-11 15:10:32 -07:00
Scott Kennedy
61f76551f1 Merge "Mark getInstallerPackageName @Nullable" am: c41a5d6bc0
am: cecccf6258

Change-Id: Ib27badf42d90932da0b7f2f0922b8903936feafd
2018-10-10 15:04:12 -07:00
Scott Kennedy
cecccf6258 Merge "Mark getInstallerPackageName @Nullable"
am: c41a5d6bc0

Change-Id: I9500bd37c872fac143074d9a79402d07b0c0419d
2018-10-10 14:57:22 -07:00
kopriva
003587b9a4 docs: fixing errors found with lint checker
am: 219f7dcb66

Change-Id: Id38a4b2e21285d5d5e2a2124d76885febd3441c6
2018-10-09 18:30:57 -07:00
Scott Kennedy
98b5f8901b Mark getInstallerPackageName @Nullable
Test: Just an annotation

Change-Id: Ida4f40e77abec2bbf3791a6b38fdb729f6083811
2018-10-09 17:37:58 -07:00
kopriva
219f7dcb66 docs: fixing errors found with lint checker
through /bluetooth directory

amending through /content directory

Test: make ds-docs

Bug: 117494359

Change-Id: I751e15d60f0b9cc441998b27560050bf62994fef
Exempt-From-Owner-Approval: Docs-only change
2018-10-09 16:01:04 -07:00
Jeff Sharkey
c084ddbf82 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
Merged-In: Ibadbfa4fc904ec54780c8102958735b03293fb9a
Change-Id: Ibadbfa4fc904ec54780c8102958735b03293fb9a
2018-10-03 14:26:17 -06:00
Amith Yamasani
0631cca3ff Merge "Keep app in high memory adjust if moving from TOP to FGS" into pi-dev
am: 311f0f5da5

Change-Id: I941f1a8f9b6ee2c65ee289a159146d5b2ee95dcc
2018-09-27 18:11:46 -07:00
TreeHugger Robot
311f0f5da5 Merge "Keep app in high memory adjust if moving from TOP to FGS" into pi-dev 2018-09-28 00:50:39 +00:00
Nicole Borrelli
3d54533e52 Merge "Fix malformed Javadoc." into pi-dev
am: 3ae3f252b4

Change-Id: Iea60c213e70a8878baeb59b9247ae4bf0eaf5a8d
2018-09-25 14:06:49 -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
Amith Yamasani
b735830a1e 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
Merged-In: Ie8934c2331afe6450c582b209869aeca7272f58a
2018-09-20 22:38:56 +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
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
kopriva
bb252836e5 Merge "docs: fixed mistaken reference to NotificationManager" into pi-dev
am: 206a50673d

Change-Id: I03ebc3385e89c5b71888d7a4d11b0e2608d80fed
2018-09-13 19:57:19 -07:00
kopriva
5495dbbb80 docs: fixed mistaken reference to NotificationManager
Test: make ds-docs

Bug: 36952345

Change-Id: Icc74db9f8808e67c6eafacc0e40a35f47cba32ba
Exempt-From-Owner-Approval: Docs-only change
2018-09-13 14:18:34 -07:00
Steven Moreland
d70998a8d9 Merge changes from topic "remove-hidl-boot-jars" am: 82e3d2f066
am: fc8de0d9e3

Change-Id: If4d5c5e99bf605f31371426ab3a5def66f0a0137
2018-09-13 09:57:42 -07:00
Steven Moreland
fc8de0d9e3 Merge changes from topic "remove-hidl-boot-jars"
am: 82e3d2f066

Change-Id: I17b89f904ed17ee8f1f31c6d56cb96da705cb553
2018-09-13 09:40:50 -07:00
Steven Moreland
f36ad62907 pm: Add hidl libraries to old class paths.
These two libraries:
android.hidl.base-V1.0-java
android.hidl.manager-V1.0-java

are being removed from BOOT_JARS. This change facilitates linking to them
for libraries or prebuilts in or before P.

Test: atest android.content.pm.AndroidHidlUpdaterTest
Bug: 77307025

Change-Id: Ic0db24cc68d66f5dbfab126ce7e304eec0bfc969
2018-09-12 09:18:40 -07:00
Mike Ma
43908f112b Merge "Avoiding potential NPE when dumping to proto." am: a52b601ef3
am: 8964390dd3

Change-Id: Ie9dc401990b4267b9bcf0469a3526db93dc438d2
2018-09-11 18:47:58 -07:00
Mike Ma
8964390dd3 Merge "Avoiding potential NPE when dumping to proto."
am: a52b601ef3

Change-Id: I9d5e520654877e6a46ea19ad3eddd3a901e58699
2018-09-11 18:26:45 -07:00
Kweku Adams
ce8e43f8d2 Avoiding potential NPE when dumping to proto.
Inspired by aosp/736453. Cherry-picked from ag/4934453

Bug: 113087610
Test: Android builds
Change-Id: I9f0dae9cd5a839947c7ed150980eb30b928beef7
2018-09-11 19:21:52 +00:00
David Brazdil
0b62a08c76 Merge "Move ApplicationInfo.usesNonSdkApi to private flags" am: fdd378c594
am: de5cc1ff5b

Change-Id: I8849fab757c732ab600e243c187f9acd0aa2c9d7
2018-09-07 04:15:02 -07:00
David Brazdil
de5cc1ff5b Merge "Move ApplicationInfo.usesNonSdkApi to private flags"
am: fdd378c594

Change-Id: I43fe6b903eb4cd900da9ebc2b10893213329c691
2018-09-07 03:12:59 -07:00
David Brazdil
fa5e8361c4 Move ApplicationInfo.usesNonSdkApi to private flags
No need to create an extra field for a boolean flag. Move the recently
added ApplicationInfo.usesNonSdkApi to one bit in privateFlags.

This also solves an issue where the field was not propagated during
copying of the data structure.

Bug: 113315999
Test: phone boots
Merged-In: I09f8f39454c013a84893ac304904a4412fc542bf
Change-Id: I09f8f39454c013a84893ac304904a4412fc542bf
(cherry picked from commit a5b4df2a89)
2018-09-06 15:31:33 +01:00
David Brazdil
3fb373d63a Merge "Add android:usesNonSdkApi manifest attribute" am: 9446fbbeb8
am: a872cb1fcc

Change-Id: I489673fe1b36c146b9b64f3da434b853e002a472
2018-08-31 03:38:08 -07:00
David Brazdil
a872cb1fcc Merge "Add android:usesNonSdkApi manifest attribute"
am: 9446fbbeb8

Change-Id: I53b5c85fc16cdea5413b35ba4ddeec0d64f22b11
2018-08-31 03:28:30 -07:00
David Brazdil
ca6f81d395 Add android:usesNonSdkApi manifest attribute
ActivityManagerService decides on the non-SDK API enforcement policy
of every newly spawned process. System apps can be exempted by adding
their package name to a config XML file, tests can pass a flag to
'am instrument'. This patch adds a new @hide attribute on the <application>
manifest tag, "android:usesNonSdkApi", which can be used by both
system apps and tests, and is automatically set by the build system.

The use of the attribute remains guarded as follows:
- if invoked via 'am instrument', must hold shell user permission,
- if app launched, must be a system app or an updated system app.
The attribute is ignored in all other cases.

Bug: 113315999
Test: N/A
Merged-In: I2f6cb56f63fa2c5dd6c7c25fcefe8205da1ec96a
Change-Id: I2f6cb56f63fa2c5dd6c7c25fcefe8205da1ec96a
(cherry picked from commit 787b6f22a6)
2018-08-30 14:10:33 +01:00
Josh Gao
0febb23559 Fix typo in IntentFilter documentation.
Test: none
Change-Id: I755766c30bf328bddf2b9cb5c4346c399e923f5b
2018-08-28 11:19:16 -07:00
Eric Holk
66a177f90e Merge "Add more tracing for obtainStyledAttributes" am: 2ef6338351
am: 106905df2e

Change-Id: I8e7a40aab8bdf2e50c741bcad62dc81bc3df88c0
2018-08-23 17:50:19 -07:00
Eric Holk
106905df2e Merge "Add more tracing for obtainStyledAttributes"
am: 2ef6338351

Change-Id: I9f65106687262f180dd62d329c7197cb720def51
2018-08-23 17:35:16 -07:00
Eric Holk
c37457799b Add more tracing for obtainStyledAttributes
Much of the time for View inflation is spent in calls to
obtainStyledAttributes. This change adds more granular tracing of this method so
we can better attribute how inflation time is spent.

Test: manual - looked at systrace for starting an app.

Change-Id: Ib72aef1e8b788ce5a61ba13b57bb4417a263b48c
2018-08-21 13:35:07 -07:00
Mathew Inwood
a5191dacdc resolve merge conflicts of 2ee069f73d to stage-aosp-master
am: 8b62717128

Change-Id: Ib32e90ab073d32cc1354c2a3e889ebca813c59f1
2018-08-17 01:43:27 -07:00
Mathew Inwood
8b62717128 resolve merge conflicts of 2ee069f73d to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Merged-In: Ia79256a3d04e16dd78331a61af0dcddc5fc1599b
Change-Id: Ieb9836ae90f6f2565fa3ba5c395b42069b58ff71
2018-08-17 08:31:16 +01:00