zenfone7: Import sm8250-common repo stuff
Several things about that:
*Rog3 no longer supported because i don't have this device anymore.
*I don't think someone will support it.
*Asus Have droppped the unlocked bootloader support so ....
Enjoy of device's stuff ^_^
Change-Id: I91df9c78557fb4bd229d60ec4b693161614a23c5
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/DeviceParts/Android.bp b/DeviceParts/Android.bp
new file mode 100644
index 0000000..df21227
--- /dev/null
+++ b/DeviceParts/Android.bp
@@ -0,0 +1,33 @@
+android_app {
+ name: "DeviceParts",
+
+ defaults: [
+ "SettingsLibDefaults",
+ ],
+
+ static_libs: [
+ "androidx.core_core",
+ "androidx.preference_preference",
+ "com.google.android.material_material",
+ "OmniLib",
+ "OmniPreferenceTheme",
+ "vendor.goodix.hardware.biometrics.fingerprint-V2.1-java",
+ ],
+
+ srcs: [
+ "src/**/*.java",
+ ],
+ certificate: "platform",
+ privileged: true,
+ platform_apis: true,
+ resource_dirs: ["res"],
+
+ libs: ["telephony-common"],
+
+ optimize: {
+ enabled: false,
+ },
+ dex_preopt: {
+ enabled: false,
+ },
+}
diff --git a/DeviceParts/AndroidManifest.xml b/DeviceParts/AndroidManifest.xml
new file mode 100644
index 0000000..04ab422
--- /dev/null
+++ b/DeviceParts/AndroidManifest.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ package="org.omnirom.device"
+ android:sharedUserId="android.uid.system" >
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <uses-permission android:name="android.permission.VIBRATE" />
+ <uses-permission android:name="android.permission.WRITE_SETTINGS" />
+ <uses-permission android:name="android.permission.INJECT_EVENTS" />
+ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
+ <uses-permission android:name="android.permission.CAMERA" />
+ <uses-permission android:name="com.asus.focusapplistener.permission.GAME_GENIE_PROVIDER"/>
+ <uses-permission android:name="com.asus.hardwarestub.permission.FPS_CENTRAL_CONTROL_SERVICE"/>
+
+ <protected-broadcast android:name="com.android.systemui.doze.pulse" />
+ <protected-broadcast android:name="com.asus.airtriggers.SYSTEMUI_AIR_TRIGGER_ON" />
+ <protected-broadcast android:name="com.asus.airtriggers.SYSTEMUI_AIR_TRIGGER_OFF" />
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/advanced_settings"
+ android:theme="@style/AppTheme"
+ android:appComponentFactory="androidx.core.app.CoreComponentFactory"
+ tools:replace="android:appComponentFactory"
+ android:supportsRtl="true" >
+ <activity
+ android:name="org.omnirom.device.TileActivity"
+ android:taskAffinity=""
+ android:excludeFromRecents="true"
+ android:exported="true" >
+ <intent-filter>
+ <action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
+ </intent-filter>
+ </activity>
+ <activity
+ android:name="org.omnirom.device.DeviceSettingsActivity"
+ android:exported="false"
+ android:launchMode="singleTask" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+ <activity-alias
+ android:name="org.omnirom.device.DeviceSettings"
+ android:exported="true"
+ android:targetActivity="DeviceSettingsActivity" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="org.omnirom.device.DEVICE_SETTING_PAGE"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ </intent-filter>
+ </activity-alias>
+ <activity
+ android:name="org.omnirom.device.GestureSettingsActivity"
+ android:exported="false"
+ android:label="@string/category_gestures_title"
+ android:launchMode="singleTask" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+ <activity
+ android:name="org.omnirom.device.DozeSettingsActivity"
+ android:exported="false"
+ android:label="@string/doze_category_title"
+ android:launchMode="singleTask" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+ <activity
+ android:name="org.omnirom.device.AudioSettingsActivity"
+ android:exported="false"
+ android:label="@string/audiowizard_entry_title"
+ android:launchMode="singleTask" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+ <receiver android:name="org.omnirom.device.Startup"
+ android:exported="false" >
+ <intent-filter android:priority="100" >
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ </intent-filter>
+ </receiver>
+ <service
+ android:name="org.omnirom.device.GloveModeTileService"
+ android:icon="@drawable/ic_glove_tile"
+ android:label="@string/glove_mode_title"
+ android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
+ android:exported="true" >
+ <intent-filter>
+ <action
+ android:name="android.service.quicksettings.action.QS_TILE"/>
+ </intent-filter>
+ </service>
+ <service
+ android:name="org.omnirom.device.VolumeTile"
+ android:icon="@drawable/ic_volume_ringer"
+ android:label="@string/volume_mode"
+ android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
+ android:exported="true" >
+ <intent-filter>
+ <action android:name="android.service.quicksettings.action.QS_TILE" />
+ </intent-filter>
+ </service>
+ <service
+ android:name="org.omnirom.device.FrameRateTileService"
+ android:icon="@drawable/ic_refresh_rate"
+ android:label="@string/refresh_rate_title"
+ android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
+ android:exported="true" >
+ <intent-filter>
+ <action
+ android:name="android.service.quicksettings.action.QS_TILE"/>
+ </intent-filter>
+ </service>
+ <service android:name="org.omnirom.device.GripSensorServiceMain"
+ android:permission="AsusGripSensorHelperService">
+ </service>
+ </application>
+</manifest>
diff --git a/DeviceParts/res/drawable-v26/ic_launcher.xml b/DeviceParts/res/drawable-v26/ic_launcher.xml
new file mode 100644
index 0000000..44a0834
--- /dev/null
+++ b/DeviceParts/res/drawable-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt">
+ <background android:drawable="@drawable/asus_app_ic_background_launcher"/>
+ <foreground android:drawable="@drawable/ic_asus_app_ic_foreground_launcher"/>
+</adaptive-icon>
diff --git a/DeviceParts/res/drawable/arrow_collapse_down.xml b/DeviceParts/res/drawable/arrow_collapse_down.xml
new file mode 100644
index 0000000..8f793f3
--- /dev/null
+++ b/DeviceParts/res/drawable/arrow_collapse_down.xml
@@ -0,0 +1,9 @@
+<!-- drawable/arrow_collapse_down.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent">
+ <path android:fillColor="#000" android:pathData="M19.92,12.08L12,20L4.08,12.08L5.5,10.67L11,16.17V2H13V16.17L18.5,10.66L19.92,12.08M12,20H2V22H22V20H12Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/arrow_collapse_up.xml b/DeviceParts/res/drawable/arrow_collapse_up.xml
new file mode 100644
index 0000000..e859eb6
--- /dev/null
+++ b/DeviceParts/res/drawable/arrow_collapse_up.xml
@@ -0,0 +1,9 @@
+<!-- drawable/arrow_collapse_up.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent">
+ <path android:fillColor="#000" android:pathData="M4.08,11.92L12,4L19.92,11.92L18.5,13.33L13,7.83V22H11V7.83L5.5,13.33L4.08,11.92M12,4H22V2H2V4H12Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/asus_app_ic_background_launcher.png b/DeviceParts/res/drawable/asus_app_ic_background_launcher.png
new file mode 100644
index 0000000..0f54091
--- /dev/null
+++ b/DeviceParts/res/drawable/asus_app_ic_background_launcher.png
Binary files differ
diff --git a/DeviceParts/res/drawable/back.xml b/DeviceParts/res/drawable/back.xml
new file mode 100644
index 0000000..3345310
--- /dev/null
+++ b/DeviceParts/res/drawable/back.xml
@@ -0,0 +1,9 @@
+<!-- drawable/arrow_left.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent">
+ <path android:fillColor="#000" android:pathData="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/home.xml b/DeviceParts/res/drawable/home.xml
new file mode 100644
index 0000000..77475c4
--- /dev/null
+++ b/DeviceParts/res/drawable/home.xml
@@ -0,0 +1,9 @@
+<!-- drawable/checkbox_blank_circle_outline.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent">
+ <path android:fillColor="#000" android:pathData="M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml b/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml
new file mode 100644
index 0000000..de4b929
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:height="108dp" android:width="108dp" android:viewportWidth="108" android:viewportHeight="108">
+ <path android:fillColor="#ebebeb" android:pathData="M54,40.6L38.6,52.8v17.7c0,1.2 0.9,2 2,2h8.2V60.1H59v12.4h8.2c1.2,0 2,-0.9 2,-2V52.8L54,40.6z"/>
+ <path android:fillColor="#7fb2e8" android:pathData="M71.5,54.5l-17.5,-13.9l-17.5,13.9l-3.8,-4.1l21.3,-17l21.3,17z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_camera.xml b/DeviceParts/res/drawable/ic_camera.xml
new file mode 100644
index 0000000..8294f4b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_camera.xml
@@ -0,0 +1,9 @@
+<!-- drawable/camera.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="32dp"
+ android:width="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent" >
+ <path android:fillColor="#fff" android:pathData="M4,4H7L9,2H15L17,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_camera_tile.xml b/DeviceParts/res/drawable/ic_camera_tile.xml
new file mode 100644
index 0000000..488f41b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_camera_tile.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#000" android:pathData="M9,12C9,11.19 9.3,10.5 9.89,9.89C10.5,9.3 11.19,9 12,9C12.81,9 13.5,9.3 14.11,9.89C14.7,10.5 15,11.19 15,12C15,12.81 14.7,13.5 14.11,14.11C13.5,14.7 12.81,15 12,15C11.19,15 10.5,14.7 9.89,14.11C9.3,13.5 9,12.81 9,12M5.53,8.44L7.31,10.22L5.53,12L7.31,13.78L5.53,15.56L2,12L5.53,8.44M8.44,18.47L10.22,16.69L12,18.47L13.78,16.69L15.56,18.47L12,22L8.44,18.47M18.47,15.56L16.69,13.78L18.47,12L16.69,10.22L18.47,8.44L22,12L18.47,15.56M15.56,5.53L13.78,7.31L12,5.53L10.22,7.31L8.44,5.53L12,2L15.56,5.53Z" />
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_disabled.xml b/DeviceParts/res/drawable/ic_disabled.xml
new file mode 100644
index 0000000..1c5152b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_disabled.xml
@@ -0,0 +1,8 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="32dp"
+ android:width="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent" >
+ <path android:fillColor="#fff" android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_flashlight.xml b/DeviceParts/res/drawable/ic_flashlight.xml
new file mode 100644
index 0000000..213a7f6
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_flashlight.xml
@@ -0,0 +1,9 @@
+<!-- drawable/flashlight.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="32dp"
+ android:width="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent" >
+ <path android:fillColor="#fff" android:pathData="M9,10L6,5H18L15,10H9M18,4H6V2H18V4M9,22V11H15V22H9M12,13A1,1 0 0,0 11,14A1,1 0 0,0 12,15A1,1 0 0,0 13,14A1,1 0 0,0 12,13Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_glove_tile.xml b/DeviceParts/res/drawable/ic_glove_tile.xml
new file mode 100644
index 0000000..b69529e
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_glove_tile.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24.0dip"
+ android:width="24.0dip"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path android:fillColor="#ff000000" android:pathData="M18.2638,12.94 L15.0238,11.32 A5.44892,5.44892,0,0,0,17.1438,7 A5.5,5.5,0,1,0,9.1438,11.89 L9.1438,15.15 L7.3038,14.76 L7.2038,14.74 A1.58226,1.58226,0,0,0,6.8838,14.71 A1.98311,1.98311,0,0,0,5.4738,15.3 L4.0738,16.72 L9.1638,21.81 A2.31462,2.31462,0,0,0,10.8138,22.5 L17.1138,22.5 A1.98854,1.98854,0,0,0,19.0838,20.83 L19.8838,16.12 A2.99226,2.99226,0,0,0,18.2638,12.94 Z M17.9138,15.79 L17.1138,20.5 L10.8138,20.5 A0.369,0.369,0,0,1,10.5738,20.4 L6.8938,16.72 L11.1438,17.61 L11.1438,7 A0.5,0.5,0,0,1,12.1438,7 L12.1438,13 L13.9038,13 L17.3638,14.73 A1.00676,1.00676,0,0,1,17.9138,15.79 Z M8.14379,7 A3.5,3.5,0,0,1,15.1438,7 A3.46426,3.46426,0,0,1,14.1438,9.44 L14.1438,7 A2.5,2.5,0,0,0,9.1438,7 L9.1438,9.44 A3.46426,3.46426,0,0,1,8.14379,7 Z" />
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_music_next.xml b/DeviceParts/res/drawable/ic_music_next.xml
new file mode 100644
index 0000000..baad21d
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_music_next.xml
@@ -0,0 +1,9 @@
+<!-- drawable/skip_next.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="32dp"
+ android:width="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent" >
+ <path android:fillColor="#fff" android:pathData="M16,18H18V6H16M6,18L14.5,12L6,6V18Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_music_play.xml b/DeviceParts/res/drawable/ic_music_play.xml
new file mode 100644
index 0000000..d8c3ba8
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_music_play.xml
@@ -0,0 +1,9 @@
+<!-- drawable/play.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="32dp"
+ android:width="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent" >
+ <path android:fillColor="#fff" android:pathData="M8,5.14V19.14L19,12.14L8,5.14Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_music_prev.xml b/DeviceParts/res/drawable/ic_music_prev.xml
new file mode 100644
index 0000000..199fcd1
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_music_prev.xml
@@ -0,0 +1,9 @@
+<!-- drawable/skip_previous.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="32dp"
+ android:width="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent" >
+ <path android:fillColor="#fff" android:pathData="M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_panel_tile.xml b/DeviceParts/res/drawable/ic_panel_tile.xml
new file mode 100644
index 0000000..ee0137f
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_panel_tile.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#fff" android:pathData="M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_refresh_rate.xml b/DeviceParts/res/drawable/ic_refresh_rate.xml
new file mode 100644
index 0000000..e6fc714
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#ff000000" android:pathData="M16.9846,18.2382 L18.2258,18.2382 C18.2131,18.2499,18.2014,18.2606,18.1897,18.2724 L16.3938,20.0038 L16.218,20.661 L19.0364,20.661 L19.2815,19.746 L17.9094,19.746 C17.923,19.7323,17.9367,19.7196,17.9494,19.706 L19.6974,18.0185 L19.7179,17.999 L19.9142,17.3174 L17.2316,17.3174 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M16.824,16.202 L15.796,16.202 L15.353,17.856 L13.951,17.856 L14.395,16.202 L13.372,16.202 L12.212,20.528 L12.177,20.661 L13.199,20.661 L13.696,18.808 L15.098,18.808 L14.601,20.661 L15.629,20.661 L16.789,16.335 L16.824,16.202 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M20.5676,5.55489 L3.43243,5.55489 A1.99674,1.99674,0,0,0,1.43732,7.549 L1.43732,16.3264 A1.99763,1.99763,0,0,0,3.43244,18.3215 L12.1487,18.3215 L12.5239,16.9229 L3.43243,16.9229 A0.5974,0.5974,0,0,1,2.83593,16.3264 L2.83593,15.5738 L4.38348,14.813 L4.38348,9.052 L2.83594,8.29946 L2.83594,7.549 A0.59756,0.59756,0,0,1,3.43244,6.95153 L20.5676,6.95153 A0.59778,0.59778,0,0,1,21.1651,7.549 L21.1651,8.29845 L19.6165,9.05205 L19.6165,14.812 L21.1651,15.5738 L21.1651,16.3264 A0.59982,0.59982,0,0,1,20.6978,16.9074 L20.5759,16.9353 L20.1779,18.3215 L20.5676,18.3215 A1.99763,1.99763,0,0,0,22.5627,16.3264 L22.5627,7.549 A1.99674,1.99674,0,0,0,20.5676,5.55489 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M9.44588,10.2675 A2.81936,2.81936,0,0,1,10.7652,9.72158 A3.20479,3.20479,0,0,1,11.3922,9.69326 L11.5924,9.71474 L11.902,8.56044 L11.61,8.54482 C11.5641,8.54282,11.5133,8.54189,11.4537,8.54189 A4.48486,4.48486,0,0,0,10.7984,8.59267 A4.271,4.271,0,0,0,8.68317,9.45888 A5.452,5.452,0,0,0,6.77792,12.453 A2.59467,2.59467,0,0,0,6.98492,14.7323 A1.62291,1.62291,0,0,0,8.33746,15.327 A3.14951,3.14951,0,0,0,11.2349,12.9793 A1.80218,1.80218,0,0,0,11.0142,11.3836 A1.5749,1.5749,0,0,0,9.70268,10.8113 A2.47,2.47,0,0,0,8.71049,11.0164 A3.28815,3.28815,0,0,1,9.44588,10.2675 Z M9.94488,12.914 A1.61176,1.61176,0,0,1,8.57188,14.2246 A0.5861,0.5861,0,0,1,8.07774,14.0244 A1.68719,1.68719,0,0,1,8.04356,12.6787 A0.49369,0.49369,0,0,1,8.15001,12.4707 A1.60065,1.60065,0,0,1,9.3453,11.913 A0.63655,0.63655,0,0,1,9.87655,12.1269 A0.90955,0.90955,0,0,1,9.94491,12.914 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M16.7756,11.9335 A3.33176,3.33176,0,0,0,16.6262,9.10536 A1.511,1.511,0,0,0,15.3537,8.54188 C13.9318,8.54188,12.7033,9.82704,12.1477,11.8974 A3.39927,3.39927,0,0,0,12.3303,14.7773 A1.4874,1.4874,0,0,0,13.5569,15.3339 C15.0441,15.3339,16.1877,14.1269,16.7756,11.9335 Z M13.4299,12.0272 C13.8098,10.6082,14.4953,9.6542,15.135,9.6542 A0.4566,0.4566,0,0,1,15.5305,9.82315 A2.76878,2.76878,0,0,1,15.4807,11.8485 C15.0705,13.3788,14.4651,14.2215,13.7756,14.2215 A0.425,0.425,0,0,1,13.4094,14.0535 A2.6914,2.6914,0,0,1,13.4299,12.0272 Z" />
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_120.xml b/DeviceParts/res/drawable/ic_refresh_rate_120.xml
new file mode 100644
index 0000000..eba0d6b
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate_120.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#ff000000" android:pathData="M17,18.24 L18.25,18.24 L18.25,18.24 L16.39,20 L16.22,20.66 L19,20.66 L19.24,19.75 L17.91,19.75 L17.91,19.75 L19.7,18 L19.7,18 L19.89,17.32 L17.23,17.32 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M16.82,16.2 L15.8,16.2 L15.35,17.86 L13.95,17.86 L14.39,16.2 L13.37,16.2 L12.21,20.53 L12.18,20.66 L13.2,20.66 L13.7,18.81 L15.1,18.81 L14.6,20.66 L15.63,20.66 L16.79,16.34 L16.82,16.2 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M20.57,5.55 L3.43,5.55 A2,2,0,0,0,1.43,7.55 L1.43,16.33 A2,2,0,0,0,3.43,18.33 L12.15,18.33 L12.52,16.93 L3.43,16.93 A0.58,0.58,0,0,1,2.84,16.34 L2.84,15.58 L4.38,14.82 L4.38,9.05 L2.84,8.3 L2.84,7.55 A0.59,0.59,0,0,1,3.43,7 L20.57,7 A0.6,0.6,0,0,1,21.17,7.6 L21.17,8.3 L19.62,9.05 L19.62,14.81 L21.17,15.57 L21.17,16.33 A0.61,0.61,0,0,1,20.7,16.91 L20.58,16.91 L20.18,18.29 L20.57,18.29 A2,2,0,0,0,22.57,16.29 L22.57,7.55 A2,2,0,0,0,20.57,5.55 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M18.11,11.93 A3.32,3.32,0,0,0,18,9.11 A1.51,1.51,0,0,0,16.73,8.54 C15.31,8.54,14.08,9.83,13.52,11.9 A3.44,3.44,0,0,0,13.7,14.78 A1.51,1.51,0,0,0,14.93,15.33 C16.38,15.33,17.52,14.13,18.11,11.93 Z M14.76,12.03 C15.14,10.61,15.83,9.65,16.47,9.65 A0.45,0.45,0,0,1,16.86,9.82 C17.1,10.13,17.08,10.82,16.81,11.82 C16.4,13.35,15.81,14.19,15.11,14.19 A0.43,0.43,0,0,1,14.74,14.02 A2.7,2.7,0,0,1,14.76,12 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M6.53,8.64 L5.87,9.82 L7.01,9.82 L5.2,15.19 L6.46,15.19 L8.66,8.64 L6.53,8.64 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M12.94,9.1 A1.67,1.67,0,0,0,11.56,8.54 A2.52,2.52,0,0,0,9.64,9.35 A3.73,3.73,0,0,0,8.93,10.78 L8.93,10.99 L10.13,10.99 L10.13,10.87 A2.62,2.62,0,0,1,10.35,10.32 A1.69,1.69,0,0,1,10.62,9.96 A1,1,0,0,1,10.94,9.76 A1.26,1.26,0,0,1,11.71,9.76 A0.49,0.49,0,0,1,11.93,9.9 A0.64,0.64,0,0,1,12.03,10.14 A0.91,0.91,0,0,1,12.03,10.5 A1.31,1.31,0,0,1,11.76,11.07 C11.68,11.16,11.55,11.3,11.37,11.47 S10.92,11.89,10.6,12.17 L7.41,15.17 L11.79,15.17 L12.19,13.98 L10.19,13.98 L11.64,12.71 C11.94,12.44,12.18,12.22,12.38,12.02 A4.35,4.35,0,0,0,12.83,11.52 A2.23,2.23,0,0,0,13.27,10.52 A1.62,1.62,0,0,0,12.94,9.1 Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_144.xml b/DeviceParts/res/drawable/ic_refresh_rate_144.xml
new file mode 100644
index 0000000..0e21f01
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate_144.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#ffffff" android:pathData="M 6.08 8.16 L 5.71 9.46 L 6.71 9.46 L 5.01 15.4 L 6.5 15.4 L 8.57 8.16 L 6.08 8.16 Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M13.77,8H12.35L7.72,13.32l-0.24 0.77 h3.16l-0.38,1.31h1.4L12,14.09h0.82l0.35-1.21h-0.83ZM9.63,12.88l2-2.42L11,12.88Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M19.77,8H18.36l-4.64,5.29-0.23 0.77 h3.16l-0.38,1.31h1.4l0.38-1.31h0.82l0.34-1.21h-0.82Zm-4.13,4.85,2-2.42L17,12.88Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M17.19,19h1.38s0,0,0,0l-2,1.93-0.2 0.73 h3.15l0.27-1H18.22s0,0,0,0l1.95-1.89,0,0,0.21-0.76h-3Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M 17.01 16.72 L 15.86 16.72 L 15.37 18.56 L 13.8 18.56 L 14.3 16.72 L 13.16 16.72 L 11.86 21.54 L 11.82 21.69 L 12.96 21.69 L 13.52 19.62 L 15.08 19.62 L 14.53 21.69 L 15.67 21.69 L 16.97 16.86 L 17.01 16.72 Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M21.73,4.38H2.27A2.27,2.27,0,0,0,0,6.65v10a2.27,2.27,0,0,0,2.27,2.27h8.9l0.43-1.59H2.27a0.68 0.68 ,0,0,1-0.68-0.68v-10A0.67 0.67 ,0,0,1,2.27,6H21.73a0.67 0.67 ,0,0,1,0.68 0.68 v10a0.68 0.68 ,0,0,1-0.53 0.66 l-0.14,0-0.45,1.58h0.44A2.27,2.27,0,0,0,24,16.62v-10A2.27,2.27,0,0,0,21.73,4.38Z"/>
+</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_160.xml b/DeviceParts/res/drawable/ic_refresh_rate_160.xml
new file mode 100644
index 0000000..44501fa
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate_160.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="17dp" android:width="18dp" android:viewportWidth="19" android:viewportHeight="18">
+ <path android:fillColor="#ffffff" android:pathData="M9,7.31a2.47,2.47,0,0,1,1.12-0.47,2.65,2.65,0,0,1,0.54,0l0.17,0,0.26-1h-0.38a3.78,3.78,0,0,0-0.56,0,3.66,3.66,0,0,0-1.8 0.74 A4.59,4.59,0,0,0,6.74,9.17a2.18,2.18,0,0,0,0.17,1.94,1.39,1.39,0,0,0,1.15 0.51 ,2.67,2.67,0,0,0,2.47-2,1.53,1.53,0,0,0-0.18-1.36,1.36,1.36,0,0,0-1.12-0.49A2.06,2.06,0,0,0,8.38,8,2.74,2.74,0,0,1,9,7.31Zm0.42,2.25a1.36,1.36,0,0,1-1.17,1.12 0.51 0.51,0,0,1-0.42-0.17,1.43,1.43,0,0,1,0-1.15 0.39 0.39,0,0,1,0.09-0.17,1.37,1.37,0,0,1,1-0.48 0.55 0.55,0,0,1,0.46 0.18 A0.78 0.78 ,0,0,1,9.43,9.56Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M 4.83 5.92 L 4.27 6.92 L 5.25 6.92 L 3.71 11.5 L 4.78 11.5 L 6.66 5.92 L 4.83 5.92 Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M15.46,8.73a2.85,2.85,0,0,0-0.13-2.41,1.3,1.3,0,0,0-1.09-0.48C13,5.84,12,6.93,11.51,8.69a2.92,2.92,0,0,0,0.16,2.46,1.26,1.26,0,0,0,1,0.47C14,11.62,15,10.59,15.46,8.73ZM12.6,8.8c0.33-1.2 0.91 -2,1.46-2a0.37 0.37 ,0,0,1,0.33 0.15 ,2.3,2.3,0,0,1,0,1.72c-0.35,1.31-0.86,2-1.45,2a0.34 0.34 ,0,0,1-0.31-0.14A2.29,2.29,0,0,1,12.6,8.8Z"/>
+ <path android:pathData="M 0.5 0 H 18.5 V 18 H 0.5 V 0 Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M14.78,14.24h1l0,0-1.5,1.45-0.15 0.55 h2.36l0.21-0.77H15.55l0,0,1.47-1.41v0l0.17-0.57H15Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M 14.64 12.54 L 13.78 12.54 L 13.41 13.92 L 12.24 13.92 L 12.61 12.54 L 11.75 12.54 L 10.78 16.16 L 10.75 16.27 L 11.61 16.27 L 12.02 14.72 L 13.2 14.72 L 12.78 16.27 L 13.64 16.27 L 14.61 12.65 L 14.64 12.54 Z"/>
+ <path android:fillColor="#ffffff" android:pathData="M15.53,3.29H3.43A1.7,1.7,0,0,0,1.73,5v7.47a1.7,1.7,0,0,0,1.7,1.7H9.92L10.24,13H3.43a0.51 0.51 ,0,0,1-0.51-0.51V5a0.51 0.51 ,0,0,1,0.51-0.51h12.1A0.51 0.51 ,0,0,1,16,5v7.55h1.19V5A1.7,1.7,0,0,0,15.53,3.29Z"/>
+ <path android:pathData="M 3 2.5 H 16 V 15.5 H 3 V 2.5 Z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_90.xml b/DeviceParts/res/drawable/ic_refresh_rate_90.xml
new file mode 100644
index 0000000..9d2ef09
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_refresh_rate_90.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="#ff000000" android:pathData="M16.9846,18.2382 L18.2258,18.2382 C18.2131,18.2499,18.2014,18.2606,18.1897,18.2724 L16.3938,20.0038 L16.218,20.661 L19.0364,20.661 L19.2815,19.746 L17.9094,19.746 C17.923,19.7323,17.9367,19.7196,17.9494,19.706 L19.6974,18.0185 L19.7179,17.999 L19.9142,17.3174 L17.2316,17.3174 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M16.824,16.202 L15.796,16.202 L15.353,17.856 L13.951,17.856 L14.395,16.202 L13.372,16.202 L12.212,20.528 L12.177,20.661 L13.199,20.661 L13.696,18.808 L15.098,18.808 L14.601,20.661 L15.629,20.661 L16.789,16.335 L16.824,16.202 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M20.5676,5.55489 L3.43243,5.55489 A1.99674,1.99674,0,0,0,1.43732,7.549 L1.43732,16.3264 A1.99763,1.99763,0,0,0,3.43244,18.3215 L12.1487,18.3215 L12.5239,16.9229 L3.43243,16.9229 A0.5974,0.5974,0,0,1,2.83593,16.3264 L2.83593,15.5738 L4.38348,14.813 L4.38348,9.052 L2.83594,8.29946 L2.83594,7.549 A0.59756,0.59756,0,0,1,3.43244,6.95153 L20.5676,6.95153 A0.59778,0.59778,0,0,1,21.1651,7.549 L21.1651,8.29845 L19.6165,9.05205 L19.6165,14.812 L21.1651,15.5738 L21.1651,16.3264 A0.59982,0.59982,0,0,1,20.6978,16.9074 L20.5759,16.9353 L20.1779,18.3215 L20.5676,18.3215 A1.99763,1.99763,0,0,0,22.5627,16.3264 L22.5627,7.549 A1.99674,1.99674,0,0,0,20.5676,5.55489 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M9.07928,13.6015 A2.81936,2.81936,0,0,1,7.75994,14.1474 A3.20479,3.20479,0,0,1,7.13294,14.1757 L6.93274,14.1542 L6.62317,15.3085 L6.91517,15.3241 C6.96107,15.3261,7.01185,15.327,7.07142,15.327 A4.48486,4.48486,0,0,0,7.72669,15.2762 A4.271,4.271,0,0,0,9.842,14.4101 A5.452,5.452,0,0,0,11.7473,11.4159 A2.59467,2.59467,0,0,0,11.5403,9.1366 A1.62291,1.62291,0,0,0,10.1878,8.54187 A3.14951,3.14951,0,0,0,7.29034,10.8895 A1.80218,1.80218,0,0,0,7.51104,12.4852 A1.5749,1.5749,0,0,0,8.82256,13.0575 A2.47,2.47,0,0,0,9.81475,12.8524 A3.28815,3.28815,0,0,1,9.07928,13.6015 Z M8.58028,10.955 A1.61176,1.61176,0,0,1,9.95328,9.64445 A0.5861,0.5861,0,0,1,10.4474,9.84465 A1.68719,1.68719,0,0,1,10.4816,11.1903 A0.49369,0.49369,0,0,1,10.3751,11.3983 A1.60065,1.60065,0,0,1,9.17979,11.9559 A0.63655,0.63655,0,0,1,8.64854,11.742 A0.90955,0.90955,0,0,1,8.58026,10.955 Z" />
+ <path android:fillColor="#ff000000" android:pathData="M16.7756,11.9335 A3.33176,3.33176,0,0,0,16.6262,9.10536 A1.511,1.511,0,0,0,15.3537,8.54188 C13.9318,8.54188,12.7033,9.82704,12.1477,11.8974 A3.39927,3.39927,0,0,0,12.3303,14.7773 A1.4874,1.4874,0,0,0,13.5569,15.3339 C15.0441,15.3339,16.1877,14.1269,16.7756,11.9335 Z M13.4299,12.0272 C13.8098,10.6082,14.4953,9.6542,15.135,9.6542 A0.4566,0.4566,0,0,1,15.5305,9.82315 A2.76878,2.76878,0,0,1,15.4807,11.8485 C15.0705,13.3788,14.4651,14.2215,13.7756,14.2215 A0.425,0.425,0,0,1,13.4094,14.0535 A2.6914,2.6914,0,0,1,13.4299,12.0272 Z" />
+</vector>
diff --git a/DeviceParts/res/drawable/ic_settings_sound.xml b/DeviceParts/res/drawable/ic_settings_sound.xml
new file mode 100644
index 0000000..7054d78
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_settings_sound.xml
@@ -0,0 +1,30 @@
+<!--
+ 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24.0dp"
+ android:height="24.0dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?android:attr/colorControlNormal">
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M3 10v4c0 .55 .45 1 1 1h3l3.29 3.29c.63 .63 1.71 .18
+1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0
+0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.46v.19c0 .38 .25 .71 .61
+.85C17.18 6.54 19 9.06 19 12s-1.82 5.46-4.39 6.5c-.36 .14 -.61 .47 -.61 .85
+v.19c0 .63 .63 1.08 1.22 .86 a8.995 8.995 0 0 0 0-16.8c-.59-.23-1.22 .23 -1.22
+.86 z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer.xml b/DeviceParts/res/drawable/ic_volume_ringer.xml
new file mode 100644
index 0000000..11d8428
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_volume_ringer.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:tint="?android:attr/colorControlNormal" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
+ <path android:fillColor="#ffffffff" android:pathData="M18,17v-6c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5S10.5,3.17 10.5,4v0.68C7.64,5.36 6,7.92 6,11v6H4v2h10h0.38H20v-2H18zM16,17H8v-6c0,-2.48 1.51,-4.5 4,-4.5s4,2.02 4,4.5V17z"/>
+ <path android:fillColor="#ffffffff" android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4C10,21.1 10.9,22 12,22z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer_mute.xml b/DeviceParts/res/drawable/ic_volume_ringer_mute.xml
new file mode 100644
index 0000000..f6f486f
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_volume_ringer_mute.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:tint="?android:attr/colorControlNormal" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
+ <path android:fillColor="#ffffffff" android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4C10,21.1 10.9,22 12,22z"/>
+ <path android:fillColor="#ffffffff" android:pathData="M16,16L2.81,2.81L1.39,4.22l4.85,4.85C6.09,9.68 6,10.33 6,11v6H4v2h12.17l3.61,3.61l1.41,-1.41L16,16zM8,17c0,0 0.01,-6.11 0.01,-6.16L14.17,17H8z"/>
+ <path android:fillColor="#ffffffff" android:pathData="M12,6.5c2.49,0 4,2.02 4,4.5v2.17l2,2V11c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5S10.5,3.17 10.5,4v0.68C9.72,4.86 9.05,5.2 8.46,5.63L9.93,7.1C10.51,6.73 11.2,6.5 12,6.5z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml b/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml
new file mode 100644
index 0000000..9010c53
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:height="19dp" android:width="19dp" android:viewportWidth="24" android:viewportHeight="24">
+ <path android:fillColor="#ffffffff" android:pathData="M1,9h2v6H1V9zM4,17h2V7H4V17zM21,9v6h2V9H21zM18,17h2V7h-2V17zM17,5.5v13c0,0.83 -0.67,1.5 -1.5,1.5h-7C7.67,20 7,19.33 7,18.5v-13C7,4.67 7.67,4 8.5,4h7C16.33,4 17,4.67 17,5.5zM15,6H9v12h6V6z"/>
+</vector>
diff --git a/DeviceParts/res/drawable/ic_wakeup.xml b/DeviceParts/res/drawable/ic_wakeup.xml
new file mode 100644
index 0000000..34209eb
--- /dev/null
+++ b/DeviceParts/res/drawable/ic_wakeup.xml
@@ -0,0 +1,8 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="32dp"
+ android:width="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent" >
+ <path android:fillColor="#fff" android:pathData="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13" />
+</vector>
diff --git a/DeviceParts/res/drawable/recent.xml b/DeviceParts/res/drawable/recent.xml
new file mode 100644
index 0000000..e3935a3
--- /dev/null
+++ b/DeviceParts/res/drawable/recent.xml
@@ -0,0 +1,9 @@
+<!-- drawable/crop_square.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="?android:attr/colorAccent">
+ <path android:fillColor="#000" android:pathData="M18,18H6V6H18M18,4H6A2,2 0 0,0 4,6V18A2,2 0 0,0 6,20H18A2,2 0 0,0 20,18V6C20,4.89 19.1,4 18,4Z" />
+</vector>
diff --git a/DeviceParts/res/layout/applist_preference_icon.xml b/DeviceParts/res/layout/applist_preference_icon.xml
new file mode 100644
index 0000000..1d6425d
--- /dev/null
+++ b/DeviceParts/res/layout/applist_preference_icon.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 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.
+-->
+
+<!-- Layout for a Preference in a PreferenceActivity. The
+ Preference is able to place a specific widget for its particular
+ type in the "widget_frame" layout. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/widget_frame"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
+ android:gravity="center_vertical"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:background="?android:attr/selectableItemBackground">
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:layout_marginEnd="12dip"
+ android:padding="2dp"
+ android:scaleType="centerInside"
+ android:layout_gravity="center" />
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="2dip"
+ android:layout_marginEnd="6dip"
+ android:layout_marginTop="6dip"
+ android:layout_marginBottom="6dip"
+ android:layout_weight="1">
+
+ <TextView android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ android:textColor="?android:attr/textColorPrimary"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal" />
+
+ </RelativeLayout>
+
+</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_app_select.xml b/DeviceParts/res/layout/preference_app_select.xml
new file mode 100644
index 0000000..e1a92f9
--- /dev/null
+++ b/DeviceParts/res/layout/preference_app_select.xml
@@ -0,0 +1,79 @@
+<?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 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/>.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:gravity="center_vertical"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:background="?android:attr/selectableItemBackground"
+ android:clipToPadding="false"
+ android:orientation="horizontal" >
+
+ <LinearLayout
+ android:id="@+id/icon_container"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="start|center_vertical"
+ android:orientation="horizontal"
+ android:clipToPadding="false"
+ android:paddingEnd="12dp"
+ android:paddingTop="4dp"
+ android:paddingBottom="4dp">
+ <com.android.internal.widget.PreferenceImageView
+ android:id="@android:id/icon"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:gravity="center"
+ android:scaleType="centerInside" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:gravity="center_vertical"
+ android:layout_weight="1" >
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="6dip"
+ android:layout_marginTop="10dip"
+ android:layout_marginBottom="6dip" >
+
+ <TextView android:id="@android:id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ android:ellipsize="marquee" />
+
+ <TextView android:id="@android:id/summary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@android:id/title"
+ android:layout_alignStart="@android:id/title"
+ android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+ android:textColor="?android:attr/textColorSecondary"
+ android:maxLines="10"
+ android:ellipsize="end" />
+
+ </RelativeLayout>
+ </LinearLayout>
+</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_dialog_applist.xml b/DeviceParts/res/layout/preference_dialog_applist.xml
new file mode 100644
index 0000000..38b4fd4
--- /dev/null
+++ b/DeviceParts/res/layout/preference_dialog_applist.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The OmniROM 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.
+-->
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="center_horizontal"
+ android:padding="24dip">
+
+ <ListView android:id="@+id/applist"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+
+</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_seek_bar.xml b/DeviceParts/res/layout/preference_seek_bar.xml
new file mode 100644
index 0000000..2afc97c
--- /dev/null
+++ b/DeviceParts/res/layout/preference_seek_bar.xml
@@ -0,0 +1,96 @@
+<?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 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/>.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:gravity="center_vertical"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:background="?android:attr/selectableItemBackground"
+ android:clipToPadding="false"
+ android:orientation="horizontal" >
+
+ <LinearLayout
+ android:id="@android:id/icon_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="-4dp"
+ android:minWidth="60dp"
+ android:gravity="start|center_vertical"
+ android:orientation="horizontal"
+ android:paddingEnd="12dp"
+ android:paddingTop="4dp"
+ android:paddingBottom="4dp">
+ <com.android.internal.widget.PreferenceImageView
+ android:id="@android:id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:maxWidth="48dp"
+ android:maxHeight="48dp" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:gravity="center_vertical"
+ android:layout_weight="1" >
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dip"
+ android:layout_marginBottom="6dip" >
+
+ <TextView android:id="@android:id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ android:ellipsize="marquee" />
+
+ <TextView android:id="@android:id/summary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@android:id/title"
+ android:layout_alignStart="@android:id/title"
+ android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+ android:textColor="?android:attr/textColorSecondary"
+ android:maxLines="10"
+ android:ellipsize="end" />
+
+ </RelativeLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:layout_marginTop="5dip"
+ android:layout_marginBottom="10dip">
+
+ <SeekBar android:id="@+id/seekbar"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingLeft="5dp"
+ android:paddingRight="5dp" />
+
+ </LinearLayout>
+ </LinearLayout>
+</LinearLayout>
diff --git a/DeviceParts/res/layout/settings_activity.xml b/DeviceParts/res/layout/settings_activity.xml
new file mode 100644
index 0000000..c0139ac
--- /dev/null
+++ b/DeviceParts/res/layout/settings_activity.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true" >
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:id="@+id/app_bar_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:fitsSystemWindows="true">
+
+ <com.google.android.material.appbar.MaterialToolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"/>
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <FrameLayout
+ android:id="@+id/fragment_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginStart="@dimen/fragment_side_margin"
+ android:layout_marginEnd="@dimen/fragment_side_margin"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/DeviceParts/res/values-af/strings.xml b/DeviceParts/res/values-af/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-af/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-am/strings.xml b/DeviceParts/res/values-am/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-am/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ar/strings.xml b/DeviceParts/res/values-ar/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ar/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-az-rAZ/strings.xml b/DeviceParts/res/values-az-rAZ/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-az-rAZ/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-bg/strings.xml b/DeviceParts/res/values-bg/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-bg/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ca/strings.xml b/DeviceParts/res/values-ca/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ca/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-cs/strings.xml b/DeviceParts/res/values-cs/strings.xml
new file mode 100644
index 0000000..d841367
--- /dev/null
+++ b/DeviceParts/res/values-cs/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="app_name">Zenfone 6</string>
+ <string name="category_gestures_title">Gesta zařízení</string>
+ <string name="category_vibrator">Vibrace</string>
+ <string name="vib_strength_title_head">Intenzita</string>
+ <string name="vib_strength_summary_head">Definujte intenzitu vibrací</string>
+ <string name="vib_test">Test</string>
+ <string name="advanced_settings">Rozšířené</string>
+ <string name="graphics_title">Grafika</string>
+ <string name="screen_title">Citlivost obrazovky</string>
+ <string name="glove_mode_summary">Zvyšuje citlivost při použití rukavic</string>
+ <string name="glove_mode_title">Režim s rukavicemi</string>
+ <string name="proxi_summary_head">Zkontrolujte senzor přiblížení pro zachycení senzoru otisků prstů</string>
+ <string name="proxi_title_head">Kontrola senzoru přiblížení</string>
+ <string name="choose_app">Vybrat aplikaci</string>
+ <string name="offscreen_gesture_title">Gesta při vypnuté obrazovce</string>
+ <string name="music_control_title">Ovládání hudby</string>
+ <string name="music_control_summary">"Nakreslete | | dvěma prsty pro pozastavení/obnovení hudby a < nebo > pro změnu skladby"</string>
+ <string name="category_m_gesture">Písmeno m</string>
+ <string name="category_e_gesture">Písmeno e</string>
+ <string name="category_s_gesture">Písmeno s</string>
+ <string name="category_v_gesture">Písmeno v</string>
+ <string name="category_w_gesture">Písmeno w</string>
+ <string name="category_z_gesture">Písmeno z</string>
+ <string name="category_left_arrow_gesture">Gesto <</string>
+ <string name="category_right_arrow_gesture">Gesto ></string>
+ <string name="category_gestures_summary">Konfigurace akcí gest</string>
+ <string name="torch_entry">Svítilna</string>
+ <string name="disabled_entry">Vypnuto</string>
+ <string name="camera_entry">Fotoaparát</string>
+ <string name="camera_label">Otočení kamery</string>
+ <string name="music_play_entry">Přehrát / pozastavit hudbu</string>
+ <string name="music_prev_entry">Předchozí skladba</string>
+ <string name="music_next_entry">Další skladba</string>
+ <string name="volume_up">Zvýšit hlasitost</string>
+ <string name="volume_down">Snížit hlasitost</string>
+ <string name="browse_scroll_up">Posunutí nahoru</string>
+ <string name="browse_scroll_down">Posunutí dolů</string>
+ <string name="navigate_back">Zpět</string>
+ <string name="navigate_home">Domů</string>
+ <string name="navigate_recent">Nedávné</string>
+ <string name="not_ready_summary">Řešení...</string>
+ <string name="resolve_failed_summary">Řešení aplikace selhalo</string>
+ <string name="category_down_swipe_gesture">Tah dolů</string>
+ <string name="category_up_swipe_gesture">Tah nahoru</string>
+ <string name="category_left_swipe_gesture">Tah doleva</string>
+ <string name="category_right_swipe_gesture">Tah doprava</string>
+ <string name="doze_category_title">Ambientní displej</string>
+ <string name="doze_category_summary">Probudí obrazovku při příjmu oznámení</string>
+ <string name="wave_check_summary">Pulzní oznámení při mávnutí rukou</string>
+ <string name="wave_check_title">Mávnutí rukou</string>
+ <string name="tilt_check_summary">Pulzní oznámení při zvednutí zařízení</string>
+ <string name="tilt_check_title">Zvednutí</string>
+ <string name="pocket_check_summary">Pulzní oznámení při vyjmutí z kapsy</string>
+ <string name="pocket_check_title">Kapsa</string>
+ <string name="ambient_display_enable">Ambientní display musí být povolen v nastavení obrazovky</string>
+ <string name="wake_entry">Probuzení</string>
+ <string name="swipe_up_to_wake_up_title">Potáhnutím nahoru probudit</string>
+ <string name="swipe_up_to_wake_up_summary">Potáhněte prstem nahoru po obrazovce pro probuzení zařízení z režimu nečinnosti</string>
+ <string name="category_frame_rate">FPS obrazovky</string>
+ <string name="refresh_rate_title">Obnovovací frekvence</string>
+ <string name="summary_placeholder"></string>
+ <string name="gaming_title">Herní režim</string>
+ <string name="gaming_browse_summary">Nastavení hry v Herním režimu</string>
+ <!-- Volume panel QS tile -->
+ <string name="volume_mode">Zvuk</string>
+ <string name="vibrate_mode">Vibrace</string>
+ <string name="mute_mode">Ticho</string>
+</resources>
diff --git a/DeviceParts/res/values-da/strings.xml b/DeviceParts/res/values-da/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-da/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-de/strings.xml b/DeviceParts/res/values-de/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-de/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-el/strings.xml b/DeviceParts/res/values-el/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-el/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-es/strings.xml b/DeviceParts/res/values-es/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-es/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-et/strings.xml b/DeviceParts/res/values-et/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-et/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-fa/strings.xml b/DeviceParts/res/values-fa/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-fa/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-fi/strings.xml b/DeviceParts/res/values-fi/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-fi/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-fr/strings.xml b/DeviceParts/res/values-fr/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-fr/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-hi/strings.xml b/DeviceParts/res/values-hi/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-hi/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-hr/strings.xml b/DeviceParts/res/values-hr/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-hr/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-hu/strings.xml b/DeviceParts/res/values-hu/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-hu/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-hy/strings.xml b/DeviceParts/res/values-hy/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-hy/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-in/strings.xml b/DeviceParts/res/values-in/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-in/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-it/strings.xml b/DeviceParts/res/values-it/strings.xml
new file mode 100644
index 0000000..05da780
--- /dev/null
+++ b/DeviceParts/res/values-it/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="app_name">Zenfone 6</string>
+ <string name="category_gestures_title">Gesti del dispositivo</string>
+ <string name="category_vibrator">Vibrazione</string>
+ <string name="vib_strength_title_head">Intensità</string>
+ <string name="vib_strength_summary_head">Definisci l\'intensità della vibrazione</string>
+ <string name="vib_test">Prova</string>
+ <string name="advanced_settings">Avanzate</string>
+ <string name="graphics_title">Grafica</string>
+ <string name="screen_title">Sensibilità dello Schermo</string>
+ <string name="glove_mode_summary">Aumenta la sensibilità al tocco indossando i guanti</string>
+ <string name="glove_mode_title">Modalità guanto</string>
+ <string name="proxi_summary_head">Controlla il sensore di prossimità per gestire il sensore di impronte digitali</string>
+ <string name="proxi_title_head">Controllo di prossimità</string>
+ <string name="choose_app">Scegli app</string>
+ <string name="offscreen_gesture_title">Gesti a schermo spento</string>
+ <string name="music_control_title">Controllo Musicale</string>
+ <string name="music_control_summary">"Disegna | | con due dita per interrompere/riprendere la musica e < o > per cambiare brano"</string>
+ <string name="category_m_gesture">Lettera M</string>
+ <string name="category_e_gesture">Lettera E</string>
+ <string name="category_s_gesture">Lettera S</string>
+ <string name="category_v_gesture">Lettera V</string>
+ <string name="category_w_gesture">Lettera W</string>
+ <string name="category_z_gesture">Lettera Z</string>
+ <string name="category_left_arrow_gesture">gesto <</string>
+ <string name="category_right_arrow_gesture">gesto ></string>
+ <string name="category_gestures_summary">Configura le azioni dei gesti</string>
+ <string name="torch_entry">Torcia</string>
+ <string name="disabled_entry">Disabilitato</string>
+ <string name="camera_entry">Fotocamera</string>
+ <string name="camera_label">Ruota fotocamera</string>
+ <string name="music_play_entry">Riproduci / interrompi la musica</string>
+ <string name="music_prev_entry">Traccia precedente</string>
+ <string name="music_next_entry">Traccia successiva</string>
+ <string name="volume_up">Alza il volume</string>
+ <string name="volume_down">Abbassa il volume</string>
+ <string name="browse_scroll_up">Scorri in su</string>
+ <string name="browse_scroll_down">Scorri in giù</string>
+ <string name="navigate_back">Indietro</string>
+ <string name="navigate_home">Home</string>
+ <string name="navigate_recent">Recenti</string>
+ <string name="not_ready_summary">Risolvendo...</string>
+ <string name="resolve_failed_summary">Risoluzione dell\'app fallita</string>
+ <string name="category_down_swipe_gesture">Scorri in giù</string>
+ <string name="category_up_swipe_gesture">Scorri in su</string>
+ <string name="category_left_swipe_gesture">Scorri a sinistra</string>
+ <string name="category_right_swipe_gesture">Scorri a destra</string>
+ <string name="doze_category_title">Ambient display</string>
+ <string name="doze_category_summary">Riattiva lo schermo alla ricezione di notifiche</string>
+ <string name="wave_check_summary">Lampeggia le notifiche agitando la mano</string>
+ <string name="wave_check_title">Agita la mano</string>
+ <string name="tilt_check_summary">Lampeggia le notifiche raccogliendo il dispositivo</string>
+ <string name="tilt_check_title">Raccogli</string>
+ <string name="pocket_check_summary">Lampeggia le notifiche estraendo dalla tasca</string>
+ <string name="pocket_check_title">Tasca</string>
+ <string name="ambient_display_enable">Ambient display dev\'esser abilitato nelle impostazioni dello schermo</string>
+ <string name="wake_entry">Riattiva</string>
+ <string name="swipe_up_to_wake_up_title">Scorri in su per riattivare</string>
+ <string name="swipe_up_to_wake_up_summary">Scorri in su sullo schermo per riattivare il tuo dispositivo dalla modalità inattiva</string>
+ <string name="category_frame_rate">FPS dello schermo</string>
+ <string name="refresh_rate_title">Frequenza di aggiornamento</string>
+ <string name="summary_placeholder"></string>
+ <string name="gaming_title">Game Genie</string>
+ <string name="gaming_browse_summary">Avvia le impostazioni del game genie</string>
+ <!-- Volume panel QS tile -->
+ <string name="volume_mode">Suono</string>
+ <string name="vibrate_mode">Vibrazione</string>
+ <string name="mute_mode">Silenzia</string>
+</resources>
diff --git a/DeviceParts/res/values-iw/strings.xml b/DeviceParts/res/values-iw/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-iw/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ja/strings.xml b/DeviceParts/res/values-ja/strings.xml
new file mode 100644
index 0000000..2378c81
--- /dev/null
+++ b/DeviceParts/res/values-ja/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="app_name">Zenfone 6</string>
+ <string name="category_gestures_title">端末ジェスチャー</string>
+ <string name="category_vibrator">振動</string>
+ <string name="vib_strength_title_head">強さ</string>
+ <string name="vib_strength_summary_head">振動の強さを決定する</string>
+ <string name="vib_test">テスト</string>
+ <string name="advanced_settings">高度な設定</string>
+ <string name="graphics_title">グラフィックス</string>
+ <string name="screen_title">画面の感度</string>
+ <string name="glove_mode_summary">手袋を着用した時のタッチ感度を上げる</string>
+ <string name="glove_mode_title">グローブモード</string>
+ <string name="proxi_summary_head">指紋センサーを処理するための近接センサーをチェックする</string>
+ <string name="proxi_title_head">近接センサーの確認</string>
+ <string name="choose_app">アプリの選択</string>
+ <string name="offscreen_gesture_title">画面消灯時のジェスチャー</string>
+ <string name="music_control_title">音楽コントロール</string>
+ <string name="music_control_summary">"2本の指で「 | | 」を描いで音楽を再生/停止し、< や > でトラックを変更します。"</string>
+ <string name="category_m_gesture">文字「m」</string>
+ <string name="category_e_gesture">文字「e」</string>
+ <string name="category_s_gesture">文字「s」</string>
+ <string name="category_v_gesture">文字「v」</string>
+ <string name="category_w_gesture">文字「w」</string>
+ <string name="category_z_gesture">文字「z」</string>
+ <string name="category_left_arrow_gesture">< ジェスチャー</string>
+ <string name="category_right_arrow_gesture">> ジェスチャー</string>
+ <string name="category_gestures_summary">ジェスチャー動作を設定する</string>
+ <string name="torch_entry">フラッシュライト</string>
+ <string name="disabled_entry">無効</string>
+ <string name="camera_entry">カメラ</string>
+ <string name="camera_label">カメラを回転</string>
+ <string name="music_play_entry">音楽の再生/停止</string>
+ <string name="music_prev_entry">前のトラック</string>
+ <string name="music_next_entry">次のトラック</string>
+ <string name="volume_up">音量を上げる</string>
+ <string name="volume_down">音量を下げる</string>
+ <string name="browse_scroll_up">上にスクロール</string>
+ <string name="browse_scroll_down">下にスクロール</string>
+ <string name="navigate_back">戻る</string>
+ <string name="navigate_home">ホーム</string>
+ <string name="navigate_recent">アプリ履歴</string>
+ <string name="not_ready_summary">処理しています...</string>
+ <string name="resolve_failed_summary">アプリの処理に失敗しました</string>
+ <string name="category_down_swipe_gesture">下にスワイプ</string>
+ <string name="category_up_swipe_gesture">上にスワイプ</string>
+ <string name="category_left_swipe_gesture">左にスワイプ</string>
+ <string name="category_right_swipe_gesture">右にスワイプ</string>
+ <string name="doze_category_title">アンビエント表示</string>
+ <string name="doze_category_summary">通知を受け取った時画面をスリープ解除する</string>
+ <string name="wave_check_summary">手を振った時に通知を点滅させる</string>
+ <string name="wave_check_title">手を振る</string>
+ <string name="tilt_check_summary">端末が傾いている時に通知を点滅させる</string>
+ <string name="tilt_check_title">持ち上げ</string>
+ <string name="pocket_check_summary">ポケットから外した時に通知を点滅させる</string>
+ <string name="pocket_check_title">ポケット</string>
+ <string name="ambient_display_enable">ディスプレイ設定でアンビエント表示を有効にしなければなりません</string>
+ <string name="wake_entry">スリープ解除</string>
+ <string name="swipe_up_to_wake_up_title">上にスワイプしてスリープ解除</string>
+ <string name="swipe_up_to_wake_up_summary">画面を上にスワイプして端末をアイドルモードからスリープ解除する</string>
+ <string name="category_frame_rate">画面の FPS</string>
+ <string name="refresh_rate_title">リフレッシュレート</string>
+ <string name="summary_placeholder"></string>
+ <string name="gaming_title">Game Genie</string>
+ <string name="gaming_browse_summary">Game Genie アプリを起動</string>
+ <!-- Volume panel QS tile -->
+ <string name="volume_mode">音声</string>
+ <string name="vibrate_mode">振動</string>
+ <string name="mute_mode">消音</string>
+</resources>
diff --git a/DeviceParts/res/values-ka/strings.xml b/DeviceParts/res/values-ka/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ka/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-km/strings.xml b/DeviceParts/res/values-km/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-km/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ko/strings.xml b/DeviceParts/res/values-ko/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ko/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-lo-rLA/strings.xml b/DeviceParts/res/values-lo-rLA/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-lo-rLA/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-lt/strings.xml b/DeviceParts/res/values-lt/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-lt/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-lv/strings.xml b/DeviceParts/res/values-lv/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-lv/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-mn/strings.xml b/DeviceParts/res/values-mn/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-mn/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ms/strings.xml b/DeviceParts/res/values-ms/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ms/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-nb/strings.xml b/DeviceParts/res/values-nb/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-nb/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ne/strings.xml b/DeviceParts/res/values-ne/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ne/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-night/colors.xml b/DeviceParts/res/values-night/colors.xml
new file mode 100644
index 0000000..2d656f0
--- /dev/null
+++ b/DeviceParts/res/values-night/colors.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2020 The OmniROM 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">
+ <color name="colorPrimary">@android:color/system_accent1_100</color>
+</resources>
diff --git a/DeviceParts/res/values-nl/strings.xml b/DeviceParts/res/values-nl/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-nl/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-pl/strings.xml b/DeviceParts/res/values-pl/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-pl/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-pt-rBR/strings.xml b/DeviceParts/res/values-pt-rBR/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-pt-rBR/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-pt-rPT/strings.xml b/DeviceParts/res/values-pt-rPT/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-pt-rPT/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-rm/strings.xml b/DeviceParts/res/values-rm/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-rm/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ro/strings.xml b/DeviceParts/res/values-ro/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ro/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-ru/strings.xml b/DeviceParts/res/values-ru/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-ru/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-si/strings.xml b/DeviceParts/res/values-si/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-si/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-sk/strings.xml b/DeviceParts/res/values-sk/strings.xml
new file mode 100644
index 0000000..f407cdd
--- /dev/null
+++ b/DeviceParts/res/values-sk/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="app_name">Zenfone 6</string>
+ <string name="category_gestures_title">Gestá zariadenia</string>
+ <string name="category_vibrator">Vibrovanie</string>
+ <string name="vib_strength_title_head">Intenzita</string>
+ <string name="vib_strength_summary_head">Definujte intenzitu vibrácií</string>
+ <string name="vib_test">Test</string>
+ <string name="advanced_settings">Rozšírené</string>
+ <string name="graphics_title">Grafika</string>
+ <string name="screen_title">citlivosť obrazovky</string>
+ <string name="glove_mode_summary">Zvyšuje citlivosť pri použití rukavíc</string>
+ <string name="glove_mode_title">Režim s rukavicami</string>
+ <string name="proxi_summary_head">Kontrola senzoru priblíženia na ovládanie gest a snímača odtlačkov prstov</string>
+ <string name="proxi_title_head">Kontrola senzoru priblíženia</string>
+ <string name="choose_app">Vybrať aplikáciu</string>
+ <string name="offscreen_gesture_title">Gestá pri vypnutej obrazovke</string>
+ <string name="music_control_title">Ovládanie hudby</string>
+ <string name="music_control_summary">"Nakreslite | | dvoma prstami pre pozastavenie/obnovenie hudby a < alebo > pre zmenu skladby"</string>
+ <string name="category_m_gesture">Písmeno m</string>
+ <string name="category_e_gesture">Písmeno e</string>
+ <string name="category_s_gesture">Písmeno s</string>
+ <string name="category_v_gesture">Písmeno v</string>
+ <string name="category_w_gesture">Písmeno w</string>
+ <string name="category_z_gesture">Písmeno z</string>
+ <string name="category_left_arrow_gesture">Gesto <</string>
+ <string name="category_right_arrow_gesture">Gesto ></string>
+ <string name="category_gestures_summary">Konfigurácia akcií gest</string>
+ <string name="torch_entry">Svietidlo</string>
+ <string name="disabled_entry">Vypnuté</string>
+ <string name="camera_entry">Fotoaparát</string>
+ <string name="camera_label">Otočiť fotoaparát</string>
+ <string name="music_play_entry">Prehrávanie / pozastavenie hudby</string>
+ <string name="music_prev_entry">Predchádzajúca skladba</string>
+ <string name="music_next_entry">Ďalšia skladba</string>
+ <string name="volume_up">Zvýšenie hlasitosti</string>
+ <string name="volume_down">Sníženie hlasitosti</string>
+ <string name="browse_scroll_up">Posunutie nahor</string>
+ <string name="browse_scroll_down">Posunutie nadol</string>
+ <string name="navigate_back">Späť</string>
+ <string name="navigate_home">Domov</string>
+ <string name="navigate_recent">Nedávne</string>
+ <string name="not_ready_summary">Riešenie...</string>
+ <string name="resolve_failed_summary">Riešenie aplikácie zlyhalo</string>
+ <string name="category_down_swipe_gesture">Potiahnutie nadol</string>
+ <string name="category_up_swipe_gesture">Potiahnutie nahor</string>
+ <string name="category_left_swipe_gesture">Potiahnutie vľavo</string>
+ <string name="category_right_swipe_gesture">Potiahnutie vpravo</string>
+ <string name="doze_category_title">Ambientne zobrazenie</string>
+ <string name="doze_category_summary">Prebudiť obrazovku po prijatí upozornenia</string>
+ <string name="wave_check_summary">Zobraziť upozornenia pri mávnutí rukou</string>
+ <string name="wave_check_title">Mávnutie rukou</string>
+ <string name="tilt_check_summary">Zobraziť upozornenia pri zdvihnutí zariadenia</string>
+ <string name="tilt_check_title">Zdvihnutie zariadenia</string>
+ <string name="pocket_check_summary">Zobraziť upozornenia pri vybratí zariadenia z vrecka</string>
+ <string name="pocket_check_title">Vrecko</string>
+ <string name="ambient_display_enable">V nastaveniach obrazovky musí byť zapnuté Ambientne zobrazenie</string>
+ <string name="wake_entry">Prebudenie</string>
+ <string name="swipe_up_to_wake_up_title">Potiahnutím nahor prebudiť</string>
+ <string name="swipe_up_to_wake_up_summary">Potiahnite prstom po obrazovke nahor pre prebudenie zariadenia z režimu nečinnosti</string>
+ <string name="category_frame_rate">FPS obrazovky</string>
+ <string name="refresh_rate_title">Obnovovacia frekvencia</string>
+ <string name="summary_placeholder"></string>
+ <string name="gaming_title">Herný režim</string>
+ <string name="gaming_browse_summary">Nastavenie hry v Hernom režime</string>
+ <!-- Volume panel QS tile -->
+ <string name="volume_mode">Zvuk</string>
+ <string name="vibrate_mode">Vibrovanie</string>
+ <string name="mute_mode">Stlmiť</string>
+</resources>
diff --git a/DeviceParts/res/values-sl/strings.xml b/DeviceParts/res/values-sl/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-sl/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-sr/strings.xml b/DeviceParts/res/values-sr/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-sr/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-sv/strings.xml b/DeviceParts/res/values-sv/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-sv/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-sw/strings.xml b/DeviceParts/res/values-sw/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-sw/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-th/strings.xml b/DeviceParts/res/values-th/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-th/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-tl/strings.xml b/DeviceParts/res/values-tl/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-tl/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-tr/strings.xml b/DeviceParts/res/values-tr/strings.xml
new file mode 100644
index 0000000..38a789e
--- /dev/null
+++ b/DeviceParts/res/values-tr/strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="app_name">Zenfone 6</string>
+ <string name="category_gestures_title">Cihaz hareketleri</string>
+ <string name="category_vibrator">Titreşim motoru</string>
+ <string name="vib_strength_title_head">Şiddet</string>
+ <string name="vib_strength_summary_head">Titreşim motorunun şiddetini belirler</string>
+ <string name="vib_test">Tecrübe edin</string>
+ <string name="advanced_settings">İleri seviye</string>
+ <string name="graphics_title">Grafik</string>
+ <string name="screen_title">Ekran Hassasiyeti</string>
+ <string name="glove_mode_summary">Eldivenle kullanırken dokunma hassasiyetini artırır</string>
+ <string name="glove_mode_title">Eldiven modu</string>
+ <string name="proxi_summary_head">Hareket ve parmak izi sensörünü yönetmek için yakınlık sensörünü yoklar</string>
+ <string name="proxi_title_head">Yakınlık yoklaması</string>
+ <string name="choose_app">Uygulama seçin</string>
+ <string name="offscreen_gesture_title">Kapalı ekran hareketleri</string>
+ <string name="music_control_title">Müzik Kontrolü</string>
+ <string name="music_control_summary">"Müziği duraklatmak ve devam ettirmek için iki parmağınızla | | işaretini, parçayı değiştirmek için < veya > işaretini çizin"</string>
+ <string name="category_m_gesture">M harfi</string>
+ <string name="category_e_gesture">E harfi</string>
+ <string name="category_s_gesture">S harfi</string>
+ <string name="category_v_gesture">V harfi</string>
+ <string name="category_w_gesture">W harfi</string>
+ <string name="category_z_gesture">Z harfi</string>
+ <string name="category_left_arrow_gesture">< hareketi</string>
+ <string name="category_right_arrow_gesture">> hareketi</string>
+ <string name="category_gestures_summary">Hareket eylemlerini ayarlayın</string>
+ <string name="torch_entry">El Feneri</string>
+ <string name="disabled_entry">Devre dışı</string>
+ <string name="camera_entry">Kamera</string>
+ <string name="camera_label">Kamerayı döndür</string>
+ <string name="music_play_entry">Müziği çal veyâ duraklat</string>
+ <string name="music_prev_entry">Evvelki şarkı</string>
+ <string name="music_next_entry">Sonraki şarkı</string>
+ <string name="volume_up">Sesi artır</string>
+ <string name="volume_down">Sesi kıs</string>
+ <string name="browse_scroll_up">Yukarıya kaydır</string>
+ <string name="browse_scroll_down">Aşağıya kaydır</string>
+ <string name="navigate_back">Geri</string>
+ <string name="navigate_home">Ana ekran</string>
+ <string name="navigate_recent">Son uygulamalar</string>
+ <string name="not_ready_summary">Tahlîl ediliyor...</string>
+ <string name="resolve_failed_summary">Uygulamalar tahlîl edilemedi</string>
+ <string name="category_down_swipe_gesture">Aşağıya kaydırma</string>
+ <string name="category_up_swipe_gesture">Yukarıya kaydırma</string>
+ <string name="category_left_swipe_gesture">Sola kaydırma</string>
+ <string name="category_right_swipe_gesture">Sağa kaydırma</string>
+ <string name="doze_category_title">Ortam ekranı</string>
+ <string name="doze_category_summary">Bildirim aldığınızda ekranı uyandırır</string>
+ <string name="wave_check_summary">Bildirimleri el sallandığı zaman gösterir</string>
+ <string name="wave_check_title">El sallama</string>
+ <string name="tilt_check_summary">Bildirimleri cihaz ele alındığı zaman gösterir</string>
+ <string name="tilt_check_title">Ele alma</string>
+ <string name="pocket_check_summary">Bildirimleri cihaz cepten çıkarıldığı zaman gösterir</string>
+ <string name="pocket_check_title">Cep</string>
+ <string name="ambient_display_enable">Ekran ayarlarındaki ortam ekranı devreye sokulmalıdır</string>
+ <string name="wake_entry">Uyanma</string>
+ <string name="swipe_up_to_wake_up_title">Uyandırmak için yukarıya kaydırın</string>
+ <string name="swipe_up_to_wake_up_summary">Cihazınızı bekleme modundan çıkarmak için ekran üzerinde yukarıya doğru kaydırın</string>
+ <string name="category_frame_rate">Ekran FPS\'si</string>
+ <string name="refresh_rate_title">Yenileme oranı</string>
+ <string name="summary_placeholder"></string>
+ <string name="gaming_title">Oyun Cini</string>
+ <string name="gaming_browse_summary">Oyun cini ayarlarını açar</string>
+ <!-- Volume panel QS tile -->
+ <string name="volume_mode">Ses</string>
+ <string name="vibrate_mode">Titreşim</string>
+ <string name="mute_mode">Sessiz</string>
+</resources>
diff --git a/DeviceParts/res/values-uk/strings.xml b/DeviceParts/res/values-uk/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-uk/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-vi/strings.xml b/DeviceParts/res/values-vi/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-vi/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-zh-rCN/strings.xml b/DeviceParts/res/values-zh-rCN/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-zh-rCN/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-zh-rHK/strings.xml b/DeviceParts/res/values-zh-rHK/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-zh-rHK/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-zh-rTW/strings.xml b/DeviceParts/res/values-zh-rTW/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-zh-rTW/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values-zu/strings.xml b/DeviceParts/res/values-zu/strings.xml
new file mode 100644
index 0000000..4559d64
--- /dev/null
+++ b/DeviceParts/res/values-zu/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="summary_placeholder"></string>
+ <!-- Volume panel QS tile -->
+</resources>
diff --git a/DeviceParts/res/values/arrays.xml b/DeviceParts/res/values/arrays.xml
new file mode 100644
index 0000000..e387a34
--- /dev/null
+++ b/DeviceParts/res/values/arrays.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 The OmniROM 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>
+ <string-array name="frame_rate_entries" translatable="false">
+ <item>60 Hz</item>
+ <item>90 Hz</item>
+ <item>120 Hz</item>
+ <item>144 Hz</item>
+ <item>160 Hz</item>
+ </string-array>
+
+ <string-array name="frame_rate_values" translatable="false">
+ <item>60</item>
+ <item>90</item>
+ <item>120</item>
+ <item>144</item>
+ <item>160</item>
+ </string-array>
+
+ <string-array name="frame_rate_zf7_entries" translatable="false">
+ <item>60 Hz</item>
+ <item>90 Hz</item>
+ </string-array>
+
+ <string-array name="frame_rate_zf7_values" translatable="false">
+ <item>60</item>
+ <item>90</item>
+ </string-array>
+</resources>
\ No newline at end of file
diff --git a/DeviceParts/res/values/colors.xml b/DeviceParts/res/values/colors.xml
new file mode 100644
index 0000000..9736292
--- /dev/null
+++ b/DeviceParts/res/values/colors.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2022 The OmniROM 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">
+ <color name="colorPrimary">@android:color/system_accent1_600</color>
+</resources>
diff --git a/DeviceParts/res/values/config.xml b/DeviceParts/res/values/config.xml
new file mode 100644
index 0000000..d396095
--- /dev/null
+++ b/DeviceParts/res/values/config.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 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">
+
+ <bool name="config_device_has_hw_nav_buttons">false</bool>
+
+</resources>
diff --git a/DeviceParts/res/values/dimens.xml b/DeviceParts/res/values/dimens.xml
new file mode 100644
index 0000000..7ba469a
--- /dev/null
+++ b/DeviceParts/res/values/dimens.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="fragment_side_margin">10dp</dimen>
+</resources>
\ No newline at end of file
diff --git a/DeviceParts/res/values/strings.xml b/DeviceParts/res/values/strings.xml
new file mode 100644
index 0000000..711df79
--- /dev/null
+++ b/DeviceParts/res/values/strings.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2017 The OmniROM 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>
+ <string name="app_name">Zenfone 6</string>
+ <string name="category_gestures_title">Device gestures</string>
+ <string name="category_vibrator">Vibrator</string>
+ <string name="vib_strength_title_head">Strength</string>
+ <string name="vib_strength_summary_head">Define the strength of the vibrator</string>
+ <string name="vib_test">Test</string>
+ <string name="advanced_settings">DeviceParts</string>
+ <string name="graphics_title">Graphics</string>
+ <string name="screen_title">Screen Sensitivity</string>
+ <string name="glove_mode_summary">Increase touch sensitivity when wearing gloves</string>
+ <string name="glove_mode_title">Glove mode</string>
+ <string name="proxi_summary_head">Check proximity sensor for handling fingerprint sensor</string>
+ <string name="proxi_title_head">Proximity check</string>
+
+ <string name="choose_app">Choose app</string>
+ <string name="offscreen_gesture_title">Offscreen gestures</string>
+ <string name="music_control_title">Music Control</string>
+ <string name="music_control_summary">"Draw | | with two fingers to pause/resume music, and < or > to change track"</string>
+ <string name="category_m_gesture">Letter m</string>
+ <string name="category_e_gesture">Letter e</string>
+ <string name="category_s_gesture">Letter s</string>
+ <string name="category_v_gesture">Letter v</string>
+ <string name="category_w_gesture">Letter w</string>
+ <string name="category_z_gesture">Letter z</string>
+ <string name="category_left_arrow_gesture">< gesture</string>
+ <string name="category_right_arrow_gesture">> gesture</string>
+ <string name="category_gestures_summary">Configure gesture actions</string>
+ <string name="torch_entry">Flashlight</string>
+ <string name="disabled_entry">Disabled</string>
+ <string name="camera_entry">Camera</string>
+ <string name="camera_label">Rotate camera</string>
+ <string name="music_play_entry">Play / pause music</string>
+ <string name="music_prev_entry">Prev track</string>
+ <string name="music_next_entry">Next track</string>
+ <string name="volume_up">Raise volume</string>
+ <string name="volume_down">Lower volume</string>
+ <string name="browse_scroll_up">Scroll up</string>
+ <string name="browse_scroll_down">Scroll down</string>
+ <string name="navigate_back">Back</string>
+ <string name="navigate_home">Home</string>
+ <string name="navigate_recent">Recent</string>
+ <string name="not_ready_summary">Resolving...</string>
+ <string name="resolve_failed_summary">Resolving app failed</string>
+ <string name="category_down_swipe_gesture">Down swipe</string>
+ <string name="category_up_swipe_gesture">Up swipe</string>
+ <string name="category_left_swipe_gesture">Left swipe</string>
+ <string name="category_right_swipe_gesture">Right swipe</string>
+
+ <string name="doze_category_title">Ambient display</string>
+ <string name="doze_category_summary">Wake screen when you receive notifications</string>
+ <string name="wave_check_summary">Pulse notifications on hand wave</string>
+ <string name="wave_check_title">Hand wave</string>
+ <string name="tilt_check_summary">Pulse notifications when device is picked up</string>
+ <string name="tilt_check_title">Pick up</string>
+ <string name="pocket_check_summary">Pulse notifications on removal from pocket</string>
+ <string name="pocket_check_title">Pocket</string>
+ <string name="wake_entry">Wakeup</string>
+ <string name="swipe_up_to_wake_up_title">Swipe up to wake up</string>
+ <string name="swipe_up_to_wake_up_summary">Swipe up on the screen to wake up your device from idle mode</string>
+ <string name="category_frame_rate">FPS of the screen</string>
+ <string name="refresh_rate_title">Refresh rate</string>
+ <string name="summary_placeholder"> </string>
+
+ <string name="gaming_title">Game Category</string>
+ <string name="gaming_browse_summary">Launch game genie settings</string>
+ <string name="asus_advanced_settings_gripsensor">AirTriggers</string>
+ <string name="grip_category_title">Launch AirTriggers</string>
+ <string name="grip_category_summary">Settings of your Grip Sensor</string>
+
+ <!-- AudioWizard -->
+ <string name="audio_title">Audio Settings</string>
+ <string name="audio_summary">Audio Settings of the device</string>
+ <string name="audiowizard_entry_title">AudioWizard</string>
+ <string name="outdoor_mode_title">Outdoor mode</string>
+
+ <!-- Volume panel QS tile -->
+ <string name="volume_mode">Sound</string>
+ <string name="vibrate_mode">Vibrate</string>
+ <string name="mute_mode">Mute</string>
+
+ <!-- Zenfone7 Motor settings -->
+ <string name="camera_retraction_category">Camera retraction</string>
+ <string name="calibrate_camera_angle_title">Calibrate camera angle</string>
+ <string name="calibrate_camera_angle_summary">When the flip angle of the camera is abnormal, calibrate the camera to restore to its original position</string>
+
+</resources>
diff --git a/DeviceParts/res/values/styles.xml b/DeviceParts/res/values/styles.xml
new file mode 100644
index 0000000..90fbdb1
--- /dev/null
+++ b/DeviceParts/res/values/styles.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014-2020 The OmniROM 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="AppTheme" parent="Theme.Material3.DayNight.NoActionBar">
+ <item name="colorPrimary">@color/colorPrimary</item>
+ <item name="colorAccent">?attr/colorPrimary</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:windowLightStatusBar">?attr/isLightTheme</item>
+ <item name="android:windowLightNavigationBar">?attr/isLightTheme</item>
+ <item name="preferenceTheme">@style/Omni.PreferenceTheme</item>
+ <item name="android:switchStyle">@style/Omni.SwitchStyle</item>
+ <item name="android:textAppearanceListItem">@style/Omni.PreferenceTitle</item>
+ <item name="alertDialogTheme">@style/AlertDialogTheme</item>
+ </style>
+
+ <style name="AlertDialogTheme" parent="Theme.Material3.DayNight.Dialog.Alert">
+ <item name="colorAccent">?attr/colorPrimary</item>
+ <item name="colorPrimary">@color/colorPrimary</item>
+ <item name="dialogCornerRadius">8dp</item>
+ </style>
+</resources>
diff --git a/DeviceParts/res/xml/audio_mode.xml b/DeviceParts/res/xml/audio_mode.xml
new file mode 100644
index 0000000..f511c73
--- /dev/null
+++ b/DeviceParts/res/xml/audio_mode.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2023 The OmniROM 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <SwitchPreference
+ android:key="outdoor_mode"
+ android:title="@string/outdoor_mode_title"
+ android:persistent="false" />
+
+ <Preference
+ android:title="@string/audiowizard_entry_title"
+ android:key="audiowizard_entry">
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="com.asus.audiowizard"
+ android:targetClass="com.asus.audiowizard.MainActivity"/>
+ </Preference>
+
+</PreferenceScreen>
diff --git a/DeviceParts/res/xml/doze_settings.xml b/DeviceParts/res/xml/doze_settings.xml
new file mode 100644
index 0000000..1cb55c5
--- /dev/null
+++ b/DeviceParts/res/xml/doze_settings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2014-2016 The OmniROM 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+ <SwitchPreference
+ android:key="wave_check"
+ android:summary="@string/wave_check_summary"
+ android:title="@string/wave_check_title"
+ android:persistent="false" />
+ <SwitchPreference
+ android:key="pocket_check"
+ android:summary="@string/pocket_check_summary"
+ android:title="@string/pocket_check_title"
+ android:persistent="false" />
+ <SwitchPreference
+ android:key="tilt_check"
+ android:summary="@string/tilt_check_summary"
+ android:title="@string/tilt_check_title"
+ android:persistent="false" />
+</PreferenceScreen>
diff --git a/DeviceParts/res/xml/gesture_settings.xml b/DeviceParts/res/xml/gesture_settings.xml
new file mode 100644
index 0000000..48b7b87
--- /dev/null
+++ b/DeviceParts/res/xml/gesture_settings.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2017 The OmniROM 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <SwitchPreference
+ android:key="proxi"
+ android:summary="@string/proxi_summary_head"
+ android:title="@string/proxi_title_head"
+ android:persistent="false"
+ android:defaultValue="true" />
+
+ <PreferenceCategory
+ android:title="@string/offscreen_gesture_title">
+
+ <SwitchPreference
+ android:key="swipeup"
+ android:title="@string/swipe_up_to_wake_up_title"
+ android:summary="@string/swipe_up_to_wake_up_summary"
+ android:persistent="false" />
+
+ <SwitchPreference
+ android:key="music_gesture_app"
+ android:title="@string/music_control_title"
+ android:summary="@string/music_control_summary"
+ android:persistent="false" />
+
+ <org.omnirom.device.AppSelectListPreference
+ android:key="e_gesture_app"
+ android:title="@string/category_e_gesture"
+ android:persistent="false" />
+
+ <org.omnirom.device.AppSelectListPreference
+ android:key="m_gesture_app"
+ android:title="@string/category_m_gesture"
+ android:persistent="false" />
+
+ <org.omnirom.device.AppSelectListPreference
+ android:key="s_gesture_app"
+ android:title="@string/category_s_gesture"
+ android:persistent="false" />
+
+ <org.omnirom.device.AppSelectListPreference
+ android:key="v_gesture_app"
+ android:title="@string/category_v_gesture"
+ android:persistent="false"/>
+
+ <org.omnirom.device.AppSelectListPreference
+ android:key="w_gesture_app"
+ android:title="@string/category_w_gesture"
+ android:persistent="false"/>
+
+ <org.omnirom.device.AppSelectListPreference
+ android:key="z_gesture_app"
+ android:title="@string/category_z_gesture"
+ android:persistent="false"/>
+
+ </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/DeviceParts/res/xml/main.xml b/DeviceParts/res/xml/main.xml
new file mode 100644
index 0000000..aad09f0
--- /dev/null
+++ b/DeviceParts/res/xml/main.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2014-2016 The OmniROM 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.
+-->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <PreferenceCategory
+ android:key="audio_category"
+ android:title="@string/audio_title">
+
+ <Preference
+ android:key="audio_pref"
+ android:title="@string/audio_title"
+ android:summary="@string/audio_summary"
+ android:persistent="false" >
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="org.omnirom.device"
+ android:targetClass="org.omnirom.device.AudioSettingsActivity" />
+ </Preference>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="key_gesture_category"
+ android:title="@string/category_gestures_title">
+ <Preference
+ android:key="gesture_category"
+ android:title="@string/category_gestures_title"
+ android:summary="@string/category_gestures_summary"
+ android:persistent="false" >
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="org.omnirom.device"
+ android:targetClass="org.omnirom.device.GestureSettingsActivity" />
+ </Preference>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="key_doze_category"
+ android:title="@string/doze_category_title">
+ <Preference
+ android:key="doze_category"
+ android:title="@string/doze_category_title"
+ android:summary="@string/doze_category_summary"
+ android:persistent="false" >
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="org.omnirom.device"
+ android:targetClass="org.omnirom.device.DozeSettingsActivity" />
+ </Preference>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="category_motor"
+ android:title="@string/camera_retraction_category">
+ <Preference
+ android:key="camera_angle_manager"
+ android:title="@string/calibrate_camera_angle_title"
+ android:summary="@string/calibrate_camera_angle_summary"
+ android:persistent="false" >
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="com.asus.motork"
+ android:targetClass="com.asus.motork.MainActivity" />
+ </Preference>
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="frame_mode_main"
+ android:title="@string/category_frame_rate">
+ <ListPreference
+ android:key="frame_mode_key"
+ android:title="@string/refresh_rate_title"
+ android:entries="@array/frame_rate_entries"
+ android:entryValues="@array/frame_rate_values"
+ android:persistent="false" />
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="frame_mode_main_zf7"
+ android:title="@string/category_frame_rate">
+ <ListPreference
+ android:key="frame_mode_key_zf7"
+ android:title="@string/refresh_rate_title"
+ android:entries="@array/frame_rate_zf7_entries"
+ android:entryValues="@array/frame_rate_zf7_values"
+ android:persistent="false" />
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="screen"
+ android:title="@string/screen_title">
+ <SwitchPreference
+ android:key="glove"
+ android:summary="@string/glove_mode_summary"
+ android:title="@string/glove_mode_title"
+ android:persistent="false" />
+ </PreferenceCategory>
+
+ <PreferenceCategory
+ android:key="category_gaming"
+ android:title="@string/gaming_title">
+
+ <SwitchPreference
+ android:key="grip_sensor_apk"
+ android:title="@string/asus_advanced_settings_gripsensor"
+ android:persistent="false" />
+
+ <Preference
+ android:key="grip_sensor_pref"
+ android:title="@string/grip_category_title"
+ android:summary="@string/grip_category_summary"
+ android:persistent="false" >
+ <intent android:action="asus.intent.action.AIRTRIGGER"
+ android:targetPackage="com.asus.airtriggers"/>
+ </Preference>
+
+ <Preference
+ android:key="game_toolbar_app"
+ android:title="@string/gaming_title"
+ android:summary="@string/gaming_browse_summary"
+ android:persistent="false" >
+ <intent android:action="com.asus.gamewidget.action.SETTINGS"
+ android:targetPackage="com.asus.gamewidget"/>
+ </Preference>
+
+ </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/DeviceParts/src/org/omnirom/device/Airtrigger.java b/DeviceParts/src/org/omnirom/device/Airtrigger.java
new file mode 100644
index 0000000..6ada330
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/Airtrigger.java
@@ -0,0 +1,49 @@
+/*
+* Copyright (C) 2020 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.ActivityOptions;
+import android.content.ActivityNotFoundException;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.provider.Settings;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceManager;
+import android.util.Log;
+
+public class Airtrigger {
+
+ private static final String AIRTRIGGER_PACKAGE_NAME = "com.asus.airtriggers";
+ private static final String ACTION_START_AIRTRIGGER_SETTINGS = "asus.intent.action.AIRTRIGGER";
+ private static final String TAG = "AirTriggerApkPreferenceController";
+
+ private Context mContext;
+
+ public Airtrigger(Context context) {
+ mContext = context;
+ }
+
+ protected static void startAirTriggerSettings(Context context) {
+ try {
+ context.startActivity(new Intent(ACTION_START_AIRTRIGGER_SETTINGS).setPackage(AIRTRIGGER_PACKAGE_NAME).addFlags(335544320), ActivityOptions.makeBasic().setLaunchDisplayId(0).toBundle());
+ } catch (ActivityNotFoundException e) {
+ Log.e(TAG, "AirTrigger apk activity not found exception : " + e.toString());
+ }
+ }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java b/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java
new file mode 100644
index 0000000..e8a7d18
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java
@@ -0,0 +1,422 @@
+/*
+* Copyright (C) 2017 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.graphics.drawable.Drawable;
+import android.os.Handler;
+import android.os.Message;
+import androidx.preference.PreferenceViewHolder;
+import androidx.preference.PreferenceDialogFragment;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import com.android.settingslib.CustomDialogPreferenceCompat;
+
+public class AppSelectListPreference extends CustomDialogPreferenceCompat {
+
+ private static String TAG = "AppSelectListPreference";
+
+ public static final String TORCH_ENTRY = "torch";
+ public static final String DISABLED_ENTRY = "disabled";
+ public static final String CAMERA_ENTRY = "camera";
+ public static final String MUSIC_PLAY_ENTRY = "music_play";
+ public static final String MUSIC_PREV_ENTRY = "music_prev";
+ public static final String MUSIC_NEXT_ENTRY = "music_next";
+ public static final String WAKE_ENTRY = "wake";
+ public static final String VOLUME_UP_ENTRY = "volume_up";
+ public static final String VOLUME_DOWN_ENTRY = "volume_down";
+ public static final String BROWSE_SCROLL_DOWN_ENTRY = "browse_scroll_down";
+ public static final String BROWSE_SCROLL_UP_ENTRY = "browse_scroll_up";
+ public static final String NAVIGATE_BACK_ENTRY = "navigate_back";
+ public static final String NAVIGATE_HOME_ENTRY = "navigate_home";
+ public static final String NAVIGATE_RECENT_ENTRY = "navigate_recent";
+
+ private AppSelectListAdapter mAdapter;
+ private Drawable mAppIconDrawable;
+ private int mAppIconResourceId;
+ private CharSequence mTitle;
+ private String mValue;
+ private PackageManager mPm;
+ private List<PackageItem> mInstalledPackages = new LinkedList<PackageItem>();
+
+ public static class PackageItem implements Comparable<PackageItem> {
+ public final CharSequence mTitle;
+ public final int mAppIconResourceId;
+ public final ComponentName mComponentName;
+ public final String mValue;
+
+ PackageItem(CharSequence title, int iconResourceId, ComponentName componentName) {
+ mTitle = title;
+ mAppIconResourceId = iconResourceId;
+ mComponentName = componentName;
+ mValue = componentName.flattenToString();
+ }
+
+ PackageItem(CharSequence title, int iconResourceId, String value) {
+ mTitle = title;
+ mAppIconResourceId = iconResourceId;
+ mComponentName = null;
+ mValue = value;
+ }
+
+ @Override
+ public int compareTo(PackageItem another) {
+ return mTitle.toString().toUpperCase().compareTo(another.mTitle.toString().toUpperCase());
+ }
+
+ @Override
+ public int hashCode() {
+ return mValue.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object another) {
+ if (another == null || !(another instanceof PackageItem)) {
+ return false;
+ }
+ return mValue.equals(((PackageItem) another).mValue);
+ }
+ }
+
+ public class AppSelectListAdapter extends BaseAdapter {
+ private LayoutInflater mInflater;
+
+ public AppSelectListAdapter(Context context) {
+ mInflater = LayoutInflater.from(context);
+ }
+
+ @Override
+ public int getCount() {
+ return mInstalledPackages.size();
+ }
+
+ @Override
+ public PackageItem getItem(int position) {
+ return mInstalledPackages.get(position);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return mInstalledPackages.get(position).hashCode();
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ ViewHolder holder;
+ if (convertView != null) {
+ holder = (ViewHolder) convertView.getTag();
+ } else {
+ convertView = mInflater.inflate(R.layout.applist_preference_icon, null, false);
+ holder = new ViewHolder();
+ convertView.setTag(holder);
+ holder.title = (TextView) convertView.findViewById(R.id.title);
+ holder.icon = (ImageView) convertView.findViewById(R.id.icon);
+ }
+
+ PackageItem applicationInfo = getItem(position);
+ holder.title.setText(applicationInfo.mTitle);
+ if (applicationInfo.mAppIconResourceId != 0) {
+ holder.icon.setImageResource(applicationInfo.mAppIconResourceId);
+ } else {
+ Drawable d = resolveAppIcon(applicationInfo);
+ holder.icon.setImageDrawable(d);
+ }
+ return convertView;
+ }
+
+ private PackageItem resolveApplication(ComponentName componentName) {
+ for (PackageItem item : mInstalledPackages) {
+ if (item.mComponentName != null && item.mComponentName.equals(componentName)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ private class ViewHolder {
+ TextView title;
+ TextView summary;
+ ImageView icon;
+ }
+ }
+
+ public AppSelectListPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ public AppSelectListPreference(Context context, int color) {
+ super(context, null);
+ init();
+ }
+
+ public void setPackageList(List<PackageItem> installedPackages) {
+ mInstalledPackages.clear();
+ mInstalledPackages.addAll(installedPackages);
+ addSpecialApps();
+ mAdapter.notifyDataSetChanged();
+ updatePreferenceViews();
+ }
+
+ private void init() {
+ mPm = getContext().getPackageManager();
+ setDialogLayoutResource(R.layout.preference_dialog_applist);
+ setLayoutResource(R.layout.preference_app_select);
+ setNegativeButtonText(android.R.string.cancel);
+ setPositiveButtonText(null);
+ setDialogTitle(R.string.choose_app);
+ setDialogIcon(null);
+ mAdapter = new AppSelectListAdapter(getContext());
+ }
+
+ private void addSpecialApps() {
+ PackageItem cameraItem = new PackageItem(getContext().getResources().getString(R.string.camera_entry),
+ R.drawable.ic_camera, CAMERA_ENTRY);
+ mInstalledPackages.add(0, cameraItem);
+
+ PackageItem torchItem = new PackageItem(getContext().getResources().getString(R.string.torch_entry),
+ R.drawable.ic_flashlight, TORCH_ENTRY);
+ mInstalledPackages.add(0, torchItem);
+
+ PackageItem musicNextItem = new PackageItem(getContext().getResources().getString(R.string.music_next_entry),
+ R.drawable.ic_music_next, MUSIC_NEXT_ENTRY);
+ mInstalledPackages.add(0, musicNextItem);
+
+ PackageItem musicPrevItem = new PackageItem(getContext().getResources().getString(R.string.music_prev_entry),
+ R.drawable.ic_music_prev, MUSIC_PREV_ENTRY);
+ mInstalledPackages.add(0, musicPrevItem);
+
+ PackageItem musicPlayItem = new PackageItem(getContext().getResources().getString(R.string.music_play_entry),
+ R.drawable.ic_music_play, MUSIC_PLAY_ENTRY);
+ mInstalledPackages.add(0, musicPlayItem);
+
+ PackageItem wakeItem = new PackageItem(getContext().getResources().getString(R.string.wake_entry),
+ R.drawable.ic_wakeup, WAKE_ENTRY);
+ mInstalledPackages.add(0, wakeItem);
+
+ PackageItem volumeUpItem = new PackageItem(
+ getContext().getResources().getString(R.string.volume_up),
+ R.drawable.ic_settings_sound, VOLUME_UP_ENTRY);
+ mInstalledPackages.add(0, volumeUpItem);
+
+ PackageItem volumeDownItem = new PackageItem(
+ getContext().getResources().getString(R.string.volume_down),
+ R.drawable.ic_settings_sound, VOLUME_DOWN_ENTRY);
+ mInstalledPackages.add(0, volumeDownItem);
+
+ PackageItem browseScrollDownItem = new PackageItem(
+ getContext().getResources().getString(R.string.browse_scroll_down),
+ R.drawable.arrow_collapse_down, BROWSE_SCROLL_DOWN_ENTRY);
+ mInstalledPackages.add(0, browseScrollDownItem);
+
+ PackageItem browseScrollUpItem = new PackageItem(
+ getContext().getResources().getString(R.string.browse_scroll_up),
+ R.drawable.arrow_collapse_up, BROWSE_SCROLL_UP_ENTRY);
+ mInstalledPackages.add(0, browseScrollUpItem);
+
+ PackageItem navigateBackItem = new PackageItem(
+ getContext().getResources().getString(R.string.navigate_back),
+ R.drawable.back, NAVIGATE_BACK_ENTRY);
+ mInstalledPackages.add(0, navigateBackItem);
+
+ PackageItem navigateHomeItem = new PackageItem(
+ getContext().getResources().getString(R.string.navigate_home),
+ R.drawable.home, NAVIGATE_HOME_ENTRY);
+ mInstalledPackages.add(0, navigateHomeItem);
+
+ PackageItem navigateRecentItem = new PackageItem(
+ getContext().getResources().getString(R.string.navigate_recent),
+ R.drawable.recent, NAVIGATE_RECENT_ENTRY);
+ mInstalledPackages.add(0, navigateRecentItem);
+
+ PackageItem disabledItem = new PackageItem(getContext().getResources().getString(R.string.disabled_entry),
+ R.drawable.ic_disabled, DISABLED_ENTRY);
+ mInstalledPackages.add(0, disabledItem);
+ }
+
+ @Override
+ protected void onSetInitialValue(boolean restorePersistedValue, Object defaultValue) {
+ super.onSetInitialValue(restorePersistedValue, defaultValue);
+ if (mTitle != null) {
+ setSummary(mTitle);
+ } else {
+ setSummary(getContext().getResources().getString(R.string.not_ready_summary));
+ }
+ mAppIconResourceId = R.drawable.ic_disabled;
+ setIcon(mAppIconResourceId);
+ }
+
+ @Override
+ protected void onBindDialogView(View view) {
+ super.onBindDialogView(view);
+
+ final ListView list = (ListView) view.findViewById(R.id.applist);
+ list.setAdapter(mAdapter);
+ list.setOnItemClickListener(new OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ PackageItem info = (PackageItem) parent.getItemAtPosition(position);
+ mValue = info.mValue;
+ if (shouldPersist()) {
+ persistString(mValue);
+ }
+ mTitle = info.mTitle;
+ mAppIconDrawable = null;
+ mAppIconResourceId = 0;
+ if (info.mComponentName != null) {
+ mAppIconDrawable = resolveAppIcon(info);
+ } else {
+ mAppIconResourceId = info.mAppIconResourceId;
+ }
+
+ updatePreferenceViews();
+ callChangeListener(mValue);
+ getDialog().dismiss();
+ }
+ });
+ }
+
+ private void updatePreferenceViews() {
+ String name = null;
+ if (shouldPersist()) {
+ name = getPersistedString(null);
+ } else {
+ name = mValue;
+ }
+ mAppIconResourceId = R.drawable.ic_disabled;
+
+ if (name != null) {
+ mAppIconDrawable = null;
+ if (name.equals(DISABLED_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.disabled_entry);
+ mAppIconResourceId = R.drawable.ic_disabled;
+ } else if (name.equals(TORCH_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.torch_entry);
+ mAppIconResourceId = R.drawable.ic_flashlight;
+ } else if (name.equals(CAMERA_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.camera_entry);
+ mAppIconResourceId = R.drawable.ic_camera;
+ } else if (name.equals(MUSIC_PLAY_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.music_play_entry);
+ mAppIconResourceId = R.drawable.ic_music_play;
+ } else if (name.equals(MUSIC_NEXT_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.music_next_entry);
+ mAppIconResourceId = R.drawable.ic_music_next;
+ } else if (name.equals(MUSIC_PREV_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.music_prev_entry);
+ mAppIconResourceId = R.drawable.ic_music_prev;
+ } else if (name.equals(WAKE_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.wake_entry);
+ mAppIconResourceId = R.drawable.ic_wakeup;
+ } else if (name.equals(VOLUME_UP_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.volume_up);
+ mAppIconResourceId = R.drawable.ic_settings_sound;
+ } else if (name.equals(VOLUME_DOWN_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.volume_down);
+ mAppIconResourceId = R.drawable.ic_settings_sound;
+ } else if (name.equals(BROWSE_SCROLL_DOWN_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.browse_scroll_down);
+ mAppIconResourceId = R.drawable.arrow_collapse_down;
+ } else if (name.equals(BROWSE_SCROLL_UP_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.browse_scroll_up);
+ mAppIconResourceId = R.drawable.arrow_collapse_up;
+ } else if (name.equals(NAVIGATE_BACK_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.navigate_back);
+ mAppIconResourceId = R.drawable.back;
+ } else if (name.equals(NAVIGATE_HOME_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.navigate_home);
+ mAppIconResourceId = R.drawable.home;
+ } else if (name.equals(NAVIGATE_RECENT_ENTRY)) {
+ mTitle = getContext().getResources().getString(R.string.navigate_recent);
+ mAppIconResourceId = R.drawable.recent;
+ } else {
+ ComponentName componentName = ComponentName.unflattenFromString(name);
+ PackageItem item = mAdapter.resolveApplication(componentName);
+ if (item != null) {
+ mTitle = item.mTitle;
+ mAppIconDrawable = resolveAppIcon(item);
+ } else {
+ mTitle = getContext().getResources().getString(R.string.resolve_failed_summary);
+ }
+ }
+ } else {
+ mTitle = getContext().getResources().getString(R.string.disabled_entry);
+ mAppIconResourceId = R.drawable.ic_disabled;
+ }
+
+ setSummary(mTitle);
+ if (mAppIconDrawable != null) {
+ setIcon(mAppIconDrawable);
+ } else {
+ setIcon(mAppIconResourceId);
+ }
+ }
+
+ private Drawable getDefaultActivityIcon() {
+ return getContext().getResources().getDrawable(android.R.drawable.sym_def_app_icon);
+ }
+
+ public String getValue() {
+ return mValue;
+ }
+
+ public void setValue(String value) {
+ mValue = value;
+ }
+
+ private Drawable resolveAppIcon(PackageItem item) {
+ Drawable appIcon = null;
+ try {
+ appIcon = mPm.getActivityIcon(item.mComponentName);
+ } catch (PackageManager.NameNotFoundException e) {
+ }
+ if (appIcon == null) {
+ appIcon = getDefaultActivityIcon();
+ }
+ return appIcon;
+ }
+
+ public static class AppSelectListPreferenceDialogFragment
+ extends CustomDialogPreferenceCompat.CustomPreferenceDialogFragment {
+ public static CustomDialogPreferenceCompat.CustomPreferenceDialogFragment
+ newInstance(String key) {
+ return CustomDialogPreferenceCompat.CustomPreferenceDialogFragment.newInstance(key);
+ }
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/AudioSettings.java b/DeviceParts/src/org/omnirom/device/AudioSettings.java
new file mode 100644
index 0000000..0a91d7f
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/AudioSettings.java
@@ -0,0 +1,105 @@
+/*
+* Copyright (C) 2023 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.util.Log;
+
+public class AudioSettings extends PreferenceFragmentCompat implements
+ Preference.OnPreferenceChangeListener {
+
+ private static final String TAG = "AudioWizardControllerOmni";
+
+ private static final String KEY_AUDIOWIZARD = "audiowizard_entry";
+ private static final String KEY_OUTDOOR_MODE = "outdoor_mode";
+ private static final String PACKAGE_NAME = "com.asus.audiowizard";
+ private static final String SETTINGS_KEY_AUDIO_OUTDOOR_MODE = "audio_outdoor_mode";
+ private static final String SETTINGS_KEY_AUDIO_SUMMARY_KEY = "settings_key_audio_wizard_summary";
+ private static final int SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_OFF = 0;
+ private static final int SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_ON = 1;
+
+ private TwoStatePreference mOutdoorMode;
+ private Preference mWizard;
+
+ @Override
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+ setPreferencesFromResource(R.xml.audio_mode, rootKey);
+ final PreferenceScreen prefScreen = getPreferenceScreen();
+
+ mOutdoorMode = (TwoStatePreference) findPreference(KEY_OUTDOOR_MODE);
+ mOutdoorMode.setChecked(Settings.System.getInt(getContext().getContentResolver(),
+ SETTINGS_KEY_AUDIO_OUTDOOR_MODE,
+ SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_OFF)==
+ SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_ON);
+
+ mWizard = prefScreen.findPreference(KEY_AUDIOWIZARD);
+ mWizard.setEnabled(isEnable());
+ updateState();
+
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(Preference preference) {
+ if (preference == mOutdoorMode) {
+ Settings.System.putInt(getContext().getContentResolver(),
+ SETTINGS_KEY_AUDIO_OUTDOOR_MODE, mOutdoorMode.isChecked() ?
+ SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_ON :
+ SETTINGS_AUDIO_WIZARD_OUTDOOR_MODE_OFF);
+ updateState();
+ return true;
+ }
+ return super.onPreferenceTreeClick(preference);
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ return true;
+ }
+
+ private void updateState() {
+ String summaryString = getSummaryString();
+ Log.i(TAG, "updateState summary = " + summaryString);
+ if (!TextUtils.isEmpty(summaryString)) {
+ mWizard.setSummary(summaryString);
+ } else {
+ mWizard.setSummary("");
+ }
+ }
+
+ private boolean isEnable() {
+ try {
+ boolean UIenable = getContext().getPackageManager().getApplicationInfo(PACKAGE_NAME, 0).enabled;
+ Log.d(TAG, " UIenable = " + UIenable);
+ return UIenable;
+ } catch (PackageManager.NameNotFoundException e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ private String getSummaryString() {
+ return Settings.System.getString(getContext().getContentResolver(), SETTINGS_KEY_AUDIO_SUMMARY_KEY);
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/AudioSettingsActivity.java b/DeviceParts/src/org/omnirom/device/AudioSettingsActivity.java
new file mode 100644
index 0000000..91691fd
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/AudioSettingsActivity.java
@@ -0,0 +1,64 @@
+/*
+* Copyright (C) 2023 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceManager;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+public class AudioSettingsActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.settings_activity);
+ setSupportActionBar(findViewById(R.id.toolbar));
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ super.onPostCreate(savedInstanceState);
+ getSupportFragmentManager().beginTransaction()
+ .replace(R.id.fragment_container, new DeviceSettings())
+ .commit();
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ return true;
+ default:
+ break;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/DeviceSettings.java b/DeviceParts/src/org/omnirom/device/DeviceSettings.java
new file mode 100644
index 0000000..fdc3d54
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/DeviceSettings.java
@@ -0,0 +1,217 @@
+/*
+* 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 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.Parcel;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.UserHandle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.SwitchPreference;
+import androidx.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListView;
+import android.util.Log;
+import java.util.Map;
+
+public class DeviceSettings extends PreferenceFragmentCompat implements
+ Preference.OnPreferenceChangeListener {
+
+ public static final String KEY_SETTINGS_PREFIX = "device_setting_";
+ public static final String KEY_GLOVE_SWITCH = "glove";
+
+ private static final String KEY_CATEGORY_AUDIO = "audio_category";
+ private static final String KEY_CATEGORY_MOTOR = "category_motor";
+ private static final String KEY_CATEGORY_GAMING = "category_gaming";
+ private static final String KEY_CATEGORY_SCREEN = "screen";
+ public static final String KEY_GAME_GENIE = "game_toolbar_app";
+ private static final String KEY_FRAME_MODE = "frame_mode_key";
+ private static final String KEY_FRAME_MODE_ZF7 = "frame_mode_key_zf7";
+ private static final String KEY_FRAME_CATEGORY = "frame_mode_main";
+ private static final String KEY_FRAME_CATEGORY_ZF7 = "frame_mode_main_zf7";
+ public static final String FPS = "fps";
+
+ protected static final String DEFAULT_FPS_VALUE = "60";
+ private static final String ACTION_AIR_TRIGGER_OFF = "com.asus.airtriggers.SYSTEMUI_AIR_TRIGGER_OFF";
+ private static final String ACTION_AIR_TRIGGER_ON = "com.asus.airtriggers.SYSTEMUI_AIR_TRIGGER_ON";
+ private static final String AIRTRIGGER_PACKAGE_NAME = "com.asus.airtriggers";
+ private static final String FIELD_AIR_TRIGGER_ENABLE = "air_trigger_enable";
+ public static final String KEY_AIRTRIGGER = "grip_sensor_apk";
+ public static final String KEY_AIRTRIGGER_PREF = "grip_sensor_pref";
+ private static final String TAG = "AirTriggerApkPreferenceController";
+
+ private Airtrigger mAirtrigger;
+ private static Preference mAirtriggerPref;
+ private static ListPreference mFrameModeRate;
+ private static ListPreference mFrameModeRateZF7;
+ private static SwitchPreference mGripSensorPreference;
+ private static TwoStatePreference mGloveModeSwitch;
+ private static Preference mGameGenie;
+
+ protected static final boolean isRog3 = android.os.Build.DEVICE.equals("ASUS_I003_1");
+ private static final String SURFACE_FLINGER_SERVICE_KEY = "SurfaceFlinger";
+ private static final String SURFACE_COMPOSER_INTERFACE_KEY = "android.ui.ISurfaceComposer";
+ private static final int SURFACE_FLINGER_CODE = 1035;
+ private static Map<Integer, Integer> fpsMap = Map.of(160, 0, 144, 1, 120, 2, 90, 3, 60, 4);
+ private static Map<Integer, Integer> fpsMapZF7 = Map.of(90, 0, 60, 1);
+ private static IBinder mSurfaceFlinger;
+
+ @Override
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+ setPreferencesFromResource(R.xml.main, rootKey);
+ final PreferenceScreen prefScreen = getPreferenceScreen();
+ final PreferenceCategory audioCategory =
+ (PreferenceCategory) prefScreen.findPreference(KEY_CATEGORY_AUDIO);
+ final PreferenceCategory fpsCategory =
+ (PreferenceCategory) prefScreen.findPreference(KEY_FRAME_CATEGORY);
+ final PreferenceCategory fpsCategoryzf7 =
+ (PreferenceCategory) prefScreen.findPreference(KEY_FRAME_CATEGORY_ZF7);
+ final PreferenceCategory GamingCategory =
+ (PreferenceCategory) prefScreen.findPreference(KEY_CATEGORY_GAMING);
+ final PreferenceCategory MotorCategory =
+ (PreferenceCategory) prefScreen.findPreference(KEY_CATEGORY_MOTOR);
+
+ mFrameModeRate = (ListPreference) findPreference(KEY_FRAME_MODE);
+ int framevalue = Settings.System.getInt(getContext().getContentResolver(),
+ FPS, 60);
+ mFrameModeRate.setValue(Integer.toString(framevalue));
+ mFrameModeRate.setSummary(mFrameModeRate.getEntry());
+ mFrameModeRate.setOnPreferenceChangeListener(this);
+
+ mFrameModeRateZF7 = (ListPreference) findPreference(KEY_FRAME_MODE_ZF7);
+ int framevaluezf7 = Settings.System.getInt(getContext().getContentResolver(),
+ FPS, 60);
+ mFrameModeRateZF7.setValue(Integer.toString(framevaluezf7));
+ mFrameModeRateZF7.setSummary(mFrameModeRateZF7.getEntry());
+ mFrameModeRateZF7.setOnPreferenceChangeListener(this);
+
+ if (isRog3) {
+ prefScreen.removePreference(fpsCategoryzf7);
+ } else {
+ prefScreen.removePreference(audioCategory);
+ prefScreen.removePreference(fpsCategory);
+ }
+
+ mGloveModeSwitch = (TwoStatePreference) findPreference(KEY_GLOVE_SWITCH);
+ mGloveModeSwitch.setEnabled(GloveModeSwitch.isSupported());
+ mGloveModeSwitch.setChecked(GloveModeSwitch.isCurrentlyEnabled(this.getContext()));
+ mGloveModeSwitch.setOnPreferenceChangeListener(new GloveModeSwitch(getContext()));
+
+ mGameGenie = findPreference(KEY_GAME_GENIE);
+ mGameGenie.setEnabled(GameGenie.isGameGenieExist(this.getContext()));
+
+ mAirtriggerPref = findPreference(KEY_AIRTRIGGER_PREF);
+ mAirtriggerPref.setOnPreferenceChangeListener(this);
+ if (!isRog3) {
+ prefScreen.removePreference(GamingCategory);
+ }
+
+ if (isRog3) {
+ mGripSensorPreference = (SwitchPreference) findPreference(KEY_AIRTRIGGER);
+ mGripSensorPreference.setChecked(Settings.Global.getInt(getContext().getContentResolver(),
+ FIELD_AIR_TRIGGER_ENABLE, 0) == 1);
+ mGripSensorPreference.setOnPreferenceChangeListener(this);
+
+ // Remove the camera motor category for the Rog3
+ prefScreen.removePreference(MotorCategory);
+ }
+
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(Preference preference) {
+ if (preference == mAirtriggerPref) {
+ mAirtrigger.startAirTriggerSettings(this.getContext());
+ }
+ return super.onPreferenceTreeClick(preference);
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ if (preference == mFrameModeRate) {
+ int value = Integer.valueOf((String) newValue);
+ int index = mFrameModeRate.findIndexOfValue((String) newValue);
+ mFrameModeRate.setSummary(mFrameModeRate.getEntries()[index]);
+ changeFps(getContext(), value);
+ Settings.System.putInt(getContext().getContentResolver(), FPS, value);
+ }
+ if (preference == mFrameModeRateZF7) {
+ int value = Integer.valueOf((String) newValue);
+ int index = mFrameModeRateZF7.findIndexOfValue((String) newValue);
+ mFrameModeRateZF7.setSummary(mFrameModeRateZF7.getEntries()[index]);
+ changeFps(getContext(), value);
+ Settings.System.putInt(getContext().getContentResolver(), FPS, value);
+ }
+ if (preference == mGripSensorPreference) {
+ notifySwitchState(((Boolean) newValue).booleanValue());
+ }
+ return true;
+ }
+
+ protected static void changeFps(Context context, int fps) {
+ mSurfaceFlinger = ServiceManager.getService(SURFACE_FLINGER_SERVICE_KEY);
+ try {
+ if (mSurfaceFlinger != null) {
+ mSurfaceFlinger = ServiceManager.getService(SURFACE_FLINGER_SERVICE_KEY);
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken(SURFACE_COMPOSER_INTERFACE_KEY);
+ if (isRog3) {
+ data.writeInt(fpsMap.getOrDefault(fps, -1));
+ } else {
+ data.writeInt(fpsMapZF7.getOrDefault(fps, -1));
+ }
+ mSurfaceFlinger.transact(SURFACE_FLINGER_CODE, data, null, 0);
+ data.recycle();
+ if (isRog3) {
+ System.out.println("OmnifpsMap: " + fpsMap +" Omnifps: "+ fps);
+ } else {
+ System.out.println("OmnifpsMap: " + fpsMapZF7 +" Omnifps: "+ fps);
+ }
+ }
+ } catch (RemoteException ex) {
+ // intentional no-op
+ }
+ Settings.System.putInt(context.getContentResolver(), DeviceSettings.FPS, fps);
+ }
+
+ private void notifySwitchState(boolean z) {
+ Log.d(TAG, "notifySwitchState enabled=" + z);
+ Intent intent = new Intent();
+ intent.setAction(z ? ACTION_AIR_TRIGGER_ON : ACTION_AIR_TRIGGER_OFF);
+ intent.setPackage(AIRTRIGGER_PACKAGE_NAME);
+ getContext().sendBroadcastAsUser(intent, UserHandle.CURRENT);
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java b/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java
new file mode 100644
index 0000000..1424f35
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java
@@ -0,0 +1,64 @@
+/*
+* Copyright (C) 2017 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceManager;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+public class DeviceSettingsActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.settings_activity);
+ setSupportActionBar(findViewById(R.id.toolbar));
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ super.onPostCreate(savedInstanceState);
+ getSupportFragmentManager().beginTransaction()
+ .replace(R.id.fragment_container, new DeviceSettings())
+ .commit();
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ return true;
+ default:
+ break;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/DozeSettings.java b/DeviceParts/src/org/omnirom/device/DozeSettings.java
new file mode 100644
index 0000000..74d8715
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/DozeSettings.java
@@ -0,0 +1,105 @@
+/*
+* Copyright (C) 2017 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.res.Resources;
+import android.content.Intent;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListView;
+import android.util.Log;
+
+import org.omnirom.omnilib.utils.OmniSettings;
+
+public class DozeSettings extends PreferenceFragmentCompat {
+
+ private static final String KEY_WAVE_CHECK = "wave_check";
+ private static final String KEY_POCKET_CHECK = "pocket_check";
+ private static final String KEY_TILT_CHECK = "tilt_check";
+
+ private boolean mUseTiltCheck;
+ private boolean mUseWaveCheck;
+ private boolean mUsePocketCheck;
+
+ @Override
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+ setPreferencesFromResource(R.xml.doze_settings, rootKey);
+
+ getDozeSettings();
+
+ TwoStatePreference waveSwitch = (TwoStatePreference) findPreference(KEY_WAVE_CHECK);
+ waveSwitch.setChecked(mUseWaveCheck);
+ waveSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ mUseWaveCheck = (Boolean) newValue;
+ setDozeSettings();
+ return true;
+ }
+ });
+ TwoStatePreference pocketSwitch = (TwoStatePreference) findPreference(KEY_POCKET_CHECK);
+ pocketSwitch.setChecked(mUsePocketCheck);
+ pocketSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ mUsePocketCheck = (Boolean) newValue;
+ setDozeSettings();
+ return true;
+ }
+ });
+ TwoStatePreference tiltSwitch = (TwoStatePreference) findPreference(KEY_TILT_CHECK);
+ tiltSwitch.setChecked(mUseTiltCheck);
+ tiltSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ mUseTiltCheck = (Boolean) newValue;
+ setDozeSettings();
+ return true;
+ }
+ });
+ }
+
+ private void getDozeSettings() {
+ String value = Settings.System.getString(getContext().getContentResolver(),
+ OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS);
+ if (!TextUtils.isEmpty(value)) {
+ String[] parts = value.split(":");
+ mUseWaveCheck = Boolean.valueOf(parts[0]);
+ mUsePocketCheck = Boolean.valueOf(parts[1]);
+ mUseTiltCheck = Boolean.valueOf(parts[2]);
+ }
+ }
+
+ private void setDozeSettings() {
+ String newValue = String.valueOf(mUseWaveCheck) + ":" + String.valueOf(mUsePocketCheck) + ":" + String.valueOf(mUseTiltCheck);
+ Settings.System.putString(getContext().getContentResolver(), OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS, newValue);
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java b/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java
new file mode 100644
index 0000000..28a1263
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java
@@ -0,0 +1,64 @@
+/*
+* Copyright (C) 2017 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceManager;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+public class DozeSettingsActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.settings_activity);
+ setSupportActionBar(findViewById(R.id.toolbar));
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ super.onPostCreate(savedInstanceState);
+ getSupportFragmentManager().beginTransaction()
+ .replace(R.id.fragment_container, new DozeSettings())
+ .commit();
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ return true;
+ default:
+ break;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/FrameRateTileService.java b/DeviceParts/src/org/omnirom/device/FrameRateTileService.java
new file mode 100644
index 0000000..f11ff98
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/FrameRateTileService.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2020 The OmniROM 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.
+ */
+package org.omnirom.device;
+
+import android.graphics.drawable.Icon;
+import android.provider.Settings;
+import android.service.quicksettings.Tile;
+import android.service.quicksettings.TileService;
+
+public class FrameRateTileService extends TileService {
+
+ private static final boolean isRog3 = android.os.Build.DEVICE.equals("ASUS_I003_1");
+ private static final String DEFAULT_FPS_VALUE = "60";
+ private static final String FPS_VALUE_90 = "90";
+ private static final String FPS_VALUE_120 = "120";
+ private static final String FPS_VALUE_144 = "144";
+ private static final String FPS_VALUE_160 = "160";
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ }
+
+ @Override
+ public void onTileAdded() {
+ super.onTileAdded();
+ }
+
+ @Override
+ public void onTileRemoved() {
+ super.onTileRemoved();
+ }
+
+ @Override
+ public void onStartListening() {
+ super.onStartListening();
+
+ String value = Settings.System.getString(this.getContentResolver(), DeviceSettings.FPS);
+ getQsTile().setState(Tile.STATE_ACTIVE);
+ switch (value) {
+ case DEFAULT_FPS_VALUE:
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate));
+ break;
+ case FPS_VALUE_90:
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_90));
+ break;
+ case FPS_VALUE_120:
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_120));
+ break;
+ case FPS_VALUE_144:
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_144));
+ break;
+ case FPS_VALUE_160:
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_160));
+ break;
+ }
+ getQsTile().updateTile();
+ }
+
+ @Override
+ public void onStopListening() {
+ super.onStopListening();
+ }
+
+ @Override
+ public void onClick() {
+ super.onClick();
+
+ String value = Settings.System.getString(this.getContentResolver(), DeviceSettings.FPS);
+
+ switch (value) {
+ case DEFAULT_FPS_VALUE:
+ DeviceSettings.changeFps(this, Integer.valueOf(FPS_VALUE_90));
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_90));
+ break;
+ case FPS_VALUE_90:
+ if (isRog3) {
+ DeviceSettings.changeFps(this, Integer.valueOf(FPS_VALUE_120));
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_120));
+ break;
+ } else {
+ DeviceSettings.changeFps(this, Integer.valueOf(DEFAULT_FPS_VALUE));
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate));
+ break;
+ }
+ case FPS_VALUE_120:
+ DeviceSettings.changeFps(this, Integer.valueOf(FPS_VALUE_144));
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_144));
+ break;
+ case FPS_VALUE_144:
+ DeviceSettings.changeFps(this, Integer.valueOf(FPS_VALUE_160));
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_160));
+ break;
+ case FPS_VALUE_160:
+ DeviceSettings.changeFps(this, Integer.valueOf(DEFAULT_FPS_VALUE));
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate));
+ break;
+ }
+ getQsTile().updateTile();
+ }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GameGenie.java b/DeviceParts/src/org/omnirom/device/GameGenie.java
new file mode 100644
index 0000000..15b2e1e
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GameGenie.java
@@ -0,0 +1,51 @@
+/*
+* Copyright (C) 2020 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.ActivityNotFoundException;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.util.Log;
+
+public class GameGenie {
+
+ private static final String TAG = "GameGenieController";
+ private static final String GAMEGENIE_PACKAGE_NAME = "com.asus.gamewidget";
+
+ private Context mContext;
+
+ public GameGenie(Context context) {
+ mContext = context;
+ }
+
+ public static boolean isGameGenieExist(Context context) {
+ try {
+ ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(GAMEGENIE_PACKAGE_NAME, 0);
+ if (!applicationInfo.enabled || (applicationInfo.flags & 1) == 0) {
+ return false;
+ }
+ return true;
+ } catch (PackageManager.NameNotFoundException e) {
+ Log.e(TAG, "Game genie apk not found exception : " + e.toString());
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GestureSettings.java b/DeviceParts/src/org/omnirom/device/GestureSettings.java
new file mode 100644
index 0000000..27920a4
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GestureSettings.java
@@ -0,0 +1,333 @@
+/*
+* Copyright (C) 2017 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.Resources;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import androidx.fragment.app.DialogFragment;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.TwoStatePreference;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListView;
+import android.util.Log;
+import static android.provider.Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED;
+import android.os.UserHandle;
+
+import org.omnirom.omnilib.utils.OmniSettings;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+public class GestureSettings extends PreferenceFragmentCompat implements
+ Preference.OnPreferenceChangeListener {
+
+ public static final String KEY_PROXI_SWITCH = "proxi";
+ public static final String KEY_OFF_SCREEN_GESTURE_FEEDBACK_SWITCH = "off_screen_gesture_feedback";
+ public static final String KEY_OFFSCREEN_GESTURE = "zenmotion";
+ public static final String KEY_SWIPEUP_SWITCH = "swipeup";
+ public static final String KEY_SETTINGS_SWIPEUP_PREFIX = "gesture_setting_";
+
+ public static final String SETTINGS_GESTURE_KEY = KEY_SETTINGS_SWIPEUP_PREFIX + KEY_SWIPEUP_SWITCH;
+ public static final String SETTINGS_ZENMOTION_KEY = KEY_SETTINGS_SWIPEUP_PREFIX + KEY_OFFSCREEN_GESTURE;
+
+ public static final int KEY_W_ID = 0;
+ public static final int KEY_S_ID = 1;
+ public static final int KEY_E_ID = 2;
+ public static final int KEY_M_ID = 3;
+ public static final int KEY_Z_ID = 4;
+ public static final int KEY_V_ID = 5;
+ public static final int KEY_MUSIC_ID = 6;
+
+ public static final String KEY_E_APP = "e_gesture_app";
+ public static final String KEY_M_APP = "m_gesture_app";
+ public static final String KEY_S_APP = "s_gesture_app";
+ public static final String KEY_V_APP = "v_gesture_app";
+ public static final String KEY_W_APP = "w_gesture_app";
+ public static final String KEY_Z_APP = "z_gesture_app";
+ public static final String KEY_MUSIC = "music_gesture_app";
+ public static final String KEY_OFFSCREEN = "offscreen_gestures";
+
+ public static final String DEVICE_GESTURE_MAPPING_0 = "device_gesture_mapping_0_0";
+ public static final String DEVICE_GESTURE_MAPPING_1 = "device_gesture_mapping_1_0";
+ public static final String DEVICE_GESTURE_MAPPING_2 = "device_gesture_mapping_2_0";
+ public static final String DEVICE_GESTURE_MAPPING_3 = "device_gesture_mapping_3_0";
+ public static final String DEVICE_GESTURE_MAPPING_4 = "device_gesture_mapping_4_0";
+ public static final String DEVICE_GESTURE_MAPPING_5 = "device_gesture_mapping_5_0";
+
+ private TwoStatePreference mMusicSwitch;
+ private TwoStatePreference mProxiSwitch;
+ private TwoStatePreference mSwipeUpSwitch;
+ private AppSelectListPreference mLetterEGesture;
+ private AppSelectListPreference mLetterMGesture;
+ private AppSelectListPreference mLetterSGesture;
+ private AppSelectListPreference mLetterVGesture;
+ private AppSelectListPreference mLetterWGesture;
+ private AppSelectListPreference mLetterZGesture;
+
+ public static final String OFFSCREEN_PATH = "/proc/driver/gesture_type";
+ private static final String SWIPEUP_PATH = "/proc/driver/swipeup";
+
+ private List<AppSelectListPreference.PackageItem> mInstalledPackages = new LinkedList<AppSelectListPreference.PackageItem>();
+ private PackageManager mPm;
+ private int gestureMode;
+
+ @Override
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+ setPreferencesFromResource(R.xml.gesture_settings, rootKey);
+ mPm = getContext().getPackageManager();
+
+ mMusicSwitch = (TwoStatePreference) findPreference(KEY_MUSIC);
+ mMusicSwitch.setChecked(Settings.System.getInt(getContext().getContentResolver(),
+ KEY_MUSIC, 0) == 1);
+
+ mProxiSwitch = (TwoStatePreference) findPreference(KEY_PROXI_SWITCH);
+ mProxiSwitch.setChecked(Settings.System.getInt(getContext().getContentResolver(),
+ OmniSettings.OMNI_DEVICE_PROXI_CHECK_ENABLED, 1) != 0);
+
+ mLetterEGesture = (AppSelectListPreference) findPreference(KEY_E_APP);
+ mLetterEGesture.setEnabled(true);
+ String value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_0);
+ mLetterEGesture.setValue(value);
+ mLetterEGesture.setOnPreferenceChangeListener(this);
+
+ mLetterMGesture = (AppSelectListPreference) findPreference(KEY_M_APP);
+ mLetterMGesture.setEnabled(true);
+ value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_1);
+ mLetterMGesture.setValue(value);
+ mLetterMGesture.setOnPreferenceChangeListener(this);
+
+ mLetterSGesture = (AppSelectListPreference) findPreference(KEY_S_APP);
+ mLetterSGesture.setEnabled(true);
+ value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_2);
+ mLetterSGesture.setValue(value);
+ mLetterSGesture.setOnPreferenceChangeListener(this);
+
+ mLetterVGesture = (AppSelectListPreference) findPreference(KEY_V_APP);
+ mLetterVGesture.setEnabled(true);
+ value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_3);
+ mLetterVGesture.setValue(value);
+ mLetterVGesture.setOnPreferenceChangeListener(this);
+
+ mLetterWGesture = (AppSelectListPreference) findPreference(KEY_W_APP);
+ mLetterWGesture.setEnabled(true);
+ value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_4);
+ mLetterWGesture.setValue(value);
+ mLetterWGesture.setOnPreferenceChangeListener(this);
+
+ mLetterZGesture = (AppSelectListPreference) findPreference(KEY_Z_APP);
+ mLetterZGesture.setEnabled(true);
+ value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_5);
+ mLetterZGesture.setValue(value);
+ mLetterZGesture.setOnPreferenceChangeListener(this);
+
+ mSwipeUpSwitch = (TwoStatePreference) findPreference(KEY_SWIPEUP_SWITCH);
+ mSwipeUpSwitch.setChecked(Settings.System.getInt(getContext().getContentResolver(),
+ SETTINGS_GESTURE_KEY, 0) == 1);
+
+ new FetchPackageInformationTask().execute();
+ }
+
+ private boolean areSystemNavigationKeysEnabled() {
+ return Settings.Secure.getInt(getContext().getContentResolver(),
+ Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 0) == 1;
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(Preference preference) {
+ if (preference == mProxiSwitch) {
+ Settings.System.putInt(getContext().getContentResolver(),
+ OmniSettings.OMNI_DEVICE_PROXI_CHECK_ENABLED, mProxiSwitch.isChecked() ? 1 : 0);
+ return true;
+ }
+ if (preference == mMusicSwitch) {
+ Settings.System.putInt(getContext().getContentResolver(), KEY_MUSIC, mMusicSwitch.isChecked() ? 1 : 0);
+ boolean enabled = Settings.System.getInt(getContext().getContentResolver(), KEY_MUSIC, 0) != 0;
+ setGestureEnabled(KEY_MUSIC_ID, enabled);
+ return true;
+ }
+ if (preference == mSwipeUpSwitch) {
+ Settings.System.putInt(getContext().getContentResolver(), SETTINGS_GESTURE_KEY, mSwipeUpSwitch.isChecked() ? 1 : 0);
+ Utils.writeValue(getFile(), mSwipeUpSwitch.isChecked() ? "1" : "0");
+ return true;
+ }
+ return super.onPreferenceTreeClick(preference);
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ if (preference == mLetterEGesture) {
+ String value = (String) newValue;
+ boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ setGestureEnabled(KEY_E_ID, !gestureDisabled);
+ Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_0, value);
+ } else if (preference == mLetterMGesture) {
+ String value = (String) newValue;
+ boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ setGestureEnabled(KEY_M_ID, !gestureDisabled);
+ Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_1, value);
+ } else if (preference == mLetterSGesture) {
+ String value = (String) newValue;
+ boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ setGestureEnabled(KEY_S_ID, !gestureDisabled);
+ Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_2, value);
+ } else if (preference == mLetterVGesture) {
+ String value = (String) newValue;
+ boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ setGestureEnabled(KEY_V_ID, !gestureDisabled);
+ Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_3, value);
+ } else if (preference == mLetterWGesture) {
+ String value = (String) newValue;
+ boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ setGestureEnabled(KEY_W_ID, !gestureDisabled);
+ Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_4, value);
+ } else if (preference == mLetterZGesture) {
+ String value = (String) newValue;
+ boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ setGestureEnabled(KEY_Z_ID, !gestureDisabled);
+ Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_5, value);
+ }
+ return true;
+ }
+
+ public static String getFile() {
+ if (Utils.fileWritable(SWIPEUP_PATH)) {
+ return SWIPEUP_PATH;
+ }
+ return null;
+ }
+
+ public static String getGestureFile(String key) {
+ switch(key) {
+ case OFFSCREEN_PATH:
+ return "/proc/driver/gesture_type";
+ case SWIPEUP_PATH:
+ return "/proc/driver/swipeup";
+ }
+ return null;
+ }
+
+ private static final int KEY_MASK_GESTURE_CONTROL = 1 << 0;
+ private static final int[] ALL_GESTURE_MASKS = {
+ 1 << 1, // W gesture mask
+ 1 << 2, // S gesture mask
+ 1 << 3, // e gesture mask
+ 1 << 4, // M gesture mask
+ 1 << 5, // Z gesture mask
+ 1 << 6, // V gesture mask
+ 1 << 7, // Music control mask
+ };
+
+ private void setGestureEnabled(int id, boolean enabled) {
+ Log.i("GestureSettings", "setGestureEnabled called with key=" +id+ ",enabled=" +enabled);
+
+ if (!DeviceSettings.isRog3) {
+ gestureMode = Integer.decode(Utils.readLine(OFFSCREEN_PATH).trim());
+ }
+ int mask = ALL_GESTURE_MASKS[id];
+
+ if (enabled)
+ gestureMode |= mask;
+ else
+ gestureMode &= ~mask;
+
+ if (gestureMode != 0)
+ gestureMode |= KEY_MASK_GESTURE_CONTROL;
+
+ String gestureType = String.format("%7s", Integer.toBinaryString(gestureMode)).replace(' ', '0');
+ Log.i("GestureSettings", "gestureType=" +gestureType);
+
+ Settings.System.putString(getContext().getContentResolver(), SETTINGS_ZENMOTION_KEY, gestureType);
+
+ Utils.writeLine(OFFSCREEN_PATH, gestureType);
+ }
+
+ @Override
+ public void onDisplayPreferenceDialog(Preference preference) {
+ if (!(preference instanceof AppSelectListPreference)) {
+ super.onDisplayPreferenceDialog(preference);
+ return;
+ }
+ DialogFragment fragment =
+ AppSelectListPreference.AppSelectListPreferenceDialogFragment
+ .newInstance(preference.getKey());
+ fragment.setTargetFragment(this, 0);
+ fragment.show(getFragmentManager(), "dialog_preference");
+ }
+
+ private void loadInstalledPackages() {
+ final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
+ mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
+ List<ResolveInfo> installedAppsInfo = mPm.queryIntentActivities(mainIntent, 0);
+
+ for (ResolveInfo info : installedAppsInfo) {
+ ActivityInfo activity = info.activityInfo;
+ ApplicationInfo appInfo = activity.applicationInfo;
+ ComponentName componentName = new ComponentName(appInfo.packageName, activity.name);
+ CharSequence label = null;
+ try {
+ label = activity.loadLabel(mPm);
+ } catch (Exception e) {
+ }
+ if (label != null) {
+ final AppSelectListPreference.PackageItem item = new AppSelectListPreference.PackageItem(activity.loadLabel(mPm), 0, componentName);
+ mInstalledPackages.add(item);
+ }
+ }
+ Collections.sort(mInstalledPackages);
+ }
+
+ private class FetchPackageInformationTask extends AsyncTask<Void, Void, Void> {
+ public FetchPackageInformationTask() {
+ }
+
+ @Override
+ protected Void doInBackground(Void... params) {
+ loadInstalledPackages();
+ return null;
+ }
+
+ @Override
+ protected void onPostExecute(Void feed) {
+ mLetterEGesture.setPackageList(mInstalledPackages);
+ mLetterMGesture.setPackageList(mInstalledPackages);
+ mLetterSGesture.setPackageList(mInstalledPackages);
+ mLetterVGesture.setPackageList(mInstalledPackages);
+ mLetterWGesture.setPackageList(mInstalledPackages);
+ mLetterZGesture.setPackageList(mInstalledPackages);
+ }
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java b/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java
new file mode 100644
index 0000000..c641ce8
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java
@@ -0,0 +1,64 @@
+/*
+* Copyright (C) 2017 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceManager;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+
+public class GestureSettingsActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.settings_activity);
+ setSupportActionBar(findViewById(R.id.toolbar));
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ super.onPostCreate(savedInstanceState);
+ getSupportFragmentManager().beginTransaction()
+ .replace(R.id.fragment_container, new GestureSettings())
+ .commit();
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ return true;
+ default:
+ break;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java b/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java
new file mode 100644
index 0000000..5fee680
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java
@@ -0,0 +1,61 @@
+/*
+* Copyright (C) 2020 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.provider.Settings;
+import androidx.preference.Preference;
+import androidx.preference.Preference.OnPreferenceChangeListener;
+import androidx.preference.PreferenceManager;
+
+public class GloveModeSwitch implements OnPreferenceChangeListener {
+
+ private static final String FILE = "/proc/driver/glove";
+
+ public static final String SETTINGS_KEY = DeviceSettings.KEY_SETTINGS_PREFIX + DeviceSettings.KEY_GLOVE_SWITCH;
+
+ private Context mContext;
+
+ public GloveModeSwitch(Context context) {
+ mContext = context;
+ }
+
+ public static String getFile() {
+ if (Utils.fileWritable(FILE)) {
+ return FILE;
+ }
+ return null;
+ }
+
+ public static boolean isSupported() {
+ return Utils.fileWritable(getFile());
+ }
+
+ public static boolean isCurrentlyEnabled(Context context) {
+ return Utils.getFileValueAsBoolean(getFile(), false);
+ }
+
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ Boolean enabled = (Boolean) newValue;
+ Settings.System.putInt(mContext.getContentResolver(), SETTINGS_KEY, enabled ? 1 : 0);
+ Utils.writeValue(getFile(), enabled ? "1" : "0");
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GloveModeTileService.java b/DeviceParts/src/org/omnirom/device/GloveModeTileService.java
new file mode 100644
index 0000000..10bad91
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GloveModeTileService.java
@@ -0,0 +1,71 @@
+/*
+* Copyright (C) 2018 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.annotation.TargetApi;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.service.quicksettings.Tile;
+import android.service.quicksettings.TileService;
+import androidx.preference.PreferenceManager;
+
+
+@TargetApi(24)
+public class GloveModeTileService extends TileService {
+ private boolean enabled = false;
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ }
+
+ @Override
+ public void onTileAdded() {
+ super.onTileAdded();
+ }
+
+ @Override
+ public void onTileRemoved() {
+ super.onTileRemoved();
+ }
+
+ @Override
+ public void onStartListening() {
+ super.onStartListening();
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+ enabled = GloveModeSwitch.isCurrentlyEnabled(this);
+ getQsTile().setState(enabled ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE);
+ getQsTile().updateTile();
+ }
+
+ @Override
+ public void onStopListening() {
+ super.onStopListening();
+ }
+
+ @Override
+ public void onClick() {
+ super.onClick();
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+ enabled = GloveModeSwitch.isCurrentlyEnabled(this);
+ Utils.writeValue(GloveModeSwitch.getFile(), enabled ? "0" : "1");
+ sharedPrefs.edit().putBoolean(DeviceSettings.KEY_GLOVE_SWITCH, enabled ? false : true).commit();
+ getQsTile().setState(enabled ? Tile.STATE_INACTIVE : Tile.STATE_ACTIVE);
+ getQsTile().updateTile();
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GripSensor.java b/DeviceParts/src/org/omnirom/device/GripSensor.java
new file mode 100644
index 0000000..88390c4
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GripSensor.java
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2021 The OmniRom 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.
+ */
+
+package org.omnirom.device;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorManager;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Messenger;
+import android.os.RemoteException;
+import android.os.SystemProperties;
+import android.os.UserHandle;
+import android.util.Log;
+import android.util.Slog;
+
+public class GripSensor {
+ private static final boolean DEBUG = SystemProperties.getInt("persist.vendor.asus.grip.debug", 0) == 1;
+ private static final int GRIP_SENSOR = 65537;
+ private static final int MSG_BIND_SERVICE = 1001;
+ private static final int MSG_REGISTER_GRIPSENSOR = 1000;
+ private static final int MSG_RESET_BINDINGSTATE = 1002;
+ private static final int MSG_UPDATE_REMOTE_SENSOR_EVENT = 3000;
+ public static final int MSG_UPDATE_SENSOR_ON_CHANGED = 2000;
+ private static final String REMTOE_SERVICE_PACKAGENAME = "com.asus.focusapplistener";
+ private static final String REMOTE_SERVICE_BIND_ACTION = "com.asus.focusapplistener.grip.messengerservice";
+ private static final int REMOTE_SERVICE_STATE_BINDING = 1;
+ private static final int REMOTE_SERVICE_STATE_BOUND = 2;
+ private static final int REMOTE_SERVICE_STATE_UNBOUND = 0;
+ private static final String TAG = "GripSensorOmni";
+ private Context mContext;
+ private MyGripsensorListener mGripSensorListener;
+ private HandlerThread mHandlerThread;
+ private Object mLock = new Object();
+ private Handler mMainHandler = null;
+ private Messenger mRemoteMsgService = null;
+ private int mServiceState = 0;
+ private WorkerHandler mWorkerHandler = null;
+ private ServiceConnection mConnection = new ServiceConnection() {
+ public void onServiceConnected(ComponentName className, IBinder service) {
+ synchronized (mLock) {
+ Slog.d(TAG, "grip sensor service is connected");
+ Messenger unused = mRemoteMsgService = new Messenger(service);
+ int unused2 = mServiceState = 2;
+ Slog.d(TAG, "service state: " + mServiceState);
+ }
+ }
+
+ public void onServiceDisconnected(ComponentName className) {
+ synchronized (mLock) {
+ Slog.d(TAG, "grip sensor service is disconnected");
+ Messenger unused = mRemoteMsgService = null;
+ int unused2 = mServiceState = 0;
+ }
+ }
+ };
+
+ public GripSensor(Context context) {
+ mContext = context;
+ }
+
+ public void onStart() {
+ if (DEBUG) Log.d(TAG, "Enabling");
+ mHandlerThread = new HandlerThread("GripSensorServiceHandler", -8);
+ mHandlerThread.start();
+ mWorkerHandler = new WorkerHandler(mHandlerThread.getLooper(), mContext);
+ mMainHandler = new SensorServiceHandler(mContext.getMainLooper());
+ mMainHandler.sendEmptyMessage(MSG_REGISTER_GRIPSENSOR);
+ Slog.d(TAG, "GripSensor onStart()");
+ }
+
+ void disable() {
+ }
+
+ private class SensorServiceHandler extends Handler {
+ public SensorServiceHandler(Looper l) {
+ super(l);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ int gripMessengerServiceState;
+ switch (msg.what) {
+ case MSG_REGISTER_GRIPSENSOR:
+ GripSensor gripSensorService = GripSensor.this;
+ gripSensorService.mGripSensorListener = new MyGripsensorListener((SensorManager) gripSensorService.mContext.getSystemService("sensor"),
+ GRIP_SENSOR, true, mWorkerHandler, mContext);
+ if (mGripSensorListener != null) {
+ mGripSensorListener.register();
+ }
+ sendEmptyMessage(MSG_BIND_SERVICE);
+ return;
+ case MSG_BIND_SERVICE:
+ synchronized (mLock) {
+ gripMessengerServiceState = mServiceState;
+ Slog.d(GripSensor.TAG, "Bind service, current state -> " + mServiceState);
+ }
+ if (gripMessengerServiceState == 0) {
+ Slog.d(GripSensor.TAG, "Remote service is unbound. Bind it and send message later");
+ synchronized (mLock) {
+ doBindServiceLocked();
+ }
+ sendMessageDelayed(Message.obtain(msg), 1000L);
+ return;
+ } else if (gripMessengerServiceState == 1) {
+ if (retryLimitReached(msg.arg1)) {
+ Slog.w(GripSensor.TAG, "Reach max retry times, reset binding state after 30 seconds.");
+ sendEmptyMessageDelayed(MSG_RESET_BINDINGSTATE, 30000L);
+ return;
+ }
+ Slog.d(GripSensor.TAG, "Remote service is binding. Send message later.");
+ Message newMessage = Message.obtain(msg);
+ newMessage.arg1++;
+ sendMessageDelayed(newMessage, 1000L);
+ return;
+ } else {
+ return;
+ }
+ case MSG_RESET_BINDINGSTATE:
+ synchronized (mLock) {
+ mServiceState = 0;
+ mRemoteMsgService = null;
+ Slog.d(GripSensor.TAG, "Reset state: " + mServiceState);
+ }
+ return;
+ default:
+ return;
+ }
+ }
+
+ private boolean retryLimitReached(int count) {
+ return count > 9;
+ }
+ }
+
+ private class WorkerHandler extends Handler {
+ public WorkerHandler(Looper l, Context context) {
+ super(l);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_UPDATE_SENSOR_ON_CHANGED:
+ synchronized (mLock) {
+ updateSensorEventToRemoteLocked(msg.getData());
+ }
+ return;
+ default:
+ return;
+ }
+ }
+ }
+
+ class MyGripsensorListener extends GripsensorListener {
+ MyGripsensorListener(SensorManager sensorManager, int type, boolean wakeUp, Handler handler, Context context) {
+ super(sensorManager, type, wakeUp, handler, context);
+ }
+
+ @Override
+ public void onSensorChanged(SensorEvent event) {
+ int length = event.values.length;
+ Sensor sensor = event.sensor;
+ if (length == 0) {
+ Log.w(GripSensor.TAG, "Cannot obtain value from sensor " + sensor);
+ } else if (event.sensor.getType() == GRIP_SENSOR) {
+ if (GripSensor.DEBUG) {
+ Slog.d(GripSensor.TAG, "GRIP array: \nGesture_TYPE[0]: " + event.values[0] + " \nTRK_ID[1]: " + event.values[1] +
+ " \nBAR_ID[2]: " + event.values[2] + " \nPRESSURE[3]: " + event.values[3] + " \nFRAME[4]: " + event.values[4] +
+ " \nCenter[5]: " + event.values[5] + "\nLENGTH[6]: " + event.values[6]);
+ }
+ acquireWakelock((int) event.values[0]);
+ float[] rawData = (float[]) event.values.clone();
+ Message msg = mHandler.obtainMessage(MSG_UPDATE_SENSOR_ON_CHANGED);
+ Bundle data = new Bundle();
+ data.putFloatArray("data", rawData);
+ msg.setData(data);
+ mHandler.sendMessage(msg);
+ }
+ }
+ }
+
+ private void doBindServiceLocked() {
+ Intent intent = new Intent();
+ intent.setAction(REMOTE_SERVICE_BIND_ACTION);
+ intent.setPackage(REMTOE_SERVICE_PACKAGENAME);
+ try {
+ mContext.bindServiceAsUser(intent, mConnection, 1, UserHandle.CURRENT);
+ mServiceState = 1;
+ Slog.d(TAG, "Bind grip sensor service");
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void updateSensorEventToRemoteLocked(Bundle in) {
+ if (mRemoteMsgService != null) {
+ Message msg = Message.obtain((Handler) null, (int) MSG_UPDATE_REMOTE_SENSOR_EVENT);
+ try {
+ Bundle out = new Bundle(in);
+ msg.setData(out);
+ mRemoteMsgService.send(msg);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ } else if (mServiceState == 0) {
+ Slog.e(TAG, "Client object is null. Rebind...");
+ mMainHandler.sendEmptyMessage(MSG_BIND_SERVICE);
+ }
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GripSensorServiceMain.java b/DeviceParts/src/org/omnirom/device/GripSensorServiceMain.java
new file mode 100644
index 0000000..0244c64
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GripSensorServiceMain.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2021 The OmniRom 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.
+ */
+
+package org.omnirom.device;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+import android.os.Messenger;
+import android.util.Log;
+
+public class GripSensorServiceMain extends Service {
+ private static final String TAG = "GripSensorOmni";
+ private static final boolean DEBUG = true;
+
+ private GripSensor mGripSensor;
+ private Messenger mMessenger;
+
+ @Override
+ public void onCreate() {
+ if (DEBUG) Log.d(TAG, "Creating service");
+ mGripSensor = new GripSensor(this);
+ }
+
+ @Override
+ public int onStartCommand(Intent intent, int flags, int startId) {
+ if (DEBUG) Log.d(TAG, "Starting service");
+ mGripSensor.onStart();
+ return START_STICKY;
+ }
+
+ @Override
+ public void onDestroy() {
+ if (DEBUG) Log.d(TAG, "Destroying service");
+ mGripSensor.disable();
+ super.onDestroy();
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return mMessenger.getBinder();
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/GripsensorListener.java b/DeviceParts/src/org/omnirom/device/GripsensorListener.java
new file mode 100644
index 0000000..d16eb05
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/GripsensorListener.java
@@ -0,0 +1,77 @@
+package org.omnirom.device;
+
+import android.content.Context;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.os.Handler;
+import android.os.PowerManager;
+import android.os.SystemProperties;
+import android.util.Log;
+
+public abstract class GripsensorListener implements SensorEventListener {
+ private static final int GRIP_GESTURE_LONG_SQUEEZE = 8;
+ private static final int GRIP_GESTURE_SHORT_SQUEEZE = 7;
+ private static final String TAG = "GripSensorListenerOmni";
+ protected Handler mHandler;
+ private boolean mIsRegistered = false;
+ private Sensor mSensor;
+ private SensorManager mSensorManager;
+ private PowerManager.WakeLock mWakeLock;
+
+ protected GripsensorListener(SensorManager sensorManager, int type, boolean wakeUp, Handler handler, Context context) {
+ mSensor = null;
+ mSensorManager = null;
+ mHandler = null;
+ mHandler = handler;
+ mSensorManager = sensorManager;
+ Sensor defaultSensor = sensorManager.getDefaultSensor(type);
+ mSensor = defaultSensor;
+ if (defaultSensor == null) {
+ Log.w(TAG, "Can not get sensor: " + type + ". wakeUp: " + wakeUp);
+ }
+ PowerManager powerManager = null;
+ powerManager = context != null ? (PowerManager) context.getSystemService("power") : powerManager;
+ if (powerManager != null) {
+ mWakeLock = powerManager.newWakeLock(1, "GripSensor.WakeLock");
+ }
+ }
+
+ public boolean register() {
+ Sensor sensor;
+ if (!mIsRegistered && (sensor = mSensor) != null) {
+ boolean registerListener = mSensorManager.registerListener(this, sensor, 3, mHandler);
+ mIsRegistered = registerListener;
+ return registerListener;
+ }
+ return false;
+ }
+
+ public void unregister() {
+ Sensor sensor;
+ if (mIsRegistered && (sensor = mSensor) != null) {
+ mSensorManager.unregisterListener(this, sensor);
+ mIsRegistered = false;
+ }
+ }
+
+ public Sensor getSensor() {
+ return mSensor;
+ }
+
+ @Override
+ public void onSensorChanged(SensorEvent event) {
+ }
+
+ @Override
+ public void onAccuracyChanged(Sensor sensor, int accuracy) {
+ }
+
+ protected void acquireWakelock(int gestureType) {
+ PowerManager.WakeLock wakeLock;
+ if ((gestureType == GRIP_GESTURE_SHORT_SQUEEZE || gestureType == GRIP_GESTURE_LONG_SQUEEZE) && (wakeLock = mWakeLock) != null && !wakeLock.isHeld()) {
+ mWakeLock.acquire(1000L);
+ }
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/KeyHandler.java b/DeviceParts/src/org/omnirom/device/KeyHandler.java
new file mode 100644
index 0000000..9ebf7fe
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/KeyHandler.java
@@ -0,0 +1,675 @@
+/*
+* 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 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.app.ActivityManagerNative;
+import android.app.NotificationManager;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.database.ContentObserver;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.media.IAudioService;
+import android.media.AudioManager;
+import android.media.session.MediaSessionLegacyHelper;
+import android.net.Uri;
+import android.text.TextUtils;
+import android.os.FileObserver;
+import android.os.Handler;
+import android.os.Message;
+import android.os.PowerManager;
+import android.os.PowerManager.WakeLock;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.SystemClock;
+import android.os.SystemProperties;
+import android.os.UEventObserver;
+import android.os.UserHandle;
+import android.os.VibrationEffect;
+import android.os.Vibrator;
+import android.provider.Settings;
+import android.provider.Settings.Global;
+import android.provider.Settings.Secure;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.HapticFeedbackConstants;
+import android.view.WindowManagerGlobal;
+
+import com.android.internal.util.ArrayUtils;
+import com.android.internal.statusbar.IStatusBarService;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import org.omnirom.omnilib.utils.DeviceKeyHandler;
+import org.omnirom.omnilib.utils.OmniSettings;
+import org.omnirom.omnilib.utils.OmniUtils;
+import org.omnirom.omnilib.utils.OmniVibe;
+import org.omnirom.omnilib.utils.PackageUtils;
+
+import vendor.goodix.hardware.biometrics.fingerprint.V2_1.IGoodixFingerprintDaemon;
+
+public class KeyHandler implements DeviceKeyHandler {
+
+ private static final String TAG = "KeyHandler";
+ private static final boolean DEBUG = true;
+ private static final boolean DEBUG_SENSOR = true;
+
+ protected static final int GESTURE_REQUEST = 1;
+ private static final int GESTURE_WAKELOCK_DURATION = 2000;
+
+ private static final int KEY_DOUBLE_TAP = 143;
+ private static final int KEY_HOME = 102;
+ private static final int KEY_BACK = 158;
+ private static final int KEY_RECENTS = 580;
+
+ private static final int KEY_GESTURE_PAUSE = 119;
+ private static final int KEY_GESTURE_FORWARD = 159;
+ private static final int KEY_GESTURE_REWIND =168;
+
+ private static final int KEY_GESTURE_E = 18;
+ private static final int KEY_GESTURE_M = 50;
+ private static final int KEY_GESTURE_S = 31;
+ private static final int KEY_GESTURE_V = 47;
+ private static final int KEY_GESTURE_W = 17;
+ private static final int KEY_GESTURE_Z = 44;
+ private static final int KEY_SWIPEUP_GESTURE = 103;
+
+ private static final int KEY_FOD_PRESSED = 33;
+ private static final int KEY_FOD_UP = 22;
+ private static final String LOCAL_HBM_ON = "1";
+ private static final String LOCAL_HBM_OFF = "0";
+ private static final String LOCAL_HBM_PATH = "/proc/localHbm";
+
+ private static final int MIN_PULSE_INTERVAL_MS = 2500;
+ private static final String DOZE_INTENT = "com.android.systemui.doze.pulse";
+ private static final int HANDWAVE_MAX_DELTA_MS = 1000;
+ private static final int POCKET_MIN_DELTA_MS = 5000;
+
+ private static final String DT2W_CONTROL_PATH = "/proc/driver/dclick";
+ private static final String GOODIX_CONTROL_PATH = "/sys/devices/platform/soc/0.goodix_gf3626/goodix_fp/goodix_fp/proximity_state";
+
+ private static final String CLIENT_PACKAGE_NAME = "com.asus.camera";
+ private static final String CLIENT_PACKAGE_PATH = "/data/misc/omni/client_package_name";
+ private static final String VENDOR_PROPERTY = "vendor.camera.apk.usingname";
+
+ private static final int[] sSupportedGestures = new int[]{
+ };
+
+ private static final int[] sProxiCheckedGestures = new int[]{
+ KEY_DOUBLE_TAP,
+ KEY_GESTURE_E,
+ KEY_GESTURE_M,
+ KEY_GESTURE_S,
+ KEY_GESTURE_V,
+ KEY_GESTURE_W,
+ KEY_GESTURE_Z,
+ KEY_GESTURE_PAUSE,
+ KEY_GESTURE_FORWARD,
+ KEY_GESTURE_REWIND
+ };
+
+ protected final Context mContext;
+ private final PowerManager mPowerManager;
+ private EventHandler mEventHandler;
+ private WakeLock mGestureWakeLock;
+ private Handler mHandler = new Handler();
+ private SettingsObserver mSettingsObserver;
+ private static boolean mButtonDisabled;
+ private final NotificationManager mNoMan;
+ private final AudioManager mAudioManager;
+ private SensorManager mSensorManager;
+ private boolean mProxyIsNear;
+ private boolean mUseProxiCheck;
+ private Sensor mTiltSensor;
+ private boolean mUseTiltCheck;
+ private boolean mProxyWasNear;
+ private long mProxySensorTimestamp;
+ private boolean mUseWaveCheck;
+ private Sensor mPocketSensor;
+ private boolean mUsePocketCheck;
+ private boolean mDispOn;
+ private boolean IsOffscreenGesture;
+ private boolean isASUSCameraAvail;
+ private boolean mRestoreUser;
+ private boolean mDoubleTapToWake;
+ private ClientPackageNameObserver mClientObserver;
+ private ExecutorService mExecutorService;
+
+ private SensorEventListener mProximitySensor = new SensorEventListener() {
+ @Override
+ public void onSensorChanged(SensorEvent event) {
+ mProxyIsNear = event.values[0] < mPocketSensor.getMaximumRange();
+
+ if (DEBUG_SENSOR) Log.i(TAG, "mProxyIsNear = " + mProxyIsNear + " mProxyWasNear = " + mProxyWasNear);
+ if (mUseWaveCheck || mUsePocketCheck) {
+ if (mProxyWasNear && !mProxyIsNear) {
+ long delta = SystemClock.elapsedRealtime() - mProxySensorTimestamp;
+ if (DEBUG_SENSOR) Log.i(TAG, "delta = " + delta);
+ if (mUseWaveCheck && delta < HANDWAVE_MAX_DELTA_MS) {
+ launchDozePulse();
+ }
+ if (mUsePocketCheck && delta > POCKET_MIN_DELTA_MS) {
+ launchDozePulse();
+ }
+ }
+ mProxySensorTimestamp = SystemClock.elapsedRealtime();
+ mProxyWasNear = mProxyIsNear;
+ }
+ if (mUseProxiCheck) {
+ if (Utils.fileWritable(GOODIX_CONTROL_PATH)) {
+ Utils.writeValue(GOODIX_CONTROL_PATH, mProxyIsNear ? "1" : "0");
+ if (DEBUG_SENSOR) Log.i(TAG, "Goodix Fingerprint blocked with the proximity sensor ? = " + mProxyIsNear);
+ }
+ }
+ }
+
+ @Override
+ public void onAccuracyChanged(Sensor sensor, int accuracy) {
+ }
+ };
+
+ private SensorEventListener mTiltSensorListener = new SensorEventListener() {
+ @Override
+ public void onSensorChanged(SensorEvent event) {
+ if (event.values[0] == 1) {
+ launchDozePulse();
+ }
+ }
+
+ @Override
+ public void onAccuracyChanged(Sensor sensor, int accuracy) {
+ }
+ };
+
+ private class SettingsObserver extends ContentObserver {
+ SettingsObserver(Handler handler) {
+ super(handler);
+ }
+
+ void observe() {
+ mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(
+ OmniSettings.OMNI_DEVICE_PROXI_CHECK_ENABLED),
+ false, this);
+ mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(
+ OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS),
+ false, this);
+ mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(
+ Settings.Secure.DOUBLE_TAP_TO_WAKE),
+ false, this);
+ update();
+ updateDozeSettings();
+ }
+
+ @Override
+ public void onChange(boolean selfChange) {
+ update();
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ if (uri.equals(Settings.System.getUriFor(
+ OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS))){
+ updateDozeSettings();
+ return;
+ }
+ update();
+ }
+
+ public void update() {
+ mUseProxiCheck = Settings.System.getIntForUser(
+ mContext.getContentResolver(), OmniSettings.OMNI_DEVICE_PROXI_CHECK_ENABLED, 1,
+ UserHandle.USER_CURRENT) == 1;
+ mDoubleTapToWake = Settings.Secure.getInt(
+ mContext.getContentResolver(), Settings.Secure.DOUBLE_TAP_TO_WAKE, 0) != 0;
+ updateDoubleTapToWake();
+ }
+ }
+
+ private BroadcastReceiver mSystemStateReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
+ mDispOn = true;
+ onDisplayOn();
+ } else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
+ mDispOn = false;
+ onDisplayOff();
+ } else if (intent.getAction().equals(Intent.ACTION_USER_SWITCHED)) {
+ int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
+ if (userId == UserHandle.USER_SYSTEM && mRestoreUser) {
+ if (DEBUG) Log.i(TAG, "ACTION_USER_SWITCHED to system");
+ Startup.restoreAfterUserSwitch(context);
+ } else {
+ mRestoreUser = true;
+ }
+ }
+ }
+ };
+
+ public KeyHandler(Context context) {
+ mContext = context;
+ mDispOn = true;
+ mEventHandler = new EventHandler();
+ mPowerManager = mContext.getSystemService(PowerManager.class);
+ mGestureWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
+ "GestureWakeLock");
+ mSettingsObserver = new SettingsObserver(mHandler);
+ mSettingsObserver.observe();
+ mNoMan = mContext.getSystemService(NotificationManager.class);
+ mAudioManager = mContext.getSystemService(AudioManager.class);
+ mSensorManager = mContext.getSystemService(SensorManager.class);
+ mTiltSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_TILT_DETECTOR);
+ mPocketSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
+ IntentFilter systemStateFilter = new IntentFilter(Intent.ACTION_SCREEN_ON);
+ systemStateFilter.addAction(Intent.ACTION_SCREEN_OFF);
+ systemStateFilter.addAction(Intent.ACTION_USER_SWITCHED);
+ mContext.registerReceiver(mSystemStateReceiver, systemStateFilter);
+
+ isASUSCameraAvail = PackageUtils.isAvailableApp(CLIENT_PACKAGE_NAME , context);
+ if (isASUSCameraAvail) {
+ mClientObserver = new ClientPackageNameObserver(CLIENT_PACKAGE_PATH);
+ mClientObserver.startWatching();
+ }
+ mExecutorService = Executors.newSingleThreadExecutor();
+ }
+
+ private Future<?> submit(Runnable runnable) {
+ return mExecutorService.submit(runnable);
+ }
+
+ private class EventHandler extends Handler {
+ @Override
+ public void handleMessage(Message msg) {
+ }
+ }
+
+ @Override
+ public boolean handleKeyEvent(KeyEvent event) {
+ if (event.getAction() != KeyEvent.ACTION_UP) {
+ return false;
+ }
+ IsOffscreenGesture = false;
+
+ int gesturecode = event.getScanCode();
+ if (DEBUG) Log.i(TAG, "nav_code= " + gesturecode);
+ boolean value = getGestureValueForMusicCode(gesturecode);
+ if (value && !mDispOn){
+ IsOffscreenGesture = true;
+ }
+ return IsOffscreenGesture;
+ }
+
+ @Override
+ public boolean canHandleKeyEvent(KeyEvent event) {
+ if ((event.getScanCode() == KEY_FOD_PRESSED) && (DeviceSettings.isRog3) && (!mDispOn)) {
+ mHandler.post(() -> {
+ try {
+ IGoodixFingerprintDaemon goodixDaemon = IGoodixFingerprintDaemon.getService();
+ goodixDaemon.sendCommand(200001, new java.util.ArrayList<Byte>(), (returnCode, resultData) -> {
+ Log.e(TAG, "Goodix send pressed wakeup 200001 command returned code "+ returnCode);
+ });
+ Utils.writeLine(LOCAL_HBM_PATH, LOCAL_HBM_ON);
+ goodixDaemon.sendCommand(200002, new java.util.ArrayList<Byte>(), (returnCode, resultData) -> {
+ Log.e(TAG, "Goodix send pressed wakeup 200002 command returned code "+ returnCode);
+ });
+ } catch (Throwable t) {
+ Log.e(TAG, "Tried sending pressed wakeup goodix daemon cmd failed", t);
+ }
+ });
+ return true;
+ } else if ((event.getScanCode() == KEY_FOD_UP) && (DeviceSettings.isRog3) && (!mDispOn)) {
+ mHandler.post(() -> {
+ try {
+ IGoodixFingerprintDaemon goodixDaemon = IGoodixFingerprintDaemon.getService();
+ Utils.writeLine(LOCAL_HBM_PATH, LOCAL_HBM_OFF);
+ goodixDaemon.sendCommand(200003, new java.util.ArrayList<Byte>(), (returnCode, resultData) -> {
+ Log.e(TAG, "Goodix send 200003 FOD UP command returned code "+ returnCode);
+ });
+ } catch (Throwable t) {
+ Utils.writeLine(LOCAL_HBM_PATH, LOCAL_HBM_OFF);
+ Log.e(TAG, "Tried sending 200003 FOD UP goodix daemon cmd failed", t);
+ }
+ });
+ return true;
+ } else {
+ return ArrayUtils.contains(sSupportedGestures, event.getScanCode());
+ }
+ }
+
+ @Override
+ public boolean isDisabledKeyEvent(KeyEvent event) {
+ boolean isProxyCheckRequired = mUseProxiCheck &&
+ ArrayUtils.contains(sProxiCheckedGestures, event.getScanCode());
+ if (mProxyIsNear && isProxyCheckRequired) {
+ if (DEBUG) Log.i(TAG, "isDisabledKeyEvent: blocked by proxi sensor - scanCode=" + event.getScanCode());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isCameraLaunchEvent(KeyEvent event) {
+ if (event.getAction() != KeyEvent.ACTION_UP) {
+ return false;
+ }
+ String value = getGestureValueForScanCode(event.getScanCode());
+ return !TextUtils.isEmpty(value) && value.equals(AppSelectListPreference.CAMERA_ENTRY);
+ }
+
+ @Override
+ public boolean isWakeEvent(KeyEvent event){
+ if (event.getAction() != KeyEvent.ACTION_UP) {
+ return false;
+ }
+ if (event.getScanCode() == KEY_SWIPEUP_GESTURE) {
+ return true;
+ }
+ String value = getGestureValueForScanCode(event.getScanCode());
+ if (!TextUtils.isEmpty(value) && value.equals(AppSelectListPreference.WAKE_ENTRY)) {
+ if (DEBUG) Log.i(TAG, "isWakeEvent " + event.getScanCode() + value);
+ return true;
+ }
+ return event.getScanCode() == KEY_DOUBLE_TAP;
+ }
+
+ @Override
+ public Intent isActivityLaunchEvent(KeyEvent event) {
+ if (event.getAction() != KeyEvent.ACTION_UP) {
+ return null;
+ }
+ String value = getGestureValueForScanCode(event.getScanCode());
+ if (!TextUtils.isEmpty(value) && !value.equals(AppSelectListPreference.DISABLED_ENTRY)) {
+ if (DEBUG) Log.i(TAG, "isActivityLaunchEvent " + event.getScanCode() + value);
+ if (!launchSpecialActions(value)) {
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ Intent intent = createIntent(value);
+ return intent;
+ }
+ }
+ return null;
+ }
+
+ private IAudioService getAudioService() {
+ IAudioService audioService = IAudioService.Stub
+ .asInterface(ServiceManager.checkService(Context.AUDIO_SERVICE));
+ if (audioService == null) {
+ Log.w(TAG, "Unable to find IAudioService interface.");
+ }
+ return audioService;
+ }
+
+ boolean isMusicActive() {
+ return mAudioManager.isMusicActive();
+ }
+
+ private void dispatchMediaKeyWithWakeLockToAudioService(int keycode) {
+ if (ActivityManagerNative.isSystemReady()) {
+ IAudioService audioService = getAudioService();
+ if (audioService != null) {
+ KeyEvent event = new KeyEvent(SystemClock.uptimeMillis(),
+ SystemClock.uptimeMillis(), KeyEvent.ACTION_DOWN,
+ keycode, 0);
+ dispatchMediaKeyEventUnderWakelock(event);
+ event = KeyEvent.changeAction(event, KeyEvent.ACTION_UP);
+ dispatchMediaKeyEventUnderWakelock(event);
+ }
+ }
+ }
+
+ private void dispatchMediaKeyEventUnderWakelock(KeyEvent event) {
+ if (ActivityManagerNative.isSystemReady()) {
+ MediaSessionLegacyHelper.getHelper(mContext).sendMediaButtonEvent(event, true);
+ }
+ }
+
+ private void onDisplayOn() {
+ if (DEBUG) Log.i(TAG, "Display on");
+ if (enableProxiSensor()) {
+ submit(() -> {
+ mSensorManager.unregisterListener(mProximitySensor, mPocketSensor);
+ });
+ }
+ if (mUseTiltCheck) {
+ submit(() -> {
+ mSensorManager.unregisterListener(mTiltSensorListener, mTiltSensor);
+ });
+ }
+ if ((mClientObserver == null) && (isASUSCameraAvail)) {
+ mClientObserver = new ClientPackageNameObserver(CLIENT_PACKAGE_PATH);
+ mClientObserver.startWatching();
+ }
+ }
+
+ private void updateDoubleTapToWake() {
+ Log.i(TAG, "udateDoubleTapToWake " + mDoubleTapToWake);
+ if (Utils.fileWritable(DT2W_CONTROL_PATH)) {
+ Utils.writeValue(DT2W_CONTROL_PATH, mDoubleTapToWake ? "1" : "0");
+ }
+ }
+
+ private void onDisplayOff() {
+ if (DEBUG) Log.i(TAG, "Display off");
+ if (enableProxiSensor()) {
+ mProxyWasNear = false;
+ mProxySensorTimestamp = SystemClock.elapsedRealtime();
+ submit(() -> {
+ mSensorManager.registerListener(mProximitySensor, mPocketSensor,
+ SensorManager.SENSOR_DELAY_NORMAL);
+ });
+ }
+ if (mUseTiltCheck) {
+ submit(() -> {
+ mSensorManager.registerListener(mTiltSensorListener, mTiltSensor,
+ SensorManager.SENSOR_DELAY_NORMAL);
+ });
+ }
+ if (mClientObserver != null) {
+ mClientObserver.stopWatching();
+ mClientObserver = null;
+ }
+ }
+
+ private Intent createIntent(String value) {
+ ComponentName componentName = ComponentName.unflattenFromString(value);
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.addCategory(Intent.CATEGORY_LAUNCHER);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+ intent.setComponent(componentName);
+ return intent;
+ }
+
+ private boolean launchSpecialActions(String value) {
+ if (value.equals(AppSelectListPreference.TORCH_ENTRY)) {
+ mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+ IStatusBarService service = getStatusBarService();
+ if (service != null) {
+ try {
+ service.toggleCameraFlash();
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ } catch (RemoteException e) {
+ // do nothing.
+ }
+ }
+ return true;
+ } else if (value.equals(AppSelectListPreference.MUSIC_PLAY_ENTRY)) {
+ mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE);
+ return true;
+ } else if (value.equals(AppSelectListPreference.MUSIC_NEXT_ENTRY)) {
+ if (isMusicActive()) {
+ mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_NEXT);
+ }
+ return true;
+ } else if (value.equals(AppSelectListPreference.MUSIC_PREV_ENTRY)) {
+ if (isMusicActive()) {
+ mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PREVIOUS);
+ }
+ return true;
+ } else if (value.equals(AppSelectListPreference.VOLUME_UP_ENTRY)) {
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ mAudioManager.adjustSuggestedStreamVolume(AudioManager.ADJUST_RAISE,AudioManager.USE_DEFAULT_STREAM_TYPE,AudioManager.FLAG_SHOW_UI);
+ return true;
+ } else if (value.equals(AppSelectListPreference.VOLUME_DOWN_ENTRY)) {
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ mAudioManager.adjustSuggestedStreamVolume(AudioManager.ADJUST_LOWER,AudioManager.USE_DEFAULT_STREAM_TYPE,AudioManager.FLAG_SHOW_UI);
+ return true;
+ } else if (value.equals(AppSelectListPreference.BROWSE_SCROLL_DOWN_ENTRY)) {
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ OmniUtils.sendKeycode(KeyEvent.KEYCODE_PAGE_DOWN);
+ return true;
+ } else if (value.equals(AppSelectListPreference.BROWSE_SCROLL_UP_ENTRY)) {
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ OmniUtils.sendKeycode(KeyEvent.KEYCODE_PAGE_UP);
+ return true;
+ } else if (value.equals(AppSelectListPreference.NAVIGATE_BACK_ENTRY)) {
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ OmniUtils.sendKeycode(KeyEvent.KEYCODE_BACK);
+ return true;
+ } else if (value.equals(AppSelectListPreference.NAVIGATE_HOME_ENTRY)) {
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ OmniUtils.sendKeycode(KeyEvent.KEYCODE_HOME);
+ return true;
+ } else if (value.equals(AppSelectListPreference.NAVIGATE_RECENT_ENTRY)) {
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ OmniUtils.sendKeycode(KeyEvent.KEYCODE_APP_SWITCH);
+ return true;
+ }
+ return false;
+ }
+
+ private String getGestureValueForScanCode(int scanCode) {
+ switch(scanCode) {
+ case KEY_GESTURE_E:
+ return Settings.System.getStringForUser(mContext.getContentResolver(),
+ GestureSettings.DEVICE_GESTURE_MAPPING_0, UserHandle.USER_CURRENT);
+ case KEY_GESTURE_M:
+ return Settings.System.getStringForUser(mContext.getContentResolver(),
+ GestureSettings.DEVICE_GESTURE_MAPPING_1, UserHandle.USER_CURRENT);
+ case KEY_GESTURE_S:
+ return Settings.System.getStringForUser(mContext.getContentResolver(),
+ GestureSettings.DEVICE_GESTURE_MAPPING_2, UserHandle.USER_CURRENT);
+ case KEY_GESTURE_V:
+ return Settings.System.getStringForUser(mContext.getContentResolver(),
+ GestureSettings.DEVICE_GESTURE_MAPPING_3, UserHandle.USER_CURRENT);
+ case KEY_GESTURE_W:
+ return Settings.System.getStringForUser(mContext.getContentResolver(),
+ GestureSettings.DEVICE_GESTURE_MAPPING_4, UserHandle.USER_CURRENT);
+ case KEY_GESTURE_Z:
+ return Settings.System.getStringForUser(mContext.getContentResolver(),
+ GestureSettings.DEVICE_GESTURE_MAPPING_5, UserHandle.USER_CURRENT);
+ }
+ return null;
+ }
+
+ private boolean getGestureValueForMusicCode(int scanCode) {
+ switch(scanCode) {
+ case KEY_GESTURE_PAUSE:
+ if (DEBUG) Log.i(TAG, "Music Play/Pause");
+ mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE);
+ return true;
+ case KEY_GESTURE_FORWARD:
+ if (DEBUG) Log.i(TAG, "Music Next");
+ if (isMusicActive()) {
+ mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_NEXT);
+ }
+ return true;
+ case KEY_GESTURE_REWIND:
+ if (DEBUG) Log.i(TAG, "Music Previous");
+ if (isMusicActive()) {
+ mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
+ OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
+ dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PREVIOUS);
+ }
+ return true;
+ }
+ return false;
+ }
+
+ private void launchDozePulse() {
+ if (DEBUG) Log.i(TAG, "Doze pulse");
+ mContext.sendBroadcastAsUser(new Intent(DOZE_INTENT),
+ new UserHandle(UserHandle.USER_CURRENT));
+ }
+
+ private boolean enableProxiSensor() {
+ return mUsePocketCheck || mUseWaveCheck || mUseProxiCheck;
+ }
+
+ private void updateDozeSettings() {
+ String value = Settings.System.getStringForUser(mContext.getContentResolver(),
+ OmniSettings.OMNI_DEVICE_FEATURE_SETTINGS,
+ UserHandle.USER_CURRENT);
+ if (DEBUG) Log.i(TAG, "Doze settings = " + value);
+ if (!TextUtils.isEmpty(value)) {
+ String[] parts = value.split(":");
+ mUseWaveCheck = Boolean.valueOf(parts[0]);
+ mUsePocketCheck = Boolean.valueOf(parts[1]);
+ mUseTiltCheck = Boolean.valueOf(parts[2]);
+ }
+ }
+
+ protected static Sensor getSensor(SensorManager sm, String type) {
+ for (Sensor sensor : sm.getSensorList(Sensor.TYPE_ALL)) {
+ if (type.equals(sensor.getStringType())) {
+ return sensor;
+ }
+ }
+ return null;
+ }
+
+ IStatusBarService getStatusBarService() {
+ return IStatusBarService.Stub.asInterface(ServiceManager.getService("statusbar"));
+ }
+
+ private class ClientPackageNameObserver extends FileObserver {
+
+ public ClientPackageNameObserver(String file) {
+ super(CLIENT_PACKAGE_PATH, MODIFY);
+ }
+
+ @Override
+ public void onEvent(int event, String file) {
+ String pkgName = Utils.getFileValue(CLIENT_PACKAGE_PATH, "0");
+ if (event == FileObserver.MODIFY) {
+ Log.d(TAG, "Camera name in use = " + pkgName);
+ SystemProperties.set(VENDOR_PROPERTY, pkgName);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/Startup.java b/DeviceParts/src/org/omnirom/device/Startup.java
new file mode 100644
index 0000000..df8dedb
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/Startup.java
@@ -0,0 +1,165 @@
+/*
+* 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import androidx.preference.PreferenceManager;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.text.TextUtils;
+
+public class Startup extends BroadcastReceiver {
+ private static final String ASUS_GAMEMODE = "asus_gamemode";
+
+ private static void restore(String file, boolean enabled) {
+ if (file == null) {
+ return;
+ }
+ Utils.writeValue(file, enabled ? "1" : "0");
+ }
+
+ private static void restore(String file, String value) {
+ if (file == null) {
+ return;
+ }
+ Utils.writeValue(file, value);
+ }
+
+ private static String getGestureFile(String key) {
+ return GestureSettings.getGestureFile(key);
+ }
+
+ private void maybeImportOldSettings(Context context) {
+ boolean imported = Settings.System.getInt(context.getContentResolver(), "omni_device_setting_imported", 0) != 0;
+ if (!imported) {
+ SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
+ boolean enabled = sharedPrefs.getBoolean(DeviceSettings.KEY_GLOVE_SWITCH, false);
+ Settings.System.putInt(context.getContentResolver(), GloveModeSwitch.SETTINGS_KEY, enabled ? 1 : 0);
+
+ Settings.System.putInt(context.getContentResolver(), "omni_device_setting_imported", 1);
+ }
+ }
+
+ @Override
+ public void onReceive(final Context context, final Intent bootintent) {
+ maybeImportOldSettings(context);
+ restoreAfterUserSwitch(context);
+ if (DeviceSettings.isRog3) {
+ context.startServiceAsUser(new Intent(context, GripSensorServiceMain.class),
+ UserHandle.CURRENT);
+ }
+ }
+
+ public static void restoreAfterUserSwitch(Context context) {
+
+ // E Gesture
+ String mapping = GestureSettings.DEVICE_GESTURE_MAPPING_0;
+ String value = Settings.System.getString(context.getContentResolver(), mapping);
+ if (TextUtils.isEmpty(value)) {
+ value = AppSelectListPreference.DISABLED_ENTRY;
+ Settings.System.putString(context.getContentResolver(), mapping, value);
+ }
+ boolean enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ restore(GestureSettings.getGestureFile(GestureSettings.KEY_E_APP), enabled);
+
+ // M Gesture
+ mapping = GestureSettings.DEVICE_GESTURE_MAPPING_1;
+ value = Settings.System.getString(context.getContentResolver(), mapping);
+ if (TextUtils.isEmpty(value)) {
+ value = AppSelectListPreference.DISABLED_ENTRY;
+ Settings.System.putString(context.getContentResolver(), mapping, value);
+ }
+ enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ restore(GestureSettings.getGestureFile(GestureSettings.KEY_M_APP), enabled);
+
+ // S Gesture
+ mapping = GestureSettings.DEVICE_GESTURE_MAPPING_2;
+ value = Settings.System.getString(context.getContentResolver(), mapping);
+ if (TextUtils.isEmpty(value)) {
+ value = AppSelectListPreference.DISABLED_ENTRY;
+ Settings.System.putString(context.getContentResolver(), mapping, value);
+ }
+ enabled = !TextUtils.isEmpty(value) && !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ restore(GestureSettings.getGestureFile(GestureSettings.KEY_S_APP), enabled);
+
+ // V Gesture
+ mapping = GestureSettings.DEVICE_GESTURE_MAPPING_3;
+ value = Settings.System.getString(context.getContentResolver(), mapping);
+ if (TextUtils.isEmpty(value)) {
+ value = AppSelectListPreference.DISABLED_ENTRY;
+ Settings.System.putString(context.getContentResolver(), mapping, value);
+ }
+ enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ restore(GestureSettings.getGestureFile(GestureSettings.KEY_V_APP), enabled);
+
+ // W Gesture
+ mapping = GestureSettings.DEVICE_GESTURE_MAPPING_4;
+ value = Settings.System.getString(context.getContentResolver(), mapping);
+ if (TextUtils.isEmpty(value)) {
+ value = AppSelectListPreference.DISABLED_ENTRY;
+ Settings.System.putString(context.getContentResolver(), mapping, value);
+ }
+ enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ restore(GestureSettings.getGestureFile(GestureSettings.KEY_W_APP), enabled);
+
+ // Z Gesture
+ mapping = GestureSettings.DEVICE_GESTURE_MAPPING_5;
+ value = Settings.System.getString(context.getContentResolver(), mapping);
+ if (TextUtils.isEmpty(value)) {
+ value = AppSelectListPreference.DISABLED_ENTRY;
+ Settings.System.putString(context.getContentResolver(), mapping, value);
+ }
+ enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
+ restore(GestureSettings.getGestureFile(GestureSettings.KEY_Z_APP), enabled);
+
+ enabled = Settings.System.getInt(context.getContentResolver(), GloveModeSwitch.SETTINGS_KEY, 0) != 0;
+ if (enabled) {
+ restore(GloveModeSwitch.getFile(), enabled);
+ }
+
+ boolean enabledGesture = Settings.System.getInt(context.getContentResolver(), GestureSettings.SETTINGS_GESTURE_KEY, 0) != 0;
+ if (enabledGesture) {
+ restore(GestureSettings.getFile(), enabledGesture);
+ }
+
+ String valueExtra = Settings.System.getString(context.getContentResolver(), GestureSettings.SETTINGS_ZENMOTION_KEY);
+ if (!TextUtils.isEmpty(valueExtra)) {
+ Utils.writeLine(GestureSettings.OFFSCREEN_PATH, valueExtra);
+ }
+
+ value = Settings.System.getString(context.getContentResolver(), DeviceSettings.FPS);
+ if (TextUtils.isEmpty(value)) {
+ value = DeviceSettings.DEFAULT_FPS_VALUE;
+ Settings.System.putString(context.getContentResolver(), DeviceSettings.FPS, value);
+ DeviceSettings.changeFps(context, Integer.valueOf(value));
+ } else {
+ DeviceSettings.changeFps(context, Integer.valueOf(value));
+ }
+
+ if (DeviceSettings.isRog3) {
+ value = Settings.Global.getString(context.getContentResolver(), ASUS_GAMEMODE);
+ if (TextUtils.isEmpty(value)) {
+ value = "0";
+ Settings.Global.putString(context.getContentResolver(), ASUS_GAMEMODE, value);
+ }
+ }
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/TileActivity.java b/DeviceParts/src/org/omnirom/device/TileActivity.java
new file mode 100644
index 0000000..3de9bdd
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/TileActivity.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The OmniROM 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.
+ */
+
+package org.omnirom.device;
+
+import android.content.ComponentName;
+import android.content.Intent;
+import android.os.Bundle;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+public class TileActivity extends AppCompatActivity {
+ protected void onCreate(Bundle bundle) {
+ super.onCreate(bundle);
+ Intent intent = new Intent();
+ String className = ((ComponentName) getIntent().getParcelableExtra("android.intent.extra.COMPONENT_NAME")).getClassName();
+ if (className.equals("org.omnirom.device.FrameRateTileService") ||
+ className.equals("org.omnirom.device.GloveModeTileService")) {
+ intent.setPackage("org.omnirom.device");
+ intent.setAction("org.omnirom.device.DEVICE_SETTING_PAGE");
+ startActivity(intent);
+ }
+ finish();
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/Utils.java b/DeviceParts/src/org/omnirom/device/Utils.java
new file mode 100644
index 0000000..3e33754
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/Utils.java
@@ -0,0 +1,152 @@
+/*
+* 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/>.
+*
+*/
+package org.omnirom.device;
+
+import android.util.Log;
+
+import android.os.SystemProperties;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.FileReader;
+import java.io.FileWriter;
+
+public class Utils {
+
+ /**
+ * Write a string value to the specified file.
+ * @param filename The filename
+ * @param value The value
+ */
+ public static void writeValue(String filename, String value) {
+ if (filename == null) {
+ return;
+ }
+ try {
+ FileOutputStream fos = new FileOutputStream(new File(filename));
+ fos.write(value.getBytes());
+ fos.flush();
+ fos.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Check if the specified file exists.
+ * @param filename The filename
+ * @return Whether the file exists or not
+ */
+ public static boolean fileExists(String filename) {
+ if (filename == null) {
+ return false;
+ }
+ return new File(filename).exists();
+ }
+
+ public static boolean fileWritable(String filename) {
+ return fileExists(filename) && new File(filename).canWrite();
+ }
+
+ public static String readLine(String filename) {
+ if (filename == null) {
+ return null;
+ }
+ BufferedReader br = null;
+ String line = null;
+ try {
+ br = new BufferedReader(new FileReader(filename), 1024);
+ line = br.readLine();
+ } catch (IOException e) {
+ return null;
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ return line;
+ }
+
+ public static boolean getFileValueAsBoolean(String filename, boolean defValue) {
+ String fileValue = readLine(filename);
+ if(fileValue!=null){
+ return (fileValue.equals("0")?false:true);
+ }
+ return defValue;
+ }
+
+ public static boolean getLineValueAsBoolean(String filename, boolean defValue) {
+ String fileValue = readLine(filename);
+ if(fileValue!=null){
+ return (fileValue.equals("Glove Mode: Off")?false:true);
+ }
+ return defValue;
+ }
+
+ public static String getFileValue(String filename, String defValue) {
+ String fileValue = readLine(filename);
+ if(fileValue!=null){
+ return fileValue;
+ }
+ return defValue;
+ }
+
+ /**
+ * Writes the given value into the given file
+ *
+ * @return true on success, false on failure
+ */
+ public static boolean writeLine(String fileName, String value) {
+ BufferedWriter writer = null;
+
+ try {
+ writer = new BufferedWriter(new FileWriter(fileName));
+ writer.write(value);
+ } catch (FileNotFoundException e) {
+ Log.w("Utils", "No such file " + fileName + " for writing", e);
+ return false;
+ } catch (IOException e) {
+ Log.e("Utils", "Could not write to file " + fileName, e);
+ return false;
+ } finally {
+ try {
+ if (writer != null) {
+ writer.close();
+ }
+ } catch (IOException e) {
+ // Ignored, not much we can do anyway
+ }
+ }
+
+ return true;
+ }
+
+ public static boolean isCNSKU() {
+ String str = SystemProperties.get("ro.vendor.build.asus.sku", "");
+ return str.toLowerCase().startsWith("bby") || str.toLowerCase().startsWith("cn");
+ }
+}
diff --git a/DeviceParts/src/org/omnirom/device/VolumeTile.java b/DeviceParts/src/org/omnirom/device/VolumeTile.java
new file mode 100644
index 0000000..c2126eb
--- /dev/null
+++ b/DeviceParts/src/org/omnirom/device/VolumeTile.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2020 The OmniROM 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.
+ */
+package org.omnirom.device;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.Icon;
+import android.media.AudioManager;
+import android.service.quicksettings.Tile;
+import android.service.quicksettings.TileService;
+
+public class VolumeTile extends TileService {
+ private AudioManager mAudioManager;
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ }
+
+ @Override
+ public void onTileAdded() {
+ super.onTileAdded();
+ }
+
+ @Override
+ public void onTileRemoved() {
+ super.onTileRemoved();
+ }
+
+ @Override
+ public void onStartListening() {
+ super.onStartListening();
+ mAudioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
+
+ switch (mAudioManager.getRingerModeInternal()) {
+ case AudioManager.RINGER_MODE_SILENT:
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_mute));
+ getQsTile().setLabel(getString(R.string.mute_mode));
+ break;
+ case AudioManager.RINGER_MODE_VIBRATE:
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_vibrate));
+ getQsTile().setLabel(getString(R.string.vibrate_mode));
+ break;
+ case AudioManager.RINGER_MODE_NORMAL:
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer));
+ getQsTile().setLabel(getString(R.string.volume_mode));
+ break;
+ }
+ getQsTile().setState(Tile.STATE_ACTIVE);
+ getQsTile().updateTile();
+ }
+
+ @Override
+ public void onStopListening() {
+ super.onStopListening();
+ }
+
+ @Override
+ public void onClick() {
+ super.onClick();
+ mAudioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
+
+ switch (mAudioManager.getRingerModeInternal()) {
+ case AudioManager.RINGER_MODE_SILENT:
+ mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer));
+ getQsTile().setLabel(getString(R.string.volume_mode));
+ break;
+ case AudioManager.RINGER_MODE_VIBRATE:
+ mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_mute));
+ getQsTile().setLabel(getString(R.string.mute_mode));
+ break;
+ case AudioManager.RINGER_MODE_NORMAL:
+ mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);
+ getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_vibrate));
+ getQsTile().setLabel(getString(R.string.vibrate_mode));
+ break;
+ }
+ getQsTile().updateTile();
+ }
+
+}
\ No newline at end of file