Loading Android.bp +12 −0 Original line number Diff line number Diff line Loading @@ -1295,6 +1295,18 @@ python_binary_host { ], } python_binary_host { name: "update_font_metadata", defaults: ["base_default"], main: "tools/fonts/update_font_metadata.py", srcs: [ "tools/fonts/update_font_metadata.py", ], libs: [ "fontTools", ], } filegroup { name: "framework-media-annotation-srcs", srcs: [ Loading services/core/java/com/android/server/graphics/fonts/FontManagerShellCommand.java +2 −1 Original line number Diff line number Diff line Loading @@ -169,8 +169,9 @@ public class FontManagerShellCommand extends ShellCommand { sb.append(c++); sb.append("]: lang=\""); sb.append(family.getLocaleList().toLanguageTags()); sb.append("\""); if (family.getVariant() != FontConfig.FontFamily.VARIANT_DEFAULT) { sb.append("\", variant="); sb.append(", variant="); switch (family.getVariant()) { case FontConfig.FontFamily.VARIANT_COMPACT: sb.append("Compact"); Loading tests/ApkVerityTest/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ java_test_host { name: "ApkVerityTest", srcs: ["src/**/*.java"], libs: ["tradefed", "compatibility-tradefed", "compatibility-host-util"], static_libs: ["frameworks-base-hostutils"], test_suites: ["general-tests", "vts"], target_required: [ "block_device_writer_module", Loading tests/ApkVerityTest/src/com/android/apkverity/ApkVerityTest.java +6 −20 Original line number Diff line number Diff line Loading @@ -21,10 +21,10 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeTrue; import android.platform.test.annotations.RootPermissionTest; import com.android.fsverity.AddFsVerityCertRule; import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.device.ITestDevice; import com.android.tradefed.log.LogUtil.CLog; Loading @@ -35,6 +35,7 @@ import com.android.tradefed.util.CommandStatus; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading @@ -85,40 +86,25 @@ public class ApkVerityTest extends BaseHostJUnit4Test { private static final String DAMAGING_EXECUTABLE = "/data/local/tmp/block_device_writer"; private static final String CERT_PATH = "/data/local/tmp/ApkVerityTestCert.der"; private static final String APK_VERITY_STANDARD_MODE = "2"; /** Only 4K page is supported by fs-verity currently. */ private static final int FSVERITY_PAGE_SIZE = 4096; @Rule public final AddFsVerityCertRule mAddFsVerityCertRule = new AddFsVerityCertRule(this, CERT_PATH); private ITestDevice mDevice; private String mKeyId; @Before public void setUp() throws DeviceNotAvailableException { mDevice = getDevice(); String apkVerityMode = mDevice.getProperty("ro.apk_verity.mode"); assumeTrue(mDevice.getLaunchApiLevel() >= 30 || APK_VERITY_STANDARD_MODE.equals(apkVerityMode)); mKeyId = expectRemoteCommandToSucceed( "mini-keyctl padd asymmetric fsv_test .fs-verity < " + CERT_PATH).trim(); if (!mKeyId.matches("^\\d+$")) { String keyId = mKeyId; mKeyId = null; fail("Key ID is not decimal: " + keyId); } uninstallPackage(TARGET_PACKAGE); } @After public void tearDown() throws DeviceNotAvailableException { uninstallPackage(TARGET_PACKAGE); if (mKeyId != null) { expectRemoteCommandToSucceed("mini-keyctl unlink " + mKeyId + " .fs-verity"); } } @Test Loading tests/UpdatableSystemFontTest/Android.bp 0 → 100644 +30 −0 Original line number Diff line number Diff line // Copyright (C) 2021 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. java_test_host { name: "UpdatableSystemFontTest", srcs: ["src/**/*.java"], libs: ["tradefed", "compatibility-tradefed", "compatibility-host-util"], static_libs: ["frameworks-base-hostutils"], test_suites: ["general-tests", "vts"], data: [ ":NotoColorEmojiTtf", ":UpdatableSystemFontTestCertDer", ":UpdatableSystemFontTestNotoColorEmojiTtfFsvSig", ":UpdatableSystemFontTestNotoColorEmojiV1Ttf", ":UpdatableSystemFontTestNotoColorEmojiV1TtfFsvSig", ":UpdatableSystemFontTestNotoColorEmojiV2Ttf", ":UpdatableSystemFontTestNotoColorEmojiV2TtfFsvSig", ], } Loading
Android.bp +12 −0 Original line number Diff line number Diff line Loading @@ -1295,6 +1295,18 @@ python_binary_host { ], } python_binary_host { name: "update_font_metadata", defaults: ["base_default"], main: "tools/fonts/update_font_metadata.py", srcs: [ "tools/fonts/update_font_metadata.py", ], libs: [ "fontTools", ], } filegroup { name: "framework-media-annotation-srcs", srcs: [ Loading
services/core/java/com/android/server/graphics/fonts/FontManagerShellCommand.java +2 −1 Original line number Diff line number Diff line Loading @@ -169,8 +169,9 @@ public class FontManagerShellCommand extends ShellCommand { sb.append(c++); sb.append("]: lang=\""); sb.append(family.getLocaleList().toLanguageTags()); sb.append("\""); if (family.getVariant() != FontConfig.FontFamily.VARIANT_DEFAULT) { sb.append("\", variant="); sb.append(", variant="); switch (family.getVariant()) { case FontConfig.FontFamily.VARIANT_COMPACT: sb.append("Compact"); Loading
tests/ApkVerityTest/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ java_test_host { name: "ApkVerityTest", srcs: ["src/**/*.java"], libs: ["tradefed", "compatibility-tradefed", "compatibility-host-util"], static_libs: ["frameworks-base-hostutils"], test_suites: ["general-tests", "vts"], target_required: [ "block_device_writer_module", Loading
tests/ApkVerityTest/src/com/android/apkverity/ApkVerityTest.java +6 −20 Original line number Diff line number Diff line Loading @@ -21,10 +21,10 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeTrue; import android.platform.test.annotations.RootPermissionTest; import com.android.fsverity.AddFsVerityCertRule; import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.device.ITestDevice; import com.android.tradefed.log.LogUtil.CLog; Loading @@ -35,6 +35,7 @@ import com.android.tradefed.util.CommandStatus; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; Loading Loading @@ -85,40 +86,25 @@ public class ApkVerityTest extends BaseHostJUnit4Test { private static final String DAMAGING_EXECUTABLE = "/data/local/tmp/block_device_writer"; private static final String CERT_PATH = "/data/local/tmp/ApkVerityTestCert.der"; private static final String APK_VERITY_STANDARD_MODE = "2"; /** Only 4K page is supported by fs-verity currently. */ private static final int FSVERITY_PAGE_SIZE = 4096; @Rule public final AddFsVerityCertRule mAddFsVerityCertRule = new AddFsVerityCertRule(this, CERT_PATH); private ITestDevice mDevice; private String mKeyId; @Before public void setUp() throws DeviceNotAvailableException { mDevice = getDevice(); String apkVerityMode = mDevice.getProperty("ro.apk_verity.mode"); assumeTrue(mDevice.getLaunchApiLevel() >= 30 || APK_VERITY_STANDARD_MODE.equals(apkVerityMode)); mKeyId = expectRemoteCommandToSucceed( "mini-keyctl padd asymmetric fsv_test .fs-verity < " + CERT_PATH).trim(); if (!mKeyId.matches("^\\d+$")) { String keyId = mKeyId; mKeyId = null; fail("Key ID is not decimal: " + keyId); } uninstallPackage(TARGET_PACKAGE); } @After public void tearDown() throws DeviceNotAvailableException { uninstallPackage(TARGET_PACKAGE); if (mKeyId != null) { expectRemoteCommandToSucceed("mini-keyctl unlink " + mKeyId + " .fs-verity"); } } @Test Loading
tests/UpdatableSystemFontTest/Android.bp 0 → 100644 +30 −0 Original line number Diff line number Diff line // Copyright (C) 2021 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. java_test_host { name: "UpdatableSystemFontTest", srcs: ["src/**/*.java"], libs: ["tradefed", "compatibility-tradefed", "compatibility-host-util"], static_libs: ["frameworks-base-hostutils"], test_suites: ["general-tests", "vts"], data: [ ":NotoColorEmojiTtf", ":UpdatableSystemFontTestCertDer", ":UpdatableSystemFontTestNotoColorEmojiTtfFsvSig", ":UpdatableSystemFontTestNotoColorEmojiV1Ttf", ":UpdatableSystemFontTestNotoColorEmojiV1TtfFsvSig", ":UpdatableSystemFontTestNotoColorEmojiV2Ttf", ":UpdatableSystemFontTestNotoColorEmojiV2TtfFsvSig", ], }