I'm trying to enable a check for the following structure:
```
/** @hide */
public class Class1 {
/** @hide */
@SystemApi // Invalid because the class is hidden.
public void method1() { }
}
```
The internal R.java file violates this, which this change is going to fix.
Bug: 159162473
Test: build (treehugger)
Test: atest aapt2_tests
Merged-in: I613e8611ddaf5f8e4761d351d4cd0142d59c7cc9
Change-Id: I613e8611ddaf5f8e4761d351d4cd0142d59c7cc9
Cherry picks the rest of Id9d10e16f32533da1b67ab72ac846791526e7a76.
When the --rename-resources-package flag is used, only rename the
package name within the resources.arsc. Generate the R.java under
the package name defined by the manifest unless --custom-package is
used.
Test: manual
Bug: 147434671
Merged-In: Iab30ff9d3d136fa1e5464913f8d493df22c5c1c4
Change-Id: I896b8c69793cff714a950081fd8521e4acf0cf25
When the --rename-resources-package flag is used, only rename the
package name within the resources.arsc. Generate the R.java under
the package name defined by the manifest unless --custom-package is
used.
(This is a cherry pick.)
Bug: 147434671
Test: manual
Merged-In: Id9d10e16f32533da1b67ab72ac846791526e7a76
Change-Id: Id9d10e16f32533da1b67ab72ac846791526e7a76
There is currently no way to change the package name encoded in the
resources table. This change adds a flag that controls rewriting the
package name encoded into the resources table. This flag does not
rewrite the package name in the manifest xml.
(This is a cherry pick.)
Bug: 147434671
Test: manual
Merged-In: I435ba07e29df0522c3a44cc5f2c460004a02d71c
Change-Id: I435ba07e29df0522c3a44cc5f2c460004a02d71c
Preparation for removing implicit include paths for jni.h from soong.
Also remove unnecessary jni.h includes from PathParser.{h,cpp}.
Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
We should keep classes that are in the android:name or class xml
attributes.
Test: m -j aapt2_tests
Bug: 142601969
Change-Id: Ia67365bd702bae75d38b9572d68e9930e856e0f8
"aapt2 compile" marks styleables as public instead of preserving
information from <public/> or --visibility options. This behavior can
now be disabled via --preserve-visibility-of-styleables.
Bug: 146649511
Change-Id: Ifb8ab396573d1393df737a59625e79e9cf2494a7
Tested: aapt2_tests
The results of CollectLocations() are only used if the --proguard-conditional-keep-rules option is set, but the function is always called when the --proguard option is set.
Since this function can be slow on particularly large resource sets, avoid calling it unless --proguard-conditional-keep-rules is set.
Change-Id: If259d41cdab16abad8ca62f30d8beb5ebf33575a
Bug: 144236322
Test: aapt2_tests
When the protobuf header (or data payload) size are a multiple of 4,
"entry_length" (called "aligned size" in the code) would have counted bytes that
are never actually written.
Bug: 139418052
Change-Id: Ia688a82a67f3807f7feb0be03670bf2827b1d6a1
(cherry picked from commit b99e50922bf8a5eb9f034c1d232646fda122e83c)
std::set only works correctly when the < comparator is a strict weak
ordering, while UsageLocation::operator< was actually implementing !=.
Bug: 134190468
Change-Id: Icb9407e9c8451f9fcb4eb9b2cea310e3bcaf159e
Tested: aapt2_tests, and b/134190468#comment1
(cherry picked from commit 44fa342eb91b90df7998fa2808e21af75aafaf39)
When building with SANATIZE_HOST=address and ASAN_OPTIONS="" in order to
test that leaks are removed from AIDL, was hitting leaks here.
Explicitly setting ASAN_OPTIONS here so that we can detect leaks in
other host tools.
Bug: 141312058
Test: AIDL's runtests_asan.sh
Change-Id: Ibc599ab75bbf63eab1c7747d17952390a7967e87
This reverts commit 60c71cee6ec064a0d2f4c6608fdb54bf95545d45.
Reason for revert: Rolling forward for Q-Finalization
Bug: 131429032
Bug: 129975435
Change-Id: Idd812d93b767d8a672b9ada58c8bcc2441395847
Some tests starting failing when
b435101ec8aa827375e837c4843f6444145e1f4c was merged. It seems on qt-dev
aapt2_host_unit_tests does not run while it does on master.
Bug: 131762014
Bug: 129146717
Test: aapt2_tests
Change-Id: I701b275989c908acb78190be0930785712cb5686
Prebuilt script is no longer updating libwinpthread-1.dll. Link the
windows executable statically so aapt2 will no longer require the
dependency on the dll.
Bug: 131883685
Test: manual test of aapt2.exe on windows without libwinpthread-1.dll
Change-Id: If78a8ec3030003862c18e3967e4d8333fde7928a
This reverts commit 8a3d1f96e1736c7e0493ebb71ed2904dffdebbfd.
Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th
Bug: 131429032
Bug: 129975435
Change-Id: I7a48ef6a057a97ebd9903b7e934a7d95ec97f00e
Time may be eternal, Captain, but our patience is not. It's time to put
an end to your trek through the stars.
Test: Builds, boots.
Bug: 131429032
Bug: 129975435
Change-Id: Ia2367124afb642dac0fb365e4fa096db1c648adb
Instead of printing the tag name, print the type name when the type was
unable to be recognized. The type name is initialized to the tag name
and changes when a type attribute is defined..
Bug: 37891551
Test: manual
Change-Id: I9b0e6a6f2d96a8c5af71fbca8e83c947a8e308bf
aapt(1) does not allow for attributes to be redefined with a different
format. Also, attributes declared with enums or flags are never allowed to be
redefined. This change will not allow attributes to be redefined with a
conflicting format in aapt2.
Bug: 129146717
Test: aapt2_tests
Change-Id: Idc43d6d689199ba2cdc672d009ede22eaa75a10c
AAPT does not allow for attributes declared in declare-styleables
that do not have a format to create new attribute resources. AAPT2
does and should not.
Bug: 131100106
Test: aapt2_tests
Change-Id: Id00884dc9ed939672df90f670a7915d4b6d232c1