Fix apps build

Fix two problems with Soong's aapt2 rules that occur when
TARGET_BUILD_APPS is set.  Fix escaping the values passed to
--min-sdk-version, they are sometimes P-$$(cat out/build_number.txt).
Also use the correct path to the aapt2 prebuilt.

Bug: 69917341
Test: m TARGET_PRODUCT=full TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_APPS=Camera2
Change-Id: I8660a62c4a87a74e0ac1b9d03d67103af93a0cbe
This commit is contained in:
Colin Cross
2017-12-02 16:14:26 -08:00
parent 61ae0b7eed
commit 42f3a76f00
2 changed files with 2 additions and 2 deletions

View File

@@ -254,7 +254,7 @@ func (a *AndroidApp) aapt2Flags(ctx android.ModuleContext) (flags []string, deps
sdkVersion := String(a.deviceProperties.Sdk_version)
switch sdkVersion {
case "", "current", "system_current", "test_current":
sdkVersion = ctx.Config().AppsDefaultVersionName()
sdkVersion = proptools.NinjaEscape([]string{ctx.Config().AppsDefaultVersionName()})[0]
}
linkFlags = append(linkFlags, "--min-sdk-version "+sdkVersion)