Commit Graph

6716 Commits

Author SHA1 Message Date
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
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
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
cecccf6258 Merge "Mark getInstallerPackageName @Nullable"
am: c41a5d6bc0

Change-Id: I9500bd37c872fac143074d9a79402d07b0c0419d
2018-10-10 14:57:22 -07:00
Scott Kennedy
98b5f8901b Mark getInstallerPackageName @Nullable
Test: Just an annotation

Change-Id: Ida4f40e77abec2bbf3791a6b38fdb729f6083811
2018-10-09 17:37: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
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
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
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
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
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
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
Mathew Inwood
1c77a11db2 Add @UnsupportedAppUsage annotations
For packages:
  android.content.res
  android.content.pm.split
  android.content.pm.permission
  android.content.pm.dex
  android.content.pm
  android.content.om
  android.content

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ie932bb108f8e21aad8576e444d43e7a553a4d128
Merged-In: Ia79256a3d04e16dd78331a61af0dcddc5fc1599b
2018-08-15 09:59:43 +01:00
Andrew Sapperstein
d8a7b012a0 Merge "Hide system apps until installed (1/2)" into pi-dev
am: 70a9f39e6a

Change-Id: Ide5ea4b18ca95ee061bf84cb349369b2468504d1
2018-06-26 13:19:57 -07:00
Neil Fuller
e01a7adf5a resolve merge conflicts of 55c0a66825 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ie524607cabc6688911eee7e4f61c50fd406c71f4
2018-06-26 11:55:46 +01:00
Rhed Jao
c19da78203 Hide system apps until installed (1/2)
Applying this mechanism for system carrier apps to make visibility
reasonable from the user's perspective. In other words, before
hidden system apps have been installed, they wouldn't be listed
via APIs in PackageManager which are used at all apps list and
search in Settings and so on.

Test: atest CarrierAppUtilsTest
Test: atest PackageManagerTest
Test: cts DeviceOwnerTest
Test: gts ManagedProfileProvisioningHostsideTest
Bug: 74068582
Change-Id: I1f23aba589b98351a1871a44a3058b67c416f351
2018-06-26 02:21:10 +00:00
Neil Fuller
cccc48d0fe Minimum viable TimeZoneDetectorService
This is a do-nothing TimeZoneDetectorService that can be
populated in following commits. A temporary method has been
added so the service has one method.

Unit tests can be run with:

atest FrameworksServicesTests:TimeZoneDetectorServiceTest

Test: build / boot
Test: See above
Merged-In: I565fb5dd2f18b7aac2e5779d346bfe69e9da02af
Change-Id: I565fb5dd2f18b7aac2e5779d346bfe69e9da02af
2018-06-21 09:30:34 +00:00
Colin Cross
234a906ee1 Merge "Don't override targetVers with minCode"
am: 3b0eba4499

Change-Id: Ied3eb76b2b996500c540965d970fc9cc05fccbd9
2018-06-19 13:10:23 -07:00
Colin Cross
f61f9e3cd9 Don't override targetVers with minCode
If a package contains minSdkVersion="Q" targetSdkVersion="25",
targetCode will be initialized to "Q" when reading minCode,
but targetVers will be set to "25".  targetCode overrides
targetVers, so this results in the computed targetSdkVersion
being "Q".  If minSdkVersion were instead "28", the computed
targetSdkVersion would be "Q".

Make the computed targetSdkVersion consistent by leaving
targetCode and targetVers unset while parsing minSdkVersion,
and then setting them to minCode and minVers if there is
no targetSdkVersion attribute.

Bug: 110167203
Bug: 110353795
Test: install DeviceHealthChecks, verify targetSdk=25
Change-Id: I9547e9b4720543f0c892cbf4de92888c8eead44f
2018-06-18 12:58:11 -07:00
Andreas Gampe
eb56c581d3 Frameworks: Remove complex boolean
To allow an Errorprone warning to become an error.

Bug: 72451126
Test: m
Change-Id: I8733f0ee74de615e4ffc979fb9de38730c2506c6
Merged-In: Ia6856157e8813856268fba003e1e591d690cb26e
2018-06-12 10:37:04 -07:00
Neil Fuller
79d42a61e4 resolve merge conflicts of 5e1d95b0cc to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ic5527b29cbe8c84d2053be849cf09df5341e4790
2018-06-12 14:23:51 +01:00
Neil Fuller
b557907f51 Minimum viable TimeDetectorService
This is a do-nothing TimeDetectorService that can be
populated in following commits. A temporary method has been
added so the service has one method.

Unit tests can be run with:

atest FrameworksServicesTests:TimeDetectorServiceTest

Test: build / boot
Test: See above
Merged-In: I9e4eac70b944441f34491315cd1ce7fa2b9ae150
Change-Id: I9e4eac70b944441f34491315cd1ce7fa2b9ae150
(cherry picked from commit feeee682a2)
2018-06-11 15:29:57 +01:00
Chris Forbes
27213a3120 Merge "pm: Exposing Vulkan 1.1 does not guarantee AHB extension support" into pi-dev
am: 551328eaaa

Change-Id: I4f9a420dcefb53e767a745f595787b71fcacd228
2018-06-07 22:23:29 -07:00
Chris Forbes
98f34402cc pm: Exposing Vulkan 1.1 does not guarantee AHB extension support
Bug: b/109875843
Change-Id: Ib53fb1a4f7a5a6c055b575b4d8775f8bd62db7a8
2018-06-07 16:41:19 -07:00
Andrew Sapperstein
15014a6f4c Merge "Revert "Hide system apps until installed (1/2)"" into pi-dev
am: bae9b1a71c

Change-Id: I75e88cc0905cb90412609f9a14627e6fa7963a27
2018-06-07 09:36:29 -07:00
Andrew Sapperstein
bae9b1a71c Merge "Revert "Hide system apps until installed (1/2)"" into pi-dev 2018-06-07 16:15:57 +00:00
Felipe Leme
c0830f8f2a Merge "Document -n option on intent specification." into pi-dev
am: 39f04a7da4

Change-Id: Id8b23acedbd9fe3eb73438b1397a6ff80d36c267
2018-06-06 19:55:38 -07:00
TreeHugger Robot
39f04a7da4 Merge "Document -n option on intent specification." into pi-dev 2018-06-07 00:36:10 +00:00
Sanry Huang
afef5daaf9 Revert "Hide system apps until installed (1/2)"
This reverts commit 40ede29ed6.

Bug: 74068582
Bug: 80444486
Bug: 80316870
Bug: 109803325
Bug: 109642189
Bug: 109660260
Bug: 109649585
Bug: 109647120
Bug: 109648512
Bug: 109648513
Bug: 109647122
Change-Id: I0e50ceebeaecae89f461f541450e24d9c148527d
2018-06-06 19:42:39 +00:00
Andrew Sapperstein
de8f091279 Merge "Revert "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS"" into pi-dev
am: 0c6929ec04

Change-Id: I2f1c4b07946290e3adde90af82b6f7a2ec55f2b1
2018-06-04 17:28:50 -07:00
TreeHugger Robot
0c6929ec04 Merge "Revert "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS"" into pi-dev 2018-06-04 23:27:42 +00:00
Hongming Jin
10fa41b542 Merge "Add shell command handler for account manager to allow enabling service binding for instant app. Test: cts-tradefed run cts -m CtsAccountManagerTestCases cts-instant-tradefed run cts-instant -m CtsAccountManagerTestCases Bug: 79367659" into pi-dev
am: 64896541d4

Change-Id: I6221649f9035bcaa5dea4066b5a61c9dc8fdb06d
2018-06-04 14:19:06 -07:00
Jackal Guo
411e733a83 Merge "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS" into pi-dev
am: 15ebbeb9fd

Change-Id: I6447f40dae907f63042024ac9558aa9ba6f6f4fd
2018-06-04 14:11:44 -07:00
Hongming Jin
64896541d4 Merge "Add shell command handler for account manager to allow enabling service binding for instant app. Test: cts-tradefed run cts -m CtsAccountManagerTestCases cts-instant-tradefed run cts-instant -m CtsAccountManagerTestCases Bug: 79367659" into pi-dev 2018-06-04 20:38:46 +00:00
Andrew Sapperstein
4da326c0d6 Revert "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS"
This reverts commit 44c4ca41d8.

Reason for revert: Wanted to go with a different option and this was mistakenly Dr. No'ed.

Bug: 80444486
Test: clean revert
Change-Id: I7fdd13a5bc0f4d9fabf91f3e5497c4065008b531
2018-06-04 20:34:31 +00:00
TreeHugger Robot
15ebbeb9fd Merge "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS" into pi-dev 2018-06-04 20:32:30 +00:00
Hongming Jin
8e2bfc11ce Add shell command handler for account manager to allow enabling service
binding for instant app.
Test: cts-tradefed run cts -m CtsAccountManagerTestCases
cts-instant-tradefed run cts-instant -m CtsAccountManagerTestCases
Bug: 79367659

Change-Id: I3ac968ebc20be68da08293d9b685a01920f11b76
2018-06-04 09:41:01 -07:00
Hongming Jin
e2304c2ed4 Merge "Enforce permission check before returning application info Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest Bug: 77821568" into pi-dev
am: dbc6052022

Change-Id: I137f5df296a05d7ec128427d8aafd5ae66b519f7
2018-06-01 10:36:14 -07:00
Jackal Guo
44c4ca41d8 Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS
Update the logic in PackageParser to avoid unistalled system app
can't be found.

Test: follow steps on b/80444486 and can add account normally
Test: PackageManagerTest
Bug: 80444486
Change-Id: Ifafac34111d883e51563018be793655c25d09fba
2018-06-01 12:22:38 +08:00