1162 Commits

Author SHA1 Message Date
weisu
90d3fb6354 Write files in a temporary directory
Avoid writing test files in the build output directory which fails when
run with Bazel. This happens because Bazel's sandboxing environment
ensures that the test's working directory is unwritable.

See https://docs.bazel.build/versions/main/sandboxing.html for more
information.

Bug: 209687942
Test: atest --bazel-mode aapt2_tests
Test: atest aapt2_tests

Change-Id: I0fce701bbac255c3e308ad5c85aa27230c3b620b
2022-01-05 23:05:14 +00:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Luke Edgar
0ba2a37eaf Merge "AAPT Files - Permit invariant filepaths for getting file names" 2021-11-11 09:17:33 +00:00
Luke Edgar
9109a415b2 AAPT Files - Permit invariant filepaths for getting file names
AAPT compile provides a "--source-path" option that instructs aapt to
use a provided source path rather than the default source resource as
resource orgin. However, this is not file system agnostic. This causes
incorrect outputs of AAPT link, as source path parsing is tied to the
file system. This change ensures that AAPT Files::getFilename can parse
filepaths, regardless of file system filepath type.

Bug: 141301405, 155218379
Test: manually tested on windows with a unix style filepath, passes aapt
tests
Change-Id: I548de01ad513b549dc30eb35d2a59813fa3d4e69
2021-11-10 10:42:05 +00:00
Yurii Zubrytskyi
4c87aec35f Update the resources owner files
Bug: 205633893
Test: n/a

Change-Id: Ib9cf70c9acb200e8019a6522cb6a85f85b760651
2021-11-08 16:25:33 -08:00
Treehugger Robot
e29dc9dfe1 Merge "Stop using group_static_libs property" am: bc8a6d063b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1814336

Change-Id: Iae29e06901daae4b6f8d7f972ba938e2a94a5311
2021-08-31 18:07:45 +00:00
LaMont Jones
d010fb142d Stop using group_static_libs property
This property is now ignored, so there is no need to set it.
For more details, see the bug and/or "Effecient archive file handling"
in https://lld.llvm.org/NewLLD.html#key-concepts

Bug: 189475744
Test: Manual build succeeds
Change-Id: I79ff6aaba47fb13548d735b291da0796d416be48
2021-08-30 23:35:28 +00:00
Colin Cross
1bb97985f0 Rename T to Tiramisu
PLATFORM_VERSION_CODENAME is being updated from T to Tiramisu.

Bug: 186121492
Bug: 194055070
Test: m checkbuild
Change-Id: I6882018a916dc1c71abc442068cb54fb9c42ff3c
Merged-In: I6882018a916dc1c71abc442068cb54fb9c42ff3c
(cherry picked from commit ff02f9a70ed9fa7cb3114f22db5290a316be661e)
2021-07-26 09:42:17 -07:00
Colin Cross
ff02f9a70e Rename T to Tiramisu
PLATFORM_VERSION_CODENAME is being updated from T to Tiramisu.

Bug: 186121492
Bug: 194055070
Test: m checkbuild
Change-Id: I6882018a916dc1c71abc442068cb54fb9c42ff3c
Merged-In: I6882018a916dc1c71abc442068cb54fb9c42ff3c
2021-07-23 21:06:15 +00:00
Jeff Sharkey
80865170ce Merge "Emit "usesPermissionFlags" in "dump badging"." into sc-dev am: c206d63edc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14019347

Change-Id: I7e42cd52e8ba333dd00faa635767373d56adc30b
2021-06-04 22:20:08 +00:00
Jeff Sharkey
c206d63edc Merge "Emit "usesPermissionFlags" in "dump badging"." into sc-dev 2021-06-04 22:06:55 +00:00
Colin Cross
0df037d6ae Merge "Support codename T in aapt2" am: ff7bba27a8 am: 90b463900a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1715428

Change-Id: I6a9db68648a48c06bb0af370577b185d4cdcad04
2021-06-03 09:18:39 +00:00
Colin Cross
ff7bba27a8 Merge "Support codename T in aapt2" 2021-06-01 23:27:30 +00:00
Jeff Sharkey
7c5f4337fd platform/frameworks/base/ - S is now 31
Bug: 171506470
Test: Build
Change-Id: I46d4df5f27783a96a58c966b113391ea3bc112cb
2021-06-01 06:48:51 -06:00
Patrick Baumann
dff37ee6d2 Merge "Updates OWNERS files" into sc-dev 2021-05-24 18:30:19 +00:00
Patrick Baumann
43628ca24c Updates OWNERS files
Bug: 186864416
Test: Builds
Change-Id: I04dfc5c2c7143825334ebc62742e335b8c889492
2021-05-21 14:13:18 -07:00
Colin Cross
a1250b59ab Support codename T in aapt2
Bug: 186121492
Test: treehugger
Change-Id: I3f136f505bce80d0eb7f8b0cca316041730a4580
2021-05-21 10:23:17 -07:00
Ryan Mitchell
6ea9ed3d5f Do not call pop_back when app has no uses-sdk
Calling pop_back on an empty container results in undefined behavior.
aapt2 dump badging seg faults when used on an APK with no uses-sdk.

Bug: 188461703
Test: aapt2 dump badging HelloAppTest.apk
Change-Id: I8d8308a06d542f003ae399629bdbfb5b845674fc
2021-05-20 13:55:12 -07:00
Patrick Baumann
e6c0a4f8ce Updates OWNERS files
Bug: 186864416
Test: Builds
Change-Id: I04dfc5c2c7143825334ebc62742e335b8c889492
2021-05-14 15:45:42 +00:00
TreeHugger Robot
30f6ef3a7b Merge "Fix segmentation fault in aapt2" into sc-dev 2021-05-11 21:05:42 +00:00
Kelvin Zhang
3965584d3a Fix segmentation fault in aapt2
When passing a single iterator to std::vector::eraase, only element at
that iterator is removed. If no elements are filtered, std::remove_if()
returns the end iterator, attempting to erase() the end iterator can
cause segmentation fault. This bug causes signing test to fail.
https://atp.googleplex.com/tests/asit/ota/signing?tabId=test_run

Test: aapt2
PRODUCT/app/CalculatorGooglePrebuilt/CalculatorGooglePrebuilt.apk

Bug: 175789289
Bug: 178554651

Change-Id: I813055238bef2dcbdf76172a00b3f44ae940b759
(cherry picked from commit b88ccf80aa884df039cd13c5a31f3e08065d487e)
2021-05-11 17:18:45 +00:00
Ryan Mitchell
2ec8e1b71f Add <staging-public-group-final> to aapt2 (2/2)
Fixes BinaryResourceParser loading of alias chunk and makes changes
that did not get committed in 2fedba9a32d9e92344eaf6e9faf5b43e1bc2ae70.

Bug: 183411356
Test: aapt2_test
Change-Id: Ieff9166100019f38ddcfe900014709b15db24e43
2021-05-11 08:28:00 -07:00
Ryan Mitchell
2fedba9a32 Add <staging-public-group-final> to aapt2
To allow apps that compiled against a pre-release SDK to continue
working for a period of time after API finalization, a new tag,
<staging-public-group-final>, has been added to aapt2.

When finalizing the framework resource API, converting
<staging-public-group> tags to <staging-public-group-final> will
cause aapt2 to generate the resource table so that there is a resource
entry for the old non-finalized (staged) resource ID and another entry
for the finalized resource ID of newly finalized resources. This allows
an application that compiled against the pre-release SDK to continue
resolving resources using pre-release resource IDs.

All references to pre-release resource IDs will be rewritten to their
finalized resource IDs through the information stored in the new staged
alias chunk. This allows applications compiled against
<staging-public-group> resources to use the newly finalized
resource ID without re-compilation.

When an application is re-compiled against the SDK with
<staging-public-group-final> tags, the application will use the
finalized resource IDs.

This change limits the use of the alias chunk to the framework for S.

Bug: 183411356
Test: aapt2_test
Change-Id: Iba1c3033c3c2f32de8e4a19b58d3921c971092c4
2021-05-10 17:22:33 -07:00
Ryan Mitchell
ea15d442b2 Merge "Fix uninitialized macro reference member" into sc-dev 2021-05-04 22:49:07 +00:00
Ryan Mitchell
556d84ca6c Merge "AAPT2: Only print last uses-sdk tag" into sc-dev 2021-05-04 17:47:50 +00:00
Ryan Mitchell
a2b4fcde92 Fix uninitialized macro reference member
Reference::allow_raw was left uninitialized.

Bug: 175616308
Test: aapt2_tests
Change-Id: I58a560c7fb278c1aa2b415e456f849999c835155
2021-05-03 16:17:28 -07:00
Ryan Mitchell
1966e1f236 AAPT2: Only print last uses-sdk tag
When an APK defines multiple "uses-sdk" tags, the Android runtime only
uses the minSdkVersion and targetSdkVersion values from the last
occurrence of the "uses-sdk" tag.

For example an application with the following tags:
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
<uses-sdk android:maxSdkVersion="28"/>

Will have the following version codes at runtime:
minSdk=1 targetSdk=1

Another example:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>

Will have the following version codes at runtime:
minSdk=5 targetSdk=19

AAPT2 must print the version data from only the last tag, skipping other
occurrences of the tag.

Bug: 175789289
Test: manual
Change-Id: If0fece7de1d96046221c89d1b12515bc5c15c301
2021-05-03 13:54:55 -07:00
Ryan Mitchell
326e35ffaf Add <macro> tag to aapt2
AAPT2 Macros are compile-time resources definitions that are expanded
when referenced during the link phase.

A macro must be defined in the res/values.xml directory. A macro
definition for a macro named "foo" looks like the following:
 <macro name="foo">contents</macro>

When "@macro/foo" is used in the res/values directory or in a compiled
XML file, the contents of the macro replace the macro reference and
then the substituted contents are compiled and linked. If the macro
contents reference xml namespaces from its original definition, the
namespaces of the original macro definition will be used to determine
which package is being referenced.

Macros can be used anywhere resources can be referenced using the
@package:type/entry syntax.

Macros are not included in the final resource table or the R.java since
they are not actual resources.

Bug: 175616308
Test: aapt2_tests
Change-Id: I48b29ab6564357b32b4b4e32bff7ef06036382bc
2021-04-28 14:58:23 -07:00
Bob Badour
1cdaca9f84 [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyAndException/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestApp/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v1/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v3/Android.mk
  core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk
  core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk
  packages/Android.bp
  packages/SystemUI/tests/Android.mk
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  tests/Camera2Tests/CameraToo/Android.mk
  tests/Camera2Tests/CameraToo/tests/Android.mk
  tests/Camera2Tests/SmartCamera/SimpleCamera/Android.mk
  tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
  tests/CanvasCompare/Android.mk
  tests/FlickerTests/test-apps/Android.bp
  tests/LockTaskTests/Android.mk
  tests/SoundTriggerTests/Android.mk
  tools/aapt2/integration-tests/MergeOnlyTest/App/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/App/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/Split/Android.mk
  tools/fonts/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Ic480b653df5da840f5e65b818af3de5c8417ab4a
2021-04-21 14:42:18 -07:00
Bob Badour
268090cd09 DO NOT MERGE Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyAndException/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestApp/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppTests2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestServices/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v1/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v2/Android.mk
  core/tests/hosttests/test-apps/MultiDexLegacyVersionedTestApp_v3/Android.mk
  core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk
  core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk
  location/tests/Android.bp
  packages/CarSystemUI/tests/Android.mk
  packages/SystemUI/tests/Android.mk
  packages/overlays/AccentColorAmethystOverlay/Android.mk
  packages/overlays/AccentColorAquamarineOverlay/Android.mk
  packages/overlays/AccentColorBlackOverlay/Android.mk
  packages/overlays/AccentColorCarbonOverlay/Android.mk
  packages/overlays/AccentColorCinnamonOverlay/Android.mk
  packages/overlays/AccentColorGreenOverlay/Android.mk
  packages/overlays/AccentColorOceanOverlay/Android.mk
  packages/overlays/AccentColorOrchidOverlay/Android.mk
  packages/overlays/AccentColorPaletteOverlay/Android.mk
  packages/overlays/AccentColorPurpleOverlay/Android.mk
  packages/overlays/AccentColorSandOverlay/Android.mk
  packages/overlays/AccentColorSpaceOverlay/Android.mk
  packages/overlays/AccentColorTangerineOverlay/Android.mk
  packages/overlays/DisplayCutoutEmulationCornerOverlay/Android.mk
  packages/overlays/DisplayCutoutEmulationDoubleOverlay/Android.mk
  packages/overlays/DisplayCutoutEmulationHoleOverlay/Android.mk
  packages/overlays/DisplayCutoutEmulationNarrowOverlay/Android.mk
  packages/overlays/DisplayCutoutEmulationTallOverlay/Android.mk
  packages/overlays/DisplayCutoutEmulationWaterfallOverlay/Android.mk
  packages/overlays/DisplayCutoutEmulationWideOverlay/Android.mk
  packages/overlays/FontNotoSerifSourceOverlay/Android.mk
  packages/overlays/IconPackCircularAndroidOverlay/Android.mk
  packages/overlays/IconPackCircularLauncherOverlay/Android.mk
  packages/overlays/IconPackCircularSettingsOverlay/Android.mk
  packages/overlays/IconPackCircularSystemUIOverlay/Android.mk
  packages/overlays/IconPackCircularThemePickerOverlay/Android.mk
  packages/overlays/IconPackFilledAndroidOverlay/Android.mk
  packages/overlays/IconPackFilledLauncherOverlay/Android.mk
  packages/overlays/IconPackFilledSettingsOverlay/Android.mk
  packages/overlays/IconPackFilledSystemUIOverlay/Android.mk
  packages/overlays/IconPackFilledThemePickerOverlay/Android.mk
  packages/overlays/IconPackKaiAndroidOverlay/Android.mk
  packages/overlays/IconPackKaiLauncherOverlay/Android.mk
  packages/overlays/IconPackKaiSettingsOverlay/Android.mk
  packages/overlays/IconPackKaiSystemUIOverlay/Android.mk
  packages/overlays/IconPackKaiThemePickerOverlay/Android.mk
  packages/overlays/IconPackRoundedAndroidOverlay/Android.mk
  packages/overlays/IconPackRoundedLauncherOverlay/Android.mk
  packages/overlays/IconPackRoundedSettingsOverlay/Android.mk
  packages/overlays/IconPackRoundedSystemUIOverlay/Android.mk
  packages/overlays/IconPackRoundedThemePickerOverlay/Android.mk
  packages/overlays/IconPackSamAndroidOverlay/Android.mk
  packages/overlays/IconPackSamLauncherOverlay/Android.mk
  packages/overlays/IconPackSamSettingsOverlay/Android.mk
  packages/overlays/IconPackSamSystemUIOverlay/Android.mk
  packages/overlays/IconPackSamThemePickerOverlay/Android.mk
  packages/overlays/IconPackVictorAndroidOverlay/Android.mk
  packages/overlays/IconPackVictorLauncherOverlay/Android.mk
  packages/overlays/IconPackVictorSettingsOverlay/Android.mk
  packages/overlays/IconPackVictorSystemUIOverlay/Android.mk
  packages/overlays/IconPackVictorThemePickerOverlay/Android.mk
  packages/overlays/IconShapeHeartOverlay/Android.mk
  packages/overlays/IconShapePebbleOverlay/Android.mk
  packages/overlays/IconShapeRoundedRectOverlay/Android.mk
  packages/overlays/IconShapeSquareOverlay/Android.mk
  packages/overlays/IconShapeSquircleOverlay/Android.mk
  packages/overlays/IconShapeTaperedRectOverlay/Android.mk
  packages/overlays/IconShapeTeardropOverlay/Android.mk
  packages/overlays/IconShapeVesselOverlay/Android.mk
  packages/overlays/NavigationBarMode2ButtonOverlay/Android.mk
  packages/overlays/NavigationBarMode3ButtonOverlay/Android.mk
  packages/overlays/NavigationBarModeGesturalOverlay/Android.mk
  packages/overlays/NavigationBarModeGesturalOverlayExtraWideBack/Android.mk
  packages/overlays/NavigationBarModeGesturalOverlayNarrowBack/Android.mk
  packages/overlays/NavigationBarModeGesturalOverlayWideBack/Android.mk
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  tests/Camera2Tests/CameraToo/Android.mk
  tests/Camera2Tests/CameraToo/tests/Android.mk
  tests/Camera2Tests/SmartCamera/SimpleCamera/Android.mk
  tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
  tests/CanvasCompare/Android.mk
  tests/FlickerTests/test-apps/Android.bp
  tests/LockTaskTests/Android.mk
  tests/SoundTriggerTests/Android.mk
  tools/aapt2/integration-tests/MergeOnlyTest/App/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/App/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/Split/Android.mk
  tools/fonts/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I90231075f135176668586b903f2c85ec350fd527
2021-04-21 20:55:12 +00:00
Ryan Mitchell
31031a91f1 Merge "Aapt2 ValueTransformer" into sc-dev 2021-04-21 17:44:55 +00:00
Ryan Mitchell
efcdb95fa7 Aapt2 ValueTransformer
For future macro support, aapt2 must be able to convert Reference
values into other Value types. Currently a DescendingValueVisitor is
used to visit all of the References in a ResourceTable or a compiled
XML file to set their resource ids during the link phase. This was fine
since we were only mutating the resource id of the visited Reference.

A macro may reference a String, BinaryPrimitive, or any other Item
type. During the link phase, we will need to transform references to
macros into the values of the macros.

The only parameter in the methods of the ValueVisitor interface is a
raw pointer to the type being visited. The visitor interface does not
support reassigning the visited type to a different type.

ValueTransformer is a new interface for consuming a Value type and
transforming it into a compatible Value type. This change refactors
Value::Clone to use this interface.

Bug: 175616308
Test: aapt2_tests
Change-Id: Ic1b9d718b932c208764114cd9c74d880e189ccb0
2021-04-21 08:32:30 -07:00
Ryan Mitchell
d4f0220d29 Merge "Use staging-public-group in framework SDK" into sc-dev 2021-04-01 18:36:33 +00:00
Ryan Mitchell
ca3b4f7633 Use staging-public-group in framework SDK
To make S finalization easier, this changes the framework SDK so that
apps linking against it will be able to continue working as expected
after the first phase of SDK finalization.

During the first phase of SDK finalization, the resource ids of
resources that have not been removed are finalized.
staging-public-group tags are converted to staging-public-group-final
tags in order to encode into the framework what the staged resource id
of a finalized resource was. When an app recompiles, it will use the
finalized resource id. Then after all apps recompile, phase 2 of
finalization begins, in which the staging-public-group-final tags are
removed so apps can no longer use the staged resource ids.

Apps that link against the SDK (provided they are using a recent
version of aapt) will encode references to staged resources as
TYPE_DYNAMIC_REFERENCE and TYPE_DYNAMIC_ATTRIBUTE. The values of R
fields for staged resources are defined out-of-line to prevent them
from being inlined into apps linking agsint the SDK. This allows the
resource ids to change during phase 1 of API finalization.

Bug: 183413192
Test: `aapt2 diff` and resource ids stayed the same
Test: `aapt2 dump` of framework-res.apk and observe staged resources
Change-Id: Ie2275c608297a5f63dde8b1cf795415112cbcc24
2021-03-31 23:04:57 -07:00
Ryan Mitchell
87d30ddcc0 Fix aapt2 feature split package name generation
Before flattening the resource table of a feature split, if the package
name of the feature split is the same as the base package name, the
split name is appended to the end of the feature's package name.

A bug was causing the rewritten package name to not be applied to the
feature package which resulted in the feature split being flattened
under the same package name as the base.

Bug: 184034454
Test: `m CtsSplitAppFeatureWarm_v23` && `aapt2 dump resources`
      to observe that package name is correct
Change-Id: I0a0ac57764f599c4dd05326a222056a3c52a4ae3
2021-03-31 22:09:04 +00:00
Ryan Mitchell
1499f504e4 Update iterators during aapt2 diff
A recent change broke aapt2 diff. We need to update the iterators when
an package, type, or entry is not missing from either APK.

Bug: 184066458
Test: `aapt2 diff` with framework before and after staging changes
Change-Id: I9138b9bd80aec24488feca6e06be1d7cf5775290
2021-03-30 14:13:07 -07:00
Ryan Mitchell
2e9bec1154 Add staging-public-group to aapt2
staging-public-group is a tag for putting resources that have been
added during platform development, but have not yet been finalized,
into a separate resource id namespace.

R.java fields of staged resources are non-final, so when the SDK is
finalized, applications using the android R.java will automatically
use the new finalized resource id without having to recompile.

Staged resources can exist either in the same type id as the type's
non-staged counterpart or in a separate type id. Multiple
staging-public-group tags each with a different type id can exist
simultaneously, which allows for multiple versions of the platform
to be developed at once.

Bug: 183411093
Test: aapt2_tests

Change-Id: Ibb6c84c3626751e33c6097f35a03e306bb85616a
2021-03-29 16:33:16 -07:00
Ryan Mitchell
1d008d1d2a Refactor aapt2 tests ResourceTable changes
This changes refactors tests to use the NewResourceBuilder class
that makes it easier to construct resource entries.

Bug: 183102797
Test: aapt2_tests
Change-Id: I851f9fb99a003769f8df8c1876997eee0864822a
2021-03-29 10:22:10 -07:00
Ryan Mitchell
9634efb6f4 Prepare aapt2 for multiple ids per type
For the SDK finalization changes, aapt2 must be able to handle
resources of the same type having different type ids. The
ResourceTable data structure currently stores package ids and type ids
on ResourceTablePackage and ResourceTableType respectively. This
prevents resource entries of the same type from having different type
ids without having to create another ResourceTableType structure.

JavaClassGenerator assumes each type only appears once in the
ResourceTable and it would need to dedupe the types to ensure one class
containing all the resource types ids is generated. TableFlattener on
the other hand needs a separate ResourceTableType for each type/id
combination so that the types are flattened into separate
ResTable_types.

This change simplifies aapt2's ResourceTable data structure:
- Resource ids are stored exclusively on ResourceEntry structures
  meaning multiple entries can have different type ids while being
  stored in the same ResourceTableType. Classes like JavaClassGenerator
  can simply iterate over a type to see all the resources of the type
  regardless of what their type id is.

- ResourceTable::GetPartitionedView() retrieves a list of resources
  sorted and partitioned by package id, type id, and entry id. Classes
  like TableFlattener can use this view to get separate
  ResourceTavleTypes for each different type id that a type has.

These changes will also make it easy to have a resource span multiple
type ids if it exhausts all of the entry ids in one type id.

The new NewResourcesBuilder replaces the numerous setter methods on
ResourceTable.

Bug: 183102797
Test: aapt2_tests
Change-Id: I60dbcb24143bb958333899cafa7d41faa226d203
2021-03-29 10:22:08 -07:00
Jeff Sharkey
abcddfd12b Emit "usesPermissionFlags" in "dump badging".
Since developers can declare the "neverForLocation" flag in their
manifest as public API, we should also offer a way to inspect the
value that we parsed from the manifest.

Bug: 183816684
Test: aapt2 dump badging \
        CtsAppThatRequestsBluetoothPermissionNeverForLocation31.apk
Change-Id: I93c0371d6fb1a0ca928aa26265074acee2bee879
2021-03-29 10:05:23 -06:00
Ryan Mitchell
51ee3d1944 Merge "Use R field directly for shared lib styleable attrs" into sc-dev 2021-03-02 20:02:24 +00:00
Ryan Mitchell
5855de7ed6 Use R field directly for shared lib styleable attrs
If a shared library exposes an attribute and a client uses the
attribute in its own styleable, the value of the lib attribute
resource id in the client styleable must be fixed with the correct
package id at runtime. Since the client will not have an
onResourcesLoaded to call, the client should directly reference the
attribute resource field in its styleable.

Bug: 147674078
Test: aapt2_tests
Change-Id: I8e64bb2d3165a7072e2604fe1730b248545978f4
2021-02-24 15:57:34 -08:00
Bob Badour
8a6a2bce6c [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  apct-tests/perftests/autofill/Android.bp
  apct-tests/perftests/blobstore/Android.bp
  apct-tests/perftests/core/Android.bp
  apct-tests/perftests/core/apps/overlay/Android.bp
  apct-tests/perftests/core/apps/reources_manager/Android.bp
  apct-tests/perftests/core/jni/Android.bp
  apct-tests/perftests/multiuser/Android.bp
  apct-tests/perftests/multiuser/apps/dummyapp/Android.bp
  apct-tests/perftests/packagemanager/Android.bp
  apct-tests/perftests/packagemanager/apps/query-all/Android.bp
  apct-tests/perftests/textclassifier/Android.bp
  apct-tests/perftests/utils/Android.bp
  apct-tests/perftests/windowmanager/Android.bp
  apex/Android.bp
  apex/blobstore/framework/Android.bp
  apex/blobstore/service/Android.bp
  apex/jobscheduler/framework/Android.bp
  apex/jobscheduler/service/Android.bp
  apex/media/Android.bp
  apex/media/aidl/Android.bp
  apex/media/framework/Android.bp
  cmds/am/Android.bp
  cmds/app_process/Android.bp
  cmds/appops/Android.bp
  cmds/appwidget/Android.bp
  cmds/backup/Android.bp
  cmds/bmgr/Android.bp
  cmds/bootanimation/Android.bp
  cmds/bu/Android.bp
  cmds/content/Android.bp
  cmds/dpm/Android.bp
  cmds/hid/Android.bp
  cmds/hid/jni/Android.bp
  cmds/idmap2/Android.bp
  cmds/ime/Android.bp
  cmds/incident/Android.bp
  cmds/incident_helper/Android.bp
  cmds/incidentd/Android.bp
  cmds/input/Android.bp
  cmds/interrupter/Android.bp
  cmds/locksettings/Android.bp
  cmds/pm/Android.bp
  cmds/requestsync/Android.bp
  cmds/screencap/Android.bp
  cmds/sm/Android.bp
  cmds/svc/Android.bp
  cmds/telecom/Android.bp
  cmds/uiautomator/Android.bp
  cmds/uiautomator/cmds/uiautomator/Android.bp
  cmds/uiautomator/instrumentation/Android.bp
  cmds/uiautomator/library/Android.bp
  cmds/vr/Android.bp
  cmds/wm/Android.bp
  config/Android.bp
  core/java/android/service/wallpaper/Android.bp
  core/jni/Android.bp
  core/sysprop/Android.bp
  core/tests/BroadcastRadioTests/Android.bp
  core/tests/ConnectivityManagerTest/Android.bp
  core/tests/PackageInstallerSessions/Android.bp
  core/tests/PlatformCompatFramework/Android.bp
  core/tests/bandwidthtests/Android.bp
  core/tests/benchmarks/Android.bp
  core/tests/bluetoothtests/Android.bp
  core/tests/bugreports/Android.bp
  core/tests/coretests/Android.bp
  core/tests/coretests/BinderDeathRecipientHelperApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestService/Android.bp
  core/tests/coretests/BstatsTestApp/Android.bp
  core/tests/coretests/DisabledTestApp/Android.bp
  core/tests/coretests/EnabledTestApp/Android.bp
  core/tests/coretests/aidl/Android.bp
  core/tests/coretests/apks/Android.bp
  core/tests/coretests/apks/install/Android.bp
  core/tests/coretests/apks/install_bad_dex/Android.bp
  core/tests/coretests/apks/install_complete_package_info/Android.bp
  core/tests/coretests/apks/install_decl_perm/Android.bp
  core/tests/coretests/apks/install_jni_lib/Android.bp
  core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.bp
  core/tests/coretests/apks/install_loc_auto/Android.bp
  core/tests/coretests/apks/install_loc_internal/Android.bp
  core/tests/coretests/apks/install_loc_sdcard/Android.bp
  core/tests/coretests/apks/install_loc_unspecified/Android.bp
  core/tests/coretests/apks/install_use_perm_good/Android.bp
  core/tests/coretests/apks/install_uses_feature/Android.bp
  core/tests/coretests/apks/install_verifier_bad/Android.bp
  core/tests/coretests/apks/install_verifier_good/Android.bp
  core/tests/coretests/apks/keyset/Android.bp
  core/tests/coretests/apks/locales/Android.bp
  core/tests/coretests/apks/overlay_config/Android.bp
  core/tests/coretests/apks/version/Android.bp
  core/tests/coretests/apks/version_nosys/Android.bp
  core/tests/featureflagtests/Android.bp
  core/tests/hdmitests/Android.bp
  core/tests/hosttests/test-apps/AutoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocPermsFLTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPerms/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.bp
  core/tests/hosttests/test-apps/InternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests/Android.bp
  core/tests/hosttests/test-apps/NoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/java_only/Android.bp
  core/tests/hosttests/test-apps/SimpleTestApp/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v2_int/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v2_none/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Auto/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_External/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Internal/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_None/Android.bp
  core/tests/mockingcoretests/Android.bp
  core/tests/notificationtests/Android.bp
  core/tests/overlaytests/device/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayOne/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayTwo/Android.bp
  core/tests/overlaytests/device/test-apps/FrameworkOverlay/Android.bp
  core/tests/overlaytests/host/Android.bp
  core/tests/overlaytests/remount/Android.bp
  core/tests/overlaytests/remount/test-apps/Overlay/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibrary/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibraryOverlay/Android.bp
  core/tests/overlaytests/remount/test-apps/Target/Android.bp
  core/tests/packagemanagertests/Android.bp
  core/tests/privacytests/Android.bp
  core/tests/screenshothelpertests/Android.bp
  core/tests/systemproperties/Android.bp
  core/tests/utillib/Android.bp
  core/tests/utiltests/Android.bp
  core/tests/utiltests/jni/Android.bp
  core/tests/uwbtests/Android.bp
  core/xsd/Android.bp
  core/xsd/vts/Android.bp
  data/etc/Android.bp
  data/etc/car/Android.bp
  data/fonts/Android.bp
  data/keyboards/Android.mk
  drm/jni/Android.bp
  errorprone/Android.bp
  graphics/proto/Android.bp
  keystore/Android.bp
  keystore/tests/Android.bp
  libs/WindowManager/Jetpack/Android.bp
  libs/WindowManager/Shell/Android.bp
  libs/WindowManager/Shell/tests/Android.bp
  libs/androidfw/Android.bp
  libs/androidfw/fuzz/resourcefile_fuzzer/Android.bp
  libs/hostgraphics/Android.bp
  libs/incident/Android.bp
  libs/input/Android.bp
  libs/input/tests/Android.bp
  libs/protoutil/Android.bp
  libs/services/Android.bp
  libs/storage/Android.bp
  libs/usb/tests/AccessoryChat/Android.bp
  libs/usb/tests/AccessoryChat/accessorychat/Android.bp
  location/lib/Android.bp
  location/tests/Android.bp
  location/tests/locationtests/Android.bp
  lowpan/tests/Android.bp
  media/Android.bp
  media/java/Android.bp
  media/java/android/media/tv/tunerresourcemanager/Android.bp
  media/jni/Android.bp
  media/jni/audioeffect/Android.bp
  media/jni/soundpool/Android.bp
  media/jni/soundpool/tests/Android.bp
  media/lib/remotedisplay/Android.bp
  media/lib/signer/Android.bp
  media/lib/tvremote/Android.bp
  media/lib/tvremote/tests/Android.bp
  media/mca/filterfw/Android.bp
  media/mca/filterfw/native/Android.bp
  media/mca/filterpacks/Android.bp
  media/mca/samples/CameraEffectsRecordingSample/Android.bp
  media/mca/tests/Android.bp
  media/native/midi/Android.bp
  media/packages/BluetoothMidiService/Android.bp
  media/packages/BluetoothMidiService/tests/unit/Android.bp
  media/tests/AudioPolicyTest/Android.bp
  media/tests/CameraBrowser/Android.bp
  media/tests/EffectsTest/Android.bp
  media/tests/MediaDump/Android.bp
  media/tests/MediaFrameworkTest/Android.bp
  media/tests/MediaRouter/Android.bp
  media/tests/MtpTests/Android.bp
  media/tests/ScoAudioTest/Android.bp
  media/tests/SoundPoolTest/Android.bp
  media/tests/TunerTest/Android.bp
  media/tests/audiotests/Android.bp
  media/tests/players/Android.bp
  mime/Android.bp
  native/android/Android.bp
  native/graphics/jni/Android.bp
  native/webview/loader/Android.bp
  nfc-extras/Android.bp
  nfc-extras/tests/Android.bp
  packages/AppPredictionLib/Android.bp
  packages/BackupEncryption/Android.bp
  packages/BackupEncryption/test/robolectric-integration/Android.bp
  packages/BackupEncryption/test/robolectric/Android.bp
  packages/BackupEncryption/test/unittest/Android.bp
  packages/BackupRestoreConfirmation/Android.bp
  packages/CarSystemUI/Android.bp
  packages/CarrierDefaultApp/Android.bp
  packages/CarrierDefaultApp/tests/unit/Android.bp
  packages/CompanionDeviceManager/Android.bp
  packages/Connectivity/framework/Android.bp
  packages/Connectivity/service/Android.bp
  packages/CtsShim/Android.bp
  packages/CtsShim/build/Android.bp
  packages/CtsShim/build/jni/Android.bp
  packages/DynamicSystemInstallationService/Android.bp
  packages/DynamicSystemInstallationService/tests/Android.bp
  packages/EasterEgg/Android.bp
  packages/EncryptedLocalTransport/Android.bp
  packages/ExtShared/Android.bp
  packages/ExternalStorageProvider/Android.bp
  packages/ExternalStorageProvider/tests/Android.bp
  packages/FakeOemFeatures/Android.bp
  packages/FusedLocation/Android.bp
  packages/InputDevices/Android.bp
  packages/LocalTransport/Android.bp
  packages/PackageInstaller/Android.bp
  packages/PrintRecommendationService/Android.bp
  packages/PrintSpooler/Android.bp
  packages/PrintSpooler/jni/Android.bp
  packages/PrintSpooler/tests/outofprocess/Android.bp
  packages/SettingsLib/ActionBarShadow/Android.bp
  packages/SettingsLib/ActionButtonsPreference/Android.bp
  packages/SettingsLib/AdaptiveIcon/Android.bp
  packages/SettingsLib/Android.bp
  packages/SettingsLib/AppPreference/Android.bp
  packages/SettingsLib/BarChartPreference/Android.bp
  packages/SettingsLib/DisplayDensityUtils/Android.bp
  packages/SettingsLib/EntityHeaderWidgets/Android.bp
  packages/SettingsLib/HelpUtils/Android.bp
  packages/SettingsLib/LayoutPreference/Android.bp
  packages/SettingsLib/ProgressBar/Android.bp
  packages/SettingsLib/RadioButtonPreference/Android.bp
  packages/SettingsLib/RestrictedLockUtils/Android.bp
  packages/SettingsLib/SchedulesProvider/Android.bp
  packages/SettingsLib/SearchProvider/Android.bp
  packages/SettingsLib/SearchWidget/Android.bp
  packages/SettingsLib/SettingsSpinner/Android.bp
  packages/SettingsLib/SettingsTheme/Android.bp
  packages/SettingsLib/Tile/Android.bp
  packages/SettingsLib/Utils/Android.bp
  packages/SettingsLib/search/Android.bp
  packages/SettingsLib/tests/integ/Android.bp
  packages/SettingsLib/tests/robotests/Android.bp
  packages/SettingsProvider/Android.bp
  packages/SharedStorageBackup/Android.bp
  packages/Shell/Android.bp
  packages/Shell/tests/Android.bp
  packages/SimAppDialog/Android.bp
  packages/SoundPicker/Android.bp
  packages/StatementService/Android.bp
  packages/SystemUI/Android.bp
  packages/SystemUI/plugin/Android.bp
  packages/SystemUI/plugin/ExamplePlugin/Android.bp
  packages/SystemUI/plugin_core/Android.bp
  packages/SystemUI/shared/Android.bp
  packages/VpnDialogs/Android.bp
  packages/WAPPushManager/Android.bp
  packages/WAPPushManager/tests/Android.bp
  packages/WallpaperBackup/Android.bp
  packages/WallpaperCropper/Android.bp
  packages/overlays/Android.mk
  packages/overlays/tests/Android.bp
  packages/services/PacProcessor/Android.bp
  packages/services/PacProcessor/jni/Android.bp
  packages/services/Proxy/Android.bp
  proto/Android.bp
  rs/jni/Android.mk
  samples/demo/haptic-assessment/Android.bp
  sax/tests/saxtests/Android.bp
  services/Android.bp
  services/accessibility/Android.bp
  services/appprediction/Android.bp
  services/appwidget/Android.bp
  services/autofill/Android.bp
  services/backup/Android.bp
  services/backup/backuplib/Android.bp
  services/companion/Android.bp
  services/contentcapture/Android.bp
  services/contentsuggestions/Android.bp
  services/core/Android.bp
  services/core/java/com/android/server/vcn/Android.bp
  services/core/jni/Android.bp
  services/core/xsd/Android.bp
  services/core/xsd/vts/Android.bp
  services/coverage/Android.bp
  services/devicepolicy/Android.bp
  services/incremental/Android.bp
  services/midi/Android.bp
  services/net/Android.bp
  services/people/Android.bp
  services/print/Android.bp
  services/profcollect/Android.bp
  services/restrictions/Android.bp
  services/robotests/Android.bp
  services/robotests/backup/Android.bp
  services/systemcaptions/Android.bp
  services/tests/PackageManagerComponentOverrideTests/Android.bp
  services/tests/PackageManagerServiceTests/host/Android.bp
  services/tests/PackageManagerServiceTests/host/test-apps/Android.bp
  services/tests/mockingservicestests/Android.bp
  services/tests/rescueparty/Android.bp
  services/tests/servicestests/Android.bp
  services/tests/servicestests/aidl/Android.bp
  services/tests/servicestests/apks/Android.bp
  services/tests/servicestests/apks/install-split-base/Android.bp
  services/tests/servicestests/apks/install-split-feature-a/Android.bp
  services/tests/servicestests/apks/install_intent_filters/Android.bp
  services/tests/servicestests/apks/install_uses_sdk/Android.bp
  services/tests/servicestests/test-apps/ConnTestApp/Android.bp
  services/tests/servicestests/test-apps/JobTestApp/Android.bp
  services/tests/servicestests/test-apps/PackageParserApp/Android.bp
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  services/tests/servicestests/test-apps/SimpleServiceTestApp/Android.bp
  services/tests/servicestests/test-apps/SuspendTestApp/Android.bp
  services/tests/shortcutmanagerutils/Android.bp
  services/tests/uiservicestests/Android.bp
  services/tests/wmtests/Android.bp
  services/usage/Android.bp
  services/usb/Android.bp
  services/voiceinteraction/Android.bp
  services/wifi/Android.bp
  startop/apps/test/Android.bp
  startop/iorap/Android.bp
  startop/iorap/functional_tests/Android.bp
  startop/iorap/stress/Android.bp
  startop/iorap/tests/Android.bp
  startop/view_compiler/Android.bp
  startop/view_compiler/dex_builder_test/Android.bp
  test-base/hiddenapi/Android.bp
  test-mock/Android.bp
  test-runner/tests/Android.bp
  tests/AccessibilityEventsLogger/Android.bp
  tests/AccessoryDisplay/common/Android.bp
  tests/AccessoryDisplay/sink/Android.bp
  tests/AccessoryDisplay/source/Android.bp
  tests/ActivityManagerPerfTests/stub-app/Android.bp
  tests/ActivityManagerPerfTests/test-app/Android.bp
  tests/ActivityManagerPerfTests/tests/Android.bp
  tests/ActivityManagerPerfTests/utils/Android.bp
  tests/ActivityTests/Android.bp
  tests/ActivityViewTest/Android.bp
  tests/AmSlam/Android.bp
  tests/ApkVerityTest/Android.bp
  tests/ApkVerityTest/ApkVerityTestApp/Android.bp
  tests/ApkVerityTest/block_device_writer/Android.bp
  tests/AppLaunch/Android.bp
  tests/AppLaunchWear/Android.bp
  tests/AppResourcesLoaders/Android.bp
  tests/AppResourcesLoaders/Overlay/Android.bp
  tests/Assist/Android.bp
  tests/AutoVerify/app1/Android.bp
  tests/AutoVerify/app2/Android.bp
  tests/AutoVerify/app3/Android.bp
  tests/AutoVerify/app4/Android.bp
  tests/BackgroundDexOptServiceIntegrationTests/Android.bp
  tests/BandwidthTests/Android.bp
  tests/BatteryWaster/Android.bp
  tests/BiDiTests/Android.bp
  tests/BlobStoreTestUtils/Android.bp
  tests/BootImageProfileTest/Android.bp
  tests/BrowserPowerTest/Android.bp
  tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp
  tests/CameraPrewarmTest/Android.bp
  tests/Codegen/Android.bp
  tests/Compatibility/Android.bp
  tests/CoreTests/android/Android.bp
  tests/DataIdleTest/Android.bp
  tests/DozeTest/Android.bp
  tests/DpiTest/Android.bp
  tests/DynamicCodeLoggerIntegrationTests/Android.mk
  tests/FeatureSplit/base/Android.bp
  tests/FeatureSplit/feature1/Android.bp
  tests/FeatureSplit/feature2/Android.bp
  tests/FixVibrateSetting/Android.bp
  tests/FlickerTests/Android.bp
  tests/FlickerTests/test-apps/Android.bp
  tests/FlickerTests/test-apps/flickerapp/Android.bp
  tests/FrameworkPerf/Android.bp
  tests/GamePerformance/Android.bp
  tests/GridLayoutTest/Android.bp
  tests/HierarchyViewerTest/Android.bp
  tests/HugeBackup/Android.bp
  tests/HwAccelerationTest/Android.bp
  tests/Internal/Android.bp
  tests/JankBench/Android.bp
  tests/JobSchedulerPerfTests/Android.bp
  tests/JobSchedulerTestApp/Android.bp
  tests/LargeAssetTest/Android.bp
  tests/LegacyAssistant/Android.bp
  tests/LocalizationTest/Android.bp
  tests/LocationTracker/Android.bp
  tests/LotsOfApps/Android.bp
  tests/LowStorageTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/app/DummyDPC/Android.bp
  tests/MemoryUsage/Android.bp
  tests/MirrorSurfaceTest/Android.bp
  tests/NativeProcessesMemoryTest/Android.bp
  tests/NetworkSecurityConfigTest/Android.bp
  tests/NullHomeTest/Android.bp
  tests/OdmApps/Android.bp
  tests/OdmApps/app/Android.bp
  tests/OdmApps/priv-app/Android.bp
  tests/OneMedia/Android.bp
  tests/PackageWatchdog/Android.bp
  tests/PlatformCompatGating/Android.bp
  tests/PlatformCompatGating/test-rules/Android.bp
  tests/ProtoInputStreamTests/Android.bp
  tests/RemoteDisplayProvider/Android.bp
  tests/RenderThreadTest/Android.bp
  tests/RollbackTest/Android.bp
  tests/SerialChat/Android.bp
  tests/ServiceCrashTest/Android.bp
  tests/SharedLibrary/client/Android.bp
  tests/SharedLibrary/lib/Android.bp
  tests/ShowWhenLockedApp/Android.bp
  tests/SmokeTest/Android.bp
  tests/SmokeTest/tests/Android.bp
  tests/SmokeTestApps/Android.bp
  tests/SoundTriggerTestApp/Android.bp
  tests/Split/Android.bp
  tests/StagedInstallTest/Android.bp
  tests/StatusBar/Android.bp
  tests/SurfaceComposition/Android.bp
  tests/SurfaceControlViewHostTest/Android.bp
  tests/SystemMemoryTest/device/Android.bp
  tests/SystemMemoryTest/host/Android.bp
  tests/SystemUIDemoModeController/Android.bp
  tests/TaskOrganizerTest/Android.bp
  tests/TelephonyCommonTests/Android.bp
  tests/TouchLatency/Android.bp
  tests/TransformTest/Android.bp
  tests/TtsTests/Android.bp
  tests/UiBench/Android.bp
  tests/UsageReportingTest/Android.bp
  tests/UsageStatsPerfTests/Android.bp
  tests/UsageStatsTest/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp
  tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp
  tests/UsbManagerTests/Android.bp
  tests/UsbManagerTests/lib/Android.bp
  tests/UsbTests/Android.bp
  tests/UsesFeature2Test/Android.bp
  tests/VectorDrawableTest/Android.bp
  tests/VoiceEnrollment/Android.bp
  tests/VoiceInteraction/Android.bp
  tests/WallpaperTest/Android.bp
  tests/WindowAnimationJank/Android.bp
  tests/WindowInsetsTests/Android.bp
  tests/appwidgets/AppWidgetHostTest/Android.bp
  tests/appwidgets/AppWidgetProviderTest/Android.bp
  tests/backup/Android.mk
  tests/benchmarks/Android.bp
  tests/libs-permissions/Android.bp
  tests/net/Android.bp
  tests/net/common/Android.bp
  tests/net/deflake/Android.bp
  tests/net/integration/Android.bp
  tests/net/jni/Android.bp
  tests/net/smoketest/Android.bp
  tests/notification/Android.bp
  tests/permission/Android.bp
  tests/privapp-permissions/Android.bp
  tests/testables/Android.bp
  tests/testables/tests/Android.bp
  tests/utils/StubIME/Android.bp
  tests/utils/hostutils/Android.bp
  tests/utils/testutils/Android.bp
  tests/vcn/Android.bp
  tools/aapt/Android.bp
  tools/aapt2/Android.bp
  tools/aapt2/integration-tests/AutoVersionTest/Android.bp
  tools/aapt2/integration-tests/BasicTest/Android.bp
  tools/aapt2/integration-tests/MergeOnlyTest/LeafLib/Android.mk
  tools/aapt2/integration-tests/MergeOnlyTest/LocalLib/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk
  tools/aapt2/integration-tests/StaticLibTest/App/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp
  tools/aapt2/integration-tests/SymlinkTest/Android.bp
  tools/bit/Android.bp
  tools/codegen/Android.bp
  tools/dump-coverage/Android.bp
  tools/incident_report/Android.bp
  tools/incident_section_gen/Android.bp
  tools/lock_agent/Android.bp
  tools/locked_region_code_injection/Android.bp
  tools/obbtool/Android.bp
  tools/powermodel/Android.bp
  tools/preload-check/Android.bp
  tools/preload-check/device/Android.bp
  tools/preload/loadclass/Android.bp
  tools/processors/staledataclass/Android.bp
  tools/processors/view_inspector/Android.bp
  tools/protologtool/Android.bp
  tools/sdkparcelables/Android.bp
  tools/split-select/Android.bp
  tools/streaming_proto/Android.bp
  tools/validatekeymaps/Android.bp
  wifi/java/Android.bp
  wifi/tests/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  libs/hwui/Android.bp
  native/webview/plat_support/Android.bp
  obex/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-CPL-1.0
    SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    SPDX-license-identifier-W3C legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    legacy_unencumbered
to:
  core/java/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
  test-base/Android.bp
  test-runner/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL
to:
  core/res/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0
to:
  libs/usb/Android.bp
  libs/usb/tests/accessorytest/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  tools/preload/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS
to:
  api/Android.bp
  boot/Android.bp
  cmds/device_config/Android.bp
  cmds/settings/Android.bp
  core/api/Android.bp
  core/tests/coretests/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/overlaid_apex/Android.bp
  core/tests/overlaytests/remount/test-apps/overlay_apex/Android.bp
  libs/tracingproxy/Android.bp
  services/startop/Android.bp
  test-legacy/Android.mk
  tests/ApkVerityTest/testdata/Android.bp
  tests/TransitionTests/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Ib9737d8fb5ef5b90a2c14fe71f1a571079edcf02
Merged-In: Ib9737d8fb5ef5b90a2c14fe71f1a571079edcf02
2021-02-21 20:12:24 +00:00
Bob Badour
051ef786ac [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  apct-tests/perftests/autofill/Android.bp
  apct-tests/perftests/blobstore/Android.bp
  apct-tests/perftests/core/Android.bp
  apct-tests/perftests/core/apps/overlay/Android.bp
  apct-tests/perftests/core/apps/reources_manager/Android.bp
  apct-tests/perftests/core/jni/Android.bp
  apct-tests/perftests/multiuser/Android.bp
  apct-tests/perftests/multiuser/apps/dummyapp/Android.bp
  apct-tests/perftests/packagemanager/Android.bp
  apct-tests/perftests/packagemanager/apps/query-all/Android.bp
  apct-tests/perftests/textclassifier/Android.bp
  apct-tests/perftests/utils/Android.bp
  apct-tests/perftests/windowmanager/Android.bp
  apex/Android.bp
  apex/blobstore/framework/Android.bp
  apex/blobstore/service/Android.bp
  apex/jobscheduler/framework/Android.bp
  apex/jobscheduler/service/Android.bp
  apex/media/Android.bp
  apex/media/aidl/Android.bp
  apex/media/framework/Android.bp
  cmds/am/Android.bp
  cmds/app_process/Android.bp
  cmds/appops/Android.bp
  cmds/appwidget/Android.bp
  cmds/backup/Android.bp
  cmds/bmgr/Android.bp
  cmds/bootanimation/Android.bp
  cmds/bu/Android.bp
  cmds/content/Android.bp
  cmds/dpm/Android.bp
  cmds/hid/Android.bp
  cmds/hid/jni/Android.bp
  cmds/idmap2/Android.bp
  cmds/ime/Android.bp
  cmds/incident/Android.bp
  cmds/incident_helper/Android.bp
  cmds/incidentd/Android.bp
  cmds/input/Android.bp
  cmds/interrupter/Android.bp
  cmds/locksettings/Android.bp
  cmds/pm/Android.bp
  cmds/requestsync/Android.bp
  cmds/screencap/Android.bp
  cmds/sm/Android.bp
  cmds/svc/Android.bp
  cmds/telecom/Android.bp
  cmds/uiautomator/Android.bp
  cmds/uiautomator/cmds/uiautomator/Android.bp
  cmds/uiautomator/instrumentation/Android.bp
  cmds/uiautomator/library/Android.bp
  cmds/vr/Android.bp
  cmds/wm/Android.bp
  config/Android.bp
  core/java/android/service/wallpaper/Android.bp
  core/jni/Android.bp
  core/sysprop/Android.bp
  core/tests/BroadcastRadioTests/Android.bp
  core/tests/ConnectivityManagerTest/Android.bp
  core/tests/PackageInstallerSessions/Android.bp
  core/tests/PlatformCompatFramework/Android.bp
  core/tests/bandwidthtests/Android.bp
  core/tests/benchmarks/Android.bp
  core/tests/bluetoothtests/Android.bp
  core/tests/bugreports/Android.bp
  core/tests/coretests/Android.bp
  core/tests/coretests/BinderDeathRecipientHelperApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestService/Android.bp
  core/tests/coretests/BstatsTestApp/Android.bp
  core/tests/coretests/DisabledTestApp/Android.bp
  core/tests/coretests/EnabledTestApp/Android.bp
  core/tests/coretests/aidl/Android.bp
  core/tests/coretests/apks/Android.bp
  core/tests/coretests/apks/install/Android.bp
  core/tests/coretests/apks/install_bad_dex/Android.bp
  core/tests/coretests/apks/install_complete_package_info/Android.bp
  core/tests/coretests/apks/install_decl_perm/Android.bp
  core/tests/coretests/apks/install_jni_lib/Android.bp
  core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.bp
  core/tests/coretests/apks/install_loc_auto/Android.bp
  core/tests/coretests/apks/install_loc_internal/Android.bp
  core/tests/coretests/apks/install_loc_sdcard/Android.bp
  core/tests/coretests/apks/install_loc_unspecified/Android.bp
  core/tests/coretests/apks/install_use_perm_good/Android.bp
  core/tests/coretests/apks/install_uses_feature/Android.bp
  core/tests/coretests/apks/install_verifier_bad/Android.bp
  core/tests/coretests/apks/install_verifier_good/Android.bp
  core/tests/coretests/apks/keyset/Android.bp
  core/tests/coretests/apks/locales/Android.bp
  core/tests/coretests/apks/overlay_config/Android.bp
  core/tests/coretests/apks/version/Android.bp
  core/tests/coretests/apks/version_nosys/Android.bp
  core/tests/featureflagtests/Android.bp
  core/tests/hdmitests/Android.bp
  core/tests/hosttests/test-apps/AutoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocPermsFLTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPerms/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.bp
  core/tests/hosttests/test-apps/InternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests/Android.bp
  core/tests/hosttests/test-apps/NoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/java_only/Android.bp
  core/tests/hosttests/test-apps/SimpleTestApp/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v2_int/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v2_none/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Auto/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_External/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Internal/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_None/Android.bp
  core/tests/mockingcoretests/Android.bp
  core/tests/notificationtests/Android.bp
  core/tests/overlaytests/device/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayOne/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayTwo/Android.bp
  core/tests/overlaytests/device/test-apps/FrameworkOverlay/Android.bp
  core/tests/overlaytests/host/Android.bp
  core/tests/overlaytests/remount/Android.bp
  core/tests/overlaytests/remount/test-apps/Overlay/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibrary/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibraryOverlay/Android.bp
  core/tests/overlaytests/remount/test-apps/Target/Android.bp
  core/tests/packagemanagertests/Android.bp
  core/tests/privacytests/Android.bp
  core/tests/screenshothelpertests/Android.bp
  core/tests/systemproperties/Android.bp
  core/tests/utillib/Android.bp
  core/tests/utiltests/Android.bp
  core/tests/utiltests/jni/Android.bp
  core/tests/uwbtests/Android.bp
  core/xsd/Android.bp
  core/xsd/vts/Android.bp
  data/etc/Android.bp
  data/etc/car/Android.bp
  data/fonts/Android.bp
  data/keyboards/Android.mk
  drm/jni/Android.bp
  errorprone/Android.bp
  graphics/proto/Android.bp
  keystore/Android.bp
  keystore/tests/Android.bp
  libs/WindowManager/Jetpack/Android.bp
  libs/WindowManager/Shell/Android.bp
  libs/WindowManager/Shell/tests/Android.bp
  libs/androidfw/Android.bp
  libs/androidfw/fuzz/resourcefile_fuzzer/Android.bp
  libs/hostgraphics/Android.bp
  libs/incident/Android.bp
  libs/input/Android.bp
  libs/input/tests/Android.bp
  libs/protoutil/Android.bp
  libs/services/Android.bp
  libs/storage/Android.bp
  libs/usb/tests/AccessoryChat/Android.bp
  libs/usb/tests/AccessoryChat/accessorychat/Android.bp
  location/lib/Android.bp
  location/tests/Android.bp
  location/tests/locationtests/Android.bp
  lowpan/tests/Android.bp
  media/Android.bp
  media/java/Android.bp
  media/java/android/media/tv/tunerresourcemanager/Android.bp
  media/jni/Android.bp
  media/jni/audioeffect/Android.bp
  media/jni/soundpool/Android.bp
  media/jni/soundpool/tests/Android.bp
  media/lib/remotedisplay/Android.bp
  media/lib/signer/Android.bp
  media/lib/tvremote/Android.bp
  media/lib/tvremote/tests/Android.bp
  media/mca/filterfw/Android.bp
  media/mca/filterfw/native/Android.bp
  media/mca/filterpacks/Android.bp
  media/mca/samples/CameraEffectsRecordingSample/Android.bp
  media/mca/tests/Android.bp
  media/native/midi/Android.bp
  media/packages/BluetoothMidiService/Android.bp
  media/packages/BluetoothMidiService/tests/unit/Android.bp
  media/tests/AudioPolicyTest/Android.bp
  media/tests/CameraBrowser/Android.bp
  media/tests/EffectsTest/Android.bp
  media/tests/MediaDump/Android.bp
  media/tests/MediaFrameworkTest/Android.bp
  media/tests/MediaRouter/Android.bp
  media/tests/MtpTests/Android.bp
  media/tests/ScoAudioTest/Android.bp
  media/tests/SoundPoolTest/Android.bp
  media/tests/TunerTest/Android.bp
  media/tests/audiotests/Android.bp
  media/tests/players/Android.bp
  mime/Android.bp
  native/android/Android.bp
  native/graphics/jni/Android.bp
  native/webview/loader/Android.bp
  nfc-extras/Android.bp
  nfc-extras/tests/Android.bp
  packages/AppPredictionLib/Android.bp
  packages/BackupEncryption/Android.bp
  packages/BackupEncryption/test/robolectric-integration/Android.bp
  packages/BackupEncryption/test/robolectric/Android.bp
  packages/BackupEncryption/test/unittest/Android.bp
  packages/BackupRestoreConfirmation/Android.bp
  packages/CarSystemUI/Android.bp
  packages/CarrierDefaultApp/Android.bp
  packages/CarrierDefaultApp/tests/unit/Android.bp
  packages/CompanionDeviceManager/Android.bp
  packages/Connectivity/framework/Android.bp
  packages/Connectivity/service/Android.bp
  packages/CtsShim/Android.bp
  packages/CtsShim/build/Android.bp
  packages/CtsShim/build/jni/Android.bp
  packages/DynamicSystemInstallationService/Android.bp
  packages/DynamicSystemInstallationService/tests/Android.bp
  packages/EasterEgg/Android.bp
  packages/EncryptedLocalTransport/Android.bp
  packages/ExtShared/Android.bp
  packages/ExternalStorageProvider/Android.bp
  packages/ExternalStorageProvider/tests/Android.bp
  packages/FakeOemFeatures/Android.bp
  packages/FusedLocation/Android.bp
  packages/InputDevices/Android.bp
  packages/LocalTransport/Android.bp
  packages/PackageInstaller/Android.bp
  packages/PrintRecommendationService/Android.bp
  packages/PrintSpooler/Android.bp
  packages/PrintSpooler/jni/Android.bp
  packages/PrintSpooler/tests/outofprocess/Android.bp
  packages/SettingsLib/ActionBarShadow/Android.bp
  packages/SettingsLib/ActionButtonsPreference/Android.bp
  packages/SettingsLib/AdaptiveIcon/Android.bp
  packages/SettingsLib/Android.bp
  packages/SettingsLib/AppPreference/Android.bp
  packages/SettingsLib/BarChartPreference/Android.bp
  packages/SettingsLib/DisplayDensityUtils/Android.bp
  packages/SettingsLib/EntityHeaderWidgets/Android.bp
  packages/SettingsLib/HelpUtils/Android.bp
  packages/SettingsLib/LayoutPreference/Android.bp
  packages/SettingsLib/ProgressBar/Android.bp
  packages/SettingsLib/RadioButtonPreference/Android.bp
  packages/SettingsLib/RestrictedLockUtils/Android.bp
  packages/SettingsLib/SchedulesProvider/Android.bp
  packages/SettingsLib/SearchProvider/Android.bp
  packages/SettingsLib/SearchWidget/Android.bp
  packages/SettingsLib/SettingsSpinner/Android.bp
  packages/SettingsLib/SettingsTheme/Android.bp
  packages/SettingsLib/Tile/Android.bp
  packages/SettingsLib/Utils/Android.bp
  packages/SettingsLib/search/Android.bp
  packages/SettingsLib/tests/integ/Android.bp
  packages/SettingsLib/tests/robotests/Android.bp
  packages/SettingsProvider/Android.bp
  packages/SharedStorageBackup/Android.bp
  packages/Shell/Android.bp
  packages/Shell/tests/Android.bp
  packages/SimAppDialog/Android.bp
  packages/SoundPicker/Android.bp
  packages/StatementService/Android.bp
  packages/SystemUI/Android.bp
  packages/SystemUI/plugin/Android.bp
  packages/SystemUI/plugin/ExamplePlugin/Android.bp
  packages/SystemUI/plugin_core/Android.bp
  packages/SystemUI/shared/Android.bp
  packages/VpnDialogs/Android.bp
  packages/WAPPushManager/Android.bp
  packages/WAPPushManager/tests/Android.bp
  packages/WallpaperBackup/Android.bp
  packages/WallpaperCropper/Android.bp
  packages/overlays/Android.mk
  packages/overlays/tests/Android.bp
  packages/services/PacProcessor/Android.bp
  packages/services/PacProcessor/jni/Android.bp
  packages/services/Proxy/Android.bp
  proto/Android.bp
  rs/jni/Android.mk
  samples/demo/haptic-assessment/Android.bp
  sax/tests/saxtests/Android.bp
  services/Android.bp
  services/accessibility/Android.bp
  services/appprediction/Android.bp
  services/appwidget/Android.bp
  services/autofill/Android.bp
  services/backup/Android.bp
  services/backup/backuplib/Android.bp
  services/companion/Android.bp
  services/contentcapture/Android.bp
  services/contentsuggestions/Android.bp
  services/core/Android.bp
  services/core/java/com/android/server/vcn/Android.bp
  services/core/jni/Android.bp
  services/core/xsd/Android.bp
  services/core/xsd/vts/Android.bp
  services/coverage/Android.bp
  services/devicepolicy/Android.bp
  services/incremental/Android.bp
  services/midi/Android.bp
  services/net/Android.bp
  services/people/Android.bp
  services/print/Android.bp
  services/profcollect/Android.bp
  services/restrictions/Android.bp
  services/robotests/Android.bp
  services/robotests/backup/Android.bp
  services/systemcaptions/Android.bp
  services/tests/PackageManagerComponentOverrideTests/Android.bp
  services/tests/PackageManagerServiceTests/host/Android.bp
  services/tests/PackageManagerServiceTests/host/test-apps/Android.bp
  services/tests/mockingservicestests/Android.bp
  services/tests/rescueparty/Android.bp
  services/tests/servicestests/Android.bp
  services/tests/servicestests/aidl/Android.bp
  services/tests/servicestests/apks/Android.bp
  services/tests/servicestests/apks/install-split-base/Android.bp
  services/tests/servicestests/apks/install-split-feature-a/Android.bp
  services/tests/servicestests/apks/install_intent_filters/Android.bp
  services/tests/servicestests/apks/install_uses_sdk/Android.bp
  services/tests/servicestests/test-apps/ConnTestApp/Android.bp
  services/tests/servicestests/test-apps/JobTestApp/Android.bp
  services/tests/servicestests/test-apps/PackageParserApp/Android.bp
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  services/tests/servicestests/test-apps/SimpleServiceTestApp/Android.bp
  services/tests/servicestests/test-apps/SuspendTestApp/Android.bp
  services/tests/shortcutmanagerutils/Android.bp
  services/tests/uiservicestests/Android.bp
  services/tests/wmtests/Android.bp
  services/usage/Android.bp
  services/usb/Android.bp
  services/voiceinteraction/Android.bp
  services/wifi/Android.bp
  startop/apps/test/Android.bp
  startop/iorap/Android.bp
  startop/iorap/functional_tests/Android.bp
  startop/iorap/stress/Android.bp
  startop/iorap/tests/Android.bp
  startop/view_compiler/Android.bp
  startop/view_compiler/dex_builder_test/Android.bp
  test-base/hiddenapi/Android.bp
  test-mock/Android.bp
  test-runner/tests/Android.bp
  tests/AccessibilityEventsLogger/Android.bp
  tests/AccessoryDisplay/common/Android.bp
  tests/AccessoryDisplay/sink/Android.bp
  tests/AccessoryDisplay/source/Android.bp
  tests/ActivityManagerPerfTests/stub-app/Android.bp
  tests/ActivityManagerPerfTests/test-app/Android.bp
  tests/ActivityManagerPerfTests/tests/Android.bp
  tests/ActivityManagerPerfTests/utils/Android.bp
  tests/ActivityTests/Android.bp
  tests/ActivityViewTest/Android.bp
  tests/AmSlam/Android.bp
  tests/ApkVerityTest/Android.bp
  tests/ApkVerityTest/ApkVerityTestApp/Android.bp
  tests/ApkVerityTest/block_device_writer/Android.bp
  tests/AppLaunch/Android.bp
  tests/AppLaunchWear/Android.bp
  tests/AppResourcesLoaders/Android.bp
  tests/AppResourcesLoaders/Overlay/Android.bp
  tests/Assist/Android.bp
  tests/AutoVerify/app1/Android.bp
  tests/AutoVerify/app2/Android.bp
  tests/AutoVerify/app3/Android.bp
  tests/AutoVerify/app4/Android.bp
  tests/BackgroundDexOptServiceIntegrationTests/Android.bp
  tests/BandwidthTests/Android.bp
  tests/BatteryWaster/Android.bp
  tests/BiDiTests/Android.bp
  tests/BlobStoreTestUtils/Android.bp
  tests/BootImageProfileTest/Android.bp
  tests/BrowserPowerTest/Android.bp
  tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp
  tests/CameraPrewarmTest/Android.bp
  tests/Codegen/Android.bp
  tests/Compatibility/Android.bp
  tests/CoreTests/android/Android.bp
  tests/DataIdleTest/Android.bp
  tests/DozeTest/Android.bp
  tests/DpiTest/Android.bp
  tests/DynamicCodeLoggerIntegrationTests/Android.mk
  tests/FeatureSplit/base/Android.bp
  tests/FeatureSplit/feature1/Android.bp
  tests/FeatureSplit/feature2/Android.bp
  tests/FixVibrateSetting/Android.bp
  tests/FlickerTests/Android.bp
  tests/FlickerTests/test-apps/Android.bp
  tests/FlickerTests/test-apps/flickerapp/Android.bp
  tests/FrameworkPerf/Android.bp
  tests/GamePerformance/Android.bp
  tests/GridLayoutTest/Android.bp
  tests/HierarchyViewerTest/Android.bp
  tests/HugeBackup/Android.bp
  tests/HwAccelerationTest/Android.bp
  tests/Internal/Android.bp
  tests/JankBench/Android.bp
  tests/JobSchedulerPerfTests/Android.bp
  tests/JobSchedulerTestApp/Android.bp
  tests/LargeAssetTest/Android.bp
  tests/LegacyAssistant/Android.bp
  tests/LocalizationTest/Android.bp
  tests/LocationTracker/Android.bp
  tests/LotsOfApps/Android.bp
  tests/LowStorageTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/app/DummyDPC/Android.bp
  tests/MemoryUsage/Android.bp
  tests/MirrorSurfaceTest/Android.bp
  tests/NativeProcessesMemoryTest/Android.bp
  tests/NetworkSecurityConfigTest/Android.bp
  tests/NullHomeTest/Android.bp
  tests/OdmApps/Android.bp
  tests/OdmApps/app/Android.bp
  tests/OdmApps/priv-app/Android.bp
  tests/OneMedia/Android.bp
  tests/PackageWatchdog/Android.bp
  tests/PlatformCompatGating/Android.bp
  tests/PlatformCompatGating/test-rules/Android.bp
  tests/ProtoInputStreamTests/Android.bp
  tests/RemoteDisplayProvider/Android.bp
  tests/RenderThreadTest/Android.bp
  tests/RollbackTest/Android.bp
  tests/SerialChat/Android.bp
  tests/ServiceCrashTest/Android.bp
  tests/SharedLibrary/client/Android.bp
  tests/SharedLibrary/lib/Android.bp
  tests/ShowWhenLockedApp/Android.bp
  tests/SmokeTest/Android.bp
  tests/SmokeTest/tests/Android.bp
  tests/SmokeTestApps/Android.bp
  tests/SoundTriggerTestApp/Android.bp
  tests/Split/Android.bp
  tests/StagedInstallTest/Android.bp
  tests/StatusBar/Android.bp
  tests/SurfaceComposition/Android.bp
  tests/SurfaceControlViewHostTest/Android.bp
  tests/SystemMemoryTest/device/Android.bp
  tests/SystemMemoryTest/host/Android.bp
  tests/SystemUIDemoModeController/Android.bp
  tests/TaskOrganizerTest/Android.bp
  tests/TelephonyCommonTests/Android.bp
  tests/TouchLatency/Android.bp
  tests/TransformTest/Android.bp
  tests/TtsTests/Android.bp
  tests/UiBench/Android.bp
  tests/UsageReportingTest/Android.bp
  tests/UsageStatsPerfTests/Android.bp
  tests/UsageStatsTest/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp
  tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp
  tests/UsbManagerTests/Android.bp
  tests/UsbManagerTests/lib/Android.bp
  tests/UsbTests/Android.bp
  tests/UsesFeature2Test/Android.bp
  tests/VectorDrawableTest/Android.bp
  tests/VoiceEnrollment/Android.bp
  tests/VoiceInteraction/Android.bp
  tests/WallpaperTest/Android.bp
  tests/WindowAnimationJank/Android.bp
  tests/WindowInsetsTests/Android.bp
  tests/appwidgets/AppWidgetHostTest/Android.bp
  tests/appwidgets/AppWidgetProviderTest/Android.bp
  tests/backup/Android.mk
  tests/benchmarks/Android.bp
  tests/libs-permissions/Android.bp
  tests/net/Android.bp
  tests/net/common/Android.bp
  tests/net/deflake/Android.bp
  tests/net/integration/Android.bp
  tests/net/jni/Android.bp
  tests/net/smoketest/Android.bp
  tests/notification/Android.bp
  tests/permission/Android.bp
  tests/privapp-permissions/Android.bp
  tests/testables/Android.bp
  tests/testables/tests/Android.bp
  tests/utils/StubIME/Android.bp
  tests/utils/hostutils/Android.bp
  tests/utils/testutils/Android.bp
  tests/vcn/Android.bp
  tools/aapt/Android.bp
  tools/aapt2/Android.bp
  tools/aapt2/integration-tests/AutoVersionTest/Android.bp
  tools/aapt2/integration-tests/BasicTest/Android.bp
  tools/aapt2/integration-tests/MergeOnlyTest/LeafLib/Android.mk
  tools/aapt2/integration-tests/MergeOnlyTest/LocalLib/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk
  tools/aapt2/integration-tests/StaticLibTest/App/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp
  tools/aapt2/integration-tests/SymlinkTest/Android.bp
  tools/bit/Android.bp
  tools/codegen/Android.bp
  tools/dump-coverage/Android.bp
  tools/incident_report/Android.bp
  tools/incident_section_gen/Android.bp
  tools/lock_agent/Android.bp
  tools/locked_region_code_injection/Android.bp
  tools/obbtool/Android.bp
  tools/powermodel/Android.bp
  tools/preload-check/Android.bp
  tools/preload-check/device/Android.bp
  tools/preload/loadclass/Android.bp
  tools/processors/staledataclass/Android.bp
  tools/processors/view_inspector/Android.bp
  tools/protologtool/Android.bp
  tools/sdkparcelables/Android.bp
  tools/split-select/Android.bp
  tools/streaming_proto/Android.bp
  tools/validatekeymaps/Android.bp
  wifi/java/Android.bp
  wifi/tests/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  libs/hwui/Android.bp
  native/webview/plat_support/Android.bp
  obex/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-CPL-1.0
    SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    SPDX-license-identifier-W3C legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    legacy_unencumbered
to:
  core/java/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
  test-base/Android.bp
  test-runner/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL
to:
  core/res/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0
to:
  libs/usb/Android.bp
  libs/usb/tests/accessorytest/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  tools/preload/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS
to:
  api/Android.bp
  boot/Android.bp
  cmds/device_config/Android.bp
  cmds/settings/Android.bp
  core/api/Android.bp
  core/tests/coretests/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/overlaid_apex/Android.bp
  core/tests/overlaytests/remount/test-apps/overlay_apex/Android.bp
  libs/tracingproxy/Android.bp
  services/startop/Android.bp
  test-legacy/Android.mk
  tests/ApkVerityTest/testdata/Android.bp
  tests/TransitionTests/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ic44d662936d1ff0cae7fbe915932b37aa4e4869a
Merged-in: I6e9103c3275cb2e6df5dc586588eccd7d2ab6b06
2021-02-16 04:09:57 -08:00
Ryan Mitchell
14e8ade9a9 Optimize FilterApkAssets by caching config
ResTable_config of every ResTable_type is read from device every time
AssetManager::RebuildFilterList is invoked. For large APKs (like
framework-res.apk), this causes a large number of page faults
when accessing the config from disk. The configs are also used in the
slow path of AssetManager::FindEntryInternal, which makes it even
slower. Instead cache the config on the TypeSpec of its ApkAsset.

Bug: 177247024
Test: libandroidfw_tests
Change-Id: I66d507c4eeb2399f7558f3d9dfc53c157129ada0
2021-01-13 21:14:31 -08:00
Bernie Innocenti
fbb7fe0da3 Merge "Add explicit Result::ok() checks where needed" am: c08d3ef8a8 am: ae613dd6c4 am: f454301ae6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532909

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I22f3e4f97d523bd09b898ebdf4de18114cb4c34f
2020-12-22 07:02:53 +00:00
Bernie Innocenti
58cf8e3ffa Add explicit Result::ok() checks where needed
Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests
Exempt-From-Owner-Approval: mechanical mass refactoring
Change-Id: I3117833c51cdb333cccdfd159d1582f2adef77db
2020-12-21 15:50:57 +00:00
Ryan Mitchell
80094e39f9 Revert^2 "libandroidfw hardening for IncFs"
55ef6167a2c235bd88c7216238b2001b46795b79

Change-Id: I02d4890d181655dfd0a14c188468db512559d27b
Merged-In: I02d4890d181655dfd0a14c188468db512559d27b
2020-12-08 16:58:12 +00:00
Rhed Jao
b9ccb8a49b aapt2: Add a new flag '--revision-code'
A new flag to inject revisionCode into the manifest for cts splits tests.

Bug: 174338944
Test: atest aapt2_tests
Change-Id: If5a089f37233f53af3012ca5eab17fab21eafd9c
2020-11-30 21:48:34 +08:00
Rhed Jao
61bcee0cd1 Merge "aapt2: Limit length of package name and shared user id" 2020-11-20 02:18:53 +00:00