omni: add default extra font package
Based on template from DU
https://github.com/DirtyUnicorns/android_vendor_du/commit/c5b22c8ffecb8497cc096c135a863b4c8324853f
Thanks to them for the launcher icon too
Noto fonts are from google
https://www.google.com/get/noto/
GoogleSans is from Pixel2
SourceSansPro is from Adobe
Change-Id: I1440d6c51ee25c7e465e83b2f4ec5099f03e741d
diff --git a/config/packages.mk b/config/packages.mk
index 54e6c0b..6d7c23f 100644
--- a/config/packages.mk
+++ b/config/packages.mk
@@ -100,4 +100,8 @@
Launcher3Dark
# for fun
-PRODUCT_PACKAGES += EggGame
+PRODUCT_PACKAGES += \
+ EggGame
+
+PRODUCT_PACKAGES += \
+ ExtraFonts
diff --git a/fonts/Android.mk b/fonts/Android.mk
new file mode 100644
index 0000000..8191b41
--- /dev/null
+++ b/fonts/Android.mk
@@ -0,0 +1,9 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+LOCAL_PACKAGE_NAME := ExtraFonts
+LOCAL_SDK_VERSION := current
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
diff --git a/fonts/AndroidManifest.xml b/fonts/AndroidManifest.xml
new file mode 100644
index 0000000..8823c56
--- /dev/null
+++ b/fonts/AndroidManifest.xml
@@ -0,0 +1,8 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.omnirom.fonts">
+
+ <application android:label="@string/app_name"
+ android:icon="@mipmap/ic_launcher"
+ android:hasCode="false"/>
+
+</manifest>
diff --git a/fonts/assets/fonts/GoogleSans.zip b/fonts/assets/fonts/GoogleSans.zip
new file mode 100644
index 0000000..349d202
--- /dev/null
+++ b/fonts/assets/fonts/GoogleSans.zip
Binary files differ
diff --git a/fonts/assets/fonts/NotoSans.zip b/fonts/assets/fonts/NotoSans.zip
new file mode 100644
index 0000000..149b853
--- /dev/null
+++ b/fonts/assets/fonts/NotoSans.zip
Binary files differ
diff --git a/fonts/assets/fonts/NotoSerif.zip b/fonts/assets/fonts/NotoSerif.zip
new file mode 100644
index 0000000..74be4fb
--- /dev/null
+++ b/fonts/assets/fonts/NotoSerif.zip
Binary files differ
diff --git a/fonts/assets/fonts/SourceSansPro.zip b/fonts/assets/fonts/SourceSansPro.zip
new file mode 100644
index 0000000..c462a81
--- /dev/null
+++ b/fonts/assets/fonts/SourceSansPro.zip
Binary files differ
diff --git a/fonts/res/mipmap-hdpi/ic_launcher.png b/fonts/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..102d6d3
--- /dev/null
+++ b/fonts/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/fonts/res/mipmap-mdpi/ic_launcher.png b/fonts/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..24802c2
--- /dev/null
+++ b/fonts/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/fonts/res/mipmap-xhdpi/ic_launcher.png b/fonts/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..dd7bdd9
--- /dev/null
+++ b/fonts/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/fonts/res/mipmap-xxhdpi/ic_launcher.png b/fonts/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..bcf7e2f
--- /dev/null
+++ b/fonts/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/fonts/res/mipmap-xxxhdpi/ic_launcher.png b/fonts/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..3bbe220
--- /dev/null
+++ b/fonts/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
diff --git a/fonts/res/values/bools.xml b/fonts/res/values/bools.xml
new file mode 100644
index 0000000..e098a06
--- /dev/null
+++ b/fonts/res/values/bools.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2017, 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.
+ */
+-->
+<resources>
+
+ <bool name="custom_rom_font_provider">true</bool>
+
+</resources>
diff --git a/fonts/res/values/strings.xml b/fonts/res/values/strings.xml
new file mode 100644
index 0000000..7266a20
--- /dev/null
+++ b/fonts/res/values/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2017, 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.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <string name="app_name">Extra Fonts</string>
+
+</resources>
diff --git a/overlay/common/frameworks/base/core/res/res/values/config.xml b/overlay/common/frameworks/base/core/res/res/values/config.xml
index 1627b2a..d412e76 100644
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
@@ -46,4 +46,9 @@
<bool name="config_dozeAlwaysOnDisplayEnabledDefault">false</bool>
<string name="def_wireless_charging_started_sound" translatable="false">/system/media/audio/ui/omni_charge_start.ogg</string>
+
+ <!-- System font packages (overlay in vendor) -->
+ <string-array name="config_fontPackages" translatable="false">
+ <item>org.omnirom.fonts</item>
+ </string-array>
</resources>