OmniLib: Introduce OmniRom SDK
* omnilib-res app will be installed to system/frameworks for the futur internal ressources add-on
* OmniLib java_library will be installed to system/frameworks for the futur internal java/aidl add-on
* The OmniPreference android_library need to be moved outside system/frameworks because of some nested dependency breakage
Change-Id: I2b9a7bc7f4aa72052ae6600933eb114d2a481b35
omnilib-res: Add allow-reserved-package-id
Thx to the LineageOS team
https://github.com/LineageOS/android_lineage-sdk/blob/lineage-20.0/Android.bp#L44-L49
Change-Id: I07ba56685981a8735bdef5ea75528ec82dd68318
diff --git a/omnipreference/res/values/arrays.xml b/omnipreference/res/values/arrays.xml
new file mode 100644
index 0000000..ed5ebaf
--- /dev/null
+++ b/omnipreference/res/values/arrays.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Copyright (C) 2013 The OmniROM Project
+
+ Parts Copyright (C) 2012-2013 The CyanogenMod Project
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="entries_led_colors" translatable="false">
+ <item>@string/led_color_green</item>
+ <item>@string/led_color_red</item>
+ </string-array>
+
+ <string-array name="values_led_colors" translatable="false">
+ <item>#FF00FF00</item>
+ <item>#FFFF0000</item>
+ </string-array>
+</resources>
diff --git a/omnipreference/res/values/attrs.xml b/omnipreference/res/values/attrs.xml
new file mode 100644
index 0000000..5be682d
--- /dev/null
+++ b/omnipreference/res/values/attrs.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+/*
+** Copyright 2013, The ChameleonOS 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>
+ <declare-styleable name="SeekBarPreference">
+ <attr name="min" format="integer" />
+ <attr name="interval" format="integer" />
+ <attr name="unitsLeft" format="reference" />
+ <attr name="unitsRight" format="reference" />
+ </declare-styleable>
+
+ <declare-styleable name="ColorSelectPreference">
+ <attr name="ledPreview" format="boolean" />
+ <attr name="multiColor" format="boolean" />
+ <attr name="withAlpha" format="boolean" />
+ </declare-styleable>
+
+ <declare-styleable name="SystemSettingsColorSelectPreference">
+ <attr name="ledPreview" format="boolean" />
+ <attr name="multiColor" format="boolean" />
+ <attr name="withAlpha" format="boolean" />
+ </declare-styleable>
+
+ <declare-styleable name="SecureSettingsSwitch">
+ <attr name="initialValue" format="integer" />
+ </declare-styleable>
+
+ <declare-styleable name="SystemSettingsSwitch">
+ <attr name="initialValue" format="integer" />
+ </declare-styleable>
+
+</resources>
diff --git a/omnipreference/res/values/config.xml b/omnipreference/res/values/config.xml
new file mode 100644
index 0000000..6c10706
--- /dev/null
+++ b/omnipreference/res/values/config.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The OmniROM Project
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+<!-- does the device have multi color led support or only
+ a fixed set of led colors -->
+ <bool name="config_has_multi_color_led">true</bool>
+</resources>
diff --git a/omnipreference/res/values/dimensions.xml b/omnipreference/res/values/dimensions.xml
new file mode 100644
index 0000000..b329078
--- /dev/null
+++ b/omnipreference/res/values/dimensions.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The OmniROM Project
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<resources>
+ <dimen name="alert_dialog_padding_material">20dp</dimen>
+ <dimen name="color_preference_width">18dip</dimen>
+ <dimen name="color_preference_height">18dip</dimen>
+</resources>
\ No newline at end of file
diff --git a/omnipreference/res/values/strings.xml b/omnipreference/res/values/strings.xml
new file mode 100644
index 0000000..c43a2b1
--- /dev/null
+++ b/omnipreference/res/values/strings.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 The OmniROM Project
+
+ Parts Copyright (C) 2012-2013 The CyanogenMod Project
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="action_save">Save</string>
+ <string name="disabled_entry">Disabled</string>
+ <string name="profile_choose_app">Choose app</string>
+ <string name="not_ready_summary">Resolving...</string>
+ <string name="resolve_failed_summary">Resolving app failed</string>
+ <string name="choose_app">Choose app</string>
+ <string name="led_color_green">Green</string>
+ <string name="led_color_red">Red</string>
+</resources>
diff --git a/omnipreference/res/values/styles.xml b/omnipreference/res/values/styles.xml
new file mode 100644
index 0000000..d31d2fe
--- /dev/null
+++ b/omnipreference/res/values/styles.xml
@@ -0,0 +1,22 @@
+<!--
+ ~ Copyright (C) 2016 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>
+ <style name="preference_icon_frame">
+ <item name="android:layout_marginStart">-4dp</item>
+ <item name="android:minWidth">60dp</item>
+ </style>
+</resources>