Merge "[Ravenwood] Cleanup and update RavenwoodEnvironment" into main
diff --git a/packages/SystemUI/src/com/android/systemui/dump/DumpManager.kt b/packages/SystemUI/src/com/android/systemui/dump/DumpManager.kt
index 3492365..b2fcc43 100644
--- a/packages/SystemUI/src/com/android/systemui/dump/DumpManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/dump/DumpManager.kt
@@ -45,7 +45,7 @@
/** See [registerCriticalDumpable]. */
fun registerCriticalDumpable(module: Dumpable) {
- registerCriticalDumpable(module::class.java.canonicalName, module)
+ registerCriticalDumpable(module::class.java.name, module)
}
/**
@@ -62,7 +62,7 @@
/** See [registerNormalDumpable]. */
fun registerNormalDumpable(module: Dumpable) {
- registerNormalDumpable(module::class.java.canonicalName, module)
+ registerNormalDumpable(module::class.java.name, module)
}
/**
@@ -104,13 +104,10 @@
dumpables[name] = DumpableEntry(module, name, priority)
}
- /**
- * Same as the above override, but automatically uses the canonical class name as the dumpable
- * name.
- */
+ /** Same as the above override, but automatically uses the class name as the dumpable name. */
@Synchronized
fun registerDumpable(module: Dumpable) {
- registerDumpable(module::class.java.canonicalName, module)
+ registerDumpable(module::class.java.name, module)
}
/** Unregisters a previously-registered dumpable. */
diff --git a/packages/SystemUI/tests/src/com/android/systemui/dump/DumpManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/dump/DumpManagerTest.kt
index 6d5226f..08881a0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/dump/DumpManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/dump/DumpManagerTest.kt
@@ -22,6 +22,7 @@
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.table.TableLogBuffer
import com.google.common.truth.Truth.assertThat
+import java.io.PrintWriter
import org.junit.Assert.assertThrows
import org.junit.Before
import org.junit.Test
@@ -131,6 +132,21 @@
}
@Test
+ fun registerDumpable_supportsAnonymousDumpables() {
+ val anonDumpable =
+ object : Dumpable {
+ override fun dump(pw: PrintWriter, args: Array<out String>) {
+ pw.println("AnonDumpable")
+ }
+ }
+
+ // THEN registration with implicit names should succeed
+ dumpManager.registerCriticalDumpable(anonDumpable)
+
+ // No exception thrown
+ }
+
+ @Test
fun getDumpables_returnsSafeCollection() {
// GIVEN a variety of registered dumpables
dumpManager.registerCriticalDumpable("dumpable1", dumpable1)
diff --git a/ravenwood/Android.bp b/ravenwood/Android.bp
index 65ea9fe..b3f78ab 100644
--- a/ravenwood/Android.bp
+++ b/ravenwood/Android.bp
@@ -360,6 +360,239 @@
],
}
+filegroup {
+ name: "ravenwood-data",
+ device_common_srcs: [
+ ":system-build.prop",
+ ":framework-res",
+ ":ravenwood-empty-res",
+ ":framework-platform-compat-config",
+ ":services-platform-compat-config",
+ ],
+ device_first_srcs: [
+ ":apex_icu.dat",
+ ],
+ visibility: ["//visibility:private"],
+}
+
+// Keep in sync with build/make/target/product/generic/Android.bp
+filegroup {
+ name: "ravenwood-fonts",
+ device_common_srcs: [
+ ":AndroidClock.ttf",
+ ":CarroisGothicSC-Regular.ttf",
+ ":ComingSoon.ttf",
+ ":CutiveMono.ttf",
+ ":DancingScript-Regular.ttf",
+ ":DroidSansMono.ttf",
+ ":NotoColorEmoji.ttf",
+ ":NotoColorEmojiFlags.ttf",
+ ":NotoNaskhArabic-Bold.ttf",
+ ":NotoNaskhArabic-Regular.ttf",
+ ":NotoNaskhArabicUI-Bold.ttf",
+ ":NotoNaskhArabicUI-Regular.ttf",
+ ":NotoSansAdlam-VF.ttf",
+ ":NotoSansAhom-Regular.otf",
+ ":NotoSansAnatolianHieroglyphs-Regular.otf",
+ ":NotoSansArmenian-VF.ttf",
+ ":NotoSansAvestan-Regular.ttf",
+ ":NotoSansBalinese-Regular.ttf",
+ ":NotoSansBamum-Regular.ttf",
+ ":NotoSansBassaVah-Regular.otf",
+ ":NotoSansBatak-Regular.ttf",
+ ":NotoSansBengali-VF.ttf",
+ ":NotoSansBengaliUI-VF.ttf",
+ ":NotoSansBhaiksuki-Regular.otf",
+ ":NotoSansBrahmi-Regular.ttf",
+ ":NotoSansBuginese-Regular.ttf",
+ ":NotoSansBuhid-Regular.ttf",
+ ":NotoSansCJK-Regular.ttc",
+ ":NotoSansCanadianAboriginal-Regular.ttf",
+ ":NotoSansCarian-Regular.ttf",
+ ":NotoSansChakma-Regular.otf",
+ ":NotoSansCham-Bold.ttf",
+ ":NotoSansCham-Regular.ttf",
+ ":NotoSansCherokee-Regular.ttf",
+ ":NotoSansCoptic-Regular.ttf",
+ ":NotoSansCuneiform-Regular.ttf",
+ ":NotoSansCypriot-Regular.ttf",
+ ":NotoSansDeseret-Regular.ttf",
+ ":NotoSansDevanagari-VF.ttf",
+ ":NotoSansDevanagariUI-VF.ttf",
+ ":NotoSansEgyptianHieroglyphs-Regular.ttf",
+ ":NotoSansElbasan-Regular.otf",
+ ":NotoSansEthiopic-VF.ttf",
+ ":NotoSansGeorgian-VF.ttf",
+ ":NotoSansGlagolitic-Regular.ttf",
+ ":NotoSansGothic-Regular.ttf",
+ ":NotoSansGrantha-Regular.ttf",
+ ":NotoSansGujarati-Bold.ttf",
+ ":NotoSansGujarati-Regular.ttf",
+ ":NotoSansGujaratiUI-Bold.ttf",
+ ":NotoSansGujaratiUI-Regular.ttf",
+ ":NotoSansGunjalaGondi-Regular.otf",
+ ":NotoSansGurmukhi-VF.ttf",
+ ":NotoSansGurmukhiUI-VF.ttf",
+ ":NotoSansHanifiRohingya-Regular.otf",
+ ":NotoSansHanunoo-Regular.ttf",
+ ":NotoSansHatran-Regular.otf",
+ ":NotoSansHebrew-Bold.ttf",
+ ":NotoSansHebrew-Regular.ttf",
+ ":NotoSansImperialAramaic-Regular.ttf",
+ ":NotoSansInscriptionalPahlavi-Regular.ttf",
+ ":NotoSansInscriptionalParthian-Regular.ttf",
+ ":NotoSansJavanese-Regular.otf",
+ ":NotoSansKaithi-Regular.ttf",
+ ":NotoSansKannada-VF.ttf",
+ ":NotoSansKannadaUI-VF.ttf",
+ ":NotoSansKayahLi-Regular.ttf",
+ ":NotoSansKharoshthi-Regular.ttf",
+ ":NotoSansKhmer-VF.ttf",
+ ":NotoSansKhmerUI-Bold.ttf",
+ ":NotoSansKhmerUI-Regular.ttf",
+ ":NotoSansKhojki-Regular.otf",
+ ":NotoSansLao-Bold.ttf",
+ ":NotoSansLao-Regular.ttf",
+ ":NotoSansLaoUI-Bold.ttf",
+ ":NotoSansLaoUI-Regular.ttf",
+ ":NotoSansLepcha-Regular.ttf",
+ ":NotoSansLimbu-Regular.ttf",
+ ":NotoSansLinearA-Regular.otf",
+ ":NotoSansLinearB-Regular.ttf",
+ ":NotoSansLisu-Regular.ttf",
+ ":NotoSansLycian-Regular.ttf",
+ ":NotoSansLydian-Regular.ttf",
+ ":NotoSansMalayalam-VF.ttf",
+ ":NotoSansMalayalamUI-VF.ttf",
+ ":NotoSansMandaic-Regular.ttf",
+ ":NotoSansManichaean-Regular.otf",
+ ":NotoSansMarchen-Regular.otf",
+ ":NotoSansMasaramGondi-Regular.otf",
+ ":NotoSansMedefaidrin-VF.ttf",
+ ":NotoSansMeeteiMayek-Regular.ttf",
+ ":NotoSansMeroitic-Regular.otf",
+ ":NotoSansMiao-Regular.otf",
+ ":NotoSansModi-Regular.ttf",
+ ":NotoSansMongolian-Regular.ttf",
+ ":NotoSansMro-Regular.otf",
+ ":NotoSansMultani-Regular.otf",
+ ":NotoSansMyanmar-Bold.otf",
+ ":NotoSansMyanmar-Medium.otf",
+ ":NotoSansMyanmar-Regular.otf",
+ ":NotoSansMyanmarUI-Bold.otf",
+ ":NotoSansMyanmarUI-Medium.otf",
+ ":NotoSansMyanmarUI-Regular.otf",
+ ":NotoSansNKo-Regular.ttf",
+ ":NotoSansNabataean-Regular.otf",
+ ":NotoSansNewTaiLue-Regular.ttf",
+ ":NotoSansNewa-Regular.otf",
+ ":NotoSansOgham-Regular.ttf",
+ ":NotoSansOlChiki-Regular.ttf",
+ ":NotoSansOldItalic-Regular.ttf",
+ ":NotoSansOldNorthArabian-Regular.otf",
+ ":NotoSansOldPermic-Regular.otf",
+ ":NotoSansOldPersian-Regular.ttf",
+ ":NotoSansOldSouthArabian-Regular.ttf",
+ ":NotoSansOldTurkic-Regular.ttf",
+ ":NotoSansOriya-Bold.ttf",
+ ":NotoSansOriya-Regular.ttf",
+ ":NotoSansOriyaUI-Bold.ttf",
+ ":NotoSansOriyaUI-Regular.ttf",
+ ":NotoSansOsage-Regular.ttf",
+ ":NotoSansOsmanya-Regular.ttf",
+ ":NotoSansPahawhHmong-Regular.otf",
+ ":NotoSansPalmyrene-Regular.otf",
+ ":NotoSansPauCinHau-Regular.otf",
+ ":NotoSansPhagsPa-Regular.ttf",
+ ":NotoSansPhoenician-Regular.ttf",
+ ":NotoSansRejang-Regular.ttf",
+ ":NotoSansRunic-Regular.ttf",
+ ":NotoSansSamaritan-Regular.ttf",
+ ":NotoSansSaurashtra-Regular.ttf",
+ ":NotoSansSharada-Regular.otf",
+ ":NotoSansShavian-Regular.ttf",
+ ":NotoSansSinhala-VF.ttf",
+ ":NotoSansSinhalaUI-VF.ttf",
+ ":NotoSansSoraSompeng-Regular.otf",
+ ":NotoSansSoyombo-VF.ttf",
+ ":NotoSansSundanese-Regular.ttf",
+ ":NotoSansSylotiNagri-Regular.ttf",
+ ":NotoSansSymbols-Regular-Subsetted.ttf",
+ ":NotoSansSymbols-Regular-Subsetted2.ttf",
+ ":NotoSansSyriacEastern-Regular.ttf",
+ ":NotoSansSyriacEstrangela-Regular.ttf",
+ ":NotoSansSyriacWestern-Regular.ttf",
+ ":NotoSansTagalog-Regular.ttf",
+ ":NotoSansTagbanwa-Regular.ttf",
+ ":NotoSansTaiLe-Regular.ttf",
+ ":NotoSansTaiTham-Regular.ttf",
+ ":NotoSansTaiViet-Regular.ttf",
+ ":NotoSansTakri-VF.ttf",
+ ":NotoSansTamil-VF.ttf",
+ ":NotoSansTamilUI-VF.ttf",
+ ":NotoSansTelugu-VF.ttf",
+ ":NotoSansTeluguUI-VF.ttf",
+ ":NotoSansThaana-Bold.ttf",
+ ":NotoSansThaana-Regular.ttf",
+ ":NotoSansThai-Bold.ttf",
+ ":NotoSansThai-Regular.ttf",
+ ":NotoSansThaiUI-Bold.ttf",
+ ":NotoSansThaiUI-Regular.ttf",
+ ":NotoSansTifinagh-Regular.otf",
+ ":NotoSansUgaritic-Regular.ttf",
+ ":NotoSansVai-Regular.ttf",
+ ":NotoSansWancho-Regular.otf",
+ ":NotoSansWarangCiti-Regular.otf",
+ ":NotoSansYi-Regular.ttf",
+ ":NotoSerif-Bold.ttf",
+ ":NotoSerif-BoldItalic.ttf",
+ ":NotoSerif-Italic.ttf",
+ ":NotoSerif-Regular.ttf",
+ ":NotoSerifArmenian-VF.ttf",
+ ":NotoSerifBengali-VF.ttf",
+ ":NotoSerifCJK-Regular.ttc",
+ ":NotoSerifDevanagari-VF.ttf",
+ ":NotoSerifDogra-Regular.ttf",
+ ":NotoSerifEthiopic-VF.ttf",
+ ":NotoSerifGeorgian-VF.ttf",
+ ":NotoSerifGujarati-VF.ttf",
+ ":NotoSerifGurmukhi-VF.ttf",
+ ":NotoSerifHebrew-Bold.ttf",
+ ":NotoSerifHebrew-Regular.ttf",
+ ":NotoSerifHentaigana.ttf",
+ ":NotoSerifKannada-VF.ttf",
+ ":NotoSerifKhmer-Bold.otf",
+ ":NotoSerifKhmer-Regular.otf",
+ ":NotoSerifLao-Bold.ttf",
+ ":NotoSerifLao-Regular.ttf",
+ ":NotoSerifMalayalam-VF.ttf",
+ ":NotoSerifMyanmar-Bold.otf",
+ ":NotoSerifMyanmar-Regular.otf",
+ ":NotoSerifNyiakengPuachueHmong-VF.ttf",
+ ":NotoSerifSinhala-VF.ttf",
+ ":NotoSerifTamil-VF.ttf",
+ ":NotoSerifTelugu-VF.ttf",
+ ":NotoSerifThai-Bold.ttf",
+ ":NotoSerifThai-Regular.ttf",
+ ":NotoSerifTibetan-VF.ttf",
+ ":NotoSerifYezidi-VF.ttf",
+ ":Roboto-Regular.ttf",
+ ":RobotoFlex-Regular.ttf",
+ ":RobotoStatic-Regular.ttf",
+ ":SourceSansPro-Bold.ttf",
+ ":SourceSansPro-BoldItalic.ttf",
+ ":SourceSansPro-Italic.ttf",
+ ":SourceSansPro-Regular.ttf",
+ ":SourceSansPro-SemiBold.ttf",
+ ":SourceSansPro-SemiBoldItalic.ttf",
+ ],
+ device_first_srcs: [
+ ":font_fallback.xml",
+ ":fonts.xml",
+ ],
+ visibility: ["//visibility:private"],
+}
+
// JARs in "ravenwood-runtime" are set to the classpath, sorted alphabetically.
// Rename some of the dependencies to make sure they're included in the intended order.
@@ -386,13 +619,8 @@
android_ravenwood_libgroup {
name: "ravenwood-runtime",
- data: [
- ":system-build.prop",
- ":framework-res",
- ":ravenwood-empty-res",
- ":framework-platform-compat-config",
- ":services-platform-compat-config",
- ],
+ data: [":ravenwood-data"],
+ fonts: [":ravenwood-fonts"],
libs: [
"100-framework-minus-apex.ravenwood",
"200-kxml2-android",