diff --git a/README.md b/README.md
index b654c4822..247cf2bb8 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
- # v6.8.0 is out!
+ # v6.9.0 is out!
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 92623826b..6b802cd55 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -16,8 +16,8 @@ android {
applicationId = "com.drdisagree.iconify"
minSdk = 31
targetSdk = 34
- versionCode = 20
- versionName = "6.8.0"
+ versionCode = 21
+ versionName = "6.9.0"
setProperty("archivesBaseName", "Iconify v$versionName")
buildConfigField("int", "MIN_SDK_VERSION", "$minSdk")
}
@@ -65,6 +65,7 @@ android {
viewBinding = true
dataBinding = true
buildConfig = true
+ aidl = true
}
compileOptions {
@@ -112,6 +113,7 @@ dependencies {
// Data Binding
implementation(libs.library)
+ implementation(libs.androidx.palette.ktx)
// Xposed API
compileOnly(files("libs/api-82.jar"))
@@ -128,7 +130,7 @@ dependencies {
implementation(libs.kotlinx.coroutines.android)
// Color Picker
- implementation(libs.colorpicker)
+ implementation(libs.jaredrummler.colorpicker)
// Splash Screen
implementation(libs.androidx.core.splashscreen)
@@ -142,6 +144,9 @@ dependencies {
// Zip Util
implementation(libs.zip4j)
+ // Preference
+ implementation(libs.androidx.preference.ktx)
+
// Remote Preference
implementation(libs.remotepreferences)
@@ -190,12 +195,20 @@ dependencies {
// Fading Edge Layout
implementation(libs.fadingedgelayout)
+ // Google Subject Segmentation - MLKit
+ implementation(libs.com.google.android.gms.play.services.mlkit.subject.segmentation)
+ implementation(libs.play.services.base)
+
+ // Blur View
+ implementation(libs.blurview)
+
// Misc
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.work.runtime)
implementation(libs.androidx.work.runtime.ktx)
implementation(libs.slf4j.api)
+ implementation(libs.commons.text)
}
tasks.register("printVersionName") {
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index bd62f20fe..474870070 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -21,15 +21,23 @@
public static int d(...);
}
+# Activity and Fragment names
+-keep class com.drdisagree.iconify.ui.activities.**
+-keep class com.drdisagree.iconify.ui.fragments.**
+
# Xposed
-keep class de.robv.android.xposed.**
-keep class com.drdisagree.iconify.xposed.InitHook
-keepnames class com.drdisagree.iconify.xposed.**
--keepnames class com.drdisagree.iconify.config.XPrefs
+-keepnames class com.drdisagree.iconify.xposed.utils.XPrefs
-keep class com.drdisagree.iconify.xposed.** {
(android.content.Context);
}
+# Weather
+-keepnames class com.drdisagree.iconify.utils.weather.**
+-keep class com.drdisagree.iconify.utils.weather.** { *; }
+
# EventBus
-keepattributes *Annotation*
-keepclassmembers,allowoptimization,allowobfuscation class * {
@@ -59,4 +67,13 @@
# Obfuscation
-repackageclasses
--allowaccessmodification
\ No newline at end of file
+-allowaccessmodification
+
+# Root Service
+-keep class com.drdisagree.iconify.services.RootProviderProxy { *; }
+-keep class com.drdisagree.iconify.IRootProviderProxy { *; }
+
+# AIDL Classes
+-keep interface **.I* { *; }
+-keep class **.I*$Stub { *; }
+-keep class **.I*$Stub$Proxy { *; }
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a7b81b747..676021d76 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -22,6 +22,17 @@
+
+
+
+
+
+
+
+
+
+
-->
+
+
@@ -170,12 +191,192 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/aidl/com/drdisagree/iconify/IExtractSubjectCallback.aidl b/app/src/main/aidl/com/drdisagree/iconify/IExtractSubjectCallback.aidl
new file mode 100644
index 000000000..d66b84c6e
--- /dev/null
+++ b/app/src/main/aidl/com/drdisagree/iconify/IExtractSubjectCallback.aidl
@@ -0,0 +1,6 @@
+package com.drdisagree.iconify;
+
+interface IExtractSubjectCallback {
+ void onStart(String message);
+ void onResult(boolean success, String message);
+}
\ No newline at end of file
diff --git a/app/src/main/aidl/com/drdisagree/iconify/IRootProviderProxy.aidl b/app/src/main/aidl/com/drdisagree/iconify/IRootProviderProxy.aidl
new file mode 100644
index 000000000..e874a37be
--- /dev/null
+++ b/app/src/main/aidl/com/drdisagree/iconify/IRootProviderProxy.aidl
@@ -0,0 +1,10 @@
+package com.drdisagree.iconify;
+
+import com.drdisagree.iconify.IExtractSubjectCallback;
+
+interface IRootProviderProxy {
+ String[] runCommand(String command);
+ void extractSubject(in Bitmap input, String resultPath, IExtractSubjectCallback callback);
+ void enableOverlay(in String packageName);
+ void disableOverlay(in String packageName);
+}
\ No newline at end of file
diff --git a/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/drawable/toast_frame.xml b/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/drawable/toast_frame.xml
new file mode 100644
index 000000000..e15325f98
--- /dev/null
+++ b/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/drawable/toast_frame.xml
@@ -0,0 +1,34 @@
+
+
+ -
+
+
-
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/drawable/toast_frame_material.xml b/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/drawable/toast_frame_material.xml
new file mode 100644
index 000000000..e15325f98
--- /dev/null
+++ b/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/drawable/toast_frame_material.xml
@@ -0,0 +1,34 @@
+
+
+ -
+
+
-
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/values-night/colors.xml b/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/values-night/colors.xml
new file mode 100644
index 000000000..e05ab934e
--- /dev/null
+++ b/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/values-night/colors.xml
@@ -0,0 +1,6 @@
+
+
+
+ @android:color/system_neutral2_800
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/values/colors.xml b/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/values/colors.xml
new file mode 100644
index 000000000..b3ee65f40
--- /dev/null
+++ b/app/src/main/assets/CompileOnDemand/android/TSTFRM12/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+
+ @android:color/system_neutral1_50
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Module/IconifyCompanion/META-INF/com/google/android/update-binary b/app/src/main/assets/Module/IconifyCompanion/META-INF/com/google/android/update-binary
index b91ebe4d6..88816b3ad 100644
--- a/app/src/main/assets/Module/IconifyCompanion/META-INF/com/google/android/update-binary
+++ b/app/src/main/assets/Module/IconifyCompanion/META-INF/com/google/android/update-binary
@@ -83,7 +83,8 @@ file_paths="/system/system_ext/priv-app/SystemUI/SystemUI.apk
/system/system_ext/priv-app/sysuia/sysuia.apk
/system/system_ext/priv-app/TranSystemUI/TranSystemUI.apk
/system/system_ext/priv-app/MiuiSystemUI/MiuiSystemUI.apk
-/system/product/priv-app/MiuiSystemUI/MiuiSystemUI.apk"
+/system/product/priv-app/MiuiSystemUI/MiuiSystemUI.apk
+/system/system_ext/priv-app/LMOSystemUI/LMOSystemUI.apk"
found=0
diff --git a/app/src/main/assets/Overlays/android/QSPBA/res/values-night/iconify.xml b/app/src/main/assets/Overlays/android/QSPBA/res/values-night/iconify.xml
index 3b3e92095..2d42498a7 100644
--- a/app/src/main/assets/Overlays/android/QSPBA/res/values-night/iconify.xml
+++ b/app/src/main/assets/Overlays/android/QSPBA/res/values-night/iconify.xml
@@ -1,6 +1,9 @@
+
@*android:color/black
+ @*android:color/black
+ @*android:color/black
@*android:color/black
@*android:color/black
@*android:color/black
diff --git a/app/src/main/assets/Overlays/android/QSPBD/res/values-night/iconify.xml b/app/src/main/assets/Overlays/android/QSPBD/res/values-night/iconify.xml
index 799c3435e..1afddfcd9 100644
--- a/app/src/main/assets/Overlays/android/QSPBD/res/values-night/iconify.xml
+++ b/app/src/main/assets/Overlays/android/QSPBD/res/values-night/iconify.xml
@@ -1,6 +1,9 @@
+
@*android:color/black
+ @*android:color/black
+ @*android:color/system_neutral1_800
@*android:color/black
@*android:color/black
@*android:color/black
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..834225d2d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..834225d2d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..effcde5d9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..effcde5d9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..504cc95a7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..504cc95a7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..e6aad62df
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..e6aad62df
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..62f871e78
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..62f871e78
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..62f871e78
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC1/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..79fb7f04c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..79fb7f04c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..581331608
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..581331608
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..7765c318e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..7765c318e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..679d52e93
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..679d52e93
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..6876c0799
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..6876c0799
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..6876c0799
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC10/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..66158ad22
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..66158ad22
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..f625c4edb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..f625c4edb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..316b0d3a5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..316b0d3a5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..4106a2347
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..4106a2347
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..cf10b0123
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..cf10b0123
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..cf10b0123
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC11/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_1x_mobiledata.xml
new file mode 100644
index 000000000..9c394a97b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_1x_mobiledata.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_3g_mobiledata.xml
new file mode 100644
index 000000000..948ca6340
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_3g_mobiledata.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_4g_mobiledata.xml
new file mode 100644
index 000000000..c20075c6c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_4g_mobiledata.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_4g_plus_mobiledata.xml
new file mode 100644
index 000000000..6d0930c28
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_4g_plus_mobiledata.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_e_mobiledata.xml
new file mode 100644
index 000000000..4e6694d92
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_e_mobiledata.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_mobiledata.xml
new file mode 100644
index 000000000..66bdfcc7b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_mobiledata.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_plus_mobiledata.xml
new file mode 100644
index 000000000..b8b302488
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_plus_mobiledata.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_uc_mobiledata.xml
new file mode 100644
index 000000000..66bdfcc7b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_uc_mobiledata.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_uw_mobiledata.xml
new file mode 100644
index 000000000..66bdfcc7b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_5g_uw_mobiledata.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_e_mobiledata.xml
new file mode 100644
index 000000000..25138723c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_e_mobiledata.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_g_mobiledata.xml
new file mode 100644
index 000000000..aae9af97f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_g_mobiledata.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_h_mobiledata.xml
new file mode 100644
index 000000000..8c2fea791
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_h_mobiledata.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_h_plus_mobiledata.xml
new file mode 100644
index 000000000..ca99c0c70
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_h_plus_mobiledata.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_lte_mobiledata.xml
new file mode 100644
index 000000000..b0fbb24e0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_lte_mobiledata.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_lte_plus_mobiledata.xml
new file mode 100644
index 000000000..593db9ec5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_lte_plus_mobiledata.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..c461365dd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..c461365dd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..b4bed1feb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..b4bed1feb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..59adc2ab9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..ebcf3b106
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..b1c402dfc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..b1c402dfc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..5836f94f2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..5836f94f2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..5836f94f2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC12/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..51dbcbf08
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..51dbcbf08
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..70c43f196
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..70c43f196
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..3ba81ab0c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..3ba81ab0c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..7326f8eeb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..7326f8eeb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..882677438
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..882677438
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..882677438
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC13/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_1x_mobiledata.xml
new file mode 100644
index 000000000..4b4a46b9c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_1x_mobiledata.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_3g_mobiledata.xml
new file mode 100644
index 000000000..72326376b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_3g_mobiledata.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_4g_mobiledata.xml
new file mode 100644
index 000000000..f5c04def5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_4g_mobiledata.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_4g_plus_mobiledata.xml
new file mode 100644
index 000000000..f11915a96
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_4g_plus_mobiledata.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_e_mobiledata.xml
new file mode 100644
index 000000000..964bd1630
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_e_mobiledata.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_mobiledata.xml
new file mode 100644
index 000000000..f63b3efad
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_mobiledata.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_plus_mobiledata.xml
new file mode 100644
index 000000000..60f758e57
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_plus_mobiledata.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_uc_mobiledata.xml
new file mode 100644
index 000000000..f63b3efad
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_uc_mobiledata.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_uw_mobiledata.xml
new file mode 100644
index 000000000..f63b3efad
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_5g_uw_mobiledata.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_e_mobiledata.xml
new file mode 100644
index 000000000..97ee8cf2c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_e_mobiledata.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_g_mobiledata.xml
new file mode 100644
index 000000000..4651eab4a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_g_mobiledata.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_h_mobiledata.xml
new file mode 100644
index 000000000..8f2438d1e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_h_mobiledata.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_h_plus_mobiledata.xml
new file mode 100644
index 000000000..6f9f0fdb6
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_h_plus_mobiledata.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_lte_mobiledata.xml
new file mode 100644
index 000000000..43bfef140
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_lte_mobiledata.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_lte_plus_mobiledata.xml
new file mode 100644
index 000000000..1277d3094
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_lte_plus_mobiledata.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..8ea4c2470
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..8ea4c2470
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..695c5263e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..695c5263e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..695c5263e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..695c5263e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..83254ff81
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..83254ff81
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..4f271f0a1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..4f271f0a1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..4f271f0a1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC14/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_1x_mobiledata.xml
new file mode 100644
index 000000000..785f1dc3c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_1x_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_3g_mobiledata.xml
new file mode 100644
index 000000000..6457acd47
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_3g_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_4g_mobiledata.xml
new file mode 100644
index 000000000..6cd4fcdc3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_4g_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_4g_plus_mobiledata.xml
new file mode 100644
index 000000000..4eb5f9b78
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_4g_plus_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_e_mobiledata.xml
new file mode 100644
index 000000000..0b041917a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_e_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_mobiledata.xml
new file mode 100644
index 000000000..84c73a8b4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_plus_mobiledata.xml
new file mode 100644
index 000000000..ca78191d3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_plus_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_uc_mobiledata.xml
new file mode 100644
index 000000000..84c73a8b4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_uc_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_uw_mobiledata.xml
new file mode 100644
index 000000000..84c73a8b4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_5g_uw_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_e_mobiledata.xml
new file mode 100644
index 000000000..a2fdc1cf3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_e_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_g_mobiledata.xml
new file mode 100644
index 000000000..bf342c458
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_g_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_h_mobiledata.xml
new file mode 100644
index 000000000..f0fdd2cb6
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_h_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_h_plus_mobiledata.xml
new file mode 100644
index 000000000..8e3c9beb6
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_h_plus_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_lte_mobiledata.xml
new file mode 100644
index 000000000..61ef7651d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_lte_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_lte_plus_mobiledata.xml
new file mode 100644
index 000000000..751bcd71e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_lte_plus_mobiledata.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..751f41b79
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..751f41b79
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..531a080a4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..531a080a4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..c9e74bc8d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..c9e74bc8d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..9da5e2d31
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..9da5e2d31
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..6c8b26399
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..6c8b26399
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..6c8b26399
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC15/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..b3184f3c0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..b3184f3c0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..aceafa1c8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..aceafa1c8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..dcfadbe81
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..dcfadbe81
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..8407c90b2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..8407c90b2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..3c485ea27
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..3c485ea27
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..3c485ea27
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC16/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..f1c0efb42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..f1c0efb42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..785eacb11
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..785eacb11
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..07de2487d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..0a24a937d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..0a24a937d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..07de2487d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..1333943e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..1333943e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..1333943e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC17/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..148a4f0ae
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..148a4f0ae
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..579843a31
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..579843a31
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..0284f9ea2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..0284f9ea2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..49dce55ce
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..49dce55ce
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..c6cc45a68
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..c6cc45a68
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..c6cc45a68
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC18/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..991a4621f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..991a4621f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..57cf89631
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..57cf89631
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..d609fdc79
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..d609fdc79
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..f291f636e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..f291f636e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..fbe8dbc5c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..fbe8dbc5c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..fbe8dbc5c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC19/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_1x_mobiledata.xml
new file mode 100644
index 000000000..926bb3490
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_1x_mobiledata.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_3g_mobiledata.xml
new file mode 100644
index 000000000..e4bf66a40
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_3g_mobiledata.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_4g_mobiledata.xml
new file mode 100644
index 000000000..4a6497c26
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_4g_mobiledata.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_4g_plus_mobiledata.xml
new file mode 100644
index 000000000..cc53478fa
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_4g_plus_mobiledata.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_e_mobiledata.xml
new file mode 100644
index 000000000..f2f842bb8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_e_mobiledata.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_mobiledata.xml
new file mode 100644
index 000000000..71f201fe0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_mobiledata.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_plus_mobiledata.xml
new file mode 100644
index 000000000..e39ea5879
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_plus_mobiledata.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_uc_mobiledata.xml
new file mode 100644
index 000000000..71f201fe0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_uc_mobiledata.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_uw_mobiledata.xml
new file mode 100644
index 000000000..71f201fe0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_5g_uw_mobiledata.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_e_mobiledata.xml
new file mode 100644
index 000000000..adb8b8e50
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_e_mobiledata.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_g_mobiledata.xml
new file mode 100644
index 000000000..c68267042
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_g_mobiledata.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_h_mobiledata.xml
new file mode 100644
index 000000000..71e635477
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_h_mobiledata.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_h_plus_mobiledata.xml
new file mode 100644
index 000000000..59fdfe45b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_h_plus_mobiledata.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_lte_mobiledata.xml
new file mode 100644
index 000000000..b9e4bdd7f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_lte_mobiledata.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_lte_plus_mobiledata.xml
new file mode 100644
index 000000000..347a152be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_lte_plus_mobiledata.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..01ed78578
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..01ed78578
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..add7e5812
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..add7e5812
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..c4a9923ea
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..c4a9923ea
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..88825e53a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..88825e53a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..e65bc2f95
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..e65bc2f95
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..e65bc2f95
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC2/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..af92178ce
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..af92178ce
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..4cefd75ae
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..4cefd75ae
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..c03935468
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..c03935468
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..3bfb02198
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..3bfb02198
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..2f0a9bf75
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..2f0a9bf75
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..2f0a9bf75
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_location.xml b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_location.xml
new file mode 100644
index 000000000..5d10df06a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC20/res/drawable/ic_signal_location.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..e9aa8e2e9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..e9aa8e2e9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..1fa47ca92
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..1fa47ca92
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..60c215086
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..60c215086
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..a11914a63
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..a11914a63
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..ba2da49b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..ba2da49b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..ba2da49b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC21/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..ee33520fc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..ee33520fc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..b9178b2f4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..b9178b2f4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..3d12a6fd1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..3d12a6fd1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..590dd2c2e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..590dd2c2e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..74f9d4730
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..74f9d4730
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..74f9d4730
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC22/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_1x_mobiledata.xml
new file mode 100644
index 000000000..fcab9e628
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_1x_mobiledata.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_3g_mobiledata.xml
new file mode 100644
index 000000000..7d8f22d89
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_3g_mobiledata.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_4g_mobiledata.xml
new file mode 100644
index 000000000..50073bdae
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_4g_mobiledata.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_4g_plus_mobiledata.xml
new file mode 100644
index 000000000..1c8e393ab
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_4g_plus_mobiledata.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_e_mobiledata.xml
new file mode 100644
index 000000000..bb771755f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_e_mobiledata.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_mobiledata.xml
new file mode 100644
index 000000000..4030daa2f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_mobiledata.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_plus_mobiledata.xml
new file mode 100644
index 000000000..d4fa9acc9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_plus_mobiledata.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_uc_mobiledata.xml
new file mode 100644
index 000000000..4030daa2f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_uc_mobiledata.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_uw_mobiledata.xml
new file mode 100644
index 000000000..4030daa2f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_5g_uw_mobiledata.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_e_mobiledata.xml
new file mode 100644
index 000000000..895593be1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_e_mobiledata.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_g_mobiledata.xml
new file mode 100644
index 000000000..89a6470a1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_g_mobiledata.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_h_mobiledata.xml
new file mode 100644
index 000000000..b0262ab8e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_h_mobiledata.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_h_plus_mobiledata.xml
new file mode 100644
index 000000000..945e8bde8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_h_plus_mobiledata.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_lte_mobiledata.xml
new file mode 100644
index 000000000..3fb88a30a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_lte_mobiledata.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_lte_plus_mobiledata.xml
new file mode 100644
index 000000000..6fdc6ac5d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_lte_plus_mobiledata.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..712c49391
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..712c49391
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..f08da03ca
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..f08da03ca
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..900bbd66d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..9646f98a0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..97dc06545
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..900bbd66d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..5e4c24270
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..acf1ac807
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..5e4c24270
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC23/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..36166b1b7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..36166b1b7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..e683bbefd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..e683bbefd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..e75b2a6d5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..e75b2a6d5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..50f76bd71
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..50f76bd71
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..4f18862b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..4f18862b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..4f18862b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC24/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..d4883b2f8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..d4883b2f8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..e4eb791c5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..e4eb791c5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..2ce739f0c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..2ce739f0c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..6e33da8da
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..6e33da8da
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..a36c4b048
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..a36c4b048
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..c8033e14d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC25/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..df71163ce
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..df71163ce
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..6ea3f7147
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..6ea3f7147
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..7d8ba2f21
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..7d8ba2f21
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..db5411db2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..db5411db2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..29c3ea284
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..29c3ea284
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..29c3ea284
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC26/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..bd435406d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..bd435406d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..6164e201b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..6164e201b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..e771017df
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..e771017df
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..8934ed54f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..8934ed54f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..52285595a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..52285595a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..52285595a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC27/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..079641719
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..079641719
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..4c767ccba
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..4c767ccba
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..561b1fd55
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..561b1fd55
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..53c8458db
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..53c8458db
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..9f93ea0b8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..d51c89c81
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..d51c89c81
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC28/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..689d5664d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..689d5664d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..2d71803c7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..2d71803c7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..72f83cf96
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..72f83cf96
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..c2af388b9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..c2af388b9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..04d4d2702
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..04d4d2702
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..04d4d2702
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC29/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..38b31011a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..38b31011a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..1ecbce706
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..1ecbce706
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..7b7b7ec05
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..7b7b7ec05
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..28bcab505
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..28bcab505
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..06c36c0fd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..06c36c0fd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..06c36c0fd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC3/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..ab2c36147
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..ab2c36147
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..016a3a8fc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..a4e13b2a5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..71f52d4bd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..71f52d4bd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..852c1dac1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..852c1dac1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..8f7b90a15
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..8f7b90a15
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..8f7b90a15
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC30/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..ebe7e8878
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..ebe7e8878
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..b149a1d54
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..b149a1d54
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..ceb7d5095
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..ceb7d5095
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..d355efa26
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..d355efa26
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..ffb465530
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..ffb465530
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..ffb465530
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC31/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..58c2ac214
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..58c2ac214
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..052a63233
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..052a63233
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..64c1aff54
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..64c1aff54
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..8b6edabe9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..8b6edabe9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..1aa6aa09a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..1aa6aa09a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..1aa6aa09a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC32/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..ea3d909f3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..ea3d909f3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..0c9074b83
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..0c9074b83
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..ac81a3de8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..ac81a3de8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..c2259b10b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..c2259b10b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..b71c4c6c7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..b71c4c6c7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..b71c4c6c7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC33/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..358b914fc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..358b914fc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..c5b3d1692
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..c5b3d1692
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..ecb0f760b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..ecb0f760b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..407fbdee0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..407fbdee0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..0cc865c10
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..0cc865c10
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..0cc865c10
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC34/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..2bf2fb31a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..2bf2fb31a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..3ed9275ee
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..3ed9275ee
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..2ef8f395c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..2ef8f395c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..288ebe57c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..288ebe57c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..d341b92d4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..d341b92d4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..d341b92d4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC35/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..86139d1cc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..86139d1cc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..bc74851e3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..bc74851e3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..09a9de7dc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..09a9de7dc
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..aebc5b341
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..aebc5b341
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..e6f8c660c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..e6f8c660c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..e6f8c660c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC36/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..e19d4a6fb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..ae2e215f3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..39fa79c91
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..049aed57b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..185ee1072
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..185ee1072
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..b8f1b43b5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..b8f1b43b5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..bf29c73d1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..bf29c73d1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..bf29c73d1
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC4/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..49c8e9217
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..49c8e9217
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..d1312a6f0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..d1312a6f0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..36143d3c8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..36143d3c8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..554850966
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..554850966
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..725a41460
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..725a41460
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..725a41460
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC5/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..145fd05bd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..145fd05bd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..b10190819
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..b10190819
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..ae4b4ad54
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..ae4b4ad54
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..a9ec0f75e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..a9ec0f75e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..3f6137d42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..3f6137d42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..3f6137d42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC6/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..91105c9f4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..91105c9f4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..91105c9f4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..91105c9f4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..df462a481
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..df462a481
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..72af92adb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..72af92adb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..9df8b17db
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..9df8b17db
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..9df8b17db
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC7/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..ba55e06c5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..ba55e06c5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..c096b8452
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..c096b8452
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..f1133a5eb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..f1133a5eb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..ac4d88565
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..ac4d88565
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..b7e93666c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..b7e93666c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..b7e93666c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC8/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_0_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_0_4_bar.xml
new file mode 100644
index 000000000..c60ad0495
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_0_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_0_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_0_5_bar.xml
new file mode 100644
index 000000000..c60ad0495
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_0_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_1_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_1_4_bar.xml
new file mode 100644
index 000000000..445681baa
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_1_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_1_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_1_5_bar.xml
new file mode 100644
index 000000000..445681baa
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_1_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_2_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_2_4_bar.xml
new file mode 100644
index 000000000..b2d37469d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_2_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_2_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_2_5_bar.xml
new file mode 100644
index 000000000..b2d37469d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_2_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_3_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_3_4_bar.xml
new file mode 100644
index 000000000..49d9ecd88
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_3_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_3_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_3_5_bar.xml
new file mode 100644
index 000000000..49d9ecd88
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_3_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_4_4_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_4_4_bar.xml
new file mode 100644
index 000000000..11b7d92a9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_4_4_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_4_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_4_5_bar.xml
new file mode 100644
index 000000000..11b7d92a9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_4_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_5_5_bar.xml b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_5_5_bar.xml
new file mode 100644
index 000000000..11b7d92a9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/SGIC9/res/drawable/ic_signal_cellular_5_5_bar.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..17a804f7d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..17a804f7d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..17a804f7d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..fec096e70
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..5dd08b195
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..1974b4d26
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..18eec4e44
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..17a804f7d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..fec096e70
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..5dd08b195
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..1974b4d26
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..18eec4e44
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..17a804f7d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..fec096e70
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..5dd08b195
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..1974b4d26
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..18eec4e44
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..17a804f7d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,14 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..fec096e70
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..5dd08b195
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..1974b4d26
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..18eec4e44
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI1/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..f8fbf1e32
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..226d28263
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..f8fbf1e32
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..226d28263
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..f8fbf1e32
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..226d28263
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..f8fbf1e32
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..226d28263
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..de80ec9e8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI10/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..465a729ab
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..a4553d7ec
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..df7b1d63a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..465a729ab
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..a4553d7ec
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..df7b1d63a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..465a729ab
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..a4553d7ec
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..df7b1d63a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..465a729ab
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..a4553d7ec
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..df7b1d63a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..abc3a1a1b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI11/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..1119f8131
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..1119f8131
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..1119f8131
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..d33292b6b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..16a2e9902
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..aa17764ba
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..894c47966
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..1119f8131
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..d33292b6b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..16a2e9902
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..aa17764ba
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..894c47966
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..1119f8131
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..d33292b6b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..16a2e9902
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..aa17764ba
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..894c47966
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..1119f8131
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..d33292b6b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..16a2e9902
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..aa17764ba
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..894c47966
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI12/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..502071544
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..502071544
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..502071544
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..6b42ba14a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..7617c3fbd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..746887bc3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..88ae44047
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..502071544
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..6b42ba14a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..7617c3fbd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..746887bc3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..88ae44047
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..502071544
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..6b42ba14a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..7617c3fbd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..746887bc3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..88ae44047
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..502071544
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..6b42ba14a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..7617c3fbd
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..746887bc3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..88ae44047
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI13/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..3e389c657
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..3e389c657
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..3e389c657
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..204e906b2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..f5a538cdb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..b57747aa4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..66fb6e362
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..3e389c657
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..204e906b2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..f5a538cdb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..b57747aa4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..66fb6e362
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..3e389c657
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..204e906b2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..f5a538cdb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..b57747aa4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..66fb6e362
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..3e389c657
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..204e906b2
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..f5a538cdb
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..b57747aa4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..66fb6e362
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI14/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..d1a978fa8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..f9e7b669c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..d1a978fa8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..f9e7b669c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..d1a978fa8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..f9e7b669c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..d1a978fa8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..f9e7b669c
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..056f813de
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI15/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..b4c6a3445
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..b4c6a3445
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..b4c6a3445
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..e33ba2644
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..83908487d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..6195b24b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..76c0868a4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..b4c6a3445
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..e33ba2644
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..83908487d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..6195b24b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..76c0868a4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..b4c6a3445
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..e33ba2644
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..83908487d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..6195b24b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..76c0868a4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..b4c6a3445
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..e33ba2644
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..83908487d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..6195b24b0
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..76c0868a4
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI16/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..2a4327571
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..2a4327571
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..2a4327571
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..f05deda6a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..a6d1cf1be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..b668f00d7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..82cf3b616
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..2a4327571
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..f05deda6a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..a6d1cf1be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..b668f00d7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..82cf3b616
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..2a4327571
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..f05deda6a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..a6d1cf1be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..b668f00d7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..82cf3b616
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..2a4327571
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..f05deda6a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..a6d1cf1be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..b668f00d7
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..82cf3b616
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI2/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..f96ae041a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..17297d38a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..17297d38a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..361725009
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..a9c6992e5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..d902c2970
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..f96ae041a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..17297d38a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..361725009
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..a9c6992e5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..d902c2970
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..f96ae041a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..17297d38a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..361725009
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..a9c6992e5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..d902c2970
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..f96ae041a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..17297d38a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..361725009
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..a9c6992e5
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..d902c2970
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..f96ae041a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI3/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..59db1a957
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..59db1a957
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..59db1a957
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..1ea85488b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..b366d77d9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..d827bca42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..7c0a964be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..59db1a957
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..1ea85488b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..b366d77d9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..d827bca42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..7c0a964be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..59db1a957
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..1ea85488b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..b366d77d9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..d827bca42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..7c0a964be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..59db1a957
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..1ea85488b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..b366d77d9
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..d827bca42
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..7c0a964be
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI4/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..85643697a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..85643697a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..85643697a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..500617c4b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..f0aa6e016
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..23c0e7f0f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..23c0e7f0f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..85643697a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..500617c4b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..f0aa6e016
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..23c0e7f0f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..23c0e7f0f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..85643697a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..500617c4b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..f0aa6e016
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..23c0e7f0f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..23c0e7f0f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..85643697a
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..500617c4b
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..f0aa6e016
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..23c0e7f0f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..23c0e7f0f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI5/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,22 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..927d22325
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..867de6807
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..e2207408d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..927d22325
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..867de6807
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..e2207408d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..927d22325
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..867de6807
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..e2207408d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..927d22325
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..867de6807
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..e2207408d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..eef571d59
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI6/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..4df9bc617
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..4df9bc617
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..4df9bc617
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..ece630995
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..41e4caea8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..6e7a27fb8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..70e9d7a9e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..4df9bc617
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..ece630995
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..41e4caea8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..6e7a27fb8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..70e9d7a9e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..4df9bc617
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..ece630995
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..41e4caea8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..6e7a27fb8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..70e9d7a9e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..4df9bc617
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..ece630995
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..41e4caea8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..6e7a27fb8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..70e9d7a9e
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI7/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..e17d81062
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..e17d81062
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..e17d81062
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..a3865f829
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..eb32dd9a8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..aaae51a35
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..4f2da1a5d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..e17d81062
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..a3865f829
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..eb32dd9a8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..aaae51a35
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..4f2da1a5d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..e17d81062
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..a3865f829
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..eb32dd9a8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..aaae51a35
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..4f2da1a5d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..e17d81062
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..a3865f829
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..eb32dd9a8
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..aaae51a35
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..4f2da1a5d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI8/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000..3509c4ead
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
new file mode 100644
index 000000000..3509c4ead
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_signal_wifi_transient_animation_drawable.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_0.xml
new file mode 100644
index 000000000..3509c4ead
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_0.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_1.xml
new file mode 100644
index 000000000..175ec6658
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_2.xml
new file mode 100644
index 000000000..702a4471f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_2.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_3.xml
new file mode 100644
index 000000000..2b58058e3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_3.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_4.xml
new file mode 100644
index 000000000..f84d7689d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_4_signal_4.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_0.xml
new file mode 100644
index 000000000..3509c4ead
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_0.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_1.xml
new file mode 100644
index 000000000..175ec6658
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_2.xml
new file mode 100644
index 000000000..702a4471f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_2.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_3.xml
new file mode 100644
index 000000000..2b58058e3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_3.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_4.xml
new file mode 100644
index 000000000..f84d7689d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_5_signal_4.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_0.xml
new file mode 100644
index 000000000..3509c4ead
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_0.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_1.xml
new file mode 100644
index 000000000..175ec6658
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_2.xml
new file mode 100644
index 000000000..702a4471f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_2.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_3.xml
new file mode 100644
index 000000000..2b58058e3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_3.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_4.xml
new file mode 100644
index 000000000..f84d7689d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_6_signal_4.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_0.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_0.xml
new file mode 100644
index 000000000..3509c4ead
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_0.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_1.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_1.xml
new file mode 100644
index 000000000..175ec6658
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_1.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_2.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_2.xml
new file mode 100644
index 000000000..702a4471f
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_2.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_3.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_3.xml
new file mode 100644
index 000000000..2b58058e3
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_3.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_4.xml b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_4.xml
new file mode 100644
index 000000000..f84d7689d
--- /dev/null
+++ b/app/src/main/assets/Overlays/android/WIFI9/res/drawable/ic_wifi_signal_4.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/com.android.systemui/IPSUI1/res/raw/udfps_aod_fp.json b/app/src/main/assets/Overlays/com.android.systemui/IPSUI1/res/raw/udfps_aod_fp.json
deleted file mode 100644
index bc5045b9e..000000000
--- a/app/src/main/assets/Overlays/com.android.systemui/IPSUI1/res/raw/udfps_aod_fp.json
+++ /dev/null
@@ -1,1559 +0,0 @@
-{
- "nm": "Untitled file",
- "ddd": 0,
- "h": 24,
- "w": 24,
- "meta": {
- "g": "@lottiefiles/creator 1.9.0"
- },
- "layers": [
- {
- "ty": 4,
- "nm": "Shape Layer 1",
- "sr": 1,
- "st": 0,
- "op": 60,
- "ip": 0,
- "hd": false,
- "ddd": 0,
- "bm": 0,
- "hasMask": false,
- "ao": 0,
- "ks": {
- "a": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- },
- "shapes": [
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 1",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 1",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.8819999999999979,
- 1.205
- ],
- [
- -0.4460000000000015,
- 0.3259999999999996
- ],
- [
- -0.3269999999999982,
- -0.44700000000000006
- ],
- [
- 0,
- -1.9250000000000007
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.4969999999999999
- ],
- [
- -0.3249999999999993,
- -0.4449999999999994
- ],
- [
- 0.4469999999999992,
- -0.3260000000000005
- ],
- [
- 1.1329999999999991,
- 1.5490000000000004
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 20,
- 20
- ],
- [
- 19,
- 19
- ],
- [
- 19,
- 12
- ],
- [
- 17.652,
- 7.869
- ],
- [
- 17.869,
- 6.472
- ],
- [
- 19.267,
- 6.69
- ],
- [
- 21,
- 12
- ],
- [
- 21,
- 19
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 19.22976779937744,
- 13.139584064483643
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 19.22976779937744,
- 13.139584064483643
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 2",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 2",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -4.963,
- 0
- ],
- [
- -1.2600000000000016,
- -0.6339999999999999
- ],
- [
- 0.2480000000000011,
- -0.4930000000000003
- ],
- [
- 0.4900000000000002,
- 0.24600000000000044
- ],
- [
- 1.1050000000000004,
- 0
- ],
- [
- 0,
- -3.859
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -4.963
- ],
- [
- 1.4209999999999994,
- 0
- ],
- [
- 0.49299999999999855,
- 0.24800000000000022
- ],
- [
- -0.2480000000000011,
- 0.4939999999999998
- ],
- [
- -0.9779999999999998,
- -0.492
- ],
- [
- -3.859,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 14
- ],
- [
- 3,
- 13
- ],
- [
- 3,
- 12
- ],
- [
- 12,
- 3
- ],
- [
- 16.039,
- 3.955
- ],
- [
- 16.483,
- 5.298
- ],
- [
- 15.14,
- 5.742
- ],
- [
- 12,
- 5
- ],
- [
- 5,
- 12
- ],
- [
- 5,
- 13
- ],
- [
- 4,
- 14
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 9.789691925048828,
- 8.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 9.789691925048828,
- 8.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 3",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 3",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 20
- ],
- [
- 3,
- 19
- ],
- [
- 3,
- 16
- ],
- [
- 4,
- 15
- ],
- [
- 5,
- 16
- ],
- [
- 5,
- 19
- ],
- [
- 4,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 4,
- 17.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 4,
- 17.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 4",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 4",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 21
- ],
- [
- 15,
- 20
- ],
- [
- 15,
- 17
- ],
- [
- 16,
- 16
- ],
- [
- 17,
- 17
- ],
- [
- 17,
- 20
- ],
- [
- 16,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 16,
- 18.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 16,
- 18.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 5",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 5",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 1.654,
- 0
- ],
- [
- 0.4339999999999993,
- -1.1679999999999993
- ],
- [
- 0.5140000000000002,
- 0.18900000000000006
- ],
- [
- -0.19199999999999928,
- 0.5169999999999995
- ],
- [
- -2.0790000000000006,
- 0
- ],
- [
- 0,
- -2.7569999999999997
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.654
- ],
- [
- -1.2469999999999999,
- 0
- ],
- [
- -0.1930000000000014,
- 0.5200000000000014
- ],
- [
- -0.5179999999999998,
- -0.19299999999999962
- ],
- [
- 0.7250000000000005,
- -1.947000000000001
- ],
- [
- 2.7569999999999997,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 15
- ],
- [
- 15,
- 14
- ],
- [
- 15,
- 12
- ],
- [
- 12,
- 9
- ],
- [
- 9.188,
- 10.953
- ],
- [
- 7.902,
- 11.542
- ],
- [
- 7.313,
- 10.256
- ],
- [
- 12,
- 7
- ],
- [
- 17,
- 12
- ],
- [
- 17,
- 14
- ],
- [
- 16,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12.125400066375732,
- 11
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12.125400066375732,
- 11
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 6",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 6",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 8,
- 21
- ],
- [
- 7,
- 20
- ],
- [
- 7,
- 14
- ],
- [
- 8,
- 13
- ],
- [
- 9,
- 14
- ],
- [
- 9,
- 20
- ],
- [
- 8,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 8,
- 17
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 8,
- 17
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 7",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 7",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 15
- ],
- [
- 11,
- 14
- ],
- [
- 11,
- 12
- ],
- [
- 12,
- 11
- ],
- [
- 13,
- 12
- ],
- [
- 13,
- 14
- ],
- [
- 12,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12,
- 13
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 13
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 8",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 8",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 21
- ],
- [
- 11,
- 20
- ],
- [
- 11,
- 17
- ],
- [
- 12,
- 16
- ],
- [
- 13,
- 17
- ],
- [
- 13,
- 20
- ],
- [
- 12,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12,
- 18.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 18.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- }
- ],
- "ind": 1
- }
- ],
- "v": "5.7.0",
- "fr": 30,
- "op": 60,
- "ip": 0,
- "assets": []
-}
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/com.android.systemui/IPSUI1/res/raw/udfps_lockscreen_fp.json b/app/src/main/assets/Overlays/com.android.systemui/IPSUI1/res/raw/udfps_lockscreen_fp.json
deleted file mode 100644
index 0e73de39b..000000000
--- a/app/src/main/assets/Overlays/com.android.systemui/IPSUI1/res/raw/udfps_lockscreen_fp.json
+++ /dev/null
@@ -1,1551 +0,0 @@
-{
- "nm": "fingerprint_burn_in_loop",
- "ddd": 0,
- "h": 24,
- "w": 24,
- "meta": {
- "g": "@lottiefiles/creator 1.9.0"
- },
- "layers": [
- {
- "ty": 4,
- "nm": "Shape Layer 1",
- "sr": 1,
- "st": 0,
- "op": 45,
- "ip": 0,
- "hd": false,
- "ddd": 0,
- "bm": 0,
- "hasMask": false,
- "ao": 0,
- "ks": {
- "a": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- },
- "shapes": [
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 1",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 1",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.8819999999999979,
- 1.205
- ],
- [
- -0.4460000000000015,
- 0.3259999999999996
- ],
- [
- -0.3269999999999982,
- -0.44700000000000006
- ],
- [
- 0,
- -1.9250000000000007
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.4969999999999999
- ],
- [
- -0.3249999999999993,
- -0.4449999999999994
- ],
- [
- 0.4469999999999992,
- -0.3260000000000005
- ],
- [
- 1.1329999999999991,
- 1.5490000000000004
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 20,
- 20
- ],
- [
- 19,
- 19
- ],
- [
- 19,
- 12
- ],
- [
- 17.652,
- 7.869
- ],
- [
- 17.869,
- 6.472
- ],
- [
- 19.267,
- 6.69
- ],
- [
- 21,
- 12
- ],
- [
- 21,
- 19
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 2",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 2",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -4.963,
- 0
- ],
- [
- -1.2600000000000016,
- -0.6339999999999999
- ],
- [
- 0.2480000000000011,
- -0.4930000000000003
- ],
- [
- 0.4900000000000002,
- 0.24600000000000044
- ],
- [
- 1.1050000000000004,
- 0
- ],
- [
- 0,
- -3.859
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -4.963
- ],
- [
- 1.4209999999999994,
- 0
- ],
- [
- 0.49299999999999855,
- 0.24800000000000022
- ],
- [
- -0.2480000000000011,
- 0.4939999999999998
- ],
- [
- -0.9779999999999998,
- -0.492
- ],
- [
- -3.859,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 14
- ],
- [
- 3,
- 13
- ],
- [
- 3,
- 12
- ],
- [
- 12,
- 3
- ],
- [
- 16.039,
- 3.955
- ],
- [
- 16.483,
- 5.298
- ],
- [
- 15.14,
- 5.742
- ],
- [
- 12,
- 5
- ],
- [
- 5,
- 12
- ],
- [
- 5,
- 13
- ],
- [
- 4,
- 14
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 3",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 3",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 20
- ],
- [
- 3,
- 19
- ],
- [
- 3,
- 16
- ],
- [
- 4,
- 15
- ],
- [
- 5,
- 16
- ],
- [
- 5,
- 19
- ],
- [
- 4,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 4",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 4",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 21
- ],
- [
- 15,
- 20
- ],
- [
- 15,
- 17
- ],
- [
- 16,
- 16
- ],
- [
- 17,
- 17
- ],
- [
- 17,
- 20
- ],
- [
- 16,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 5",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 5",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 1.654,
- 0
- ],
- [
- 0.4339999999999993,
- -1.1679999999999993
- ],
- [
- 0.5140000000000002,
- 0.18900000000000006
- ],
- [
- -0.19199999999999928,
- 0.5169999999999995
- ],
- [
- -2.0790000000000006,
- 0
- ],
- [
- 0,
- -2.7569999999999997
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.654
- ],
- [
- -1.2469999999999999,
- 0
- ],
- [
- -0.1930000000000014,
- 0.5200000000000014
- ],
- [
- -0.5179999999999998,
- -0.19299999999999962
- ],
- [
- 0.7250000000000005,
- -1.947000000000001
- ],
- [
- 2.7569999999999997,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 15
- ],
- [
- 15,
- 14
- ],
- [
- 15,
- 12
- ],
- [
- 12,
- 9
- ],
- [
- 9.188,
- 10.953
- ],
- [
- 7.902,
- 11.542
- ],
- [
- 7.313,
- 10.256
- ],
- [
- 12,
- 7
- ],
- [
- 17,
- 12
- ],
- [
- 17,
- 14
- ],
- [
- 16,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 6",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 6",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 8,
- 21
- ],
- [
- 7,
- 20
- ],
- [
- 7,
- 14
- ],
- [
- 8,
- 13
- ],
- [
- 9,
- 14
- ],
- [
- 9,
- 20
- ],
- [
- 8,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 7",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 7",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 15
- ],
- [
- 11,
- 14
- ],
- [
- 11,
- 12
- ],
- [
- 12,
- 11
- ],
- [
- 13,
- 12
- ],
- [
- 13,
- 14
- ],
- [
- 12,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 8",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 8",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 21
- ],
- [
- 11,
- 20
- ],
- [
- 11,
- 17
- ],
- [
- 12,
- 16
- ],
- [
- 13,
- 17
- ],
- [
- 13,
- 20
- ],
- [
- 12,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- }
- ],
- "ind": 1
- }
- ],
- "v": "5.7.0",
- "fr": 15,
- "op": 15,
- "ip": 0,
- "assets": []
-}
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/com.android.systemui/IPSUI2/res/raw/udfps_aod_fp.json b/app/src/main/assets/Overlays/com.android.systemui/IPSUI2/res/raw/udfps_aod_fp.json
deleted file mode 100644
index bc5045b9e..000000000
--- a/app/src/main/assets/Overlays/com.android.systemui/IPSUI2/res/raw/udfps_aod_fp.json
+++ /dev/null
@@ -1,1559 +0,0 @@
-{
- "nm": "Untitled file",
- "ddd": 0,
- "h": 24,
- "w": 24,
- "meta": {
- "g": "@lottiefiles/creator 1.9.0"
- },
- "layers": [
- {
- "ty": 4,
- "nm": "Shape Layer 1",
- "sr": 1,
- "st": 0,
- "op": 60,
- "ip": 0,
- "hd": false,
- "ddd": 0,
- "bm": 0,
- "hasMask": false,
- "ao": 0,
- "ks": {
- "a": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- },
- "shapes": [
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 1",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 1",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.8819999999999979,
- 1.205
- ],
- [
- -0.4460000000000015,
- 0.3259999999999996
- ],
- [
- -0.3269999999999982,
- -0.44700000000000006
- ],
- [
- 0,
- -1.9250000000000007
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.4969999999999999
- ],
- [
- -0.3249999999999993,
- -0.4449999999999994
- ],
- [
- 0.4469999999999992,
- -0.3260000000000005
- ],
- [
- 1.1329999999999991,
- 1.5490000000000004
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 20,
- 20
- ],
- [
- 19,
- 19
- ],
- [
- 19,
- 12
- ],
- [
- 17.652,
- 7.869
- ],
- [
- 17.869,
- 6.472
- ],
- [
- 19.267,
- 6.69
- ],
- [
- 21,
- 12
- ],
- [
- 21,
- 19
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 19.22976779937744,
- 13.139584064483643
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 19.22976779937744,
- 13.139584064483643
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 2",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 2",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -4.963,
- 0
- ],
- [
- -1.2600000000000016,
- -0.6339999999999999
- ],
- [
- 0.2480000000000011,
- -0.4930000000000003
- ],
- [
- 0.4900000000000002,
- 0.24600000000000044
- ],
- [
- 1.1050000000000004,
- 0
- ],
- [
- 0,
- -3.859
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -4.963
- ],
- [
- 1.4209999999999994,
- 0
- ],
- [
- 0.49299999999999855,
- 0.24800000000000022
- ],
- [
- -0.2480000000000011,
- 0.4939999999999998
- ],
- [
- -0.9779999999999998,
- -0.492
- ],
- [
- -3.859,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 14
- ],
- [
- 3,
- 13
- ],
- [
- 3,
- 12
- ],
- [
- 12,
- 3
- ],
- [
- 16.039,
- 3.955
- ],
- [
- 16.483,
- 5.298
- ],
- [
- 15.14,
- 5.742
- ],
- [
- 12,
- 5
- ],
- [
- 5,
- 12
- ],
- [
- 5,
- 13
- ],
- [
- 4,
- 14
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 9.789691925048828,
- 8.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 9.789691925048828,
- 8.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 3",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 3",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 20
- ],
- [
- 3,
- 19
- ],
- [
- 3,
- 16
- ],
- [
- 4,
- 15
- ],
- [
- 5,
- 16
- ],
- [
- 5,
- 19
- ],
- [
- 4,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 4,
- 17.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 4,
- 17.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 4",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 4",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 21
- ],
- [
- 15,
- 20
- ],
- [
- 15,
- 17
- ],
- [
- 16,
- 16
- ],
- [
- 17,
- 17
- ],
- [
- 17,
- 20
- ],
- [
- 16,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 16,
- 18.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 16,
- 18.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 5",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 5",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 1.654,
- 0
- ],
- [
- 0.4339999999999993,
- -1.1679999999999993
- ],
- [
- 0.5140000000000002,
- 0.18900000000000006
- ],
- [
- -0.19199999999999928,
- 0.5169999999999995
- ],
- [
- -2.0790000000000006,
- 0
- ],
- [
- 0,
- -2.7569999999999997
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.654
- ],
- [
- -1.2469999999999999,
- 0
- ],
- [
- -0.1930000000000014,
- 0.5200000000000014
- ],
- [
- -0.5179999999999998,
- -0.19299999999999962
- ],
- [
- 0.7250000000000005,
- -1.947000000000001
- ],
- [
- 2.7569999999999997,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 15
- ],
- [
- 15,
- 14
- ],
- [
- 15,
- 12
- ],
- [
- 12,
- 9
- ],
- [
- 9.188,
- 10.953
- ],
- [
- 7.902,
- 11.542
- ],
- [
- 7.313,
- 10.256
- ],
- [
- 12,
- 7
- ],
- [
- 17,
- 12
- ],
- [
- 17,
- 14
- ],
- [
- 16,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12.125400066375732,
- 11
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12.125400066375732,
- 11
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 6",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 6",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 8,
- 21
- ],
- [
- 7,
- 20
- ],
- [
- 7,
- 14
- ],
- [
- 8,
- 13
- ],
- [
- 9,
- 14
- ],
- [
- 9,
- 20
- ],
- [
- 8,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 8,
- 17
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 8,
- 17
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 7",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 7",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 15
- ],
- [
- 11,
- 14
- ],
- [
- 11,
- 12
- ],
- [
- 12,
- 11
- ],
- [
- 13,
- 12
- ],
- [
- 13,
- 14
- ],
- [
- 12,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12,
- 13
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 13
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 8",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 8",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 21
- ],
- [
- 11,
- 20
- ],
- [
- 11,
- 17
- ],
- [
- 12,
- 16
- ],
- [
- 13,
- 17
- ],
- [
- 13,
- 20
- ],
- [
- 12,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12,
- 18.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 18.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- }
- ],
- "ind": 1
- }
- ],
- "v": "5.7.0",
- "fr": 30,
- "op": 60,
- "ip": 0,
- "assets": []
-}
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/com.android.systemui/IPSUI2/res/raw/udfps_lockscreen_fp.json b/app/src/main/assets/Overlays/com.android.systemui/IPSUI2/res/raw/udfps_lockscreen_fp.json
deleted file mode 100644
index 0e73de39b..000000000
--- a/app/src/main/assets/Overlays/com.android.systemui/IPSUI2/res/raw/udfps_lockscreen_fp.json
+++ /dev/null
@@ -1,1551 +0,0 @@
-{
- "nm": "fingerprint_burn_in_loop",
- "ddd": 0,
- "h": 24,
- "w": 24,
- "meta": {
- "g": "@lottiefiles/creator 1.9.0"
- },
- "layers": [
- {
- "ty": 4,
- "nm": "Shape Layer 1",
- "sr": 1,
- "st": 0,
- "op": 45,
- "ip": 0,
- "hd": false,
- "ddd": 0,
- "bm": 0,
- "hasMask": false,
- "ao": 0,
- "ks": {
- "a": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- },
- "shapes": [
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 1",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 1",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.8819999999999979,
- 1.205
- ],
- [
- -0.4460000000000015,
- 0.3259999999999996
- ],
- [
- -0.3269999999999982,
- -0.44700000000000006
- ],
- [
- 0,
- -1.9250000000000007
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.4969999999999999
- ],
- [
- -0.3249999999999993,
- -0.4449999999999994
- ],
- [
- 0.4469999999999992,
- -0.3260000000000005
- ],
- [
- 1.1329999999999991,
- 1.5490000000000004
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 20,
- 20
- ],
- [
- 19,
- 19
- ],
- [
- 19,
- 12
- ],
- [
- 17.652,
- 7.869
- ],
- [
- 17.869,
- 6.472
- ],
- [
- 19.267,
- 6.69
- ],
- [
- 21,
- 12
- ],
- [
- 21,
- 19
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 2",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 2",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -4.963,
- 0
- ],
- [
- -1.2600000000000016,
- -0.6339999999999999
- ],
- [
- 0.2480000000000011,
- -0.4930000000000003
- ],
- [
- 0.4900000000000002,
- 0.24600000000000044
- ],
- [
- 1.1050000000000004,
- 0
- ],
- [
- 0,
- -3.859
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -4.963
- ],
- [
- 1.4209999999999994,
- 0
- ],
- [
- 0.49299999999999855,
- 0.24800000000000022
- ],
- [
- -0.2480000000000011,
- 0.4939999999999998
- ],
- [
- -0.9779999999999998,
- -0.492
- ],
- [
- -3.859,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 14
- ],
- [
- 3,
- 13
- ],
- [
- 3,
- 12
- ],
- [
- 12,
- 3
- ],
- [
- 16.039,
- 3.955
- ],
- [
- 16.483,
- 5.298
- ],
- [
- 15.14,
- 5.742
- ],
- [
- 12,
- 5
- ],
- [
- 5,
- 12
- ],
- [
- 5,
- 13
- ],
- [
- 4,
- 14
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 3",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 3",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 20
- ],
- [
- 3,
- 19
- ],
- [
- 3,
- 16
- ],
- [
- 4,
- 15
- ],
- [
- 5,
- 16
- ],
- [
- 5,
- 19
- ],
- [
- 4,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 4",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 4",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 21
- ],
- [
- 15,
- 20
- ],
- [
- 15,
- 17
- ],
- [
- 16,
- 16
- ],
- [
- 17,
- 17
- ],
- [
- 17,
- 20
- ],
- [
- 16,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 5",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 5",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 1.654,
- 0
- ],
- [
- 0.4339999999999993,
- -1.1679999999999993
- ],
- [
- 0.5140000000000002,
- 0.18900000000000006
- ],
- [
- -0.19199999999999928,
- 0.5169999999999995
- ],
- [
- -2.0790000000000006,
- 0
- ],
- [
- 0,
- -2.7569999999999997
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.654
- ],
- [
- -1.2469999999999999,
- 0
- ],
- [
- -0.1930000000000014,
- 0.5200000000000014
- ],
- [
- -0.5179999999999998,
- -0.19299999999999962
- ],
- [
- 0.7250000000000005,
- -1.947000000000001
- ],
- [
- 2.7569999999999997,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 15
- ],
- [
- 15,
- 14
- ],
- [
- 15,
- 12
- ],
- [
- 12,
- 9
- ],
- [
- 9.188,
- 10.953
- ],
- [
- 7.902,
- 11.542
- ],
- [
- 7.313,
- 10.256
- ],
- [
- 12,
- 7
- ],
- [
- 17,
- 12
- ],
- [
- 17,
- 14
- ],
- [
- 16,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 6",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 6",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 8,
- 21
- ],
- [
- 7,
- 20
- ],
- [
- 7,
- 14
- ],
- [
- 8,
- 13
- ],
- [
- 9,
- 14
- ],
- [
- 9,
- 20
- ],
- [
- 8,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 7",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 7",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 15
- ],
- [
- 11,
- 14
- ],
- [
- 11,
- 12
- ],
- [
- 12,
- 11
- ],
- [
- 13,
- 12
- ],
- [
- 13,
- 14
- ],
- [
- 12,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 8",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 8",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 21
- ],
- [
- 11,
- 20
- ],
- [
- 11,
- 17
- ],
- [
- 12,
- 16
- ],
- [
- 13,
- 17
- ],
- [
- 13,
- 20
- ],
- [
- 12,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- }
- ],
- "ind": 1
- }
- ],
- "v": "5.7.0",
- "fr": 15,
- "op": 15,
- "ip": 0,
- "assets": []
-}
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/com.android.systemui/IPSUI3/res/raw/udfps_aod_fp.json b/app/src/main/assets/Overlays/com.android.systemui/IPSUI3/res/raw/udfps_aod_fp.json
deleted file mode 100644
index bc5045b9e..000000000
--- a/app/src/main/assets/Overlays/com.android.systemui/IPSUI3/res/raw/udfps_aod_fp.json
+++ /dev/null
@@ -1,1559 +0,0 @@
-{
- "nm": "Untitled file",
- "ddd": 0,
- "h": 24,
- "w": 24,
- "meta": {
- "g": "@lottiefiles/creator 1.9.0"
- },
- "layers": [
- {
- "ty": 4,
- "nm": "Shape Layer 1",
- "sr": 1,
- "st": 0,
- "op": 60,
- "ip": 0,
- "hd": false,
- "ddd": 0,
- "bm": 0,
- "hasMask": false,
- "ao": 0,
- "ks": {
- "a": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- },
- "shapes": [
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 1",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 1",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.8819999999999979,
- 1.205
- ],
- [
- -0.4460000000000015,
- 0.3259999999999996
- ],
- [
- -0.3269999999999982,
- -0.44700000000000006
- ],
- [
- 0,
- -1.9250000000000007
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.4969999999999999
- ],
- [
- -0.3249999999999993,
- -0.4449999999999994
- ],
- [
- 0.4469999999999992,
- -0.3260000000000005
- ],
- [
- 1.1329999999999991,
- 1.5490000000000004
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 20,
- 20
- ],
- [
- 19,
- 19
- ],
- [
- 19,
- 12
- ],
- [
- 17.652,
- 7.869
- ],
- [
- 17.869,
- 6.472
- ],
- [
- 19.267,
- 6.69
- ],
- [
- 21,
- 12
- ],
- [
- 21,
- 19
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 19.22976779937744,
- 13.139584064483643
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 19.22976779937744,
- 13.139584064483643
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 2",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 2",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -4.963,
- 0
- ],
- [
- -1.2600000000000016,
- -0.6339999999999999
- ],
- [
- 0.2480000000000011,
- -0.4930000000000003
- ],
- [
- 0.4900000000000002,
- 0.24600000000000044
- ],
- [
- 1.1050000000000004,
- 0
- ],
- [
- 0,
- -3.859
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -4.963
- ],
- [
- 1.4209999999999994,
- 0
- ],
- [
- 0.49299999999999855,
- 0.24800000000000022
- ],
- [
- -0.2480000000000011,
- 0.4939999999999998
- ],
- [
- -0.9779999999999998,
- -0.492
- ],
- [
- -3.859,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 14
- ],
- [
- 3,
- 13
- ],
- [
- 3,
- 12
- ],
- [
- 12,
- 3
- ],
- [
- 16.039,
- 3.955
- ],
- [
- 16.483,
- 5.298
- ],
- [
- 15.14,
- 5.742
- ],
- [
- 12,
- 5
- ],
- [
- 5,
- 12
- ],
- [
- 5,
- 13
- ],
- [
- 4,
- 14
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 9.789691925048828,
- 8.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 9.789691925048828,
- 8.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 3",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 3",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 20
- ],
- [
- 3,
- 19
- ],
- [
- 3,
- 16
- ],
- [
- 4,
- 15
- ],
- [
- 5,
- 16
- ],
- [
- 5,
- 19
- ],
- [
- 4,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 4,
- 17.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 4,
- 17.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 4",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 4",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 21
- ],
- [
- 15,
- 20
- ],
- [
- 15,
- 17
- ],
- [
- 16,
- 16
- ],
- [
- 17,
- 17
- ],
- [
- 17,
- 20
- ],
- [
- 16,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 16,
- 18.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 16,
- 18.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 5",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 5",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 1.654,
- 0
- ],
- [
- 0.4339999999999993,
- -1.1679999999999993
- ],
- [
- 0.5140000000000002,
- 0.18900000000000006
- ],
- [
- -0.19199999999999928,
- 0.5169999999999995
- ],
- [
- -2.0790000000000006,
- 0
- ],
- [
- 0,
- -2.7569999999999997
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.654
- ],
- [
- -1.2469999999999999,
- 0
- ],
- [
- -0.1930000000000014,
- 0.5200000000000014
- ],
- [
- -0.5179999999999998,
- -0.19299999999999962
- ],
- [
- 0.7250000000000005,
- -1.947000000000001
- ],
- [
- 2.7569999999999997,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 15
- ],
- [
- 15,
- 14
- ],
- [
- 15,
- 12
- ],
- [
- 12,
- 9
- ],
- [
- 9.188,
- 10.953
- ],
- [
- 7.902,
- 11.542
- ],
- [
- 7.313,
- 10.256
- ],
- [
- 12,
- 7
- ],
- [
- 17,
- 12
- ],
- [
- 17,
- 14
- ],
- [
- 16,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12.125400066375732,
- 11
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12.125400066375732,
- 11
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 6",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 6",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 8,
- 21
- ],
- [
- 7,
- 20
- ],
- [
- 7,
- 14
- ],
- [
- 8,
- 13
- ],
- [
- 9,
- 14
- ],
- [
- 9,
- 20
- ],
- [
- 8,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 8,
- 17
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 8,
- 17
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 7",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 7",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 15
- ],
- [
- 11,
- 14
- ],
- [
- 11,
- 12
- ],
- [
- 12,
- 11
- ],
- [
- 13,
- 12
- ],
- [
- 13,
- 14
- ],
- [
- 12,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12,
- 13
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 13
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 8",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 8",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 21
- ],
- [
- 11,
- 20
- ],
- [
- 11,
- 17
- ],
- [
- 12,
- 16
- ],
- [
- 13,
- 17
- ],
- [
- 13,
- 20
- ],
- [
- 12,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12,
- 18.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 18.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- }
- ],
- "ind": 1
- }
- ],
- "v": "5.7.0",
- "fr": 30,
- "op": 60,
- "ip": 0,
- "assets": []
-}
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/com.android.systemui/IPSUI3/res/raw/udfps_lockscreen_fp.json b/app/src/main/assets/Overlays/com.android.systemui/IPSUI3/res/raw/udfps_lockscreen_fp.json
deleted file mode 100644
index 0e73de39b..000000000
--- a/app/src/main/assets/Overlays/com.android.systemui/IPSUI3/res/raw/udfps_lockscreen_fp.json
+++ /dev/null
@@ -1,1551 +0,0 @@
-{
- "nm": "fingerprint_burn_in_loop",
- "ddd": 0,
- "h": 24,
- "w": 24,
- "meta": {
- "g": "@lottiefiles/creator 1.9.0"
- },
- "layers": [
- {
- "ty": 4,
- "nm": "Shape Layer 1",
- "sr": 1,
- "st": 0,
- "op": 45,
- "ip": 0,
- "hd": false,
- "ddd": 0,
- "bm": 0,
- "hasMask": false,
- "ao": 0,
- "ks": {
- "a": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- },
- "shapes": [
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 1",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 1",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.8819999999999979,
- 1.205
- ],
- [
- -0.4460000000000015,
- 0.3259999999999996
- ],
- [
- -0.3269999999999982,
- -0.44700000000000006
- ],
- [
- 0,
- -1.9250000000000007
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.4969999999999999
- ],
- [
- -0.3249999999999993,
- -0.4449999999999994
- ],
- [
- 0.4469999999999992,
- -0.3260000000000005
- ],
- [
- 1.1329999999999991,
- 1.5490000000000004
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 20,
- 20
- ],
- [
- 19,
- 19
- ],
- [
- 19,
- 12
- ],
- [
- 17.652,
- 7.869
- ],
- [
- 17.869,
- 6.472
- ],
- [
- 19.267,
- 6.69
- ],
- [
- 21,
- 12
- ],
- [
- 21,
- 19
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 2",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 2",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -4.963,
- 0
- ],
- [
- -1.2600000000000016,
- -0.6339999999999999
- ],
- [
- 0.2480000000000011,
- -0.4930000000000003
- ],
- [
- 0.4900000000000002,
- 0.24600000000000044
- ],
- [
- 1.1050000000000004,
- 0
- ],
- [
- 0,
- -3.859
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -4.963
- ],
- [
- 1.4209999999999994,
- 0
- ],
- [
- 0.49299999999999855,
- 0.24800000000000022
- ],
- [
- -0.2480000000000011,
- 0.4939999999999998
- ],
- [
- -0.9779999999999998,
- -0.492
- ],
- [
- -3.859,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 14
- ],
- [
- 3,
- 13
- ],
- [
- 3,
- 12
- ],
- [
- 12,
- 3
- ],
- [
- 16.039,
- 3.955
- ],
- [
- 16.483,
- 5.298
- ],
- [
- 15.14,
- 5.742
- ],
- [
- 12,
- 5
- ],
- [
- 5,
- 12
- ],
- [
- 5,
- 13
- ],
- [
- 4,
- 14
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 3",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 3",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 20
- ],
- [
- 3,
- 19
- ],
- [
- 3,
- 16
- ],
- [
- 4,
- 15
- ],
- [
- 5,
- 16
- ],
- [
- 5,
- 19
- ],
- [
- 4,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 4",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 4",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 21
- ],
- [
- 15,
- 20
- ],
- [
- 15,
- 17
- ],
- [
- 16,
- 16
- ],
- [
- 17,
- 17
- ],
- [
- 17,
- 20
- ],
- [
- 16,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 5",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 5",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 1.654,
- 0
- ],
- [
- 0.4339999999999993,
- -1.1679999999999993
- ],
- [
- 0.5140000000000002,
- 0.18900000000000006
- ],
- [
- -0.19199999999999928,
- 0.5169999999999995
- ],
- [
- -2.0790000000000006,
- 0
- ],
- [
- 0,
- -2.7569999999999997
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.654
- ],
- [
- -1.2469999999999999,
- 0
- ],
- [
- -0.1930000000000014,
- 0.5200000000000014
- ],
- [
- -0.5179999999999998,
- -0.19299999999999962
- ],
- [
- 0.7250000000000005,
- -1.947000000000001
- ],
- [
- 2.7569999999999997,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 15
- ],
- [
- 15,
- 14
- ],
- [
- 15,
- 12
- ],
- [
- 12,
- 9
- ],
- [
- 9.188,
- 10.953
- ],
- [
- 7.902,
- 11.542
- ],
- [
- 7.313,
- 10.256
- ],
- [
- 12,
- 7
- ],
- [
- 17,
- 12
- ],
- [
- 17,
- 14
- ],
- [
- 16,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 6",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 6",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 8,
- 21
- ],
- [
- 7,
- 20
- ],
- [
- 7,
- 14
- ],
- [
- 8,
- 13
- ],
- [
- 9,
- 14
- ],
- [
- 9,
- 20
- ],
- [
- 8,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 7",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 7",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 15
- ],
- [
- 11,
- 14
- ],
- [
- 11,
- 12
- ],
- [
- 12,
- 11
- ],
- [
- 13,
- 12
- ],
- [
- 13,
- 14
- ],
- [
- 12,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 8",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 8",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 21
- ],
- [
- 11,
- 20
- ],
- [
- 11,
- 17
- ],
- [
- 12,
- 16
- ],
- [
- 13,
- 17
- ],
- [
- 13,
- 20
- ],
- [
- 12,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- }
- ],
- "ind": 1
- }
- ],
- "v": "5.7.0",
- "fr": 15,
- "op": 15,
- "ip": 0,
- "assets": []
-}
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/com.android.systemui/IPSUI4/res/raw/udfps_aod_fp.json b/app/src/main/assets/Overlays/com.android.systemui/IPSUI4/res/raw/udfps_aod_fp.json
deleted file mode 100644
index bc5045b9e..000000000
--- a/app/src/main/assets/Overlays/com.android.systemui/IPSUI4/res/raw/udfps_aod_fp.json
+++ /dev/null
@@ -1,1559 +0,0 @@
-{
- "nm": "Untitled file",
- "ddd": 0,
- "h": 24,
- "w": 24,
- "meta": {
- "g": "@lottiefiles/creator 1.9.0"
- },
- "layers": [
- {
- "ty": 4,
- "nm": "Shape Layer 1",
- "sr": 1,
- "st": 0,
- "op": 60,
- "ip": 0,
- "hd": false,
- "ddd": 0,
- "bm": 0,
- "hasMask": false,
- "ao": 0,
- "ks": {
- "a": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- },
- "shapes": [
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 1",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 1",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.8819999999999979,
- 1.205
- ],
- [
- -0.4460000000000015,
- 0.3259999999999996
- ],
- [
- -0.3269999999999982,
- -0.44700000000000006
- ],
- [
- 0,
- -1.9250000000000007
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.4969999999999999
- ],
- [
- -0.3249999999999993,
- -0.4449999999999994
- ],
- [
- 0.4469999999999992,
- -0.3260000000000005
- ],
- [
- 1.1329999999999991,
- 1.5490000000000004
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 20,
- 20
- ],
- [
- 19,
- 19
- ],
- [
- 19,
- 12
- ],
- [
- 17.652,
- 7.869
- ],
- [
- 17.869,
- 6.472
- ],
- [
- 19.267,
- 6.69
- ],
- [
- 21,
- 12
- ],
- [
- 21,
- 19
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 19.22976779937744,
- 13.139584064483643
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 19.22976779937744,
- 13.139584064483643
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 2",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 2",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -4.963,
- 0
- ],
- [
- -1.2600000000000016,
- -0.6339999999999999
- ],
- [
- 0.2480000000000011,
- -0.4930000000000003
- ],
- [
- 0.4900000000000002,
- 0.24600000000000044
- ],
- [
- 1.1050000000000004,
- 0
- ],
- [
- 0,
- -3.859
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -4.963
- ],
- [
- 1.4209999999999994,
- 0
- ],
- [
- 0.49299999999999855,
- 0.24800000000000022
- ],
- [
- -0.2480000000000011,
- 0.4939999999999998
- ],
- [
- -0.9779999999999998,
- -0.492
- ],
- [
- -3.859,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 14
- ],
- [
- 3,
- 13
- ],
- [
- 3,
- 12
- ],
- [
- 12,
- 3
- ],
- [
- 16.039,
- 3.955
- ],
- [
- 16.483,
- 5.298
- ],
- [
- 15.14,
- 5.742
- ],
- [
- 12,
- 5
- ],
- [
- 5,
- 12
- ],
- [
- 5,
- 13
- ],
- [
- 4,
- 14
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 9.789691925048828,
- 8.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 9.789691925048828,
- 8.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 3",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 3",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 20
- ],
- [
- 3,
- 19
- ],
- [
- 3,
- 16
- ],
- [
- 4,
- 15
- ],
- [
- 5,
- 16
- ],
- [
- 5,
- 19
- ],
- [
- 4,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 4,
- 17.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 4,
- 17.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 4",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 4",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 21
- ],
- [
- 15,
- 20
- ],
- [
- 15,
- 17
- ],
- [
- 16,
- 16
- ],
- [
- 17,
- 17
- ],
- [
- 17,
- 20
- ],
- [
- 16,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 16,
- 18.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 16,
- 18.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 5",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 5",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 1.654,
- 0
- ],
- [
- 0.4339999999999993,
- -1.1679999999999993
- ],
- [
- 0.5140000000000002,
- 0.18900000000000006
- ],
- [
- -0.19199999999999928,
- 0.5169999999999995
- ],
- [
- -2.0790000000000006,
- 0
- ],
- [
- 0,
- -2.7569999999999997
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.654
- ],
- [
- -1.2469999999999999,
- 0
- ],
- [
- -0.1930000000000014,
- 0.5200000000000014
- ],
- [
- -0.5179999999999998,
- -0.19299999999999962
- ],
- [
- 0.7250000000000005,
- -1.947000000000001
- ],
- [
- 2.7569999999999997,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 15
- ],
- [
- 15,
- 14
- ],
- [
- 15,
- 12
- ],
- [
- 12,
- 9
- ],
- [
- 9.188,
- 10.953
- ],
- [
- 7.902,
- 11.542
- ],
- [
- 7.313,
- 10.256
- ],
- [
- 12,
- 7
- ],
- [
- 17,
- 12
- ],
- [
- 17,
- 14
- ],
- [
- 16,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12.125400066375732,
- 11
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12.125400066375732,
- 11
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 6",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 6",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 8,
- 21
- ],
- [
- 7,
- 20
- ],
- [
- 7,
- 14
- ],
- [
- 8,
- 13
- ],
- [
- 9,
- 14
- ],
- [
- 9,
- 20
- ],
- [
- 8,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 8,
- 17
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 8,
- 17
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 7",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 7",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 15
- ],
- [
- 11,
- 14
- ],
- [
- 11,
- 12
- ],
- [
- 12,
- 11
- ],
- [
- 13,
- 12
- ],
- [
- 13,
- 14
- ],
- [
- 12,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12,
- 13
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 13
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 8",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 8",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 21
- ],
- [
- 11,
- 20
- ],
- [
- 11,
- 17
- ],
- [
- 12,
- 16
- ],
- [
- 13,
- 17
- ],
- [
- 13,
- 20
- ],
- [
- 12,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 1,
- 1,
- 1,
- 1
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 12,
- 18.5
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 18.5
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- }
- ],
- "ind": 1
- }
- ],
- "v": "5.7.0",
- "fr": 30,
- "op": 60,
- "ip": 0,
- "assets": []
-}
\ No newline at end of file
diff --git a/app/src/main/assets/Overlays/com.android.systemui/IPSUI4/res/raw/udfps_lockscreen_fp.json b/app/src/main/assets/Overlays/com.android.systemui/IPSUI4/res/raw/udfps_lockscreen_fp.json
deleted file mode 100644
index 0e73de39b..000000000
--- a/app/src/main/assets/Overlays/com.android.systemui/IPSUI4/res/raw/udfps_lockscreen_fp.json
+++ /dev/null
@@ -1,1551 +0,0 @@
-{
- "nm": "fingerprint_burn_in_loop",
- "ddd": 0,
- "h": 24,
- "w": 24,
- "meta": {
- "g": "@lottiefiles/creator 1.9.0"
- },
- "layers": [
- {
- "ty": 4,
- "nm": "Shape Layer 1",
- "sr": 1,
- "st": 0,
- "op": 45,
- "ip": 0,
- "hd": false,
- "ddd": 0,
- "bm": 0,
- "hasMask": false,
- "ao": 0,
- "ks": {
- "a": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 12,
- 12
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- },
- "shapes": [
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 1",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 1",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.8819999999999979,
- 1.205
- ],
- [
- -0.4460000000000015,
- 0.3259999999999996
- ],
- [
- -0.3269999999999982,
- -0.44700000000000006
- ],
- [
- 0,
- -1.9250000000000007
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.4969999999999999
- ],
- [
- -0.3249999999999993,
- -0.4449999999999994
- ],
- [
- 0.4469999999999992,
- -0.3260000000000005
- ],
- [
- 1.1329999999999991,
- 1.5490000000000004
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 20,
- 20
- ],
- [
- 19,
- 19
- ],
- [
- 19,
- 12
- ],
- [
- 17.652,
- 7.869
- ],
- [
- 17.869,
- 6.472
- ],
- [
- 19.267,
- 6.69
- ],
- [
- 21,
- 12
- ],
- [
- 21,
- 19
- ],
- [
- 20,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 2",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 2",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -4.963,
- 0
- ],
- [
- -1.2600000000000016,
- -0.6339999999999999
- ],
- [
- 0.2480000000000011,
- -0.4930000000000003
- ],
- [
- 0.4900000000000002,
- 0.24600000000000044
- ],
- [
- 1.1050000000000004,
- 0
- ],
- [
- 0,
- -3.859
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -4.963
- ],
- [
- 1.4209999999999994,
- 0
- ],
- [
- 0.49299999999999855,
- 0.24800000000000022
- ],
- [
- -0.2480000000000011,
- 0.4939999999999998
- ],
- [
- -0.9779999999999998,
- -0.492
- ],
- [
- -3.859,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 14
- ],
- [
- 3,
- 13
- ],
- [
- 3,
- 12
- ],
- [
- 12,
- 3
- ],
- [
- 16.039,
- 3.955
- ],
- [
- 16.483,
- 5.298
- ],
- [
- 15.14,
- 5.742
- ],
- [
- 12,
- 5
- ],
- [
- 5,
- 12
- ],
- [
- 5,
- 13
- ],
- [
- 4,
- 14
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 3",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 3",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5529999999999999,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 4,
- 20
- ],
- [
- 3,
- 19
- ],
- [
- 3,
- 16
- ],
- [
- 4,
- 15
- ],
- [
- 5,
- 16
- ],
- [
- 5,
- 19
- ],
- [
- 4,
- 20
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 4",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 4",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 21
- ],
- [
- 15,
- 20
- ],
- [
- 15,
- 17
- ],
- [
- 16,
- 16
- ],
- [
- 17,
- 17
- ],
- [
- 17,
- 20
- ],
- [
- 16,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 5",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 5",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 1.654,
- 0
- ],
- [
- 0.4339999999999993,
- -1.1679999999999993
- ],
- [
- 0.5140000000000002,
- 0.18900000000000006
- ],
- [
- -0.19199999999999928,
- 0.5169999999999995
- ],
- [
- -2.0790000000000006,
- 0
- ],
- [
- 0,
- -2.7569999999999997
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -1.654
- ],
- [
- -1.2469999999999999,
- 0
- ],
- [
- -0.1930000000000014,
- 0.5200000000000014
- ],
- [
- -0.5179999999999998,
- -0.19299999999999962
- ],
- [
- 0.7250000000000005,
- -1.947000000000001
- ],
- [
- 2.7569999999999997,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 16,
- 15
- ],
- [
- 15,
- 14
- ],
- [
- 15,
- 12
- ],
- [
- 12,
- 9
- ],
- [
- 9.188,
- 10.953
- ],
- [
- 7.902,
- 11.542
- ],
- [
- 7.313,
- 10.256
- ],
- [
- 12,
- 7
- ],
- [
- 17,
- 12
- ],
- [
- 17,
- 14
- ],
- [
- 16,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 6",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 6",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5529999999999999,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 8,
- 21
- ],
- [
- 7,
- 20
- ],
- [
- 7,
- 14
- ],
- [
- 8,
- 13
- ],
- [
- 9,
- 14
- ],
- [
- 9,
- 20
- ],
- [
- 8,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 7",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 7",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 15
- ],
- [
- 11,
- 14
- ],
- [
- 11,
- 12
- ],
- [
- 12,
- 11
- ],
- [
- 13,
- 12
- ],
- [
- 13,
- 14
- ],
- [
- 12,
- 15
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 35
- }
- }
- ]
- },
- {
- "ty": "gr",
- "bm": 0,
- "hd": false,
- "nm": "Group 8",
- "it": [
- {
- "ty": "sh",
- "bm": 0,
- "hd": false,
- "nm": "Path 8",
- "d": 1,
- "ks": {
- "a": 0,
- "k": {
- "c": true,
- "i": [
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0,
- 0
- ],
- [
- 0.5530000000000008,
- 0
- ]
- ],
- "o": [
- [
- -0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- -0.5530000000000008
- ],
- [
- 0.5530000000000008,
- 0
- ],
- [
- 0,
- 0
- ],
- [
- 0,
- 0.5530000000000008
- ],
- [
- 0,
- 0
- ]
- ],
- "v": [
- [
- 12,
- 21
- ],
- [
- 11,
- 20
- ],
- [
- 11,
- 17
- ],
- [
- 12,
- 16
- ],
- [
- 13,
- 17
- ],
- [
- 13,
- 20
- ],
- [
- 12,
- 21
- ]
- ]
- }
- }
- },
- {
- "ty": "fl",
- "bm": 0,
- "hd": false,
- "nm": "Fill",
- "c": {
- "a": 0,
- "k": [
- 0,
- 0,
- 0
- ]
- },
- "r": 1,
- "o": {
- "a": 0,
- "k": 100
- }
- },
- {
- "ty": "tr",
- "a": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "s": {
- "a": 0,
- "k": [
- 100,
- 100
- ]
- },
- "sk": {
- "a": 0,
- "k": 0
- },
- "p": {
- "a": 0,
- "k": [
- 0,
- 0
- ]
- },
- "r": {
- "a": 0,
- "k": 0
- },
- "sa": {
- "a": 0,
- "k": 0
- },
- "o": {
- "a": 0,
- "k": 100
- }
- }
- ]
- }
- ],
- "ind": 1
- }
- ],
- "v": "5.7.0",
- "fr": 15,
- "op": 15,
- "ip": 0,
- "assets": []
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/SplashActivity.kt b/app/src/main/java/com/drdisagree/iconify/SplashActivity.kt
index a5e7d79d2..4160c3837 100644
--- a/app/src/main/java/com/drdisagree/iconify/SplashActivity.kt
+++ b/app/src/main/java/com/drdisagree/iconify/SplashActivity.kt
@@ -2,18 +2,20 @@ package com.drdisagree.iconify
import android.annotation.SuppressLint
import android.content.Intent
+import android.os.Build
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.core.splashscreen.SplashScreen
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import com.drdisagree.iconify.common.Preferences.XPOSED_ONLY_MODE
-import com.drdisagree.iconify.config.Prefs
+import com.drdisagree.iconify.config.RPrefs
import com.drdisagree.iconify.ui.activities.MainActivity
import com.drdisagree.iconify.ui.activities.OnboardingActivity
-import com.drdisagree.iconify.utils.ModuleUtil
-import com.drdisagree.iconify.utils.RootUtil
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
+import com.drdisagree.iconify.utils.ModuleUtils
+import com.drdisagree.iconify.utils.RootUtils
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.xposed.modules.utils.BitmapSubjectSegmenter
import com.google.android.material.color.DynamicColors
import com.topjohnwu.superuser.Shell
@@ -23,17 +25,17 @@ class SplashActivity : AppCompatActivity() {
private var keepShowing = true
private val runner = Runnable {
Shell.getShell { _: Shell? ->
- val isRooted = RootUtil.deviceProperlyRooted()
- val isModuleInstalled = ModuleUtil.moduleExists()
- val isOverlayInstalled = OverlayUtil.overlayExists()
- var isXposedOnlyMode = Prefs.getBoolean(XPOSED_ONLY_MODE, false)
- val isVersionCodeCorrect = BuildConfig.VERSION_CODE == SystemUtil.savedVersionCode
+ val isRooted = RootUtils.deviceProperlyRooted()
+ val isModuleInstalled = ModuleUtils.moduleExists()
+ val isOverlayInstalled = OverlayUtils.overlayExists()
+ var isXposedOnlyMode = RPrefs.getBoolean(XPOSED_ONLY_MODE, false)
+ val isVersionCodeCorrect = BuildConfig.VERSION_CODE == SystemUtils.savedVersionCode
if (isRooted) {
if (isOverlayInstalled) {
- Prefs.putBoolean(XPOSED_ONLY_MODE, false)
+ RPrefs.putBoolean(XPOSED_ONLY_MODE, false)
} else if (isModuleInstalled) {
- Prefs.putBoolean(XPOSED_ONLY_MODE, true)
+ RPrefs.putBoolean(XPOSED_ONLY_MODE, true)
isXposedOnlyMode = true
}
}
@@ -48,6 +50,9 @@ class SplashActivity : AppCompatActivity() {
isVersionCodeCorrect
) {
keepShowing = false
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
+ BitmapSubjectSegmenter(this@SplashActivity)
+ }
Intent(this@SplashActivity, MainActivity::class.java)
} else {
keepShowing = false
diff --git a/app/src/main/java/com/drdisagree/iconify/common/Const.kt b/app/src/main/java/com/drdisagree/iconify/common/Const.kt
index 9b4303d4d..cf4a25227 100644
--- a/app/src/main/java/com/drdisagree/iconify/common/Const.kt
+++ b/app/src/main/java/com/drdisagree/iconify/common/Const.kt
@@ -13,7 +13,6 @@ object Const {
const val WELLBEING_PACKAGE = "com.google.android.apps.wellbeing"
const val GMS_PACKAGE = "com.google.android.gms"
- @JvmField
val SYSTEM_PACKAGES = listOf(
SYSTEMUI_PACKAGE,
FRAMEWORK_PACKAGE,
@@ -26,6 +25,9 @@ object Const {
// Telegram group
const val TELEGRAM_GROUP = "https://t.me/IconifyDiscussion"
+ // Crowdin
+ const val ICONIFY_CROWDIN = "https://crowdin.com/project/iconify"
+
// Parse new update
const val LATEST_VERSION_URL =
"https://raw.githubusercontent.com/Mahmud0808/Iconify/stable/latestVersion.json"
@@ -45,9 +47,10 @@ object Const {
)
const val ACTION_HOOK_CHECK_REQUEST = "${BuildConfig.APPLICATION_ID}.ACTION_HOOK_CHECK_REQUEST"
const val ACTION_HOOK_CHECK_RESULT = "${BuildConfig.APPLICATION_ID}.ACTION_HOOK_CHECK_RESULT"
+ const val ACTION_BOOT_COMPLETED = "${BuildConfig.APPLICATION_ID}.ACTION_BOOT_COMPLETED"
+ const val ACTION_WEATHER_INFLATED = "${BuildConfig.APPLICATION_ID}.ACTION_WEATHER_INFLATED"
// Module script
- @JvmField
val MAGISK_UPDATE_BINARY = """
#!/sbin/sh
diff --git a/app/src/main/java/com/drdisagree/iconify/common/Dynamic.kt b/app/src/main/java/com/drdisagree/iconify/common/Dynamic.kt
index b2d362115..dcc395d7a 100644
--- a/app/src/main/java/com/drdisagree/iconify/common/Dynamic.kt
+++ b/app/src/main/java/com/drdisagree/iconify/common/Dynamic.kt
@@ -8,61 +8,47 @@ import java.io.File
object Dynamic {
// Grab number of overlays dynamically for each variant
- @JvmField
val TOTAL_BRIGHTNESSBARS =
Shell.cmd("cmd overlay list | grep '....IconifyComponentBBN'").exec().out.size
- @JvmField
val TOTAL_BRIGHTNESSBARSPIXEL =
Shell.cmd("cmd overlay list | grep '....IconifyComponentBBP'").exec().out.size
- @JvmField
- val TOTAL_ICONPACKS =
- Shell.cmd("cmd overlay list | grep '....IconifyComponentIPAS'").exec().out.size
-
- @JvmField
val TOTAL_NOTIFICATIONS =
Shell.cmd("cmd overlay list | grep '....IconifyComponentNFN'").exec().out.size
- @JvmField
val TOTAL_NOTIFICATIONSPIXEL =
Shell.cmd("cmd overlay list | grep '....IconifyComponentNFP'").exec().out.size
- @JvmField
val TOTAL_QSSHAPES =
Shell.cmd("cmd overlay list | grep '....IconifyComponentQSSN'").exec().out.size
- @JvmField
val TOTAL_QSSHAPESPIXEL =
Shell.cmd("cmd overlay list | grep '....IconifyComponentQSSP'").exec().out.size
// Overlay compiler tools
- @JvmField
val NATIVE_LIBRARY_DIR: String = appContext.applicationInfo.nativeLibraryDir
- @JvmField
val AAPTLIB = File(NATIVE_LIBRARY_DIR, "libaapt.so")
- @JvmField
val AAPT2LIB = File(NATIVE_LIBRARY_DIR, "libaapt2.so")
- @JvmField
val AAPT = File(Resources.BIN_DIR, "aapt")
- @JvmField
val AAPT2 = File(Resources.BIN_DIR, "aapt2")
- @JvmField
val ZIPALIGNLIB = File(NATIVE_LIBRARY_DIR, "libzipalign.so")
- @JvmField
val ZIPALIGN = File(Resources.BIN_DIR, "zipalign")
// Onboarding overlay installation
- @JvmField
var skippedInstallation = false
// Device information
- @JvmField
val isAtleastA14 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE
+ val isAndroid14 = Build.VERSION.SDK_INT == Build.VERSION_CODES.UPSIDE_DOWN_CAKE
+
+ // Floating action buttons
+ var requiresSystemUiRestart = false
+ var requiresDeviceRestart = false
}
diff --git a/app/src/main/java/com/drdisagree/iconify/common/Preferences.kt b/app/src/main/java/com/drdisagree/iconify/common/Preferences.kt
index b3d4f9511..e5311c190 100644
--- a/app/src/main/java/com/drdisagree/iconify/common/Preferences.kt
+++ b/app/src/main/java/com/drdisagree/iconify/common/Preferences.kt
@@ -1,26 +1,70 @@
package com.drdisagree.iconify.common
import com.drdisagree.iconify.SplashActivity
-import com.drdisagree.iconify.config.Prefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getBoolean
object Preferences {
// Xposed mods
+ const val XPOSED_HOOK_CHECK = "xposedHookCheck"
const val FORCE_RELOAD_OVERLAY_STATE = "xposed_force_reload_overlay_state"
const val QS_TRANSPARENCY_SWITCH = "xposed_qstransparency"
const val NOTIF_TRANSPARENCY_SWITCH = "xposed_notiftransparency"
const val LOCKSCREEN_SHADE_SWITCH = "xposed_lockscreen_shade"
const val QSALPHA_LEVEL = "xposed_qsalpha"
const val STATUSBAR_CLOCKBG_SWITCH = "xposed_sbclockbg"
- const val STATUSBAR_CLOCK_COLOR_OPTION = "xposed_sbclockcolor"
- const val STATUSBAR_CLOCK_COLOR_CODE = "xposed_sbclockcolorcode"
- const val CHIP_STATUSBAR_CLOCKBG_STYLE = "xposed_chipstatusbarclockbgstyle"
+ const val CHIP_STATUSBAR_CLOCK_SWITCH = "xposed_chipstatusbarclock"
+ const val CHIP_STATUSBAR_CLOCK_STYLE_CHANGED = "xposed_chipstatusbarclockstylechanged"
+ const val CHIP_STATUSBAR_CLOCK_TEXT_COLOR_OPTION = "xposed_sbclockcolor"
+ const val CHIP_STATUSBAR_CLOCK_TEXT_COLOR_CODE = "xposed_sbclockcolorcode"
+ const val CHIP_STATUSBAR_CLOCK_ACCENT = "xposed_chipstatusbarclockaccent"
+ const val CHIP_STATUSBAR_CLOCK_START_COLOR = "xposed_chipstatusbarclockstartcolor"
+ const val CHIP_STATUSBAR_CLOCK_END_COLOR = "xposed_chipstatusbarclockendcolor"
+ const val CHIP_STATUSBAR_CLOCK_GRADIENT_DIRECTION = "xposed_chipstatusbarclockgradientdirection"
+ const val CHIP_STATUSBAR_CLOCK_PADDING_LEFT = "xposed_chipstatusbarclockpaddingleft"
+ const val CHIP_STATUSBAR_CLOCK_PADDING_RIGHT = "xposed_chipstatusbarclockpaddingright"
+ const val CHIP_STATUSBAR_CLOCK_PADDING_TOP = "xposed_chipstatusbarclockpaddingtop"
+ const val CHIP_STATUSBAR_CLOCK_PADDING_BOTTOM = "xposed_chipstatusbarclockpaddingbottom"
+ const val CHIP_STATUSBAR_CLOCK_STROKE_SWITCH = "xposed_chipstatusbarclockstroke"
+ const val CHIP_STATUSBAR_CLOCK_STROKE_WIDTH = "xposed_chipstatusbarclockstrokewidth"
+ const val CHIP_STATUSBAR_CLOCK_STROKE_ACCENT = "xposed_chipstatusbarclockstrokeaccent"
+ const val CHIP_STATUSBAR_CLOCK_STROKE_COLOR = "xposed_chipstatusbarclockstrokecolor"
+ const val CHIP_STATUSBAR_CLOCK_STROKE_DASH = "xposed_chipstatusbarclockstrokedash"
+ const val CHIP_STATUSBAR_CLOCK_STROKE_DASH_WIDTH = "xposed_chipstatusbarclockstrokedashwidth"
+ const val CHIP_STATUSBAR_CLOCK_STROKE_DASH_GAP = "xposed_chipstatusbarclockstrokedashgap"
+ const val CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT = "xposed_chipstatusbarclockradiustopleft"
+ const val CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT = "xposed_chipstatusbarclockradiustopright"
+ const val CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT =
+ "xposed_chipstatusbarclockradiusbottomright"
+ const val CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT = "xposed_chipstatusbarclockradiusbottomleft"
+ const val CHIP_STATUS_ICONS_SWITCH = "xposed_chipstatusicons"
+ const val CHIP_STATUS_ICONS_STYLE_CHANGED = "xposed_chipstatusiconsstylechanged"
+ const val CHIP_STATUS_ICONS_ACCENT = "xposed_chipstatusiconsaccent"
+ const val CHIP_STATUS_ICONS_START_COLOR = "xposed_chipstatusiconsstartcolor"
+ const val CHIP_STATUS_ICONS_END_COLOR = "xposed_chipstatusiconsendcolor"
+ const val CHIP_STATUS_ICONS_GRADIENT_DIRECTION = "xposed_chipstatusiconsgradientdirection"
+ const val CHIP_STATUS_ICONS_PADDING_LEFT = "xposed_chipstatusiconspaddingleft"
+ const val CHIP_STATUS_ICONS_PADDING_RIGHT = "xposed_chipstatusiconspaddingright"
+ const val CHIP_STATUS_ICONS_PADDING_TOP = "xposed_chipstatusiconspaddingtop"
+ const val CHIP_STATUS_ICONS_PADDING_BOTTOM = "xposed_chipstatusiconspaddingbottom"
+ const val CHIP_STATUS_ICONS_STROKE_SWITCH = "xposed_chipstatusiconsstroke"
+ const val CHIP_STATUS_ICONS_STROKE_WIDTH = "xposed_chipstatusiconsstrokewidth"
+ const val CHIP_STATUS_ICONS_STROKE_ACCENT = "xposed_chipstatusiconsstrokeaccent"
+ const val CHIP_STATUS_ICONS_STROKE_COLOR = "xposed_chipstatusiconsstrokecolor"
+ const val CHIP_STATUS_ICONS_STROKE_DASH = "xposed_chipstatusiconsstrokedash"
+ const val CHIP_STATUS_ICONS_STROKE_DASH_WIDTH = "xposed_chipstatusiconsstrokedashwidth"
+ const val CHIP_STATUS_ICONS_STROKE_DASH_GAP = "xposed_chipstatusiconsstrokedashgap"
+ const val CHIP_STATUS_ICONS_RADIUS_TOP_LEFT = "xposed_chipstatusiconsradiustopleft"
+ const val CHIP_STATUS_ICONS_RADIUS_TOP_RIGHT = "xposed_chipstatusiconsradiustopright"
+ const val CHIP_STATUS_ICONS_RADIUS_BOTTOM_RIGHT = "xposed_chipstatusiconsradiusbottomright"
+ const val CHIP_STATUS_ICONS_RADIUS_BOTTOM_LEFT = "xposed_chipstatusiconsradiusbottomleft"
const val QSPANEL_STATUSICONSBG_SWITCH = "xposed_qsstatusiconsbg"
const val CHIP_QSSTATUSICONS_STYLE = "xposed_chipqsstatusiconsstyle"
const val VERTICAL_QSTILE_SWITCH = "xposed_verticalqstile"
const val HIDE_QSLABEL_SWITCH = "xposed_hideqslabel"
const val VOLUME_PANEL_PERCENTAGE = "xposed_volumepanelpercentage"
const val VOLUME_PANEL_SAFETY_WARNING = "xposed_volumepanelsafetywarning"
+ const val VOLUME_COLORED_RINGER_ICON = "xposed_volumecoloredringericon"
const val HEADER_IMAGE_SWITCH = "xposed_headerimage"
const val HEADER_IMAGE_LANDSCAPE_SWITCH = "xposed_headerimagelandscape"
const val HEADER_IMAGE_BOTTOM_FADE_AMOUNT = "xposed_headerimagebottomfadeamount"
@@ -42,6 +86,7 @@ object Preferences {
const val HEADER_CLOCK_COLOR_CODE_ACCENT3 = "xposed_headerclockcolorcodeaccent3"
const val HEADER_CLOCK_COLOR_CODE_TEXT1 = "xposed_headerclockcolorcodetext1"
const val HEADER_CLOCK_COLOR_CODE_TEXT2 = "xposed_headerclockcolorcodetext2"
+ const val HEADER_CLOCK_EXPANSION_Y = "xposed_headerclockexpansiony"
const val HEADER_CLOCK_FONT_TEXT_SCALING = "xposed_headerclocktextscaling"
const val QSPANEL_HIDE_CARRIER = "xposed_qspanelhidecarrier"
const val LSCLOCK_SWITCH = "xposed_lockscreenclock"
@@ -57,10 +102,49 @@ object Preferences {
const val LSCLOCK_FONT_SWITCH = "xposed_lockscreenclockfont"
const val LSCLOCK_FONT_LINEHEIGHT = "xposed_lockscreenclockfontlineheight"
const val LSCLOCK_FONT_TEXT_SCALING = "xposed_lockscreenclocktextscaling"
+ const val LSCLOCK_USERNAME = "xposed_lockscreenclockcustomusername"
+ const val LSCLOCK_DEVICENAME = "xposed_lockscreenclockcustomdevicename"
+
+ // LS Widgets
+ const val LOCKSCREEN_WIDGETS_ENABLED: String = "lockscreen_widgets_enabled"
+ const val LOCKSCREEN_WIDGETS_DEVICE_WIDGET: String = "lockscreen_device_widget"
+ const val LOCKSCREEN_WIDGETS: String = "lockscreen_widgets"
+ const val LOCKSCREEN_WIDGETS_EXTRAS: String = "lockscreen_widgets_extras"
+ const val MAIN_WIDGET_1_KEY: String = "main_custom_widgets1"
+ const val MAIN_WIDGET_2_KEY: String = "main_custom_widgets2"
+ const val EXTRA_WIDGET_1_KEY: String = "custom_widgets1"
+ const val EXTRA_WIDGET_2_KEY: String = "custom_widgets2"
+ const val EXTRA_WIDGET_3_KEY: String = "custom_widgets3"
+ const val EXTRA_WIDGET_4_KEY: String = "custom_widgets4"
+ const val LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CUSTOM_COLOR_SWITCH: String =
+ "lockscreen_device_widget_custom_color"
+ const val LOCKSCREEN_WIDGETS_DEVICE_WIDGET_LINEAR_COLOR: String =
+ "lockscreen_device_widget_linear_progress_color"
+ const val LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CIRCULAR_COLOR: String =
+ "lockscreen_device_widget_circular_progress_color"
+ const val LOCKSCREEN_WIDGETS_DEVICE_WIDGET_TEXT_COLOR: String =
+ "lockscreen_device_widget_text_color"
+ const val LOCKSCREEN_WIDGETS_DEVICE_WIDGET_DEVICE: String =
+ "lockscreen_device_widget_device_name"
+ const val LOCKSCREEN_WIDGETS_CUSTOM_COLOR: String = "lockscreen_widgets_custom_color"
+ const val LOCKSCREEN_WIDGETS_BIG_ACTIVE: String = "lockscreen_widgets_big_active"
+ const val LOCKSCREEN_WIDGETS_BIG_INACTIVE: String = "lockscreen_widgets_big_inactive"
+ const val LOCKSCREEN_WIDGETS_SMALL_ACTIVE: String = "lockscreen_widgets_small_active"
+ const val LOCKSCREEN_WIDGETS_SMALL_INACTIVE: String = "lockscreen_widgets_small_inactive"
+ const val LOCKSCREEN_WIDGETS_BIG_ICON_ACTIVE: String = "lockscreen_widgets_big_icon_active"
+ const val LOCKSCREEN_WIDGETS_BIG_ICON_INACTIVE: String = "lockscreen_widgets_big_icon_inactive"
+ const val LOCKSCREEN_WIDGETS_SMALL_ICON_ACTIVE: String = "lockscreen_widgets_small_icon_active"
+ const val LOCKSCREEN_WIDGETS_SMALL_ICON_INACTIVE: String =
+ "lockscreen_widgets_small_icon_inactive"
+ const val LOCKSCREEN_WIDGETS_BOTTOM_MARGIN: String = "lockscreen_widgets_bottom_margin"
+ const val LOCKSCREEN_WIDGETS_SCALE: String = "lockscreen_widgets_scale"
const val FIXED_STATUS_ICONS_SWITCH = "xposed_fixedstatusicons"
const val FIXED_STATUS_ICONS_SIDEMARGIN = "xposed_fixedstatusiconssidemargin"
const val FIXED_STATUS_ICONS_TOPMARGIN = "xposed_fixedstatusiconstopmargin"
const val HIDE_LOCKSCREEN_STATUSBAR = "xposed_hidelockscreenstatusbar"
+ const val SB_CLOCK_SIZE_SWITCH = "xposed_sbclocksizeswitch"
+ const val SB_CLOCK_SIZE = "xposed_sbclocksize"
+ const val COLORED_STATUSBAR_ICON = "xposed_coloredstatusbaricon"
const val HIDE_LOCKSCREEN_CARRIER = "xposed_hidelockscreencarrier"
const val HIDE_LOCKSCREEN_LOCK_ICON = "xposed_hidelockscreenlockicon"
const val LIGHT_QSPANEL = "xposed_lightqspanel"
@@ -74,11 +158,15 @@ object Preferences {
const val CUSTOM_BATTERY_HEIGHT = "xposed_custombatteryheight"
const val HIDE_DATA_DISABLED_ICON = "xposed_hideDataDisabledIcon"
const val DEPTH_WALLPAPER_SWITCH = "xposed_depthwallpaper"
+ const val CUSTOM_DEPTH_WALLPAPER_SWITCH = "xposed_customdepthwallpaper"
const val DEPTH_WALLPAPER_FOREGROUND_ALPHA = "xposed_depthwallpaperforegroundalpha"
+ const val DEPTH_WALLPAPER_ON_AOD = "xposed_depthwallpaperaonaod"
const val DEPTH_WALLPAPER_FADE_ANIMATION = "xposed_depthwallpaperfadeanimation"
const val DEPTH_WALLPAPER_PARALLAX_EFFECT = "xposed_depthwallpaperparallaxeffect"
- const val DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER = "xposed_depthwallpaperbackgroundmovementmultiplier"
- const val DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER = "xposed_depthwallpaperforegroundmovementmultiplier"
+ const val DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER =
+ "xposed_depthwallpaperbackgroundmovementmultiplier"
+ const val DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER =
+ "xposed_depthwallpaperforegroundmovementmultiplier"
const val DEPTH_WALLPAPER_CHANGED = "xposed_depthwallpaperchanged"
const val UNZOOM_DEPTH_WALLPAPER = "xposed_unzoomdepthwallpaper"
const val CUSTOM_BATTERY_LAYOUT_REVERSE = "xposed_custombatterylayoutreverse"
@@ -110,20 +198,32 @@ object Preferences {
const val CUSTOM_BATTERY_INSIDE_PERCENTAGE = "xposed_custombatteryinsidepercentage"
const val CUSTOM_BATTERY_HIDE_BATTERY = "xposed_custombatteryhidebattery"
const val BLUR_RADIUS_VALUE = "xposed_blurradiusvalue"
+ const val CUSTOM_QS_MARGIN = "xposed_customqsmargin"
const val QQS_TOPMARGIN = "xposed_qqspanelTopMargin"
const val QS_TOPMARGIN = "xposed_qspanelTopMargin"
const val FIX_QS_TILE_COLOR = "xposed_fixqstilecolor"
const val FIX_NOTIFICATION_COLOR = "xposed_fixnotificationcolor"
+ const val FIX_NOTIFICATION_FOOTER_BUTTON_COLOR = "xposed_fixnotificationfooterbuttoncolor"
const val HIDE_QS_SILENT_TEXT = "xposed_hideqssilenttext"
+ const val HIDE_QS_ON_LOCKSCREEN = "xposed_hideqsonlockscreen"
const val HIDE_QS_FOOTER_BUTTONS = "xposed_hideqsfooterbuttons"
const val QS_TEXT_ALWAYS_WHITE = "xposed_qstextalwayswhite"
const val QS_TEXT_FOLLOW_ACCENT = "xposed_qstextfollowaccent"
+ const val OP_QS_HEADER_SWITCH = "xposed_opqsheader"
+ const val OP_QS_HEADER_VIBRATE = "xposed_opqsheadervibrate"
+ const val OP_QS_HEADER_HIDE_STOCK_MEDIA = "xposed_opqsheaderhidestockmedia"
+ const val OP_QS_HEADER_BLUR_LEVEL = "xposed_opqsheaderblurlevel"
+ const val OP_QS_HEADER_TOP_MARGIN = "xposed_opqsheadertopmargin"
+ const val OP_QS_HEADER_EXPANSION_Y = "xposed_opqsheaderexpansiony"
+ const val OP_QS_HEADER_GAP_EXPANDED = "xposed_opqsheadergapexpanded"
// Xposed view tags
const val ICONIFY_HEADER_CLOCK_TAG = "iconify_header_clock"
const val ICONIFY_LOCKSCREEN_CLOCK_TAG = "iconify_lockscreen_clock"
const val ICONIFY_DEPTH_WALLPAPER_TAG = "iconify_depth_wallpaper"
const val ICONIFY_CHARGING_ICON_TAG = "iconify_charging_icon"
+ const val ICONIFY_QS_HEADER_CONTAINER_TAG = "iconify_qs_header_container"
+ const val ICONIFY_QS_HEADER_CONTAINER_SHADE_TAG = "iconify_qs_header_container_shade"
// Battery styles
const val BATTERY_STYLE_DEFAULT = 0
@@ -172,10 +272,10 @@ object Preferences {
const val RESTART_SYSUI_BEHAVIOR_EXT = "IconifyRestartSysuiBehaviorExtended"
// Preference keys
- const val STR_NULL = "null"
const val UPDATE_SCHEDULE = "iconify_update_schedule"
const val UPDATE_CHECK_TIME = "iconify_update_check_time"
const val LAST_UPDATE_CHECK_TIME = "iconify_last_update_check_time"
+ const val NEW_UPDATE_VERSION_CODE = "iconify_new_update_version_code"
const val FIRST_INSTALL = "firstInstall"
const val UPDATE_DETECTED = "updateDetected"
const val ON_HOME_PAGE = "onHomePage"
@@ -239,26 +339,46 @@ object Preferences {
const val NAVBAR_LOW_SENS = "navbarlowsens"
const val NAVBAR_HIDE_PILL = "navbarhidepill"
+ // Weather
+ const val WEATHER_SWITCH: String = "weather_switch"
+ const val PREF_KEY_UPDATE_STATUS: String = "update_status"
+ const val WEATHER_ICON_PACK: String = "weather_icon_pack"
+ const val WEATHER_UPDATE_INTERVAL: String = "weather_update_interval"
+ const val WEATHER_SHOW_LOCATION: String = "weather_show_location"
+ const val WEATHER_SHOW_CONDITION: String = "weather_show_condition"
+ const val WEATHER_SHOW_HUMIDITY: String = "weather_show_humidity"
+ const val WEATHER_SHOW_WIND: String = "weather_show_wind"
+ const val WEATHER_TEXT_SIZE: String = "weather_text_size"
+ const val WEATHER_ICON_SIZE: String = "weather_icon_size"
+ const val WEATHER_TEXT_COLOR_SWITCH: String = "weather_text_color_switch"
+ const val WEATHER_TEXT_COLOR: String = "weather_text_color"
+ const val WEATHER_OWM_KEY: String = "owm_key"
+ const val WEATHER_UNITS: String = "weather_units"
+ const val WEATHER_PROVIDER: String = "weather_provider"
+ const val WEATHER_CUSTOM_LOCATION: String = "weather_custom_location_switch"
+ const val WEATHER_CUSTOM_LOCATION_PICKER: String = "weather_custom_location_picker"
+ const val WEATHER_CUSTOM_MARGINS_TOP: String = "weather_custom_margins_top"
+ const val WEATHER_CUSTOM_MARGINS_SIDE: String = "weather_custom_margins_side"
+ const val WEATHER_CUSTOM_MARGINS_BOTTOM: String = "weather_custom_margins_bottom"
+ const val WEATHER_STYLE: String = "weather_style"
+ const val WEATHER_CENTER_VIEW: String = "weather_center_view"
+
// Settings
const val APP_LANGUAGE = "IconifyAppLanguage"
const val APP_ICON = "IconifyAppIcon"
const val APP_THEME = "IconifyAppTheme"
const val AUTO_UPDATE = "IconifyAutoUpdate"
const val UPDATE_OVER_WIFI = "IconifyUpdateOverWifi"
- const val SHOW_XPOSED_WARN = "IconifyShowXposedWarn"
const val SHOW_HOME_CARD = "IconifyShowHomeCard"
+ const val VIBRATE_UI = "IconifyUiVibration"
const val XPOSED_ONLY_MODE = "IconifyXposedOnlyMode"
- @JvmField
+ const val NEW_UPDATE_FOUND = "newUpdateFound"
+
var isXposedOnlyMode = getBoolean(XPOSED_ONLY_MODE, true) &&
!SplashActivity.SKIP_TO_HOMEPAGE_FOR_TESTING
// Others
const val BOOT_ID = "boot_id"
const val VER_CODE = "versionCode"
- const val EASTER_EGG = "iconify_easter_egg"
const val ALERT_DIALOG_QSROWCOL = "alertDialogQsRowCol"
- const val SHOW_QS_TILE_NORMAL_WARN = "showQsTileNormalWarn"
- const val SHOW_QS_TILE_PIXEL_WARN = "showQsTilePixelWarn"
- const val SHOW_NOTIFICATION_NORMAL_WARN = "showNotificationNormalWarn"
- const val SHOW_NOTIFICATION_PIXEL_WARN = "showNotificationPixelWarn"
}
diff --git a/app/src/main/java/com/drdisagree/iconify/common/References.kt b/app/src/main/java/com/drdisagree/iconify/common/References.kt
index 34a5eccc5..3eca82c85 100644
--- a/app/src/main/java/com/drdisagree/iconify/common/References.kt
+++ b/app/src/main/java/com/drdisagree/iconify/common/References.kt
@@ -41,6 +41,5 @@ object References {
const val METADATA_THEME_CATEGORY = "THEME_CATEGORY"
// Overlay categories
- @JvmField
val OVERLAY_CATEGORY_PREFIX = BuildConfig.APPLICATION_ID.replace(".debug", "") + ".category."
}
diff --git a/app/src/main/java/com/drdisagree/iconify/common/Resources.kt b/app/src/main/java/com/drdisagree/iconify/common/Resources.kt
index da53b4e2b..654ce73e2 100644
--- a/app/src/main/java/com/drdisagree/iconify/common/Resources.kt
+++ b/app/src/main/java/com/drdisagree/iconify/common/Resources.kt
@@ -1,9 +1,34 @@
package com.drdisagree.iconify.common
+import android.os.Build
import android.os.Environment
import com.drdisagree.iconify.BuildConfig
-import com.drdisagree.iconify.Iconify
import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.FIRST_INSTALL
+import com.drdisagree.iconify.common.Preferences.UPDATE_DETECTED
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.ui.fragments.home.Home
+import com.drdisagree.iconify.ui.fragments.settings.Settings
+import com.drdisagree.iconify.ui.fragments.tweaks.Tweaks
+import com.drdisagree.iconify.ui.fragments.xposed.BackgroundChip
+import com.drdisagree.iconify.ui.fragments.xposed.BatteryStyle
+import com.drdisagree.iconify.ui.fragments.xposed.DepthWallpaper
+import com.drdisagree.iconify.ui.fragments.xposed.HeaderClock
+import com.drdisagree.iconify.ui.fragments.xposed.LockscreenClock
+import com.drdisagree.iconify.ui.fragments.xposed.LockscreenWeather
+import com.drdisagree.iconify.ui.fragments.xposed.LockscreenWidget
+import com.drdisagree.iconify.ui.fragments.xposed.OpQsHeader
+import com.drdisagree.iconify.ui.fragments.xposed.Others
+import com.drdisagree.iconify.ui.fragments.xposed.QuickSettings
+import com.drdisagree.iconify.ui.fragments.xposed.Statusbar
+import com.drdisagree.iconify.ui.fragments.xposed.Themes
+import com.drdisagree.iconify.ui.fragments.xposed.TransparencyBlur
+import com.drdisagree.iconify.ui.fragments.xposed.VolumePanel
+import com.drdisagree.iconify.ui.fragments.xposed.Xposed
+import com.drdisagree.iconify.ui.models.SearchPreferenceItem
+import com.drdisagree.iconify.ui.preferences.preferencesearch.SearchConfiguration
+import com.drdisagree.iconify.utils.RootUtils.folderExists
object Resources {
@@ -12,94 +37,171 @@ object Resources {
const val SHARED_XPREFERENCES = BuildConfig.APPLICATION_ID + "_xpreference"
// Storage location
- @JvmField
val DOCUMENTS_DIR: String =
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).absolutePath
- @JvmField
val DOWNLOADS_DIR: String =
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).absolutePath
- @JvmField
val LOG_DIR = "$DOCUMENTS_DIR/Iconify"
const val MODULE_DIR = "/data/adb/modules/Iconify"
const val SYSTEM_OVERLAY_DIR = "/system/product/overlay"
- @JvmField
val DATA_DIR: String = appContext.filesDir.absolutePath
const val OVERLAY_DIR = "$MODULE_DIR/system/product/overlay"
- @JvmField
val BIN_DIR = appContext.dataDir.toString() + "/bin"
- @JvmField
val BACKUP_DIR = Environment.getExternalStorageDirectory().absolutePath + "/.iconify_backup"
- @JvmField
val TEMP_DIR = Environment.getExternalStorageDirectory().absolutePath + "/.iconify"
- @JvmField
val TEMP_MODULE_DIR = "$TEMP_DIR/Iconify"
- @JvmField
val TEMP_MODULE_OVERLAY_DIR = "$TEMP_MODULE_DIR/system/product/overlay"
- @JvmField
val TEMP_OVERLAY_DIR = "$TEMP_DIR/overlays"
- @JvmField
val TEMP_CACHE_DIR = "$TEMP_OVERLAY_DIR/cache"
- @JvmField
val UNSIGNED_UNALIGNED_DIR = "$TEMP_OVERLAY_DIR/unsigned_unaligned"
- @JvmField
val UNSIGNED_DIR = "$TEMP_OVERLAY_DIR/unsigned"
- @JvmField
val SIGNED_DIR = "$TEMP_OVERLAY_DIR/signed"
- @JvmField
val COMPANION_TEMP_DIR = "$TEMP_DIR/companion"
- @JvmField
val COMPANION_COMPILED_DIR = "$COMPANION_TEMP_DIR/compiled"
- @JvmField
val COMPANION_MODULE_DIR = "$TEMP_DIR/module/IconifyCompanion"
private val COMPANION_RES_DIR = "$COMPANION_MODULE_DIR/substratumXML/SystemUI/res"
- @JvmField
val COMPANION_DRAWABLE_DIR = "$COMPANION_RES_DIR/drawable"
- @JvmField
val COMPANION_LAYOUT_DIR = "$COMPANION_RES_DIR/layout"
// File resources
const val FRAMEWORK_DIR = "/system/framework/framework-res.apk"
// Xposed resource dir
- @JvmField
val XPOSED_RESOURCE_TEMP_DIR =
"${Environment.getExternalStorageDirectory()}/.iconify_files"
- @JvmField
val LSCLOCK_FONT_DIR = "$XPOSED_RESOURCE_TEMP_DIR/lsclock_font.ttf"
- @JvmField
val HEADER_CLOCK_FONT_DIR = "$XPOSED_RESOURCE_TEMP_DIR/headerclock_font.ttf"
- @JvmField
val HEADER_IMAGE_DIR = "$XPOSED_RESOURCE_TEMP_DIR/header_image.png"
- @JvmField
val DEPTH_WALL_FG_DIR = "$XPOSED_RESOURCE_TEMP_DIR/depth_wallpaper_fg.png"
- @JvmField
val DEPTH_WALL_BG_DIR = "$XPOSED_RESOURCE_TEMP_DIR/depth_wallpaper_bg.png"
// Resource names
const val HEADER_CLOCK_LAYOUT = "preview_header_clock_"
const val LOCKSCREEN_CLOCK_LAYOUT = "preview_lockscreen_clock_"
- const val LOCKSCREEN_CLOCK_LOTTIE = "lottie_lockscreen_clock_"
+
+ fun shouldShowRebootDialog() = (!getBoolean(FIRST_INSTALL) && getBoolean(UPDATE_DETECTED)) ||
+ folderExists("/data/adb/modules_update/Iconify")
+
+ val searchConfiguration = SearchConfiguration()
+
+ val searchableFragments = arrayOf(
+ SearchPreferenceItem(
+ R.xml.home,
+ R.string.navbar_home,
+ Home(),
+ !Preferences.isXposedOnlyMode
+ ),
+ SearchPreferenceItem(
+ R.xml.tweaks,
+ R.string.navbar_tweaks,
+ Tweaks(),
+ !Preferences.isXposedOnlyMode
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed,
+ R.string.navbar_xposed,
+ Xposed()
+ ),
+ SearchPreferenceItem(
+ R.xml.settings,
+ R.string.navbar_settings,
+ Settings()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_transparency_blur,
+ R.string.activity_title_transparency_blur,
+ TransparencyBlur()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_background_chip,
+ R.string.activity_title_background_chip,
+ BackgroundChip()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_quick_settings,
+ R.string.activity_title_quick_settings,
+ QuickSettings()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_themes,
+ R.string.activity_title_themes,
+ Themes()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_battery_style,
+ R.string.activity_title_battery_style,
+ BatteryStyle()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_statusbar,
+ R.string.activity_title_statusbar,
+ Statusbar()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_volume_panel,
+ R.string.activity_title_volume_panel,
+ VolumePanel()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_op_qs_header,
+ R.string.activity_title_op_qs_header,
+ OpQsHeader(),
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_header_clock,
+ R.string.activity_title_header_clock,
+ HeaderClock()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_lockscreen_clock,
+ R.string.activity_title_lockscreen_clock,
+ LockscreenClock()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_lockscreen_weather,
+ R.string.activity_title_lockscreen_weather,
+ LockscreenWeather()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_lockscreen_widget,
+ R.string.activity_title_lockscreen_widget,
+ LockscreenWidget()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_depth_wallpaper,
+ R.string.activity_title_depth_wallpaper,
+ DepthWallpaper()
+ ),
+ SearchPreferenceItem(
+ R.xml.xposed_others,
+ R.string.activity_title_xposed_others,
+ Others()
+ )
+ ).filter { it.shouldAdd }
+ .distinctBy { it.fragment::class.java }
+ .toTypedArray()
}
diff --git a/app/src/main/java/com/drdisagree/iconify/config/Prefs.kt b/app/src/main/java/com/drdisagree/iconify/config/Prefs.kt
deleted file mode 100644
index 581c0b06f..000000000
--- a/app/src/main/java/com/drdisagree/iconify/config/Prefs.kt
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.drdisagree.iconify.config
-
-import android.content.Context
-import android.content.SharedPreferences
-import com.drdisagree.iconify.Iconify
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.common.Preferences.STR_NULL
-import com.drdisagree.iconify.common.Resources.SHARED_PREFERENCES
-
-@Suppress("unused")
-object Prefs {
-
- @JvmField
- var prefs: SharedPreferences = appContext.getSharedPreferences(SHARED_PREFERENCES, Context.MODE_PRIVATE)
- private var editor: SharedPreferences.Editor = prefs.edit()
-
- @JvmStatic
- fun putBoolean(key: String?, `val`: Boolean) {
- editor.putBoolean(key, `val`).apply()
- }
-
- @JvmStatic
- fun putInt(key: String?, `val`: Int) {
- editor.putInt(key, `val`).apply()
- }
-
- @JvmStatic
- fun putLong(key: String?, `val`: Long) {
- editor.putLong(key, `val`).apply()
- }
-
- @JvmStatic
- fun putString(key: String?, `val`: String?) {
- editor.putString(key, `val`).apply()
- }
-
- @JvmStatic
- fun getBoolean(key: String?): Boolean {
- return prefs.getBoolean(key, false)
- }
-
- @JvmStatic
- fun getBoolean(key: String?, defValue: Boolean?): Boolean {
- return prefs.getBoolean(key, defValue!!)
- }
-
- @JvmStatic
- fun getInt(key: String?): Int {
- return prefs.getInt(key, 0)
- }
-
- @JvmStatic
- fun getInt(key: String?, defValue: Int): Int {
- return prefs.getInt(key, defValue)
- }
-
- @JvmStatic
- fun getLong(key: String?): Long {
- return prefs.getLong(key, 0)
- }
-
- @JvmStatic
- fun getLong(key: String?, defValue: Long): Long {
- return prefs.getLong(key, defValue)
- }
-
- @JvmStatic
- fun getString(key: String?): String? {
- return prefs.getString(key, STR_NULL)
- }
-
- @JvmStatic
- fun getString(key: String?, defValue: String?): String? {
- return prefs.getString(key, defValue)
- }
-
- @JvmStatic
- fun clearPref(key: String?) {
- editor.remove(key).apply()
- }
-
- @JvmStatic
- fun clearPrefs(vararg keys: String?) {
- for (key in keys) {
- editor.remove(key).apply()
- }
- }
-
- @JvmStatic
- fun clearAllPrefs() {
- editor.clear().apply()
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/config/PrefsHelper.kt b/app/src/main/java/com/drdisagree/iconify/config/PrefsHelper.kt
new file mode 100644
index 000000000..af91603e5
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/config/PrefsHelper.kt
@@ -0,0 +1,580 @@
+package com.drdisagree.iconify.config
+
+import android.annotation.SuppressLint
+import android.content.Context
+import android.os.Build
+import androidx.preference.Preference
+import androidx.preference.PreferenceGroup
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Dynamic.isAtleastA14
+import com.drdisagree.iconify.common.Preferences.AGGRESSIVE_QSPANEL_BLUR_SWITCH
+import com.drdisagree.iconify.common.Preferences.APP_LANGUAGE
+import com.drdisagree.iconify.common.Preferences.AUTO_UPDATE
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_CIRCLE
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_DEFAULT
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_DEFAULT_LANDSCAPE
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_DEFAULT_RLANDSCAPE
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_DOTTED_CIRCLE
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_FILLED_CIRCLE
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYA
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYI
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYJ
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYL
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYM
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYO
+import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_IOS_16
+import com.drdisagree.iconify.common.Preferences.BLUR_RADIUS_VALUE
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_SWITCH
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_BLEND_COLOR
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_COLOR
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_MARGIN_LEFT
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_MARGIN_RIGHT
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_STYLE
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_SWITCH
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_WIDTH_HEIGHT
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_DIMENSION
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_FILL_ALPHA
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_FILL_COLOR
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_FILL_GRAD_COLOR
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_HEIGHT
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_HIDE_BATTERY
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_HIDE_PERCENTAGE
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_INSIDE_PERCENTAGE
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_LAYOUT_REVERSE
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_MARGIN_BOTTOM
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_MARGIN_LEFT
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_MARGIN_RIGHT
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_MARGIN_TOP
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_PERIMETER_ALPHA
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_POWERSAVE_FILL_COLOR
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_POWERSAVE_INDICATOR_COLOR
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_RAINBOW_FILL_COLOR
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_STYLE
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_SWAP_PERCENTAGE
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_WIDTH
+import com.drdisagree.iconify.common.Preferences.CUSTOM_DEPTH_WALLPAPER_SWITCH
+import com.drdisagree.iconify.common.Preferences.CUSTOM_QS_MARGIN
+import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER
+import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_FADE_ANIMATION
+import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_FOREGROUND_ALPHA
+import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER
+import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_ON_AOD
+import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_PARALLAX_EFFECT
+import com.drdisagree.iconify.common.Preferences.DUALTONE_QSPANEL
+import com.drdisagree.iconify.common.Preferences.FIXED_STATUS_ICONS_SIDEMARGIN
+import com.drdisagree.iconify.common.Preferences.FIXED_STATUS_ICONS_SWITCH
+import com.drdisagree.iconify.common.Preferences.FIXED_STATUS_ICONS_TOPMARGIN
+import com.drdisagree.iconify.common.Preferences.FIX_NOTIFICATION_COLOR
+import com.drdisagree.iconify.common.Preferences.FIX_NOTIFICATION_FOOTER_BUTTON_COLOR
+import com.drdisagree.iconify.common.Preferences.FIX_QS_TILE_COLOR
+import com.drdisagree.iconify.common.Preferences.FLUID_NOTIF_TRANSPARENCY
+import com.drdisagree.iconify.common.Preferences.FLUID_POWERMENU_TRANSPARENCY
+import com.drdisagree.iconify.common.Preferences.FLUID_QSPANEL
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT1
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT2
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT3
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_TEXT1
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_TEXT2
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_SWITCH
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_EXPANSION_Y
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_FONT_TEXT_SCALING
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_LANDSCAPE_SWITCH
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_SIDEMARGIN
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_TOPMARGIN
+import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_ALPHA
+import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_BOTTOM_FADE_AMOUNT
+import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_HEIGHT
+import com.drdisagree.iconify.common.Preferences.HIDE_QSLABEL_SWITCH
+import com.drdisagree.iconify.common.Preferences.LIGHT_QSPANEL
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_SHADE_SWITCH
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_BIG_ACTIVE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_BIG_ICON_ACTIVE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_BIG_ICON_INACTIVE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_BIG_INACTIVE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_BOTTOM_MARGIN
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_CUSTOM_COLOR
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CIRCULAR_COLOR
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CUSTOM_COLOR_SWITCH
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_DEVICE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_LINEAR_COLOR
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_TEXT_COLOR
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_SCALE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_SMALL_ACTIVE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_SMALL_ICON_ACTIVE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_SMALL_ICON_INACTIVE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_SMALL_INACTIVE
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_BOTTOMMARGIN
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT1
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT2
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT3
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_TEXT1
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_TEXT2
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_SWITCH
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_DEVICENAME
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_FONT_LINEHEIGHT
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_FONT_TEXT_SCALING
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_STYLE
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_TOPMARGIN
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_USERNAME
+import com.drdisagree.iconify.common.Preferences.NEW_UPDATE_FOUND
+import com.drdisagree.iconify.common.Preferences.NOTIF_TRANSPARENCY_SWITCH
+import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_BLUR_LEVEL
+import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_EXPANSION_Y
+import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_TOP_MARGIN
+import com.drdisagree.iconify.common.Preferences.PREF_KEY_UPDATE_STATUS
+import com.drdisagree.iconify.common.Preferences.QQS_TOPMARGIN
+import com.drdisagree.iconify.common.Preferences.QSALPHA_LEVEL
+import com.drdisagree.iconify.common.Preferences.QSPANEL_BLUR_SWITCH
+import com.drdisagree.iconify.common.Preferences.QS_TOPMARGIN
+import com.drdisagree.iconify.common.Preferences.QS_TRANSPARENCY_SWITCH
+import com.drdisagree.iconify.common.Preferences.SB_CLOCK_SIZE
+import com.drdisagree.iconify.common.Preferences.SB_CLOCK_SIZE_SWITCH
+import com.drdisagree.iconify.common.Preferences.SHOW_HOME_CARD
+import com.drdisagree.iconify.common.Preferences.UNZOOM_DEPTH_WALLPAPER
+import com.drdisagree.iconify.common.Preferences.UPDATE_OVER_WIFI
+import com.drdisagree.iconify.common.Preferences.VERTICAL_QSTILE_SWITCH
+import com.drdisagree.iconify.common.Preferences.WEATHER_CUSTOM_LOCATION
+import com.drdisagree.iconify.common.Preferences.WEATHER_CUSTOM_LOCATION_PICKER
+import com.drdisagree.iconify.common.Preferences.WEATHER_CUSTOM_MARGINS_BOTTOM
+import com.drdisagree.iconify.common.Preferences.WEATHER_CUSTOM_MARGINS_SIDE
+import com.drdisagree.iconify.common.Preferences.WEATHER_CUSTOM_MARGINS_TOP
+import com.drdisagree.iconify.common.Preferences.WEATHER_ICON_PACK
+import com.drdisagree.iconify.common.Preferences.WEATHER_ICON_SIZE
+import com.drdisagree.iconify.common.Preferences.WEATHER_OWM_KEY
+import com.drdisagree.iconify.common.Preferences.WEATHER_PROVIDER
+import com.drdisagree.iconify.common.Preferences.WEATHER_TEXT_COLOR
+import com.drdisagree.iconify.common.Preferences.WEATHER_TEXT_COLOR_SWITCH
+import com.drdisagree.iconify.common.Preferences.WEATHER_TEXT_SIZE
+import com.drdisagree.iconify.common.Preferences.WEATHER_UNITS
+import com.drdisagree.iconify.common.Preferences.WEATHER_UPDATE_INTERVAL
+import com.drdisagree.iconify.common.Preferences.XPOSED_HOOK_CHECK
+import com.drdisagree.iconify.common.Resources.shouldShowRebootDialog
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.config.RPrefs.getSliderFloat
+import com.drdisagree.iconify.config.RPrefs.getSliderInt
+import com.drdisagree.iconify.config.RPrefs.getString
+import com.drdisagree.iconify.config.RPrefs.getStringSet
+import com.drdisagree.iconify.ui.preferences.SliderPreference
+import com.drdisagree.iconify.utils.weather.WeatherConfig
+
+object PrefsHelper {
+
+ fun isVisible(key: String?): Boolean {
+ return when (key) {
+ UPDATE_OVER_WIFI -> getBoolean(AUTO_UPDATE, true)
+
+ "iconifyHomeCard" -> getBoolean(SHOW_HOME_CARD, true)
+
+ "rebootReminder" -> shouldShowRebootDialog()
+
+ "newUpdate" -> getBoolean(NEW_UPDATE_FOUND)
+
+ XPOSED_HOOK_CHECK -> !getBoolean(key)
+
+ LOCKSCREEN_SHADE_SWITCH,
+ QSALPHA_LEVEL -> getBoolean(QS_TRANSPARENCY_SWITCH) ||
+ getBoolean(NOTIF_TRANSPARENCY_SWITCH)
+
+ AGGRESSIVE_QSPANEL_BLUR_SWITCH -> getBoolean(QSPANEL_BLUR_SWITCH)
+
+ HIDE_QSLABEL_SWITCH -> getBoolean(VERTICAL_QSTILE_SWITCH)
+
+ QQS_TOPMARGIN,
+ QS_TOPMARGIN -> getBoolean(CUSTOM_QS_MARGIN)
+
+ SB_CLOCK_SIZE -> getBoolean(SB_CLOCK_SIZE_SWITCH)
+
+ LSCLOCK_COLOR_CODE_ACCENT1,
+ LSCLOCK_COLOR_CODE_ACCENT2,
+ LSCLOCK_COLOR_CODE_ACCENT3,
+ LSCLOCK_COLOR_CODE_TEXT1,
+ LSCLOCK_COLOR_CODE_TEXT2 -> getBoolean(LSCLOCK_COLOR_SWITCH)
+
+ LSCLOCK_DEVICENAME -> getInt(LSCLOCK_STYLE, 0) == 19
+
+ LSCLOCK_USERNAME -> getInt(LSCLOCK_STYLE, 0) == 7
+
+ // Weather Common
+ WEATHER_OWM_KEY -> getString(WEATHER_PROVIDER, "0") == "1"
+ WEATHER_CUSTOM_LOCATION_PICKER -> getBoolean(WEATHER_CUSTOM_LOCATION)
+
+ // Lockscreen Weather
+ WEATHER_TEXT_COLOR -> getBoolean(WEATHER_TEXT_COLOR_SWITCH)
+
+ HEADER_CLOCK_COLOR_CODE_ACCENT1,
+ HEADER_CLOCK_COLOR_CODE_ACCENT2,
+ HEADER_CLOCK_COLOR_CODE_ACCENT3,
+ HEADER_CLOCK_COLOR_CODE_TEXT1,
+ HEADER_CLOCK_COLOR_CODE_TEXT2 -> getBoolean(HEADER_CLOCK_COLOR_SWITCH)
+
+ DUALTONE_QSPANEL -> getBoolean(LIGHT_QSPANEL)
+
+ FLUID_NOTIF_TRANSPARENCY,
+ FLUID_POWERMENU_TRANSPARENCY -> getBoolean(FLUID_QSPANEL)
+
+ "xposedThemesOthers",
+ FIX_QS_TILE_COLOR,
+ FIX_NOTIFICATION_COLOR,
+ FIX_NOTIFICATION_FOOTER_BUTTON_COLOR -> isAtleastA14
+
+ CUSTOM_DEPTH_WALLPAPER_SWITCH,
+ DEPTH_WALLPAPER_ON_AOD -> Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU
+
+ DEPTH_WALLPAPER_FADE_ANIMATION,
+ DEPTH_WALLPAPER_PARALLAX_EFFECT,
+ DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER,
+ DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER,
+ UNZOOM_DEPTH_WALLPAPER -> Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU
+
+ "xposed_depthwallpaperbgimagepicker",
+ "xposed_depthwallpaperfgimagepicker" -> getBoolean(CUSTOM_DEPTH_WALLPAPER_SWITCH) ||
+ Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU
+
+ LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CUSTOM_COLOR_SWITCH,
+ LOCKSCREEN_WIDGETS_DEVICE_WIDGET_DEVICE -> getBoolean(LOCKSCREEN_WIDGETS_DEVICE_WIDGET)
+
+ LOCKSCREEN_WIDGETS_DEVICE_WIDGET_LINEAR_COLOR,
+ LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CIRCULAR_COLOR,
+ LOCKSCREEN_WIDGETS_DEVICE_WIDGET_TEXT_COLOR -> getBoolean(
+ LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CUSTOM_COLOR_SWITCH
+ )
+
+ LOCKSCREEN_WIDGETS_BIG_ACTIVE,
+ LOCKSCREEN_WIDGETS_BIG_INACTIVE,
+ LOCKSCREEN_WIDGETS_BIG_ICON_ACTIVE,
+ LOCKSCREEN_WIDGETS_BIG_ICON_INACTIVE,
+ LOCKSCREEN_WIDGETS_SMALL_ACTIVE,
+ LOCKSCREEN_WIDGETS_SMALL_INACTIVE,
+ LOCKSCREEN_WIDGETS_SMALL_ICON_ACTIVE,
+ LOCKSCREEN_WIDGETS_SMALL_ICON_INACTIVE -> getBoolean(LOCKSCREEN_WIDGETS_CUSTOM_COLOR)
+
+ "xposed_lockscreenwidget_weather_settings" -> WeatherConfig.isEnabled(appContext)
+
+ CUSTOM_BATTERY_STYLE,
+ CUSTOM_BATTERY_WIDTH,
+ CUSTOM_BATTERY_HEIGHT,
+ CUSTOM_BATTERY_HIDE_PERCENTAGE,
+ CUSTOM_BATTERY_INSIDE_PERCENTAGE,
+ CUSTOM_BATTERY_HIDE_BATTERY,
+ CUSTOM_BATTERY_SWAP_PERCENTAGE,
+ CUSTOM_BATTERY_LAYOUT_REVERSE,
+ CUSTOM_BATTERY_PERIMETER_ALPHA,
+ CUSTOM_BATTERY_FILL_ALPHA,
+ CUSTOM_BATTERY_RAINBOW_FILL_COLOR,
+ CUSTOM_BATTERY_BLEND_COLOR,
+ CUSTOM_BATTERY_FILL_COLOR,
+ CUSTOM_BATTERY_FILL_GRAD_COLOR,
+ CUSTOM_BATTERY_CHARGING_COLOR,
+ CUSTOM_BATTERY_POWERSAVE_FILL_COLOR,
+ CUSTOM_BATTERY_POWERSAVE_INDICATOR_COLOR,
+ CUSTOM_BATTERY_DIMENSION,
+ CUSTOM_BATTERY_MARGIN_LEFT,
+ CUSTOM_BATTERY_MARGIN_RIGHT,
+ CUSTOM_BATTERY_MARGIN_TOP,
+ CUSTOM_BATTERY_MARGIN_BOTTOM,
+ CUSTOM_BATTERY_CHARGING_ICON_SWITCH,
+ CUSTOM_BATTERY_CHARGING_ICON_STYLE,
+ CUSTOM_BATTERY_CHARGING_ICON_MARGIN_LEFT,
+ CUSTOM_BATTERY_CHARGING_ICON_MARGIN_RIGHT,
+ CUSTOM_BATTERY_CHARGING_ICON_WIDTH_HEIGHT -> {
+ return isBatteryPrefsVisible(key)
+ }
+
+ // Status icons
+ "xposedStatusIcons",
+ CHIP_STATUS_ICONS_SWITCH,
+ "xposed_chipstatusiconscustomizer" -> {
+ return Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE
+ }
+
+ "mediaPlayerTweaks" -> Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE
+
+ HEADER_CLOCK_LANDSCAPE_SWITCH -> Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE
+
+ HEADER_CLOCK_EXPANSION_Y -> Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE
+
+ "xposedOthersStatusIcons",
+ FIXED_STATUS_ICONS_SWITCH -> Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU
+
+ FIXED_STATUS_ICONS_SIDEMARGIN,
+ FIXED_STATUS_ICONS_TOPMARGIN -> Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU &&
+ getBoolean(FIXED_STATUS_ICONS_SWITCH)
+
+ "xposedOpQsHeader" -> Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE
+
+ else -> true
+ }
+ }
+
+ private fun isBatteryPrefsVisible(key: String): Boolean {
+ val batteryStyle: Int = getString(CUSTOM_BATTERY_STYLE, 0.toString())!!.toInt()
+
+ val showAdvancedCustomizations =
+ batteryStyle in BATTERY_STYLE_LANDSCAPE_BATTERYA..BATTERY_STYLE_LANDSCAPE_BATTERYO
+
+ val showColorPickers: Boolean = getBoolean(CUSTOM_BATTERY_BLEND_COLOR, false)
+
+ val showRainbowBattery = batteryStyle == BATTERY_STYLE_LANDSCAPE_BATTERYI ||
+ batteryStyle == BATTERY_STYLE_LANDSCAPE_BATTERYJ
+
+ val showBatteryDimensions = batteryStyle > BATTERY_STYLE_DEFAULT_LANDSCAPE &&
+ getBoolean(CUSTOM_BATTERY_DIMENSION)
+
+ val showPercentage = batteryStyle != BATTERY_STYLE_DEFAULT &&
+ batteryStyle != BATTERY_STYLE_DEFAULT_LANDSCAPE &&
+ batteryStyle != BATTERY_STYLE_DEFAULT_RLANDSCAPE &&
+ batteryStyle != BATTERY_STYLE_LANDSCAPE_IOS_16 &&
+ batteryStyle != BATTERY_STYLE_LANDSCAPE_BATTERYL &&
+ batteryStyle != BATTERY_STYLE_LANDSCAPE_BATTERYM
+
+ val showInsidePercentage = showPercentage && !getBoolean(
+ CUSTOM_BATTERY_HIDE_PERCENTAGE,
+ false
+ )
+
+ val showChargingIconCustomization: Boolean =
+ batteryStyle > BATTERY_STYLE_DEFAULT_LANDSCAPE &&
+ getBoolean(CUSTOM_BATTERY_CHARGING_ICON_SWITCH, false)
+
+ val showSwapLayout: Boolean = showInsidePercentage &&
+ batteryStyle > BATTERY_STYLE_DEFAULT_LANDSCAPE
+
+ val circleBattery = batteryStyle == BATTERY_STYLE_CIRCLE ||
+ batteryStyle == BATTERY_STYLE_DOTTED_CIRCLE ||
+ batteryStyle == BATTERY_STYLE_FILLED_CIRCLE
+
+ return when (key) {
+ CUSTOM_BATTERY_LAYOUT_REVERSE,
+ CUSTOM_BATTERY_PERIMETER_ALPHA,
+ CUSTOM_BATTERY_FILL_ALPHA -> showAdvancedCustomizations
+
+ CUSTOM_BATTERY_BLEND_COLOR -> showAdvancedCustomizations || circleBattery
+
+ CUSTOM_BATTERY_FILL_COLOR,
+ CUSTOM_BATTERY_FILL_GRAD_COLOR,
+ CUSTOM_BATTERY_CHARGING_COLOR,
+ CUSTOM_BATTERY_POWERSAVE_FILL_COLOR,
+ CUSTOM_BATTERY_POWERSAVE_INDICATOR_COLOR -> (showAdvancedCustomizations || circleBattery) &&
+ showColorPickers
+
+ CUSTOM_BATTERY_RAINBOW_FILL_COLOR -> (showAdvancedCustomizations || circleBattery) &&
+ showRainbowBattery
+
+ CUSTOM_BATTERY_DIMENSION -> batteryStyle > BATTERY_STYLE_DEFAULT_LANDSCAPE
+
+ CUSTOM_BATTERY_MARGIN_LEFT,
+ CUSTOM_BATTERY_MARGIN_RIGHT,
+ CUSTOM_BATTERY_MARGIN_TOP,
+ CUSTOM_BATTERY_MARGIN_BOTTOM -> showBatteryDimensions
+
+ CUSTOM_BATTERY_HIDE_PERCENTAGE -> showPercentage
+
+ CUSTOM_BATTERY_INSIDE_PERCENTAGE -> showInsidePercentage
+
+ CUSTOM_BATTERY_SWAP_PERCENTAGE -> showSwapLayout
+
+ CUSTOM_BATTERY_HIDE_BATTERY,
+ CUSTOM_BATTERY_CHARGING_ICON_SWITCH -> batteryStyle > BATTERY_STYLE_DEFAULT_LANDSCAPE
+
+ CUSTOM_BATTERY_CHARGING_ICON_STYLE,
+ CUSTOM_BATTERY_CHARGING_ICON_MARGIN_LEFT,
+ CUSTOM_BATTERY_CHARGING_ICON_MARGIN_RIGHT,
+ CUSTOM_BATTERY_CHARGING_ICON_WIDTH_HEIGHT -> showChargingIconCustomization
+
+ else -> true
+ }
+ }
+
+ fun isEnabled(key: String): Boolean {
+ return when (key) {
+
+ // Weather Common Prefs
+ WEATHER_UPDATE_INTERVAL,
+ PREF_KEY_UPDATE_STATUS,
+ WEATHER_PROVIDER,
+ WEATHER_UNITS,
+ WEATHER_CUSTOM_LOCATION,
+ WEATHER_ICON_PACK -> WeatherConfig.isEnabled(appContext)
+
+ WEATHER_OWM_KEY -> getString(WEATHER_PROVIDER, "0") == "1" &&
+ WeatherConfig.isEnabled(appContext)
+
+ CUSTOM_BATTERY_WIDTH,
+ CUSTOM_BATTERY_HEIGHT -> getString(CUSTOM_BATTERY_STYLE, 0.toString())!!.toInt() != 0
+
+ else -> true
+ }
+ }
+
+ @SuppressLint("DefaultLocale")
+ fun getSummary(fragmentCompat: Context, key: String): String? {
+ if (key.endsWith("Slider")) {
+ return String.format("%.2f", RPrefs.getSliderFloat(key, 0f))
+ }
+ if (key.endsWith("List")) {
+ return getString(key, "")
+ }
+ if (key.endsWith("EditText")) {
+ return getString(key, "")
+ }
+ if (key.endsWith("MultiSelect")) {
+ return getStringSet(key, emptySet()).toString()
+ }
+
+ return when (key) {
+ APP_LANGUAGE -> {
+ val currentLanguageCode =
+ listOf(*fragmentCompat.resources.getStringArray(R.array.locale_code))
+ .indexOf(
+ getString(
+ APP_LANGUAGE,
+ fragmentCompat.resources.configuration.locales[0].language
+ )
+ )
+ val selectedLanguageCode = if (currentLanguageCode < 0) listOf(
+ *fragmentCompat.resources.getStringArray(R.array.locale_code)
+ ).indexOf("en-US") else currentLanguageCode
+
+ return listOf(*fragmentCompat.resources.getStringArray(R.array.locale_name))[selectedLanguageCode]
+ }
+
+ "checkForUpdatePref" -> BuildConfig.VERSION_NAME
+
+ QSALPHA_LEVEL -> "${getSliderInt(key, 60)}%"
+
+ BLUR_RADIUS_VALUE -> "${getSliderInt(key, 23)}px"
+
+ QQS_TOPMARGIN,
+ QS_TOPMARGIN -> "${getSliderInt(key, 100)}dp"
+
+ SB_CLOCK_SIZE -> "${getSliderInt(key, 14)}px"
+
+ FIXED_STATUS_ICONS_TOPMARGIN -> "${getSliderInt(key, 8)}dp"
+
+ FIXED_STATUS_ICONS_SIDEMARGIN -> "${getSliderInt(key, 0)}dp"
+
+ LSCLOCK_FONT_LINEHEIGHT -> "${getSliderInt(key, 0)}dp"
+
+ HEADER_CLOCK_FONT_TEXT_SCALING,
+ LSCLOCK_FONT_TEXT_SCALING -> "${String.format("%.1f", getSliderInt(key, 10) / 10f)}x"
+
+ LSCLOCK_TOPMARGIN -> "${getSliderInt(key, 100)}dp"
+
+ LSCLOCK_BOTTOMMARGIN -> "${getSliderInt(key, 40)}dp"
+
+ HEADER_CLOCK_SIDEMARGIN -> "${getSliderInt(key, 0)}dp"
+
+ HEADER_CLOCK_TOPMARGIN -> "${getSliderInt(key, 8)}dp"
+
+ HEADER_IMAGE_HEIGHT -> "${getSliderInt(key, 140)}dp"
+
+ HEADER_IMAGE_ALPHA -> "${getSliderInt(key, 100)}%"
+
+ HEADER_IMAGE_BOTTOM_FADE_AMOUNT -> "${getSliderInt(key, 40)}dp"
+
+ WEATHER_CUSTOM_MARGINS_TOP,
+ WEATHER_CUSTOM_MARGINS_BOTTOM -> "${getSliderInt(key, 0)}dp"
+
+ WEATHER_CUSTOM_MARGINS_SIDE -> "${getSliderInt(key, 32)}dp"
+
+ WEATHER_TEXT_SIZE -> "${getSliderInt(key, 16)}sp"
+
+ WEATHER_ICON_SIZE -> "${getSliderInt(key, 18)}dp"
+
+ LOCKSCREEN_WIDGETS_BOTTOM_MARGIN -> "${getSliderInt(key, 0)}dp"
+ LOCKSCREEN_WIDGETS_SCALE -> "${String.format("%.2f", getSliderFloat(key, 1f))}%"
+
+ WEATHER_CUSTOM_LOCATION_PICKER -> {
+ WeatherConfig.getLocationName(appContext).let {
+ if (it.isNullOrEmpty()) appContextLocale.getString(R.string.not_available) else it
+ }
+ }
+
+ WEATHER_OWM_KEY -> {
+ val owmKey = getString(WEATHER_OWM_KEY, "")!!
+
+ if (owmKey.length > 4) {
+ "*".repeat(owmKey.length - 4) + owmKey.takeLast(
+ 4
+ )
+ } else if (owmKey.isNotEmpty()) {
+ "*".repeat(owmKey.length)
+ } else {
+ appContextLocale.getString(R.string.not_available)
+ }
+ }
+
+ CUSTOM_BATTERY_WIDTH,
+ CUSTOM_BATTERY_HEIGHT -> "${getSliderInt(key, 20)}dp"
+
+ CUSTOM_BATTERY_MARGIN_LEFT,
+ CUSTOM_BATTERY_MARGIN_RIGHT -> "${getSliderInt(key, 4)}dp"
+
+ CUSTOM_BATTERY_MARGIN_TOP,
+ CUSTOM_BATTERY_MARGIN_BOTTOM -> "${getSliderInt(key, 0)}dp"
+
+ CUSTOM_BATTERY_CHARGING_ICON_MARGIN_LEFT -> "${getSliderInt(key, 1)}dp"
+
+ CUSTOM_BATTERY_CHARGING_ICON_MARGIN_RIGHT -> "${getSliderInt(key, 0)}dp"
+
+ CUSTOM_BATTERY_CHARGING_ICON_WIDTH_HEIGHT -> "${getSliderInt(key, 14)}dp"
+
+ HEADER_CLOCK_EXPANSION_Y -> "${getSliderInt(key, 24)}dp"
+
+ DEPTH_WALLPAPER_FOREGROUND_ALPHA -> "${getSliderInt(key, 80)}%"
+
+ OP_QS_HEADER_BLUR_LEVEL -> "${getSliderInt(key, 10)}px"
+
+ OP_QS_HEADER_TOP_MARGIN,
+ OP_QS_HEADER_EXPANSION_Y -> "${getSliderInt(key, 0)}dp"
+
+ else -> null
+ }
+ }
+
+ fun setupAllPreferences(group: PreferenceGroup) {
+ var i = 0
+ while (true) {
+ try {
+ val thisPreference = group.getPreference(i)
+
+ setupPreference(thisPreference)
+
+ if (thisPreference is PreferenceGroup) {
+ setupAllPreferences(thisPreference)
+ }
+ } catch (ignored: Throwable) {
+ break
+ }
+ i++
+ }
+ }
+
+ private fun setupPreference(preference: Preference) {
+ try {
+ val key = preference.key
+
+ preference.isVisible = isVisible(key)
+ preference.isEnabled = isEnabled(key)
+
+ getSummary(preference.context, key)?.let {
+ preference.summary = it
+ }
+
+ if (preference is SliderPreference) {
+ preference.slider.setLabelFormatter { value: Float ->
+ if (value == preference.defaultValue[0]) return@setLabelFormatter appContext.getString(
+ R.string.opt_default
+ )
+ else return@setLabelFormatter Math.round(value).toString()
+ }
+ }
+ } catch (ignored: Throwable) {
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/config/RPrefs.kt b/app/src/main/java/com/drdisagree/iconify/config/RPrefs.kt
index 6a5695374..cb8a86f90 100644
--- a/app/src/main/java/com/drdisagree/iconify/config/RPrefs.kt
+++ b/app/src/main/java/com/drdisagree/iconify/config/RPrefs.kt
@@ -2,110 +2,140 @@ package com.drdisagree.iconify.config
import android.content.Context.MODE_PRIVATE
import android.content.SharedPreferences
-import com.drdisagree.iconify.Iconify
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener
import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.common.Preferences.STR_NULL
import com.drdisagree.iconify.common.Resources.SHARED_XPREFERENCES
+import com.drdisagree.iconify.ui.preferences.SliderPreference
@Suppress("unused")
-object RPrefs {
+object RPrefs : SharedPreferences {
- @JvmField
- var prefs: SharedPreferences =
+ private val prefs: SharedPreferences by lazy {
appContext.createDeviceProtectedStorageContext().getSharedPreferences(
SHARED_XPREFERENCES, MODE_PRIVATE
)
- private var editor: SharedPreferences.Editor = prefs.edit()
+ }
+
+ private val editor: SharedPreferences.Editor by lazy { prefs.edit() }
+
+ val instance: RPrefs
+ get() = this
- @JvmStatic
- fun putBoolean(key: String?, `val`: Boolean) {
- editor.putBoolean(key, `val`).apply()
+ val getPrefs: SharedPreferences
+ get() = prefs
+
+ // Basic put methods
+ fun putBoolean(key: String?, value: Boolean) {
+ editor.putBoolean(key, value).apply()
}
- @JvmStatic
- fun putInt(key: String?, `val`: Int) {
- editor.putInt(key, `val`).apply()
+ fun putInt(key: String?, value: Int) {
+ editor.putInt(key, value).apply()
}
- @JvmStatic
- fun putLong(key: String?, `val`: Long) {
- editor.putLong(key, `val`).apply()
+ fun putFloat(key: String?, value: Float) {
+ editor.putFloat(key, value).apply()
}
- @JvmStatic
- fun putFloat(key: String?, `val`: Float) {
- editor.putFloat(key, `val`).apply()
+ fun putLong(key: String?, value: Long) {
+ editor.putLong(key, value).apply()
}
- @JvmStatic
- fun putString(key: String?, `val`: String?) {
- editor.putString(key, `val`).apply()
+ fun putString(key: String?, value: String?) {
+ editor.putString(key, value).apply()
}
- @JvmStatic
+ // Basic get methods
fun getBoolean(key: String?): Boolean {
return prefs.getBoolean(key, false)
}
- @JvmStatic
- fun getBoolean(key: String?, defValue: Boolean?): Boolean {
- return prefs.getBoolean(key, defValue!!)
- }
-
- @JvmStatic
fun getInt(key: String?): Int {
return prefs.getInt(key, 0)
}
- @JvmStatic
- fun getInt(key: String?, defValue: Int): Int {
- return prefs.getInt(key, defValue)
- }
-
- @JvmStatic
fun getLong(key: String?): Long {
return prefs.getLong(key, 0)
}
- @JvmStatic
- fun getLong(key: String?, defValue: Long): Long {
- return prefs.getLong(key, defValue)
- }
-
- @JvmStatic
fun getFloat(key: String?): Float {
return prefs.getFloat(key, 0f)
}
- @JvmStatic
- fun getFloat(key: String?, defValue: Float): Float {
- return prefs.getFloat(key, defValue)
+ fun getString(key: String?): String? {
+ return prefs.getString(key, null)
}
- @JvmStatic
- fun getString(key: String?): String? {
- return prefs.getString(key, STR_NULL)
+ // Custom slider preference methods
+ fun getSliderInt(key: String?, defaultVal: Int): Int {
+ return SliderPreference.getSingleIntValue(this, key, defaultVal)
}
- @JvmStatic
- fun getString(key: String?, defValue: String?): String? {
- return prefs.getString(key, defValue)
+ fun getSliderValues(key: String?, defaultValue: Float): List {
+ return SliderPreference.getValues(this, key, defaultValue)
}
- @JvmStatic
+ fun getSliderFloat(key: String?, defaultVal: Float): Float {
+ return SliderPreference.getSingleFloatValue(this, key, defaultVal)
+ }
+
+ // Clear methods
fun clearPref(key: String?) {
editor.remove(key).apply()
}
- @JvmStatic
fun clearPrefs(vararg keys: String?) {
- for (key in keys) {
+ keys.forEach { key ->
editor.remove(key).apply()
}
}
- @JvmStatic
fun clearAllPrefs() {
editor.clear().apply()
}
+
+ // Implementing SharedPreferences interface
+ override fun getAll(): Map {
+ return prefs.all
+ }
+
+ override fun getBoolean(key: String?, defValue: Boolean): Boolean {
+ return prefs.getBoolean(key, defValue)
+ }
+
+ override fun getInt(key: String?, defValue: Int): Int {
+ return prefs.getInt(key, defValue)
+ }
+
+ override fun getLong(key: String?, defValue: Long): Long {
+ return prefs.getLong(key, defValue)
+ }
+
+ override fun getFloat(key: String?, defValue: Float): Float {
+ return prefs.getFloat(key, defValue)
+ }
+
+ override fun getString(key: String?, defValue: String?): String? {
+ return prefs.getString(key, defValue)
+ }
+
+ override fun getStringSet(key: String, defValues: Set?): Set? {
+ return prefs.getStringSet(key, defValues)
+ }
+
+ override fun contains(key: String): Boolean {
+ return prefs.contains(key)
+ }
+
+ override fun edit(): SharedPreferences.Editor {
+ return editor
+ }
+
+ override fun registerOnSharedPreferenceChangeListener(listener: OnSharedPreferenceChangeListener) {
+ prefs.registerOnSharedPreferenceChangeListener(listener)
+ }
+
+ override fun unregisterOnSharedPreferenceChangeListener(listener: OnSharedPreferenceChangeListener) {
+ prefs.unregisterOnSharedPreferenceChangeListener(listener)
+ }
}
diff --git a/app/src/main/java/com/drdisagree/iconify/config/XPrefs.kt b/app/src/main/java/com/drdisagree/iconify/config/XPrefs.kt
deleted file mode 100644
index 624561d1a..000000000
--- a/app/src/main/java/com/drdisagree/iconify/config/XPrefs.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.drdisagree.iconify.config
-
-import android.content.Context
-import android.content.SharedPreferences
-import android.content.SharedPreferences.OnSharedPreferenceChangeListener
-import com.crossbowffs.remotepreferences.RemotePreferences
-import com.drdisagree.iconify.BuildConfig
-import com.drdisagree.iconify.common.Const.PREF_UPDATE_EXCLUSIONS
-import com.drdisagree.iconify.common.Resources.SHARED_XPREFERENCES
-import com.drdisagree.iconify.xposed.HookEntry
-
-object XPrefs {
-
- @JvmField
- var Xprefs: SharedPreferences? = null
- private var packageName: String? = null
- private val listener =
- OnSharedPreferenceChangeListener { _: SharedPreferences?, key: String? ->
- loadEverything(
- key
- )
- }
-
- @JvmStatic
- fun init(context: Context) {
- packageName = context.packageName
- Xprefs = RemotePreferences(context, BuildConfig.APPLICATION_ID, SHARED_XPREFERENCES, true)
- (Xprefs as RemotePreferences).registerOnSharedPreferenceChangeListener(listener)
- }
-
- private fun loadEverything(vararg key: String?) {
- if (key.isEmpty() || key[0].isNullOrEmpty() || PREF_UPDATE_EXCLUSIONS.any { exclusion ->
- key[0]?.equals(exclusion) == true
- }) {
- return
- }
-
- HookEntry.runningMods.forEach { thisMod ->
- thisMod.updatePrefs(*key.filterNotNull().toTypedArray())
- }
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/receiver/BootReceiver.kt b/app/src/main/java/com/drdisagree/iconify/receiver/BootReceiver.kt
index 41e3e0d0d..12f75fb90 100644
--- a/app/src/main/java/com/drdisagree/iconify/receiver/BootReceiver.kt
+++ b/app/src/main/java/com/drdisagree/iconify/receiver/BootReceiver.kt
@@ -4,16 +4,29 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
+import com.drdisagree.iconify.common.Const.ACTION_BOOT_COMPLETED
+import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
import com.drdisagree.iconify.services.UpdateScheduler
+import com.drdisagree.iconify.services.WeatherScheduler
class BootReceiver : BroadcastReceiver() {
- private val tag =this::class.java.simpleName
+ private val tag = this::class.java.simpleName
override fun onReceive(context: Context, intent: Intent) {
if (Intent.ACTION_BOOT_COMPLETED == intent.action) {
Log.i(tag, "Broadcast received: " + intent.action)
+
+ // Schedule updates
UpdateScheduler.scheduleUpdates(context)
+
+ // Schedule Weather Updates
+ WeatherScheduler.scheduleUpdates(context)
+
+ // Update QS clock on boot
+ val broadcast: Intent = Intent(ACTION_BOOT_COMPLETED)
+ broadcast.putExtra("packageName", SYSTEMUI_PACKAGE)
+ context.sendBroadcast(broadcast)
}
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/services/RootProviderProxy.kt b/app/src/main/java/com/drdisagree/iconify/services/RootProviderProxy.kt
new file mode 100644
index 000000000..eae52ebcf
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/services/RootProviderProxy.kt
@@ -0,0 +1,193 @@
+package com.drdisagree.iconify.services
+
+import android.app.Service
+import android.content.Context
+import android.content.Intent
+import android.graphics.Bitmap
+import android.os.IBinder
+import android.os.RemoteException
+import android.util.Log
+import com.drdisagree.iconify.IExtractSubjectCallback
+import com.drdisagree.iconify.IRootProviderProxy
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.utils.FileUtils
+import com.drdisagree.iconify.xposed.modules.utils.BitmapSubjectSegmenter
+import com.drdisagree.iconify.xposed.modules.utils.BitmapSubjectSegmenter.SegmentResultListener
+import com.google.android.gms.common.moduleinstall.ModuleAvailabilityResponse
+import com.topjohnwu.superuser.Shell
+import java.io.File
+import java.io.FileOutputStream
+
+class RootProviderProxy : Service() {
+
+ override fun onBind(intent: Intent): IBinder {
+ return RootProviderProxyIPC(this)
+ }
+
+ internal inner class RootProviderProxyIPC(context: Context) : IRootProviderProxy.Stub() {
+
+ init {
+ try {
+ Shell.setDefaultBuilder(
+ Shell.Builder.create()
+ .setFlags(Shell.FLAG_MOUNT_MASTER)
+ .setFlags(Shell.FLAG_REDIRECT_STDERR)
+ .setTimeout(20)
+ )
+ } catch (ignored: Throwable) {
+ }
+
+ rootGranted = Shell.getShell().isRoot
+
+ rootAllowedPacks = listOf(
+ *context.resources.getStringArray(R.array.root_requirement)
+ )
+ }
+
+ @Throws(RemoteException::class)
+ override fun runCommand(command: String): Array {
+ try {
+ ensureEnvironment()
+
+ val result = Shell.cmd(command).exec().out
+ return result.toTypedArray()
+ } catch (ignored: Throwable) {
+ return arrayOfNulls(0)
+ }
+ }
+
+ @Throws(RemoteException::class)
+ override fun enableOverlay(packageName: String) {
+ ensureEnvironment()
+
+ try {
+ Shell.cmd(
+ "cmd overlay enable --user current $packageName",
+ "cmd overlay set-priority $packageName highest"
+ ).submit()
+ } catch (throwable: Throwable) {
+ Log.e(TAG, "enableOverlay: ", throwable)
+ }
+ }
+
+ @Throws(RemoteException::class)
+ override fun disableOverlay(packageName: String) {
+ ensureEnvironment()
+
+ try {
+ Shell.cmd(
+ "cmd overlay disable --user current $packageName",
+ ).submit()
+ } catch (throwable: Throwable) {
+ Log.e(TAG, "disableOverlay: ", throwable)
+ }
+ }
+
+ @Throws(RemoteException::class)
+ override fun extractSubject(
+ input: Bitmap,
+ resultPath: String,
+ callback: IExtractSubjectCallback
+ ) {
+ ensureEnvironment()
+
+ try {
+ val bitmapSubjectSegmenter = BitmapSubjectSegmenter(applicationContext)
+
+ bitmapSubjectSegmenter
+ .segmentSubject(
+ input,
+ object : SegmentResultListener {
+ override fun onStart() {
+ callback.onStart(getString(R.string.depth_wallpaper_subject_extraction_started))
+ }
+
+ override fun onSuccess(result: Bitmap?) {
+ try {
+ val tempFile = File.createTempFile(
+ "depth_wallpaper_fg",
+ ".png"
+ )
+
+ val outputStream = FileOutputStream(tempFile)
+ result!!.compress(Bitmap.CompressFormat.PNG, 100, outputStream)
+
+ outputStream.close()
+ result.recycle()
+
+ val isSuccess = FileUtils.moveToIconifyHiddenDir(
+ tempFile.absolutePath,
+ resultPath
+ )
+
+ tempFile.delete()
+
+ callback.onResult(
+ isSuccess,
+ if (isSuccess) {
+ getString(R.string.depth_wallpaper_subject_extraction_success)
+ } else {
+ getString(R.string.depth_wallpaper_subject_extraction_failed)
+ }
+ )
+ } catch (throwable: Throwable) {
+ Log.e(
+ TAG,
+ "BitmapSubjectSegmenter - onSuccess: $throwable"
+ )
+
+ callback.onResult(
+ false,
+ getString(R.string.depth_wallpaper_subject_extraction_failed)
+ )
+ }
+ }
+
+ override fun onFail() {
+ bitmapSubjectSegmenter.checkModelAvailability { moduleAvailabilityResponse: ModuleAvailabilityResponse? ->
+ callback.onResult(
+ false,
+ if (moduleAvailabilityResponse?.areModulesAvailable() == true) {
+ getString(R.string.depth_wallpaper_subject_extraction_failed)
+ } else {
+ getString(R.string.depth_wallpaper_missing_ai_model)
+ }
+ )
+ }
+ }
+ })
+ } catch (throwable: Throwable) {
+ Log.e(TAG, "BitmapSubjectSegmenter - segmentSubject: $throwable")
+
+ callback.onResult(
+ false,
+ getString(R.string.depth_wallpaper_subject_extraction_failed)
+ )
+ }
+ }
+
+ @Throws(RemoteException::class)
+ private fun ensureEnvironment() {
+ if (!rootGranted) {
+ throw RemoteException("Root permission denied")
+ }
+
+ ensureSecurity(getCallingUid())
+ }
+
+ @Throws(RemoteException::class)
+ private fun ensureSecurity(uid: Int) {
+ for (packageName in packageManager.getPackagesForUid(uid)!!) {
+ if (rootAllowedPacks.contains(packageName)) return
+ }
+
+ throw RemoteException("$packageName is not allowed to use root commands")
+ }
+ }
+
+ companion object {
+ var TAG: String = "Iconify - ${RootProviderProxy::class.java.simpleName}: "
+ private var rootAllowedPacks: List = listOf()
+ private var rootGranted: Boolean = false
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/services/TileMonetEngine.kt b/app/src/main/java/com/drdisagree/iconify/services/TileMonetEngine.kt
index 18be615dd..108802bf9 100644
--- a/app/src/main/java/com/drdisagree/iconify/services/TileMonetEngine.kt
+++ b/app/src/main/java/com/drdisagree/iconify/services/TileMonetEngine.kt
@@ -4,9 +4,9 @@ import android.service.quicksettings.Tile
import android.service.quicksettings.TileService
import com.drdisagree.iconify.R
import com.drdisagree.iconify.common.Preferences.MONET_ENGINE_SWITCH
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.putBoolean
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
class TileMonetEngine : TileService() {
@@ -25,19 +25,19 @@ class TileMonetEngine : TileService() {
super.onClick()
if (isCustomMonetEnabled) {
- OverlayUtil.disableOverlays("IconifyComponentDM.overlay", "IconifyComponentME.overlay")
+ OverlayUtils.disableOverlays("IconifyComponentDM.overlay", "IconifyComponentME.overlay")
} else {
- OverlayUtil.enableOverlays("IconifyComponentDM.overlay", "IconifyComponentME.overlay")
+ OverlayUtils.enableOverlays("IconifyComponentDM.overlay", "IconifyComponentME.overlay")
if (getBoolean("IconifyComponentQSPBD.overlay")) {
- OverlayUtil.changeOverlayState(
+ OverlayUtils.changeOverlayState(
"IconifyComponentQSPBD.overlay",
false,
"IconifyComponentQSPBD.overlay",
true
)
} else if (getBoolean("IconifyComponentQSPBA.overlay")) {
- OverlayUtil.changeOverlayState(
+ OverlayUtils.changeOverlayState(
"IconifyComponentQSPBA.overlay",
false,
"IconifyComponentQSPBA.overlay",
diff --git a/app/src/main/java/com/drdisagree/iconify/services/TileNotchBarKiller.kt b/app/src/main/java/com/drdisagree/iconify/services/TileNotchBarKiller.kt
index 25941c462..749f09cfc 100644
--- a/app/src/main/java/com/drdisagree/iconify/services/TileNotchBarKiller.kt
+++ b/app/src/main/java/com/drdisagree/iconify/services/TileNotchBarKiller.kt
@@ -5,9 +5,9 @@ import android.service.quicksettings.TileService
import com.drdisagree.iconify.R
import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
import com.drdisagree.iconify.common.Preferences.NOTCH_BAR_KILLER_SWITCH
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.putBoolean
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.utils.SystemUtils
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager
@@ -26,7 +26,7 @@ class TileNotchBarKiller : TileService() {
override fun onClick() {
super.onClick()
- if (!SystemUtil.hasStoragePermission()) {
+ if (!SystemUtils.hasStoragePermission()) {
val tile = qsTile
tile.subtitle = resources.getString(R.string.need_storage_perm_title)
tile.updateTile()
diff --git a/app/src/main/java/com/drdisagree/iconify/services/TilePitchBlack.kt b/app/src/main/java/com/drdisagree/iconify/services/TilePitchBlack.kt
index b09ccd336..3a27843db 100644
--- a/app/src/main/java/com/drdisagree/iconify/services/TilePitchBlack.kt
+++ b/app/src/main/java/com/drdisagree/iconify/services/TilePitchBlack.kt
@@ -3,8 +3,8 @@ package com.drdisagree.iconify.services
import android.service.quicksettings.Tile
import android.service.quicksettings.TileService
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
class TilePitchBlack : TileService() {
@@ -23,7 +23,7 @@ class TilePitchBlack : TileService() {
super.onClick()
isPitchBlackEnabled = if (getBoolean("IconifyComponentQSPBD.overlay")) {
- OverlayUtil.changeOverlayState(
+ OverlayUtils.changeOverlayState(
"IconifyComponentQSPBD.overlay",
false,
"IconifyComponentQSPBA.overlay",
@@ -31,10 +31,10 @@ class TilePitchBlack : TileService() {
)
true
} else if (getBoolean("IconifyComponentQSPBA.overlay")) {
- OverlayUtil.disableOverlay("IconifyComponentQSPBA.overlay")
+ OverlayUtils.disableOverlay("IconifyComponentQSPBA.overlay")
false
} else {
- OverlayUtil.enableOverlay("IconifyComponentQSPBD.overlay")
+ OverlayUtils.enableOverlay("IconifyComponentQSPBD.overlay")
true
}
diff --git a/app/src/main/java/com/drdisagree/iconify/services/TileRestartSystemUI.kt b/app/src/main/java/com/drdisagree/iconify/services/TileRestartSystemUI.kt
index f36668c03..1669a4c12 100644
--- a/app/src/main/java/com/drdisagree/iconify/services/TileRestartSystemUI.kt
+++ b/app/src/main/java/com/drdisagree/iconify/services/TileRestartSystemUI.kt
@@ -4,8 +4,8 @@ import android.graphics.drawable.Icon
import android.service.quicksettings.Tile
import android.service.quicksettings.TileService
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
class TileRestartSystemUI : TileService() {
@@ -30,7 +30,7 @@ class TileRestartSystemUI : TileService() {
override fun onClick() {
super.onClick()
- SystemUtil.restartSystemUI()
+ SystemUtils.restartSystemUI()
val tile = qsTile
tile.state = Tile.STATE_INACTIVE
tile.label = resources.getString(R.string.restart_sysui_title)
@@ -44,13 +44,13 @@ class TileRestartSystemUI : TileService() {
private fun updateTileIcon(tile: Tile) {
var iconResId = R.drawable.ic_tile_restart_systemui
- if (OverlayUtil.isOverlayEnabled("IconifyComponentIPAS1.overlay")) {
+ if (OverlayUtils.isOverlayEnabled("IconifyComponentIPAS1.overlay")) {
iconResId = R.drawable.ic_tile_restart_systemui_aurora
- } else if (OverlayUtil.isOverlayEnabled("IconifyComponentIPAS2.overlay")) {
+ } else if (OverlayUtils.isOverlayEnabled("IconifyComponentIPAS2.overlay")) {
iconResId = R.drawable.ic_tile_restart_systemui_gradicon
- } else if (OverlayUtil.isOverlayEnabled("IconifyComponentIPAS3.overlay")) {
+ } else if (OverlayUtils.isOverlayEnabled("IconifyComponentIPAS3.overlay")) {
iconResId = R.drawable.ic_tile_restart_systemui_lorn
- } else if (OverlayUtil.isOverlayEnabled("IconifyComponentIPAS4.overlay")) {
+ } else if (OverlayUtils.isOverlayEnabled("IconifyComponentIPAS4.overlay")) {
iconResId = R.drawable.ic_tile_restart_systemui_plumpy
}
diff --git a/app/src/main/java/com/drdisagree/iconify/services/UpdateScheduler.kt b/app/src/main/java/com/drdisagree/iconify/services/UpdateScheduler.kt
index c1770c34a..fccbcf54b 100644
--- a/app/src/main/java/com/drdisagree/iconify/services/UpdateScheduler.kt
+++ b/app/src/main/java/com/drdisagree/iconify/services/UpdateScheduler.kt
@@ -10,8 +10,8 @@ import androidx.work.WorkManager
import com.drdisagree.iconify.BuildConfig
import com.drdisagree.iconify.common.Preferences.AUTO_UPDATE
import com.drdisagree.iconify.common.Preferences.UPDATE_CHECK_TIME
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.getLong
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getLong
import java.util.concurrent.TimeUnit
object UpdateScheduler {
@@ -20,7 +20,6 @@ object UpdateScheduler {
private val UPDATE_WORK_NAME = BuildConfig.APPLICATION_ID
.replace(".debug", "") + ".services.UpdateScheduler"
- @JvmStatic
fun scheduleUpdates(context: Context?) {
Log.i(TAG, "Updating update schedule...")
diff --git a/app/src/main/java/com/drdisagree/iconify/services/UpdateWorker.kt b/app/src/main/java/com/drdisagree/iconify/services/UpdateWorker.kt
index ee54f277a..d1ee25334 100644
--- a/app/src/main/java/com/drdisagree/iconify/services/UpdateWorker.kt
+++ b/app/src/main/java/com/drdisagree/iconify/services/UpdateWorker.kt
@@ -16,9 +16,9 @@ import com.drdisagree.iconify.R
import com.drdisagree.iconify.common.Const.LATEST_VERSION_URL
import com.drdisagree.iconify.common.Preferences.UPDATE_OVER_WIFI
import com.drdisagree.iconify.common.Preferences.VER_CODE
-import com.drdisagree.iconify.config.Prefs
+import com.drdisagree.iconify.config.RPrefs
import com.drdisagree.iconify.ui.activities.MainActivity
-import com.drdisagree.iconify.ui.fragments.AppUpdates
+import com.drdisagree.iconify.ui.fragments.settings.AppUpdates
import com.topjohnwu.superuser.Shell
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -56,7 +56,7 @@ class UpdateWorker(context: Context, params: WorkerParameters) : CoroutineWorker
}
private fun isGoodNetworkAvailable(): Boolean {
- val updateOverWifiOnly = Prefs.getBoolean(UPDATE_OVER_WIFI, true)
+ val updateOverWifiOnly = RPrefs.getBoolean(UPDATE_OVER_WIFI, true)
val connectivityManager =
applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
val capabilities =
diff --git a/app/src/main/java/com/drdisagree/iconify/services/WeatherScheduler.kt b/app/src/main/java/com/drdisagree/iconify/services/WeatherScheduler.kt
new file mode 100644
index 000000000..87f84d2a9
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/services/WeatherScheduler.kt
@@ -0,0 +1,76 @@
+package com.drdisagree.iconify.services
+
+import android.content.Context
+import android.util.Log
+import androidx.work.BackoffPolicy
+import androidx.work.Configuration
+import androidx.work.ExistingPeriodicWorkPolicy
+import androidx.work.OneTimeWorkRequest
+import androidx.work.PeriodicWorkRequest
+import androidx.work.WorkManager
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.utils.weather.WeatherConfig
+import com.drdisagree.iconify.utils.weather.WeatherWork
+import java.util.concurrent.TimeUnit
+
+object WeatherScheduler {
+ private const val UPDATE_WORK_NAME: String = BuildConfig.APPLICATION_ID + ".WeatherSchedule"
+ private val TAG = "Iconify - ${WeatherScheduler::class.java.simpleName}: "
+
+ fun scheduleUpdates(context: Context) {
+ Log.d(TAG, "Updating update schedule...")
+
+ if (!WorkManager.isInitialized()) {
+ WorkManager.initialize(context, Configuration.Builder().build())
+ }
+
+ val workManager = WorkManager.getInstance(context)
+
+ val weatherEnabled: Boolean = WeatherConfig.isEnabled(context)
+
+ Log.d(TAG, "Weather enabled: $weatherEnabled")
+
+ if (weatherEnabled) {
+ Log.d(TAG, "Scheduling updates")
+ val builder: PeriodicWorkRequest.Builder = PeriodicWorkRequest.Builder(
+ WeatherWork::class.java,
+ WeatherConfig.getUpdateInterval(context).toLong(), TimeUnit.HOURS
+ )
+ .setBackoffCriteria(BackoffPolicy.LINEAR, 1, TimeUnit.HOURS)
+
+ workManager.enqueueUniquePeriodicWork(
+ UPDATE_WORK_NAME,
+ ExistingPeriodicWorkPolicy.UPDATE,
+ builder.build()
+ )
+ } else {
+ workManager.cancelUniqueWork(UPDATE_WORK_NAME)
+ }
+ }
+
+ fun cancelUpdates(context: Context) {
+ if (!WorkManager.isInitialized()) {
+ WorkManager.initialize(context, Configuration.Builder().build())
+ }
+
+ val workManager = WorkManager.getInstance(context)
+
+ workManager.cancelUniqueWork(UPDATE_WORK_NAME)
+ }
+
+ fun scheduleUpdateNow(context: Context) {
+ Log.d(TAG, "Check update now")
+
+ if (!WorkManager.isInitialized()) {
+ WorkManager.initialize(context, Configuration.Builder().build())
+ }
+
+ val workManager = WorkManager.getInstance(context)
+
+ val builder: OneTimeWorkRequest.Builder =
+ OneTimeWorkRequest.Builder(WeatherWork::class.java)
+
+ workManager.enqueue(builder.build())
+ }
+
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/activities/MainActivity.kt b/app/src/main/java/com/drdisagree/iconify/ui/activities/MainActivity.kt
index 5c9be6fcf..c9d7fc34e 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/activities/MainActivity.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/activities/MainActivity.kt
@@ -1,154 +1,318 @@
package com.drdisagree.iconify.ui.activities
-import android.annotation.SuppressLint
+import android.animation.Animator
+import android.animation.AnimatorListenerAdapter
import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
import android.view.MenuItem
-import androidx.navigation.NavController
-import androidx.navigation.Navigation.findNavController
-import androidx.navigation.fragment.NavHostFragment
-import androidx.navigation.ui.NavigationUI.setupWithNavController
+import android.view.View
+import androidx.fragment.app.Fragment
+import androidx.fragment.app.FragmentManager
+import androidx.fragment.app.FragmentManager.POP_BACK_STACK_INCLUSIVE
+import androidx.preference.Preference
+import androidx.preference.PreferenceFragmentCompat
import com.airbnb.lottie.LottieCompositionFactory
import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Dynamic
import com.drdisagree.iconify.common.Preferences
-import com.drdisagree.iconify.common.Preferences.FORCE_RELOAD_OVERLAY_STATE
-import com.drdisagree.iconify.common.Preferences.FORCE_RELOAD_PACKAGE_NAME
import com.drdisagree.iconify.common.Preferences.MONET_ENGINE_SWITCH
import com.drdisagree.iconify.common.Preferences.ON_HOME_PAGE
-import com.drdisagree.iconify.config.Prefs
+import com.drdisagree.iconify.common.Resources.searchConfiguration
+import com.drdisagree.iconify.common.Resources.searchableFragments
import com.drdisagree.iconify.config.RPrefs
-import com.drdisagree.iconify.databinding.ActivityHomePageBinding
+import com.drdisagree.iconify.databinding.ActivityMainBinding
import com.drdisagree.iconify.ui.base.BaseActivity
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
import com.drdisagree.iconify.ui.events.ColorDismissedEvent
import com.drdisagree.iconify.ui.events.ColorSelectedEvent
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
+import com.drdisagree.iconify.ui.fragments.home.Home
+import com.drdisagree.iconify.ui.fragments.settings.Settings
+import com.drdisagree.iconify.ui.fragments.tweaks.Tweaks
+import com.drdisagree.iconify.ui.fragments.xposed.Xposed
+import com.drdisagree.iconify.ui.preferences.preferencesearch.SearchPreferenceFragment
+import com.drdisagree.iconify.ui.preferences.preferencesearch.SearchPreferenceResult
+import com.drdisagree.iconify.ui.preferences.preferencesearch.SearchPreferenceResultListener
+import com.drdisagree.iconify.ui.utils.FragmentHelper.isInGroup
+import com.drdisagree.iconify.utils.HapticUtils.weakVibrate
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
import com.jaredrummler.android.colorpicker.ColorPickerDialog
import com.jaredrummler.android.colorpicker.ColorPickerDialogListener
-import com.topjohnwu.superuser.Shell
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.launch
import org.greenrobot.eventbus.EventBus
+import java.util.UUID
-class MainActivity : BaseActivity(), ColorPickerDialogListener {
+class MainActivity : BaseActivity(),
+ PreferenceFragmentCompat.OnPreferenceStartFragmentCallback,
+ SearchPreferenceResultListener,
+ ColorPickerDialogListener {
- private lateinit var binding: ActivityHomePageBinding
- private var selectedFragment: Int? = null
- private var colorPickerDialog: ColorPickerDialog.Builder? = null
+ lateinit var binding: ActivityMainBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- binding = ActivityHomePageBinding.inflate(layoutInflater)
+ binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.getRoot())
- // Setup navigation
+ colorPickerDialog = ColorPickerDialog.newBuilder()
+
setupNavigation()
- Prefs.putBoolean(ON_HOME_PAGE, true)
+ setupSearchConfiguration()
+ RPrefs.putBoolean(ON_HOME_PAGE, true)
+
+ if (savedInstanceState == null) {
+ replaceFragment(
+ supportFragmentManager,
+ if (!Preferences.isXposedOnlyMode) Home() else Xposed()
+ )
+ }
+
+ initData()
+
+ setupFloatingActionButtons()
+ }
- Thread {
+ private fun initData() {
+ CoroutineScope(Dispatchers.IO).launch {
// Clear lottie cache
- LottieCompositionFactory.clearCache(this)
+ LottieCompositionFactory.clearCache(this@MainActivity)
// Get list of enabled overlays
- val enabledOverlays = OverlayUtil.enabledOverlayList
- for (overlay in enabledOverlays) {
- Prefs.putBoolean(overlay, true)
+ val enabledOverlays = OverlayUtils.enabledOverlayList
+ enabledOverlays.forEach { overlay ->
+ RPrefs.putBoolean(overlay, true)
}
- val fabricatedEnabledOverlays = FabricatedUtil.enabledOverlayList
- for (overlay in fabricatedEnabledOverlays) {
- Prefs.putBoolean("fabricated$overlay", true)
+ val fabricatedEnabledOverlays = FabricatedUtils.enabledOverlayList
+ fabricatedEnabledOverlays.forEach { overlay ->
+ if (!RPrefs.getBoolean("fabricated$overlay", false)) {
+ RPrefs.putBoolean("fabricated$overlay", true)
+ }
}
- Prefs.putBoolean(
+ RPrefs.putBoolean(
MONET_ENGINE_SWITCH,
enabledOverlays.contains("IconifyComponentME.overlay")
)
+ }
+ }
- val state =
- Shell.cmd(
- "[[ $(cmd overlay list | grep -o '\\[x\\] $FORCE_RELOAD_PACKAGE_NAME') ]] && echo 1 || echo 0"
- ).exec().out[0] == "1"
- RPrefs.putBoolean(FORCE_RELOAD_OVERLAY_STATE, state)
- }.start()
+ private fun setupFloatingActionButtons() {
+ binding.hideAll.hide()
+ binding.restartSystemui.hide()
+ binding.restartDevice.hide()
+ binding.pendingActions.shrink()
- colorPickerDialog = ColorPickerDialog.newBuilder()
+ showOrHidePendingActionButton(
+ activityBinding = binding,
+ requiresSystemUiRestart = Dynamic.requiresSystemUiRestart,
+ requiresDeviceRestart = Dynamic.requiresDeviceRestart
+ )
+
+ binding.pendingActions.setOnClickListener {
+ binding.pendingActions.weakVibrate()
+ showOrHideFabButtons()
+ }
+
+ binding.hideAll.setOnClickListener {
+ binding.hideAll.weakVibrate()
+
+ Dynamic.requiresSystemUiRestart = false
+ Dynamic.requiresDeviceRestart = false
+
+ showOrHidePendingActionButton(
+ activityBinding = binding,
+ requiresSystemUiRestart = false,
+ requiresDeviceRestart = false
+ )
+ }
+
+ binding.restartSystemui.setOnClickListener {
+ binding.restartSystemui.weakVibrate()
+
+ Dynamic.requiresSystemUiRestart = false
+
+ showOrHidePendingActionButton(
+ activityBinding = binding,
+ requiresSystemUiRestart = false,
+ requiresDeviceRestart = Dynamic.requiresDeviceRestart
+ )
+
+ Handler(Looper.getMainLooper()).postDelayed({
+ SystemUtils.restartSystemUI()
+ }, 500)
+ }
+
+ binding.restartDevice.setOnClickListener {
+ binding.restartDevice.weakVibrate()
+
+ Dynamic.requiresDeviceRestart = false
+
+ showOrHidePendingActionButton(
+ activityBinding = binding,
+ requiresSystemUiRestart = Dynamic.requiresSystemUiRestart,
+ requiresDeviceRestart = false
+ )
+
+ Handler(Looper.getMainLooper()).postDelayed({
+ SystemUtils.restartDevice()
+ }, android.R.integer.config_longAnimTime.toLong())
+ }
}
private fun setupNavigation() {
- val navHostFragment =
- supportFragmentManager.findFragmentById(R.id.fragmentContainerView) as NavHostFragment?
- ?: return
- val navController = navHostFragment.navController
-
if (Preferences.isXposedOnlyMode) {
- navController.setGraph(R.navigation.nav_xposed_menu)
binding.bottomNavigationView.menu.clear()
binding.bottomNavigationView.inflateMenu(R.menu.bottom_nav_menu_xposed_only)
}
- setupWithNavController(binding.bottomNavigationView, navController)
+ supportFragmentManager.addOnBackStackChangedListener {
+ val fragment = getTopFragment()
+ val xposedOnlyMode = Preferences.isXposedOnlyMode
- binding.bottomNavigationView.setOnItemSelectedListener { item: MenuItem ->
- setFragment(item.itemId, navController, Preferences.isXposedOnlyMode)
- true
+ val homeIndex = 0
+ val tweaksIndex = 1
+ val xposedIndex = if (!xposedOnlyMode) 2 else 0
+ val settingsIndex = if (!xposedOnlyMode) 3 else 1
+
+ when {
+ isInGroup(fragment, homeIndex) && !xposedOnlyMode -> {
+ binding.bottomNavigationView.menu.getItem(homeIndex).setChecked(true)
+ }
+
+ isInGroup(fragment, tweaksIndex) && !xposedOnlyMode -> {
+ binding.bottomNavigationView.menu.getItem(tweaksIndex).setChecked(true)
+ }
+
+ isInGroup(fragment, xposedIndex) -> {
+ binding.bottomNavigationView.menu.getItem(xposedIndex).setChecked(true)
+ }
+
+ isInGroup(fragment, settingsIndex) -> {
+ binding.bottomNavigationView.menu.getItem(settingsIndex).setChecked(true)
+ }
+ }
}
- }
- @SuppressLint("NonConstantResourceId")
- private fun setFragment(itemId: Int, navController: NavController, isXposedOnlyMode: Boolean) {
- val currentDestination = navController.currentDestination ?: return
+ binding.bottomNavigationView.setOnItemSelectedListener { item ->
+ val fragmentTag: String = getTopFragmentTag()
+
+ when (item.itemId) {
+ R.id.homePage -> {
+ if (fragmentTag != Home::class.java.simpleName) {
+ replaceFragment(supportFragmentManager, Home())
+ binding.bottomNavigationView.weakVibrate()
+ }
+ return@setOnItemSelectedListener true
+ }
+
+ R.id.tweaks -> {
+ if (fragmentTag != Tweaks::class.java.simpleName) {
+ replaceFragment(supportFragmentManager, Tweaks())
+ binding.bottomNavigationView.weakVibrate()
+ }
+ return@setOnItemSelectedListener true
+ }
- if (isXposedOnlyMode) {
- when (itemId) {
- R.id.xposedMenu -> {
- if (currentDestination.id != itemId) {
- navController.popBackStack(navController.graph.startDestinationId, false)
- selectedFragment = itemId
+ R.id.xposed -> {
+ if (fragmentTag != Xposed::class.java.simpleName) {
+ replaceFragment(supportFragmentManager, Xposed())
+ binding.bottomNavigationView.weakVibrate()
}
+ return@setOnItemSelectedListener true
}
R.id.settings -> {
- if (currentDestination.id != itemId) {
- navController.popBackStack(navController.graph.startDestinationId, false)
- findNavController(
- this,
- R.id.fragmentContainerView
- ).navigate(R.id.action_xposedMenu_to_settings2)
- selectedFragment = itemId
+ if (fragmentTag != Settings::class.java.simpleName) {
+ replaceFragment(supportFragmentManager, Settings())
+ binding.bottomNavigationView.weakVibrate()
}
+ return@setOnItemSelectedListener true
+ }
+
+ else -> {
+ return@setOnItemSelectedListener false
}
}
- return
}
+ }
- when (itemId) {
- R.id.homePage -> {
- if (currentDestination.id != itemId) {
- navController.popBackStack(navController.graph.startDestinationId, false)
- selectedFragment = itemId
- }
+ private fun showOrHideFabButtons() {
+ try {
+ val pendingActionsShown = binding.pendingActions.isShown
+ var isAnyButtonShown: Boolean
+
+ if (!binding.hideAll.isShown && pendingActionsShown) {
+ binding.hideAll.show()
+ binding.hideAllText.fadeIn()
+ isAnyButtonShown = true
+ } else {
+ binding.hideAll.hide()
+ binding.hideAllText.fadeOut()
+ isAnyButtonShown = false
}
- R.id.tweaks -> {
- if (currentDestination.id != itemId) {
- navController.popBackStack(navController.graph.startDestinationId, false)
- findNavController(
- this,
- R.id.fragmentContainerView
- ).navigate(R.id.action_home2_to_tweaks)
- selectedFragment = itemId
- }
+ if (!binding.restartSystemui.isShown && Dynamic.requiresSystemUiRestart && pendingActionsShown) {
+ binding.restartSystemui.show()
+ binding.restartSystemuiText.fadeIn()
+ isAnyButtonShown = true
+ } else {
+ binding.restartSystemui.hide()
+ binding.restartSystemuiText.fadeOut()
+ isAnyButtonShown = isAnyButtonShown || false
}
- R.id.settings -> {
- if (currentDestination.id != itemId) {
- navController.popBackStack(navController.graph.startDestinationId, false)
- findNavController(
- this,
- R.id.fragmentContainerView
- ).navigate(R.id.action_home2_to_settings)
- selectedFragment = itemId
- }
+ if (!binding.restartDevice.isShown && Dynamic.requiresDeviceRestart && pendingActionsShown) {
+ binding.restartDevice.show()
+ binding.restartDeviceText.fadeIn()
+ isAnyButtonShown = true
+ } else {
+ binding.restartDevice.hide()
+ binding.restartDeviceText.fadeOut()
+ isAnyButtonShown = isAnyButtonShown || false
+ }
+
+ if (isAnyButtonShown) {
+ binding.pendingActions.extend()
+ } else {
+ binding.pendingActions.shrink()
+ }
+ } catch (_: Exception) {
+ }
+ }
+
+ private fun setupSearchConfiguration() {
+ searchConfiguration.apply {
+ setActivity(this@MainActivity)
+ setFragmentContainerViewId(R.id.fragmentContainerView)
+
+ searchableFragments.forEach {
+ index(it.xml).addBreadcrumb(resources.getString(it.title))
}
+
+ setBreadcrumbsEnabled(true)
+ setHistoryEnabled(true)
+ setFuzzySearchEnabled(false)
+ }
+ }
+
+ private fun getTopFragment(): Fragment {
+ val last: Int = supportFragmentManager.fragments.size - 1
+
+ if (last >= 0) {
+ return supportFragmentManager.fragments[last]
}
+
+ return Home()
+ }
+
+ private fun getTopFragmentTag(): String {
+ return getTopFragment().tag ?: UUID.randomUUID().toString()
}
fun showColorPickerDialog(
@@ -158,7 +322,7 @@ class MainActivity : BaseActivity(), ColorPickerDialogListener {
showAlphaSlider: Boolean,
showColorShades: Boolean
) {
- colorPickerDialog!!.setDialogStyle(R.style.ColorPicker)
+ colorPickerDialog
.setColor(defaultColor)
.setDialogType(ColorPickerDialog.TYPE_CUSTOM)
.setAllowCustom(false)
@@ -167,19 +331,7 @@ class MainActivity : BaseActivity(), ColorPickerDialogListener {
.setShowAlphaSlider(showAlphaSlider)
.setShowColorShades(showColorShades)
- colorPickerDialog!!.show(this)
- }
-
- override fun onSaveInstanceState(outState: Bundle) {
- super.onSaveInstanceState(outState)
-
- if (selectedFragment != null) outState.putInt(DATA_KEY, selectedFragment!!)
- }
-
- public override fun onRestoreInstanceState(savedInstanceState: Bundle) {
- super.onRestoreInstanceState(savedInstanceState)
-
- selectedFragment = savedInstanceState.getInt(DATA_KEY)
+ colorPickerDialog.show(this)
}
override fun onColorSelected(dialogId: Int, color: Int) {
@@ -190,12 +342,205 @@ class MainActivity : BaseActivity(), ColorPickerDialogListener {
EventBus.getDefault().post(ColorDismissedEvent(dialogId))
}
- override fun onSupportNavigateUp(): Boolean {
- val navController = findNavController(this, R.id.fragmentContainerView)
- return navController.navigateUp() || super.onSupportNavigateUp()
+ @Suppress("deprecation")
+ override fun onPreferenceStartFragment(
+ caller: PreferenceFragmentCompat,
+ pref: Preference
+ ): Boolean {
+ replaceFragment(
+ supportFragmentManager,
+ supportFragmentManager.fragmentFactory.instantiate(
+ classLoader, pref.fragment!!
+ ).apply {
+ arguments = pref.extras
+ setTargetFragment(caller, 0)
+ }
+ )
+ return true
+ }
+
+ override fun onSearchResultClicked(result: SearchPreferenceResult) {
+ Handler(mainLooper).post {
+ val lastFragment = getLastFragment(supportFragmentManager, excludeSearchFragment = true)
+
+ (lastFragment as? BaseFragment)?.onSearchResultClicked(result)
+ ?: (lastFragment as? ControlledPreferenceFragmentCompat)
+ ?.onSearchResultClicked(result)
+ }
+ }
+
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ val itemID = item.itemId
+
+ if (itemID == android.R.id.home) {
+ onBackPressedDispatcher.onBackPressed()
+ return true
+ }
+
+ return false
}
companion object {
- private const val DATA_KEY = "mDataKey"
+ private lateinit var colorPickerDialog: ColorPickerDialog.Builder
+
+ fun replaceFragment(fragmentManager: FragmentManager, fragment: Fragment) {
+ if (fragmentManager.isStateSaved) return
+
+ try {
+ val fragmentTag = fragment.javaClass.simpleName
+ var currentFragment = fragmentManager.findFragmentById(R.id.fragmentContainerView)
+
+ if (currentFragment != null &&
+ currentFragment.javaClass.simpleName == SearchPreferenceFragment::class.java.simpleName
+ ) {
+ fragmentManager.popBackStack()
+ currentFragment = fragmentManager.findFragmentById(R.id.fragmentContainerView)
+ }
+
+ if (currentFragment != null &&
+ currentFragment.javaClass.simpleName == fragmentTag
+ ) {
+ popCurrentFragment(fragmentManager)
+ }
+
+ for (i in 0 until fragmentManager.backStackEntryCount) {
+ if (fragmentManager.getBackStackEntryAt(i).name == fragmentTag) {
+ fragmentManager.popBackStack(
+ fragmentTag,
+ POP_BACK_STACK_INCLUSIVE
+ )
+ break
+ }
+ }
+
+ fragmentManager.beginTransaction().apply {
+ setCustomAnimations(
+ R.anim.fragment_fade_in,
+ R.anim.fragment_fade_out,
+ R.anim.fragment_fade_in,
+ R.anim.fragment_fade_out
+ )
+
+ replace(R.id.fragmentContainerView, fragment, fragmentTag)
+
+ when (fragmentTag) {
+ Home::class.java.simpleName -> {
+ fragmentManager.popBackStack(null, POP_BACK_STACK_INCLUSIVE)
+ }
+
+ Tweaks::class.java.simpleName,
+ Xposed::class.java.simpleName,
+ Settings::class.java.simpleName -> {
+ fragmentManager.popBackStack(null, POP_BACK_STACK_INCLUSIVE)
+ addToBackStack(fragmentTag)
+ }
+
+ else -> {
+ addToBackStack(fragmentTag)
+ }
+ }
+
+ commit()
+ }
+ } catch (ignored: IllegalStateException) {
+ }
+ }
+
+ @Suppress("SameParameterValue")
+ private fun getLastFragment(
+ fragmentManager: FragmentManager,
+ excludeSearchFragment: Boolean = false
+ ): Fragment? {
+ val index = fragmentManager.backStackEntryCount - 1
+ var backEntry = fragmentManager.getBackStackEntryAt(index)
+ var fragment = fragmentManager.findFragmentByTag(backEntry.name)
+
+ if (excludeSearchFragment && fragment is SearchPreferenceFragment) {
+ backEntry = fragmentManager.getBackStackEntryAt(index - 1)
+ fragment = fragmentManager.findFragmentByTag(backEntry.name)
+ }
+
+ return fragment
+ }
+
+ fun popCurrentFragment(fragmentManager: FragmentManager) {
+ if (fragmentManager.isStateSaved) return
+
+ fragmentManager.popBackStack()
+ }
+
+ fun showOrHidePendingActionButton(
+ activityBinding: ActivityMainBinding, // Pass the binding as a parameter
+ requiresSystemUiRestart: Boolean = Dynamic.requiresSystemUiRestart,
+ requiresDeviceRestart: Boolean = Dynamic.requiresDeviceRestart,
+ ) {
+ Dynamic.requiresSystemUiRestart =
+ requiresSystemUiRestart || Dynamic.requiresSystemUiRestart
+ Dynamic.requiresDeviceRestart = requiresDeviceRestart || Dynamic.requiresDeviceRestart
+
+ try {
+ with(activityBinding) {
+ if (!Dynamic.requiresSystemUiRestart && !Dynamic.requiresDeviceRestart) {
+ hideAll.hide()
+ hideAllText.fadeOut()
+ restartSystemui.hide()
+ restartSystemuiText.fadeOut()
+ restartDevice.hide()
+ restartDeviceText.fadeOut()
+ pendingActions.hide()
+ pendingActions.shrink()
+ } else {
+ if (hideAll.isShown && Dynamic.requiresSystemUiRestart && !restartSystemui.isShown) {
+ restartSystemui.show()
+ restartSystemuiText.fadeIn()
+ } else if (!Dynamic.requiresSystemUiRestart && restartSystemui.isShown) {
+ restartSystemui.hide()
+ restartSystemuiText.fadeOut()
+ }
+
+ if (hideAll.isShown && Dynamic.requiresDeviceRestart && !restartDevice.isShown) {
+ restartDevice.show()
+ restartDeviceText.fadeIn()
+ } else if (!Dynamic.requiresDeviceRestart && restartDevice.isShown) {
+ restartDevice.hide()
+ restartDeviceText.fadeOut()
+ }
+
+ if (!hideAll.isShown) {
+ pendingActions.shrink()
+ } else {
+ pendingActions.extend()
+ }
+
+ pendingActions.show()
+ }
+ }
+ } catch (_: Exception) {
+ }
+ }
+
+ private fun View.fadeIn(duration: Long = 300) {
+ this.apply {
+ alpha = 0f
+ visibility = View.VISIBLE
+ animate()
+ .alpha(1f)
+ .setDuration(duration)
+ .setListener(null)
+ }
+ }
+
+ private fun View.fadeOut(duration: Long = 300) {
+ this.apply {
+ animate()
+ .alpha(0f)
+ .setDuration(duration)
+ .setListener(object : AnimatorListenerAdapter() {
+ override fun onAnimationEnd(animation: Animator) {
+ visibility = View.GONE
+ }
+ })
+ }
+ }
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/BrightnessBarAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/BrightnessBarAdapter.kt
index 3420d8cf9..7015e73cb 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/BrightnessBarAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/BrightnessBarAdapter.kt
@@ -19,7 +19,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.drdisagree.iconify.Iconify
import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.config.Prefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getBoolean
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.models.BrightnessBarModel
import com.drdisagree.iconify.utils.overlay.manager.BrightnessBarManager
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ClockPreviewAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ClockPreviewAdapter.kt
index 4c667be92..ded2c5f28 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ClockPreviewAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ClockPreviewAdapter.kt
@@ -19,7 +19,7 @@ import com.drdisagree.iconify.common.Preferences.LSCLOCK_SWITCH
import com.drdisagree.iconify.config.RPrefs
import com.drdisagree.iconify.ui.models.ClockModel
import com.drdisagree.iconify.ui.utils.ViewBindingHelpers.setBitmapWithAnimation
-import com.drdisagree.iconify.utils.WallpaperUtil
+import com.drdisagree.iconify.utils.WallpaperUtils
import com.google.android.material.button.MaterialButton
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@@ -31,7 +31,8 @@ class ClockPreviewAdapter(
private val context: Context,
private val itemList: ArrayList,
prefSwitch: String?,
- prefStyle: String
+ prefStyle: String,
+ private val mOnStyleSelected: OnStyleSelected? = null
) : RecyclerView.Adapter() {
private val prefStyle: String
@@ -67,26 +68,19 @@ class ClockPreviewAdapter(
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
- val container: LinearLayout
- private val title: TextView
- private val clockContainer: LinearLayout
- val checkIcon: ImageView
- val button: MaterialButton
- private val wallpaperView: ImageView
-
- init {
- container = itemView.findViewById(R.id.clock_preview_child)
- title = itemView.findViewById(R.id.clock_title)
- clockContainer = itemView.findViewById(R.id.clock_view_container)
- checkIcon = itemView.findViewById(R.id.icon_selected)
- button = itemView.findViewById(R.id.btn_select_style)
- wallpaperView = itemView.findViewById(R.id.wallpaper_view)
- }
+ val container: LinearLayout = itemView.findViewById(R.id.clock_preview_child)
+ private val title: TextView = itemView.findViewById(R.id.clock_title)
+ private val clockContainer: LinearLayout = itemView.findViewById(R.id.clock_view_container)
+ val checkIcon: ImageView = itemView.findViewById(R.id.icon_selected)
+ val button: MaterialButton = itemView.findViewById(R.id.btn_select_style)
+ private val wallpaperView: ImageView = itemView.findViewById(R.id.wallpaper_view)
fun bind(model: ClockModel, position: Int) {
title.text = model.title
+
button.setOnClickListener {
RPrefs.putInt(prefStyle, position)
+ mOnStyleSelected?.onStyleSelected(position)
refreshLayout(this)
}
@@ -155,10 +149,8 @@ class ClockPreviewAdapter(
fun loadWallpaper(adapter: ClockPreviewAdapter) {
CoroutineScope(Dispatchers.Main).launch {
val bitmap = withContext(Dispatchers.IO) {
- val context = adapter.context
-
- WallpaperUtil.getCompressedWallpaper(
- context,
+ WallpaperUtils.getCompressedWallpaper(
+ adapter.context,
80,
if (prefSwitch == LSCLOCK_SWITCH) {
WallpaperManager.FLAG_LOCK
@@ -175,6 +167,15 @@ class ClockPreviewAdapter(
}
}
+ interface OnStyleSelected {
+ /**
+ * Interface for style selection
+ * @param position The position of the selected style,
+ * in our case is the num of the layout
+ */
+ fun onStyleSelected(position: Int)
+ }
+
companion object {
private var prefSwitch: String? = null
private var wallpaperBitmap: Bitmap? = null
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconPackAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconPackAdapter.kt
index bbd36456f..8d131d9c0 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconPackAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconPackAdapter.kt
@@ -15,43 +15,77 @@ import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
-import com.drdisagree.iconify.Iconify
import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.config.Prefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getBoolean
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.models.IconPackModel
-import com.drdisagree.iconify.utils.overlay.manager.IconPackManager
class IconPackAdapter(
var context: Context,
private var itemList: ArrayList,
- var loadingDialog: LoadingDialog
+ var loadingDialog: LoadingDialog,
+ private var componentName: String,
+ private var onButtonClick: OnButtonClick? = null
) : RecyclerView.Adapter() {
private var iconPackKeys = ArrayList()
private var linearLayoutManager: LinearLayoutManager? = null
private var selectedItem = -1
+ private var mComponentName = componentName
+
+ constructor(
+ context: Context,
+ itemList: ArrayList,
+ loadingDialog: LoadingDialog,
+ compName: String
+ ) : this(context, itemList, loadingDialog, compName, null)
init {
// Preference key
- for (i in 1..itemList.size) iconPackKeys.add("IconifyComponentIPAS$i.overlay")
+ for (i in 1..itemList.size) iconPackKeys.add(
+ itemList[i - 1].packageName.takeIf { !it.isNullOrEmpty() }
+ ?: "IconifyComponent${mComponentName}${i}.overlay"
+ )
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
- val view =
- LayoutInflater.from(context).inflate(R.layout.view_list_option_iconpack, parent, false)
+ val view = LayoutInflater.from(context).inflate(
+ R.layout.view_list_option_iconpack,
+ parent,
+ false
+ )
return ViewHolder(view)
}
-
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.styleName.text = itemList[position].name
- holder.desc.text = context.resources.getString(itemList[position].desc)
- holder.icon1.setImageResource(itemList[position].icon1)
- holder.icon2.setImageResource(itemList[position].icon2)
- holder.icon3.setImageResource(itemList[position].icon3)
- holder.icon4.setImageResource(itemList[position].icon4)
+ if (itemList[position].desc != 0x0) {
+ holder.desc.visibility = View.VISIBLE
+ holder.desc.text = context.resources.getString(itemList[position].desc)
+ } else
+ holder.desc.visibility = View.GONE
+
+ if (itemList[position].icon1 != 0x0) {
+ holder.icon1.setImageResource(itemList[position].icon1)
+ } else if (itemList[position].drawableIcon1 != null) {
+ holder.icon1.setImageDrawable(itemList[position].drawableIcon1)
+ }
+ if (itemList[position].icon2 != 0x0) {
+ holder.icon2.setImageResource(itemList[position].icon2)
+ } else if (itemList[position].drawableIcon2 != null) {
+ holder.icon2.setImageDrawable(itemList[position].drawableIcon2)
+ }
+ if (itemList[position].icon1 != 0x0) {
+ holder.icon3.setImageResource(itemList[position].icon3)
+ } else if (itemList[position].drawableIcon3 != null) {
+ holder.icon3.setImageDrawable(itemList[position].drawableIcon3)
+ }
+ if (itemList[position].icon4 != 0x0) {
+ holder.icon4.setImageResource(itemList[position].icon4)
+ } else if (itemList[position].drawableIcon4 != null) {
+ holder.icon4.setImageDrawable(itemList[position].drawableIcon4)
+ }
refreshButton(holder)
enableOnClickListener(holder)
@@ -110,7 +144,12 @@ class IconPackAdapter(
loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait))
Thread {
- IconPackManager.enableOverlay(holder.getBindingAdapterPosition() + 1)
+ if (onButtonClick != null) {
+ onButtonClick!!.onEnableClick(
+ holder.bindingAdapterPosition,
+ itemList[holder.bindingAdapterPosition]
+ )
+ }
(context as Activity).runOnUiThread {
Handler(Looper.getMainLooper()).postDelayed({
@@ -139,7 +178,12 @@ class IconPackAdapter(
loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait))
Thread {
- IconPackManager.disableOverlay(holder.getBindingAdapterPosition() + 1)
+ if (onButtonClick != null) {
+ onButtonClick!!.onDisableClick(
+ holder.bindingAdapterPosition,
+ itemList[holder.bindingAdapterPosition]
+ )
+ }
(context as Activity).runOnUiThread {
Handler(Looper.getMainLooper()).postDelayed({
@@ -254,26 +298,23 @@ class IconPackAdapter(
class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
- var container: LinearLayout
- var styleName: TextView
- var desc: TextView
- var icon1: ImageView
- var icon2: ImageView
- var icon3: ImageView
- var icon4: ImageView
- var btnEnable: Button
- var btnDisable: Button
-
- init {
- container = itemView.findViewById(R.id.icon_pack_child)
- styleName = itemView.findViewById(R.id.iconpack_title)
- desc = itemView.findViewById(R.id.iconpack_desc)
- icon1 = itemView.findViewById(R.id.iconpack_preview1)
- icon2 = itemView.findViewById(R.id.iconpack_preview2)
- icon3 = itemView.findViewById(R.id.iconpack_preview3)
- icon4 = itemView.findViewById(R.id.iconpack_preview4)
- btnEnable = itemView.findViewById(R.id.enable_iconpack)
- btnDisable = itemView.findViewById(R.id.disable_iconpack)
- }
+ var container: LinearLayout = itemView.findViewById(R.id.icon_pack_child)
+ var styleName: TextView = itemView.findViewById(R.id.iconpack_title)
+ var desc: TextView = itemView.findViewById(R.id.iconpack_desc)
+ var icon1: ImageView = itemView.findViewById(R.id.iconpack_preview1)
+ var icon2: ImageView = itemView.findViewById(R.id.iconpack_preview2)
+ var icon3: ImageView = itemView.findViewById(R.id.iconpack_preview3)
+ var icon4: ImageView = itemView.findViewById(R.id.iconpack_preview4)
+ var btnEnable: Button = itemView.findViewById(R.id.enable_iconpack)
+ var btnDisable: Button = itemView.findViewById(R.id.disable_iconpack)
}
+
+ /**
+ * Interface for the click on the item
+ */
+ interface OnButtonClick {
+ fun onEnableClick(position: Int, item: IconPackModel)
+ fun onDisableClick(position: Int, item: IconPackModel)
+ }
+
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconShapeAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconShapeAdapter.kt
new file mode 100644
index 000000000..7c084db69
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconShapeAdapter.kt
@@ -0,0 +1,100 @@
+package com.drdisagree.iconify.ui.adapters
+
+import android.content.Context
+import android.content.res.ColorStateList
+import android.view.LayoutInflater
+import android.view.ViewGroup
+import androidx.annotation.ColorInt
+import androidx.core.content.ContextCompat
+import androidx.recyclerview.widget.RecyclerView
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.SELECTED_ICON_SHAPE
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.databinding.ViewIconShapeBinding
+import com.drdisagree.iconify.databinding.ViewToastFrameBinding
+import com.drdisagree.iconify.ui.models.IconShapeModel
+
+class IconShapeAdapter (
+ var context: Context,
+ private var itemList: ArrayList,
+ private var iconShapeClick: OnShapeClick
+) : RecyclerView.Adapter() {
+
+ private var selected = RPrefs.getInt(SELECTED_ICON_SHAPE, -1)
+ @ColorInt
+ val colorBackground = appContextLocale.resources.getColor(
+ R.color.colorBackground,
+ appContext.theme
+ )
+ @ColorInt
+ val colorSuccess = appContextLocale.resources.getColor(
+ R.color.colorSuccess,
+ appContext.theme
+ )
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
+ val binding: ViewIconShapeBinding =
+ ViewIconShapeBinding.inflate(LayoutInflater.from(parent.context), parent, false)
+ if (selected != -1) {
+ itemList[selected].selected = true
+ } else {
+ itemList[0].selected = true
+ }
+ return ViewHolder(binding)
+ }
+
+ override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+ val model = itemList[holder.bindingAdapterPosition]
+ holder.binding.shapeName.text = appContextLocale.resources.getString(model.title)
+ holder.binding.maskShapeBg.background = ContextCompat.getDrawable(appContext, model.style)
+ holder.binding.maskShapeFg.background = ContextCompat.getDrawable(appContext, model.style)
+ holder.binding.maskShapeFg.setBackgroundTintList(ColorStateList.valueOf(colorBackground))
+ if (model.selected) {
+ holder.binding.shapeName.setTextColor(colorSuccess)
+ holder.binding.maskShapeBg.setBackgroundTintList(ColorStateList.valueOf(colorSuccess))
+ } else {
+ holder.binding.shapeName.setTextColor(
+ appContextLocale.resources.getColor(
+ R.color.textColorSecondary,
+ appContext.theme
+ )
+ )
+ }
+ holder.binding.listItemShape.setOnClickListener {
+ iconShapeClick.onShapeClick(holder.bindingAdapterPosition, model)
+ }
+ }
+
+ fun notifyChange() {
+ refresh(false)
+ selected = RPrefs.getInt(SELECTED_ICON_SHAPE, -1)
+ refresh(true)
+ }
+
+ private fun refresh(select: Boolean) {
+ if (selected != -1) {
+ itemList[selected].selected = select
+ notifyItemChanged(selected)
+ } else {
+ itemList[0].selected = select
+ notifyItemChanged(0)
+ }
+ }
+
+ override fun getItemCount(): Int {
+ return itemList.size
+ }
+
+ class ViewHolder(val binding: ViewIconShapeBinding) : RecyclerView.ViewHolder(binding.getRoot()) {
+ }
+
+ /**
+ * Interface for the click on the item
+ */
+ interface OnShapeClick {
+ fun onShapeClick(position: Int, item: IconShapeModel)
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconsAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconsAdapter.kt
index 9ba682989..405db66a0 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconsAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconsAdapter.kt
@@ -10,14 +10,21 @@ import androidx.recyclerview.widget.RecyclerView
import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.R
import com.drdisagree.iconify.databinding.ViewListIconItemBinding
+import com.drdisagree.iconify.databinding.ViewListOptionWeatherIconsBinding
class IconsAdapter(
private val mEntries: Array,
private val mEntryValues: Array,
private var mValue: String,
+ private val mAdapterType: Int,
private val onItemClickListener: OnItemClickListener
) : RecyclerView.Adapter() {
+ companion object {
+ const val ICONS_ADAPTER = 0
+ const val WEATHER_ICONS_ADAPTER = 1
+ }
+
private var mEntryDrawables: Array? = null
private var mEntryResIds: IntArray? = null
@@ -39,17 +46,47 @@ class IconsAdapter(
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
- return IconsViewHolder(
- ViewListIconItemBinding.inflate(
- LayoutInflater.from(parent.context),
- parent,
- false
- )
- )
+ when (mAdapterType) {
+ ICONS_ADAPTER -> {
+ return IconsViewHolder(
+ ViewListIconItemBinding.inflate(
+ LayoutInflater.from(parent.context),
+ parent,
+ false
+ )
+ )
+ }
+
+ WEATHER_ICONS_ADAPTER -> {
+ return WeatherIconsViewHolder(
+ ViewListOptionWeatherIconsBinding.inflate(
+ LayoutInflater.from(parent.context),
+ parent,
+ false
+ )
+ )
+ }
+
+ else -> {
+ throw IllegalStateException(javaClass.getSimpleName() + " - No adapter type provided")
+ }
+ }
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
- (holder as IconsViewHolder).binding.typeTitle.text = mEntries[position]
+ when (mAdapterType) {
+ ICONS_ADAPTER -> {
+ bindIconsViewHolder(holder as IconsViewHolder, position)
+ }
+
+ WEATHER_ICONS_ADAPTER -> {
+ bindWeatherIconsViewHolder(holder as WeatherIconsViewHolder, position)
+ }
+ }
+ }
+
+ private fun bindIconsViewHolder(holder: IconsViewHolder, position: Int) {
+ holder.binding.typeTitle.text = mEntries[position]
if (mEntryDrawables != null) {
holder.binding.batteryIcon.setImageDrawable(mEntryDrawables!![position])
@@ -81,6 +118,39 @@ class IconsAdapter(
}
}
+ private fun bindWeatherIconsViewHolder(holder: WeatherIconsViewHolder, position: Int) {
+ holder.binding.text.text = mEntries[position]
+
+ if (mEntryDrawables != null) {
+ holder.binding.image.setImageDrawable(mEntryDrawables!![position])
+ } else if (mEntryResIds != null) {
+ holder.binding.image.setImageDrawable(
+ ContextCompat.getDrawable(
+ holder.binding.getRoot().context,
+ mEntryResIds!![position]
+ )
+ )
+ } else {
+ throw IllegalStateException(javaClass.getSimpleName() + " - No icons provided")
+ }
+
+ if (mEntryValues[position].toString().contentEquals(mValue)) {
+ holder.binding.rootLayout.strokeColor = appContext.getColor(R.color.colorAccent)
+ } else {
+ holder.binding.rootLayout.strokeColor = Color.TRANSPARENT
+ }
+
+ holder.binding.rootLayout.setOnClickListener { v: View ->
+ val previousPosition = mEntryValues.indexOf(mValue)
+ mValue = mEntryValues[position].toString()
+
+ notifyItemChanged(previousPosition)
+ notifyItemChanged(position)
+
+ onItemClickListener.onItemClick(v, position)
+ }
+ }
+
override fun getItemCount(): Int {
return mEntries.size
}
@@ -94,6 +164,11 @@ class IconsAdapter(
binding.getRoot()
)
+ class WeatherIconsViewHolder internal constructor(val binding: ViewListOptionWeatherIconsBinding) :
+ RecyclerView.ViewHolder(
+ binding.getRoot()
+ )
+
/**
* Interface for the click on the item
*/
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/InfoAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/InfoAdapter.kt
index 6af6265af..c737907ee 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/InfoAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/InfoAdapter.kt
@@ -45,19 +45,19 @@ class InfoAdapter(
@SuppressLint("DiscouragedApi")
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
if (holder is HeaderViewHolder) {
- holder.header.text = itemList[position].getTitle()
+ holder.header.text = itemList[position].title
- if (itemList[position].getTitle() == "") {
+ if (itemList[position].title == "") {
holder.itemView.visibility = View.GONE
holder.itemView.setLayoutParams(RecyclerView.LayoutParams(0, 0))
}
} else if (holder is ItemViewHolder) {
- holder.icon.setImageResource(itemList[position].getIcon())
- holder.title.text = itemList[position].getTitle()
- holder.desc.text = itemList[position].getDesc()
- holder.container.setOnClickListener(itemList[position].getOnClickListener())
+ holder.icon.setImageResource(itemList[position].icon)
+ holder.title.text = itemList[position].title
+ holder.desc.text = itemList[position].desc
+ holder.container.setOnClickListener(itemList[position].onClickListener)
- val drawableName = context.resources.getResourceEntryName(itemList[position].getIcon())
+ val drawableName = context.resources.getResourceEntryName(itemList[position].icon)
val typedValue = TypedValue()
context.theme.resolveAttribute(
@@ -85,26 +85,15 @@ class InfoAdapter(
internal class HeaderViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
- var header: TextView
-
- init {
- header = itemView.findViewById(R.id.list_info_header)
- }
+ var header: TextView = itemView.findViewById(R.id.list_info_header)
}
internal class ItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
- var icon: ImageView
- var title: TextView
- var desc: TextView
- var container: RelativeLayout
-
- init {
- icon = itemView.findViewById(R.id.icon)
- title = itemView.findViewById(R.id.title)
- desc = itemView.findViewById(R.id.desc)
- container = itemView.findViewById(R.id.list_info_item)
- }
+ var icon: ImageView = itemView.findViewById(R.id.icon)
+ var title: TextView = itemView.findViewById(R.id.title)
+ var desc: TextView = itemView.findViewById(R.id.desc)
+ var container: RelativeLayout = itemView.findViewById(R.id.list_info_item)
}
companion object {
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ListPreferenceAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ListPreferenceAdapter.kt
new file mode 100644
index 000000000..32bc07742
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ListPreferenceAdapter.kt
@@ -0,0 +1,169 @@
+package com.drdisagree.iconify.ui.adapters
+
+import android.graphics.Color
+import android.graphics.drawable.Drawable
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.core.content.ContextCompat
+import androidx.recyclerview.widget.RecyclerView
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.databinding.PreferenceListItemBinding
+import com.drdisagree.iconify.databinding.ViewListIconItemBinding
+
+class ListPreferenceAdapter : RecyclerView.Adapter {
+ private var mResImages: List = ArrayList()
+ private val mEntries: Array
+ private val mEntryValues: Array
+ private val mEntryIcons: IntArray?
+ private val mEntryDrawables: Array?
+ private val mKey: String
+ private val mHasImage: Boolean
+ private var onItemClickListener: OnItemClickListener
+ private var mValue: String? = null
+ var type: Int = DEFAULT_TYPE
+ private var prevPos: Int = -1
+
+ constructor(
+ entries: Array,
+ entryValues: Array,
+ entryIcons: IntArray?,
+ key: String,
+ hasImage: Boolean,
+ onItemClickListener: OnItemClickListener
+ ) {
+ this.mEntries = entries
+ this.mEntryValues = entryValues
+ this.mEntryIcons = entryIcons
+ this.mEntryDrawables = null
+ this.mKey = key
+ this.mHasImage = hasImage
+ this.onItemClickListener = onItemClickListener
+ this.type = DEFAULT_TYPE
+ }
+
+ constructor(
+ entries: Array,
+ entryValues: Array,
+ entryDrawables: Array,
+ key: String,
+ hasImage: Boolean,
+ onItemClickListener: OnItemClickListener
+ ) {
+ this.mEntries = entries
+ this.mEntryValues = entryValues
+ this.mEntryDrawables = entryDrawables
+ this.mEntryIcons = null
+ this.mKey = key
+ this.mHasImage = hasImage
+ this.onItemClickListener = onItemClickListener
+ this.type = DEFAULT_TYPE
+ }
+
+ fun setListener(onItemClickListener: OnItemClickListener) {
+ this.onItemClickListener = onItemClickListener
+ }
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
+ mValue = RPrefs.getString(mKey, "")
+ val binding: PreferenceListItemBinding =
+ PreferenceListItemBinding.inflate(LayoutInflater.from(parent.context), parent, false)
+ val batteryIconOptionsBinding: ViewListIconItemBinding =
+ ViewListIconItemBinding.inflate(LayoutInflater.from(parent.context), parent, false)
+ return if (type == TYPE_BATTERY_ICONS) {
+ BatteryIconsViewHolder(batteryIconOptionsBinding)
+ } else {
+ ViewHolder(binding)
+ }
+ }
+
+ override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
+ if (type == TYPE_BATTERY_ICONS) {
+ (holder as BatteryIconsViewHolder).binding.typeTitle.text = mEntries[holder.bindingAdapterPosition]
+
+ if (mHasImage) {
+ if (mEntryDrawables != null) holder.binding.batteryIcon.setImageDrawable(
+ mEntryDrawables[holder.bindingAdapterPosition]
+ )
+ else holder.binding.batteryIcon.setImageDrawable(
+ ContextCompat.getDrawable(
+ holder.binding.getRoot().context,
+ mEntryIcons!![holder.bindingAdapterPosition]
+ )
+ )
+ } else holder.binding.batteryIcon.setVisibility(View.GONE)
+
+ if (mEntryValues[holder.bindingAdapterPosition].toString().contentEquals(mValue)) {
+ prevPos = holder.bindingAdapterPosition
+ holder.binding.rootLayout.strokeColor = appContext.getColor(R.color.colorAccent)
+ } else {
+ holder.binding.rootLayout.strokeColor = Color.TRANSPARENT
+ }
+
+ holder.binding.rootLayout.setOnClickListener { v ->
+ onItemClickListener.onItemClick(v, holder.bindingAdapterPosition)
+ mValue = mEntryValues[holder.bindingAdapterPosition].toString()
+ notifyItemChanged(prevPos)
+ notifyItemChanged(holder.bindingAdapterPosition)
+ }
+ } else {
+ (holder as ViewHolder).binding.text.text = mEntries[holder.bindingAdapterPosition]
+ if (mHasImage) {
+ if (mEntryIcons != null && mEntryIcons.isNotEmpty()) holder.binding.image.setImageDrawable(
+ ContextCompat.getDrawable(
+ holder.binding.getRoot().context,
+ mEntryIcons[holder.bindingAdapterPosition]
+ )
+ )
+ else if (!mEntryDrawables.isNullOrEmpty()) holder.binding.image.setImageDrawable(
+ mEntryDrawables[holder.bindingAdapterPosition]
+ )
+ } else holder.binding.image.setVisibility(View.GONE)
+
+ if (mEntryValues[holder.bindingAdapterPosition].toString().contentEquals(mValue)) {
+ prevPos = holder.bindingAdapterPosition
+ holder.binding.rootLayout.strokeColor =
+ appContext.getColor(R.color.colorAccent)
+ } else {
+ holder.binding.rootLayout.strokeColor = Color.TRANSPARENT
+ }
+
+ holder.binding.rootLayout.setOnClickListener { v ->
+ onItemClickListener.onItemClick(v, holder.bindingAdapterPosition)
+ mValue = mEntryValues[holder.bindingAdapterPosition].toString()
+ notifyItemChanged(prevPos)
+ notifyItemChanged(holder.bindingAdapterPosition)
+ }
+ }
+ }
+
+ override fun getItemCount(): Int {
+ return mEntries.size
+ }
+
+ fun setImages(images: List) {
+ mResImages = images
+ }
+
+ class ViewHolder internal constructor(val binding: PreferenceListItemBinding) :
+ RecyclerView.ViewHolder(binding.getRoot()) {
+ }
+
+ class BatteryIconsViewHolder internal constructor(val binding: ViewListIconItemBinding) :
+ RecyclerView.ViewHolder(binding.getRoot()) {
+ }
+
+ /**
+ * Interface for the click on the item
+ */
+ interface OnItemClickListener {
+ fun onItemClick(view: View?, position: Int)
+ }
+
+ companion object {
+ const val DEFAULT_TYPE: Int = 0
+ const val TYPE_BATTERY_ICONS: Int = 2
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/MenuAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/MenuAdapter.kt
index 8b0251cf6..0ec75e913 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/MenuAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/MenuAdapter.kt
@@ -3,12 +3,14 @@ package com.drdisagree.iconify.ui.adapters
import android.content.Context
import android.view.View
import android.view.ViewGroup
-import androidx.navigation.Navigation.findNavController
+import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.RecyclerView
+import com.drdisagree.iconify.ui.activities.MainActivity.Companion.replaceFragment
import com.drdisagree.iconify.ui.models.MenuModel
import com.drdisagree.iconify.ui.widgets.MenuWidget
class MenuAdapter(
+ private var fragmentManager: FragmentManager,
var context: Context,
private var itemList: ArrayList
) : RecyclerView.Adapter() {
@@ -25,8 +27,8 @@ class MenuAdapter(
menu.setIcon(itemList[position].icon)
menu.setEndArrowVisibility(View.VISIBLE)
- menu.setOnClickListener { v: View? ->
- findNavController(v!!).navigate(itemList[position].id)
+ menu.setOnClickListener {
+ replaceFragment(fragmentManager, itemList[position].fragment)
}
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/NotificationAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/NotificationAdapter.kt
index 5c26c919c..49354f2b9 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/NotificationAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/NotificationAdapter.kt
@@ -18,7 +18,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.drdisagree.iconify.Iconify
import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.config.Prefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getBoolean
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.models.NotificationModel
import com.drdisagree.iconify.ui.utils.ViewBindingHelpers.setDrawable
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ProgressBarAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ProgressBarAdapter.kt
index d065a511e..f64848650 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ProgressBarAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ProgressBarAdapter.kt
@@ -16,16 +16,15 @@ import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
-import com.drdisagree.iconify.Iconify
import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.R
import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
import com.drdisagree.iconify.common.Preferences.SELECTED_PROGRESSBAR
-import com.drdisagree.iconify.config.Prefs
+import com.drdisagree.iconify.config.RPrefs
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.models.ProgressBarModel
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
import com.drdisagree.iconify.utils.overlay.compiler.OnDemandCompiler
import java.io.IOException
import java.util.concurrent.atomic.AtomicBoolean
@@ -51,7 +50,7 @@ class ProgressBarAdapter(
holder.progressbar.background =
ContextCompat.getDrawable(context, itemList[position].progress)
- itemSelected(holder.container, Prefs.getInt(SELECTED_PROGRESSBAR, -1) == position)
+ itemSelected(holder.container, RPrefs.getInt(SELECTED_PROGRESSBAR, -1) == position)
refreshButton(holder)
enableOnClickListener(holder)
}
@@ -65,7 +64,7 @@ class ProgressBarAdapter(
itemSelected(
holder.container,
- Prefs.getInt(SELECTED_PROGRESSBAR, -1) == holder.getBindingAdapterPosition()
+ RPrefs.getInt(SELECTED_PROGRESSBAR, -1) == holder.getBindingAdapterPosition()
)
refreshButton(holder)
@@ -86,7 +85,7 @@ class ProgressBarAdapter(
refreshLayout(holder)
- if (Prefs.getInt(SELECTED_PROGRESSBAR, -1) != holder.getBindingAdapterPosition()) {
+ if (RPrefs.getInt(SELECTED_PROGRESSBAR, -1) != holder.getBindingAdapterPosition()) {
holder.btnDisable.visibility = View.GONE
if (holder.btnEnable.visibility == View.VISIBLE) {
@@ -107,8 +106,8 @@ class ProgressBarAdapter(
// Set onClick operation for Enable button
holder.btnEnable.setOnClickListener {
- if (!SystemUtil.hasStoragePermission()) {
- SystemUtil.requestStoragePermission(context)
+ if (!SystemUtils.hasStoragePermission()) {
+ SystemUtils.requestStoragePermission(context)
} else {
// Show loading dialog
loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait))
@@ -116,7 +115,7 @@ class ProgressBarAdapter(
Thread {
val hasErroredOut = AtomicBoolean(false)
- Prefs.putInt(SELECTED_PROGRESSBAR, holder.getBindingAdapterPosition())
+ RPrefs.putInt(SELECTED_PROGRESSBAR, holder.getBindingAdapterPosition())
try {
hasErroredOut.set(
@@ -150,7 +149,7 @@ class ProgressBarAdapter(
Toast.LENGTH_SHORT
).show()
} else {
- Prefs.putInt(SELECTED_PROGRESSBAR, -1)
+ RPrefs.putInt(SELECTED_PROGRESSBAR, -1)
Toast.makeText(
appContext,
@@ -170,8 +169,8 @@ class ProgressBarAdapter(
loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait))
Thread {
- Prefs.putInt(SELECTED_PROGRESSBAR, -1)
- OverlayUtil.disableOverlay("IconifyComponentPGB.overlay")
+ RPrefs.putInt(SELECTED_PROGRESSBAR, -1)
+ OverlayUtils.disableOverlay("IconifyComponentPGB.overlay")
(context as Activity).runOnUiThread {
Handler(Looper.getMainLooper()).postDelayed({
// Hide loading dialog
@@ -229,7 +228,7 @@ class ProgressBarAdapter(
itemSelected(
child,
i == holder.getAbsoluteAdapterPosition() &&
- Prefs.getInt(SELECTED_PROGRESSBAR, -1) ==
+ RPrefs.getInt(SELECTED_PROGRESSBAR, -1) ==
i - (holder.getAbsoluteAdapterPosition() - holder.getBindingAdapterPosition())
)
}
@@ -242,7 +241,7 @@ class ProgressBarAdapter(
holder.btnEnable.visibility = View.GONE
holder.btnDisable.visibility = View.GONE
} else {
- if (Prefs.getInt(SELECTED_PROGRESSBAR, -1) == selectedItem) {
+ if (RPrefs.getInt(SELECTED_PROGRESSBAR, -1) == selectedItem) {
holder.btnEnable.visibility = View.GONE
holder.btnDisable.visibility = View.VISIBLE
} else {
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/QsShapeAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/QsShapeAdapter.kt
index 0e7229a4b..ba4621324 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/QsShapeAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/QsShapeAdapter.kt
@@ -19,14 +19,13 @@ import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
-import com.drdisagree.iconify.Iconify
import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.config.Prefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getBoolean
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.models.QsShapeModel
import com.drdisagree.iconify.ui.utils.ViewBindingHelpers.setDrawable
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.utils.SystemUtils
import com.drdisagree.iconify.utils.overlay.manager.QsShapeManager
import com.drdisagree.iconify.utils.overlay.manager.QsShapePixelManager
import com.drdisagree.iconify.xposed.modules.utils.ViewHelper.toPx
@@ -92,7 +91,7 @@ class QsShapeAdapter(
R.color.textColorPrimaryInverse
}
} else {
- if (itemList[position].inverseColor && SystemUtil.isDarkMode) {
+ if (itemList[position].inverseColor && SystemUtils.isDarkMode) {
R.color.textColorPrimary
} else {
R.color.textColorPrimaryInverse
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/SwitchAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/SwitchAdapter.kt
index 7afc47d9a..3091dce71 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/SwitchAdapter.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/SwitchAdapter.kt
@@ -17,16 +17,15 @@ import android.widget.Toast
import androidx.core.content.res.ResourcesCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
-import com.drdisagree.iconify.Iconify
import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.R
import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
import com.drdisagree.iconify.common.Preferences.SELECTED_SWITCH
-import com.drdisagree.iconify.config.Prefs
+import com.drdisagree.iconify.config.RPrefs
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.models.SwitchModel
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
import com.drdisagree.iconify.utils.overlay.compiler.SwitchCompiler
import java.io.IOException
import java.util.concurrent.atomic.AtomicBoolean
@@ -61,7 +60,7 @@ class SwitchAdapter(
null
)
)
- holder.aSwitch.setChecked(Prefs.getInt(SELECTED_SWITCH, -1) == position)
+ holder.aSwitch.setChecked(RPrefs.getInt(SELECTED_SWITCH, -1) == position)
enableOnCheckedChangeListener(holder)
}
@@ -74,7 +73,7 @@ class SwitchAdapter(
super.onViewAttachedToWindow(holder)
holder.aSwitch.setChecked(
- Prefs.getInt(
+ RPrefs.getInt(
SELECTED_SWITCH,
-1
) == holder.getBindingAdapterPosition()
@@ -100,7 +99,7 @@ class SwitchAdapter(
val aSwitch = view.findViewById(R.id.switch_view)
aSwitch?.setChecked(
- i == holder.getAbsoluteAdapterPosition() && Prefs.getInt(
+ i == holder.getAbsoluteAdapterPosition() && RPrefs.getInt(
SELECTED_SWITCH,
-1
) == i - (holder.getAbsoluteAdapterPosition() - holder.getBindingAdapterPosition())
@@ -124,8 +123,8 @@ class SwitchAdapter(
private fun switchAction(holder: ViewHolder, checked: Boolean) {
Handler(Looper.getMainLooper()).postDelayed({
if (checked) {
- if (!SystemUtil.hasStoragePermission()) {
- SystemUtil.requestStoragePermission(context)
+ if (!SystemUtils.hasStoragePermission()) {
+ SystemUtils.requestStoragePermission(context)
holder.aSwitch.setChecked(false)
} else {
// Show loading dialog
@@ -134,7 +133,7 @@ class SwitchAdapter(
Thread {
val hasErroredOut = AtomicBoolean(false)
- Prefs.putInt(SELECTED_SWITCH, holder.getBindingAdapterPosition())
+ RPrefs.putInt(SELECTED_SWITCH, holder.getBindingAdapterPosition())
try {
hasErroredOut.set(
@@ -164,7 +163,7 @@ class SwitchAdapter(
Toast.LENGTH_SHORT
).show()
} else {
- Prefs.putInt(SELECTED_SWITCH, -1)
+ RPrefs.putInt(SELECTED_SWITCH, -1)
holder.aSwitch.setChecked(false)
@@ -183,9 +182,9 @@ class SwitchAdapter(
loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait))
Thread {
- Prefs.putInt(SELECTED_SWITCH, -1)
+ RPrefs.putInt(SELECTED_SWITCH, -1)
- OverlayUtil.disableOverlays(
+ OverlayUtils.disableOverlays(
"IconifyComponentSWITCH1.overlay",
"IconifyComponentSWITCH2.overlay"
)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ToastAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ToastAdapter.kt
new file mode 100644
index 000000000..0f2c512ea
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ToastAdapter.kt
@@ -0,0 +1,89 @@
+package com.drdisagree.iconify.ui.adapters
+
+import android.content.Context
+import android.view.LayoutInflater
+import android.view.ViewGroup
+import androidx.core.content.ContextCompat
+import androidx.recyclerview.widget.RecyclerView
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.SELECTED_TOAST_FRAME
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.databinding.ViewToastFrameBinding
+import com.drdisagree.iconify.ui.models.ToastModel
+
+class ToastAdapter (
+ var context: Context,
+ private var itemList: ArrayList,
+ private var toastClick: OnToastClick
+) : RecyclerView.Adapter() {
+
+ private var selected = RPrefs.getInt(SELECTED_TOAST_FRAME, -1)
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
+ val binding: ViewToastFrameBinding =
+ ViewToastFrameBinding.inflate(LayoutInflater.from(parent.context), parent, false)
+ if (selected != -1) {
+ itemList[selected].selected = true
+ } else {
+ itemList[0].selected = true
+ }
+ return ViewHolder(binding)
+ }
+
+ override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+ val model = itemList[holder.bindingAdapterPosition]
+ holder.binding.styleName.text = model.title
+ holder.binding.toastContainer.background = ContextCompat.getDrawable(appContext, model.style)
+ if (model.selected) {
+ holder.binding.styleName.setTextColor(
+ appContextLocale.resources.getColor(
+ R.color.colorAccent,
+ appContext.theme
+ )
+ )
+ } else {
+ holder.binding.styleName.setTextColor(
+ appContextLocale.resources.getColor(
+ R.color.textColorSecondary,
+ appContext.theme
+ )
+ )
+ }
+ holder.binding.listItemToast.setOnClickListener {
+ toastClick.onToastClick(holder.bindingAdapterPosition, model)
+ }
+ }
+
+ fun notifyChange() {
+ refresh(false)
+ selected = RPrefs.getInt(SELECTED_TOAST_FRAME, -1)
+ refresh(true)
+ }
+
+ private fun refresh(select: Boolean) {
+ if (selected != -1) {
+ itemList[selected].selected = select
+ notifyItemChanged(selected)
+ } else {
+ itemList[0].selected = select
+ notifyItemChanged(0)
+ }
+ }
+
+ override fun getItemCount(): Int {
+ return itemList.size
+ }
+
+ class ViewHolder(val binding: ViewToastFrameBinding) : RecyclerView.ViewHolder(binding.getRoot()) {
+ }
+
+ /**
+ * Interface for the click on the item
+ */
+ interface OnToastClick {
+ fun onToastClick(position: Int, item: ToastModel)
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/base/BaseFragment.kt b/app/src/main/java/com/drdisagree/iconify/ui/base/BaseFragment.kt
index 65bf5ec02..da0429413 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/base/BaseFragment.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/base/BaseFragment.kt
@@ -1,11 +1,62 @@
package com.drdisagree.iconify.ui.base
import android.content.Context
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.view.LayoutInflater
+import android.view.Menu
+import android.view.MenuInflater
+import android.view.MenuItem
+import android.view.View
+import android.view.ViewGroup
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.core.view.MenuHost
+import androidx.core.view.MenuProvider
import androidx.core.view.WindowCompat
import androidx.fragment.app.Fragment
+import androidx.lifecycle.Lifecycle
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Dynamic
+import com.drdisagree.iconify.common.Resources.searchConfiguration
+import com.drdisagree.iconify.common.Resources.searchableFragments
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.activities.MainActivity.Companion.replaceFragment
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.ui.fragments.settings.Changelog
+import com.drdisagree.iconify.ui.fragments.settings.Experimental
+import com.drdisagree.iconify.ui.preferences.preferencesearch.SearchPreferenceResult
+import com.drdisagree.iconify.utils.SystemUtils.restartSystemUI
+import com.drdisagree.iconify.utils.helper.ImportExport.exportSettings
+import com.drdisagree.iconify.utils.helper.ImportExport.handleExportResult
+import com.drdisagree.iconify.utils.helper.ImportExport.handleImportResult
+import com.drdisagree.iconify.utils.helper.ImportExport.importSettings
import com.drdisagree.iconify.utils.helper.LocaleHelper
-open class BaseFragment : Fragment() {
+abstract class BaseFragment : Fragment() {
+
+ private var loadingDialog: LoadingDialog? = null
+
+ private var startExportActivityIntent = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ handleExportResult(
+ result = result,
+ context = requireContext(),
+ contentResolver = requireContext().contentResolver
+ )
+ }
+
+ private var startImportActivityIntent = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ handleImportResult(
+ result = result,
+ fragment = this,
+ loadingDialog = loadingDialog!!
+ )
+ }
override fun onAttach(context: Context) {
super.onAttach(LocaleHelper.setLocale(context))
@@ -15,4 +66,90 @@ open class BaseFragment : Fragment() {
WindowCompat.setDecorFitsSystemWindows(window, false)
}
}
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ // Initialize loading dialog
+ loadingDialog = LoadingDialog(requireActivity())
+
+ return super.onCreateView(inflater, container, savedInstanceState)
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+
+ val menuHost: MenuHost = requireActivity()
+ menuHost.addMenuProvider(object : MenuProvider {
+ override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
+ menu.clear()
+ menuInflater.inflate(R.menu.default_menu, menu)
+ }
+
+ override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
+ return when (menuItem.itemId) {
+ R.id.action_search -> {
+ searchConfiguration.showSearchFragment()
+ true
+ }
+
+ R.id.menu_changelog -> {
+ replaceFragment(parentFragmentManager, Changelog())
+ true
+ }
+
+ R.id.menu_export_settings -> {
+ exportSettings(this@BaseFragment, startExportActivityIntent)
+ true
+ }
+
+ R.id.menu_import_settings -> {
+ importSettings(this@BaseFragment, startImportActivityIntent)
+ true
+ }
+
+ R.id.restart_systemui -> {
+ Dynamic.requiresSystemUiRestart = false
+
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = false
+ )
+
+ Handler(Looper.getMainLooper()).postDelayed({
+ restartSystemUI()
+ }, 300)
+ true
+ }
+
+ R.id.experimental_features -> {
+ replaceFragment(parentFragmentManager, Experimental())
+ true
+ }
+
+ else -> {
+ false
+ }
+ }
+ }
+ }, viewLifecycleOwner, Lifecycle.State.RESUMED)
+ }
+
+ fun onSearchResultClicked(result: SearchPreferenceResult) {
+ for (searchableFragment in searchableFragments) {
+ if (searchableFragment.xml == result.resourceFile) {
+ replaceFragment(parentFragmentManager, searchableFragment.fragment)
+ SearchPreferenceResult.highlight(searchableFragment.fragment, result.key);
+ break
+ }
+ }
+ }
+
+ override fun onDestroy() {
+ loadingDialog?.dismiss()
+
+ super.onDestroy()
+ }
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/base/ControlledPreferenceFragmentCompat.kt b/app/src/main/java/com/drdisagree/iconify/ui/base/ControlledPreferenceFragmentCompat.kt
new file mode 100644
index 000000000..e61eeee51
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/base/ControlledPreferenceFragmentCompat.kt
@@ -0,0 +1,250 @@
+package com.drdisagree.iconify.ui.base
+
+import android.content.Context
+import android.content.SharedPreferences
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener
+import android.graphics.Color
+import android.graphics.drawable.ColorDrawable
+import android.graphics.drawable.Drawable
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.Menu
+import android.view.MenuInflater
+import android.view.MenuItem
+import android.view.View
+import android.view.ViewGroup
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.appcompat.app.AppCompatActivity
+import androidx.appcompat.widget.Toolbar
+import androidx.core.view.MenuHost
+import androidx.core.view.MenuProvider
+import androidx.core.view.WindowCompat
+import androidx.lifecycle.Lifecycle
+import androidx.preference.PreferenceFragmentCompat
+import androidx.preference.PreferenceScreen
+import androidx.recyclerview.widget.RecyclerView
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Dynamic
+import com.drdisagree.iconify.common.Resources.SHARED_XPREFERENCES
+import com.drdisagree.iconify.common.Resources.searchConfiguration
+import com.drdisagree.iconify.common.Resources.searchableFragments
+import com.drdisagree.iconify.config.PrefsHelper
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.activities.MainActivity.Companion.popCurrentFragment
+import com.drdisagree.iconify.ui.activities.MainActivity.Companion.replaceFragment
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.ui.fragments.settings.Changelog
+import com.drdisagree.iconify.ui.fragments.settings.Experimental
+import com.drdisagree.iconify.ui.preferences.preferencesearch.SearchPreferenceResult
+import com.drdisagree.iconify.utils.SystemUtils.restartSystemUI
+import com.drdisagree.iconify.utils.helper.ImportExport.exportSettings
+import com.drdisagree.iconify.utils.helper.ImportExport.handleExportResult
+import com.drdisagree.iconify.utils.helper.ImportExport.handleImportResult
+import com.drdisagree.iconify.utils.helper.ImportExport.importSettings
+import com.drdisagree.iconify.utils.helper.LocaleHelper
+
+abstract class ControlledPreferenceFragmentCompat : PreferenceFragmentCompat() {
+
+ private var loadingDialog: LoadingDialog? = null
+
+ private val changeListener =
+ OnSharedPreferenceChangeListener { _: SharedPreferences, key: String? ->
+ updateScreen(
+ key
+ )
+ }
+
+ abstract val title: String
+
+ abstract val backButtonEnabled: Boolean
+
+ abstract val layoutResource: Int
+
+ open val themeResource: Int
+ get() = R.style.PrefsThemeToolbar
+
+ abstract val hasMenu: Boolean
+
+ open val menuResource: Int
+ get() = R.menu.default_menu
+
+ private var startExportActivityIntent = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ handleExportResult(
+ result = result,
+ context = requireContext(),
+ contentResolver = requireContext().contentResolver
+ )
+ }
+
+ private var startImportActivityIntent = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ handleImportResult(
+ result = result,
+ fragment = this,
+ loadingDialog = loadingDialog!!
+ )
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ preferenceManager.setStorageDeviceProtected()
+ preferenceManager.sharedPreferencesName = SHARED_XPREFERENCES
+ preferenceManager.sharedPreferencesMode = Context.MODE_PRIVATE
+
+ try {
+ setPreferencesFromResource(layoutResource, rootKey)
+ } catch (e: Exception) {
+ Log.e(TAG, "Failed to load preference from resource", e)
+ }
+ }
+
+ override fun onAttach(context: Context) {
+ super.onAttach(LocaleHelper.setLocale(context))
+
+ if (activity != null) {
+ val window = requireActivity().window
+ WindowCompat.setDecorFitsSystemWindows(window, false)
+ }
+ }
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ inflater.context.setTheme(themeResource)
+
+ // Initialize loading dialog
+ loadingDialog = LoadingDialog(requireActivity())
+
+ return super.onCreateView(inflater, container, savedInstanceState)
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+
+ val baseContext = context as AppCompatActivity
+ view.findViewById(R.id.toolbar)?.let {
+ baseContext.setSupportActionBar(it)
+ it.title = title
+ }
+ baseContext.supportActionBar?.setDisplayHomeAsUpEnabled(backButtonEnabled)
+
+ if (hasMenu) {
+ val menuHost: MenuHost = requireActivity()
+ menuHost.addMenuProvider(object : MenuProvider {
+ override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
+ menu.clear()
+ menuInflater.inflate(menuResource, menu)
+ }
+
+ override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
+ return when (menuItem.itemId) {
+ R.id.action_search -> {
+ searchConfiguration.showSearchFragment()
+ true
+ }
+
+ R.id.menu_changelog -> {
+ replaceFragment(parentFragmentManager, Changelog())
+ true
+ }
+
+ R.id.menu_export_settings -> {
+ exportSettings(
+ this@ControlledPreferenceFragmentCompat,
+ startExportActivityIntent
+ )
+ true
+ }
+
+ R.id.menu_import_settings -> {
+ importSettings(
+ this@ControlledPreferenceFragmentCompat,
+ startImportActivityIntent
+ )
+ true
+ }
+
+ R.id.restart_systemui -> {
+ Dynamic.requiresSystemUiRestart = false
+
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = false
+ )
+
+ Handler(Looper.getMainLooper()).postDelayed({
+ restartSystemUI()
+ }, 300)
+ true
+ }
+
+ R.id.experimental_features -> {
+ replaceFragment(parentFragmentManager, Experimental())
+ true
+ }
+
+ else -> {
+ false
+ }
+ }
+ }
+ }, viewLifecycleOwner, Lifecycle.State.RESUMED)
+ }
+ }
+
+ public override fun onCreateAdapter(preferenceScreen: PreferenceScreen): RecyclerView.Adapter<*> {
+ RPrefs.registerOnSharedPreferenceChangeListener(changeListener)
+
+ updateScreen(null)
+
+ return super.onCreateAdapter(preferenceScreen)
+ }
+
+ fun onSearchResultClicked(result: SearchPreferenceResult) {
+ if (result.resourceFile == layoutResource) {
+ popCurrentFragment(parentFragmentManager)
+ SearchPreferenceResult.highlight(this, result.key)
+ } else {
+ for (searchableFragment in searchableFragments) {
+ if (searchableFragment.xml == result.resourceFile) {
+ replaceFragment(parentFragmentManager, searchableFragment.fragment)
+ SearchPreferenceResult.highlight(searchableFragment.fragment, result.key);
+ break
+ }
+ }
+ }
+ }
+
+ override fun onDestroy() {
+ loadingDialog?.hide()
+
+ RPrefs.unregisterOnSharedPreferenceChangeListener(changeListener)
+
+ super.onDestroy()
+ }
+
+ open fun updateScreen(key: String?) {
+ PrefsHelper.setupAllPreferences(this.preferenceScreen)
+ }
+
+ override fun setDivider(divider: Drawable?) {
+ super.setDivider(ColorDrawable(Color.TRANSPARENT))
+ }
+
+ override fun setDividerHeight(height: Int) {
+ super.setDividerHeight(0)
+ }
+
+ companion object {
+ private val TAG = ControlledPreferenceFragmentCompat::class.java.simpleName
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/base/WeatherPreferenceFragment.kt b/app/src/main/java/com/drdisagree/iconify/ui/base/WeatherPreferenceFragment.kt
new file mode 100644
index 000000000..056ef2dc3
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/base/WeatherPreferenceFragment.kt
@@ -0,0 +1,358 @@
+package com.drdisagree.iconify.ui.base
+
+import android.Manifest
+import android.content.Context
+import android.content.DialogInterface
+import android.content.Intent
+import android.content.pm.PackageManager
+import android.graphics.drawable.Drawable
+import android.location.LocationManager
+import android.net.Uri
+import android.os.Bundle
+import android.provider.Settings
+import android.util.Log
+import androidx.activity.result.ActivityResultLauncher
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.core.content.res.ResourcesCompat
+import androidx.fragment.app.setFragmentResultListener
+import androidx.preference.Preference
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.PREF_KEY_UPDATE_STATUS
+import com.drdisagree.iconify.common.Preferences.WEATHER_CUSTOM_LOCATION
+import com.drdisagree.iconify.common.Preferences.WEATHER_ICON_PACK
+import com.drdisagree.iconify.common.Preferences.WEATHER_PROVIDER
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.services.WeatherScheduler
+import com.drdisagree.iconify.ui.fragments.xposed.LocationBrowse.Companion.DATA_LOCATION_KEY
+import com.drdisagree.iconify.ui.fragments.xposed.LocationBrowse.Companion.DATA_LOCATION_NAME
+import com.drdisagree.iconify.ui.preferences.BottomSheetListPreference
+import com.drdisagree.iconify.ui.preferences.SwitchPreference
+import com.drdisagree.iconify.utils.OmniJawsClient
+import com.drdisagree.iconify.utils.weather.WeatherConfig
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+import java.util.Locale
+
+abstract class WeatherPreferenceFragment : ControlledPreferenceFragmentCompat(),
+ OmniJawsClient.OmniJawsObserver {
+
+ private var mCustomLocation: SwitchPreference? = null
+ private var mWeatherIconPack: BottomSheetListPreference? = null
+ private var mUpdateStatus: Preference? = null
+ private var mWeatherClient: OmniJawsClient? = null
+
+ abstract fun getMainSwitchKey(): String
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ setFragmentResultListener(DATA_LOCATION_KEY) { _, bundle ->
+ val locationName = bundle.getString(DATA_LOCATION_NAME)
+
+ Log.d("WeatherPreferenceFragment", "locationName: $locationName")
+
+ if (WeatherConfig.isEnabled(requireContext())
+ && !getBoolean(WEATHER_CUSTOM_LOCATION, false)
+ ) {
+ checkLocationEnabled(true)
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+ mWeatherClient = OmniJawsClient(requireContext())
+
+ mWeatherIconPack = findPreference(WEATHER_ICON_PACK)
+
+ var settingHeaderPackage: String = WeatherConfig.getIconPack(requireContext()).toString()
+ val entries: MutableList = ArrayList()
+ val values: MutableList = ArrayList()
+ val drawables: MutableList = ArrayList()
+ getAvailableWeatherIconPacks(entries, values, drawables)
+ mWeatherIconPack!!.entries = entries.toTypedArray()
+ mWeatherIconPack!!.entryValues = values.toTypedArray()
+ mWeatherIconPack!!.createDefaultAdapter(
+ drawables.filterNotNull().toTypedArray(),
+ object : BottomSheetListPreference.OnItemClickListener {
+ override fun onItemClick(position: Int) {
+ RPrefs.putString(WEATHER_ICON_PACK, values[position])
+ mWeatherIconPack!!.setSummary(entries[position])
+ forceRefreshWeatherSettings()
+ }
+ })
+ var valueIndex: Int = mWeatherIconPack!!.findIndexOfValue(settingHeaderPackage)
+ if (valueIndex == -1) {
+ // no longer found
+ settingHeaderPackage = DEFAULT_WEATHER_ICON_PACKAGE
+ valueIndex = mWeatherIconPack!!.findIndexOfValue(settingHeaderPackage)
+ }
+ mWeatherIconPack!!.setValueIndex(if (valueIndex >= 0) valueIndex else 0)
+ mWeatherIconPack!!.setSummary(mWeatherIconPack!!.getEntry())
+
+ mUpdateStatus = findPreference(PREF_KEY_UPDATE_STATUS)
+ mUpdateStatus?.onPreferenceClickListener = Preference.OnPreferenceClickListener {
+ forceRefreshWeatherSettings()
+ true
+ }
+
+ mCustomLocation = findPreference(WEATHER_CUSTOM_LOCATION)
+ mCustomLocation?.setOnPreferenceClickListener {
+ forceRefreshWeatherSettings()
+ true
+ }
+ }
+
+ override fun onResume() {
+ super.onResume()
+ mWeatherClient!!.addObserver(this)
+
+ handlePermissions()
+ }
+
+ private fun handlePermissions() {
+ if (WeatherConfig.isEnabled(requireContext()) &&
+ !getBoolean(WEATHER_CUSTOM_LOCATION, false)
+ ) {
+ checkLocationEnabled(false)
+ } else {
+ forceRefreshWeatherSettings()
+ }
+ }
+
+ private fun hasPermissions(): Boolean {
+ return (requireContext().checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)
+ == PackageManager.PERMISSION_GRANTED) &&
+ (requireContext().checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION)
+ == PackageManager.PERMISSION_GRANTED) &&
+ (requireContext().checkSelfPermission(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
+ == PackageManager.PERMISSION_GRANTED)
+ }
+
+ private fun isLocationEnabled(): Boolean {
+ val lm = requireContext().getSystemService(Context.LOCATION_SERVICE) as LocationManager
+ return lm.isLocationEnabled
+ }
+
+ private fun requestLocationPermission(locationPermissionRequest: ActivityResultLauncher>) {
+ if (shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION) ||
+ shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_COARSE_LOCATION) ||
+ shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
+ ) {
+ showApplicationPermissionDialog()
+ } else {
+ locationPermissionRequest.launch(
+ arrayOf(
+ Manifest.permission.ACCESS_FINE_LOCATION,
+ Manifest.permission.ACCESS_COARSE_LOCATION,
+ Manifest.permission.ACCESS_BACKGROUND_LOCATION
+ )
+ )
+ }
+ }
+
+ private fun checkLocationEnabled(force: Boolean) {
+ if (!isLocationEnabled()) {
+ showLocationPermissionDialog()
+ } else {
+ checkLocationPermission(force)
+ }
+ }
+
+ private fun checkLocationPermission(force: Boolean) {
+ if (!hasPermissions() && !getBoolean(WEATHER_CUSTOM_LOCATION, false)) {
+ requestLocationPermission(requestPermissionLauncher)
+ } else {
+ if (force) {
+ forceRefreshWeatherSettings()
+ }
+ queryAndUpdateWeather()
+ }
+ }
+
+ private fun showLocationPermissionDialog() {
+ MaterialAlertDialogBuilder(requireContext())
+ .setTitle(R.string.weather_retrieve_location_dialog_title)
+ .setMessage(R.string.weather_retrieve_location_dialog_message)
+ .setCancelable(false)
+ .setPositiveButton(R.string.weather_retrieve_location_dialog_enable_button) { _, _ ->
+ startActivity(
+ Intent(
+ Settings.ACTION_LOCATION_SOURCE_SETTINGS
+ ).apply {
+ setFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP)
+ }
+ )
+ }
+ .setNegativeButton(android.R.string.cancel, null)
+ .create()
+ .show()
+ }
+
+ private fun showApplicationPermissionDialog() {
+ MaterialAlertDialogBuilder(requireContext())
+ .setTitle(R.string.weather_permission_dialog_title)
+ .setMessage(R.string.weather_permission_dialog_message)
+ .setCancelable(false)
+ .setPositiveButton(android.R.string.ok) { _: DialogInterface?, _: Int ->
+ startActivity(
+ Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply {
+ setData(
+ Uri.fromParts(
+ "package",
+ requireContext().packageName,
+ null
+ )
+ )
+ }
+ )
+ }
+ .setNegativeButton(android.R.string.cancel, null)
+ .create()
+ .show()
+ }
+
+ private fun enableService() {
+ WeatherScheduler.scheduleUpdates(requireContext())
+ }
+
+ override fun onPause() {
+ super.onPause()
+ mWeatherClient!!.removeObserver(this)
+ }
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ if (key == null) return
+
+ val mainKey = getMainSwitchKey()
+
+ if (key == mainKey) {
+ WeatherConfig.setEnabled(requireContext(), getBoolean(mainKey, false), mainKey)
+ if (getBoolean(mainKey, false)) {
+ handlePermissions()
+ enableService()
+ forceRefreshWeatherSettings()
+ }
+ } else if (key == WEATHER_PROVIDER) {
+ forceRefreshWeatherSettings()
+ }
+ }
+
+ @Suppress("DiscouragedApi")
+ private fun getAvailableWeatherIconPacks(
+ entries: MutableList,
+ values: MutableList,
+ drawables: MutableList
+ ) {
+ val i = Intent()
+ val packageManager = requireContext().packageManager
+ i.setAction(BuildConfig.APPLICATION_ID + ".WeatherIconPack")
+ for (r in packageManager.queryIntentActivities(i, 0)) {
+ val packageName = r.activityInfo.applicationInfo.packageName
+ if (packageName == DEFAULT_WEATHER_ICON_PACKAGE) {
+ values.add(0, r.activityInfo.name)
+ drawables.add(
+ 0,
+ ResourcesCompat.getDrawable(
+ resources,
+ resources.getIdentifier(
+ "google_30",
+ "drawable",
+ BuildConfig.APPLICATION_ID
+ ),
+ requireContext().theme
+ )
+ )
+ } else {
+ values.add(packageName + "." + r.activityInfo.name.split(".").last())
+ val name = r.activityInfo.name.split("\\.".toRegex()).dropLastWhile { it.isEmpty() }
+ .toTypedArray()
+ drawables.add(
+ ResourcesCompat.getDrawable(
+ resources, resources.getIdentifier(
+ name[name.size - 1].lowercase(
+ Locale.getDefault()
+ ) + "_30", "drawable", BuildConfig.APPLICATION_ID
+ ), requireContext().theme
+ )
+ )
+ }
+
+ val label: String = r.activityInfo.loadLabel(packageManager).toString()
+ if (packageName == DEFAULT_WEATHER_ICON_PACKAGE) {
+ entries.add(0, label)
+ } else {
+ entries.add(label)
+ }
+ }
+ }
+
+ override fun weatherUpdated() {
+ queryAndUpdateWeather()
+ }
+
+ override fun weatherError(errorReason: Int) {
+ val errorString: String = when (errorReason) {
+ OmniJawsClient.EXTRA_ERROR_DISABLED -> {
+ resources.getString(R.string.omnijaws_service_disabled)
+ }
+
+ OmniJawsClient.EXTRA_ERROR_LOCATION -> {
+ resources.getString(R.string.omnijaws_service_error_location)
+ }
+
+ OmniJawsClient.EXTRA_ERROR_NETWORK -> {
+ resources.getString(R.string.omnijaws_service_error_network)
+ }
+
+ OmniJawsClient.EXTRA_ERROR_NO_PERMISSIONS -> {
+ resources.getString(R.string.omnijaws_service_error_permissions)
+ }
+
+ else -> {
+ resources.getString(R.string.omnijaws_service_error_long)
+ }
+ }
+
+ requireActivity().runOnUiThread {
+ mUpdateStatus?.summary = errorString
+ }
+ }
+
+ private fun queryAndUpdateWeather() {
+ mWeatherClient!!.queryWeather()
+ if (mWeatherClient?.weatherInfo != null) {
+ requireActivity().runOnUiThread {
+ mUpdateStatus?.setSummary(mWeatherClient!!.weatherInfo!!.lastUpdateTime)
+ }
+ }
+ }
+
+ private var requestPermissionLauncher: ActivityResultLauncher> =
+ registerForActivityResult(
+ ActivityResultContracts.RequestMultiplePermissions()
+ ) { result ->
+ val fineLocationGranted: Boolean = result.getOrDefault(
+ Manifest.permission.ACCESS_FINE_LOCATION, false
+ )
+ val coarseLocationGranted: Boolean = result.getOrDefault(
+ Manifest.permission.ACCESS_COARSE_LOCATION, false
+ )
+ if (fineLocationGranted || coarseLocationGranted) {
+ forceRefreshWeatherSettings()
+ }
+ }
+
+ private fun forceRefreshWeatherSettings() {
+ WeatherScheduler.scheduleUpdateNow(appContext)
+ }
+
+ companion object {
+ private const val DEFAULT_WEATHER_ICON_PACKAGE: String =
+ "${BuildConfig.APPLICATION_ID}.google"
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/core/Transform.kt b/app/src/main/java/com/drdisagree/iconify/ui/core/Transform.kt
index b105bcbab..88364a2aa 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/core/Transform.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/core/Transform.kt
@@ -23,7 +23,6 @@ object Transform {
return pageTransformer
}
- @JvmStatic
fun setParallaxTransformation(page: View, position: Float) {
val parallaxView = page.findViewById(R.id.img)
val isLandscape =
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/dialogs/EditTextDialog.kt b/app/src/main/java/com/drdisagree/iconify/ui/dialogs/EditTextDialog.kt
new file mode 100644
index 000000000..903d07f53
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/dialogs/EditTextDialog.kt
@@ -0,0 +1,99 @@
+package com.drdisagree.iconify.ui.dialogs
+
+import android.app.Dialog
+import android.content.Context
+import android.graphics.Color
+import android.graphics.drawable.ColorDrawable
+import android.view.LayoutInflater
+import android.view.View.GONE
+import android.view.ViewGroup
+import android.view.WindowManager
+import com.drdisagree.iconify.databinding.ViewEditTextDialogBinding
+import com.drdisagree.iconify.ui.base.BaseActivity
+
+class EditTextDialog(
+ var context: Context,
+ private var dialogId: Int
+) : BaseActivity() {
+
+ var dialog: Dialog? = null
+ private var binding: ViewEditTextDialogBinding? = null
+ private var listener: EditTextDialogListener? = null
+
+
+ fun setDialogListener(listener: EditTextDialogListener?) {
+ this.listener = listener
+ }
+
+ fun show(title: String, subTitle: String, hint: String, text: String) {
+ if (dialog != null) dialog!!.dismiss()
+
+ dialog = Dialog(context)
+ binding = ViewEditTextDialogBinding.inflate(LayoutInflater.from(context))
+
+ dialog!!.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
+ dialog!!.setCancelable(true)
+ dialog!!.setOnCancelListener(null)
+ dialog!!.setCanceledOnTouchOutside(true)
+
+ binding!!.title.text = title
+ if (subTitle.isNotEmpty()) binding!!.subtitle.text = subTitle
+ else binding!!.subtitle.visibility = GONE
+ if (hint.isNotEmpty() && hint != "null") binding!!.editText.hint = hint
+ if (text.isNotEmpty()) binding!!.editText.setText(text)
+
+ binding!!.confirm.setOnClickListener {
+ listener?.onOkPressed(dialogId, binding!!.editText.text.toString())
+ dialog!!.hide()
+ }
+
+ binding!!.cancel.setOnClickListener {
+ dialog!!.hide()
+ }
+
+ dialog!!.setContentView(binding!!.root)
+
+ val dialogParams = binding!!.root.layoutParams as ViewGroup.MarginLayoutParams
+ dialogParams.setMargins(28.dpToPx(), 0, 28.dpToPx(), 0)
+ binding!!.root.layoutParams = dialogParams
+
+ dialog!!.create()
+ dialog!!.show()
+
+ val layoutParams = WindowManager.LayoutParams()
+ layoutParams.copyFrom(dialog!!.window!!.attributes)
+ layoutParams.width = WindowManager.LayoutParams.WRAP_CONTENT
+ layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT
+ dialog!!.window!!.setAttributes(layoutParams)
+ }
+
+ fun hide() {
+ if (dialog?.isShowing == true) {
+ dialog?.dismiss()
+ }
+ }
+
+ fun dismiss() {
+ dialog?.dismiss()
+ }
+
+ public override fun onDestroy() {
+ dismiss()
+ super.onDestroy()
+ }
+
+ /**
+ * Interface for the EditTextDialog
+ * Implement this interface in the calling class to handle the dialog actions
+ * @property dialogId The ID of the dialog
+ * @property newText The new text entered in the EditText
+ */
+ interface EditTextDialogListener {
+ fun onOkPressed(dialogId: Int, newText: String)
+ }
+
+ private fun Int.dpToPx(): Int {
+ val density = context.resources.displayMetrics.density
+ return (this * density).toInt()
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/drawables/TintedDrawableSpan.kt b/app/src/main/java/com/drdisagree/iconify/ui/drawables/TintedDrawableSpan.kt
new file mode 100644
index 000000000..b717db475
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/drawables/TintedDrawableSpan.kt
@@ -0,0 +1,52 @@
+package com.drdisagree.iconify.ui.drawables
+
+import android.content.Context
+import android.graphics.Canvas
+import android.graphics.Paint
+import android.graphics.Paint.FontMetricsInt
+import android.graphics.drawable.Drawable
+import android.text.style.DynamicDrawableSpan
+
+
+/**
+ * [DynamicDrawableSpan] which draws a drawable tinted with the current paint color.
+ */
+class TintedDrawableSpan(context: Context, resourceId: Int) :
+ DynamicDrawableSpan(ALIGN_BOTTOM) {
+ private val mDrawable = context.getDrawable(resourceId)!!.mutate()
+ private var mOldTint = 0
+
+ init {
+ mDrawable.setTint(0)
+ }
+
+ override fun getSize(
+ paint: Paint,
+ text: CharSequence,
+ start: Int,
+ end: Int,
+ fm: FontMetricsInt?
+ ): Int {
+ var fm = fm
+ fm = fm ?: paint.fontMetricsInt
+ val iconSize = fm!!.bottom - fm.top
+ mDrawable.setBounds(0, 0, iconSize, iconSize)
+ return super.getSize(paint, text, start, end, fm)
+ }
+
+ override fun draw(
+ canvas: Canvas, text: CharSequence,
+ start: Int, end: Int, x: Float, top: Int, y: Int, bottom: Int, paint: Paint
+ ) {
+ val color = paint.color
+ if (mOldTint != color) {
+ mOldTint = color
+ mDrawable.setTint(mOldTint)
+ }
+ super.draw(canvas, text, start, end, x, top, y, bottom, paint)
+ }
+
+ override fun getDrawable(): Drawable {
+ return mDrawable
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/events/ColorSelectedEvent.kt b/app/src/main/java/com/drdisagree/iconify/ui/events/ColorSelectedEvent.kt
index 701bb7057..985121bd0 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/events/ColorSelectedEvent.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/events/ColorSelectedEvent.kt
@@ -1,6 +1,6 @@
package com.drdisagree.iconify.ui.events
data class ColorSelectedEvent(
- @JvmField val dialogId: Int,
- @JvmField val selectedColor: Int
+ val dialogId: Int,
+ val selectedColor: Int
)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Experimental.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/Experimental.kt
deleted file mode 100644
index fd0a78b1e..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Experimental.kt
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_OVERLAP
-import com.drdisagree.iconify.common.Preferences.HIDE_DATA_DISABLED_ICON
-import com.drdisagree.iconify.common.Preferences.UNZOOM_DEPTH_WALLPAPER
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.databinding.FragmentExperimentalBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-
-class Experimental : BaseFragment() {
-
- private lateinit var binding: FragmentExperimentalBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentExperimentalBinding.inflate(inflater, container, false)
- val root: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_experimental
- )
-
- // Header image overlap
- binding.headerImageOverlap.isSwitchChecked = getBoolean(HEADER_IMAGE_OVERLAP, false)
- binding.headerImageOverlap.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HEADER_IMAGE_OVERLAP, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.restartSystemUI() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Unzoom depth wallpaper
- binding.unzoomDepthWallpaper.isSwitchChecked = getBoolean(UNZOOM_DEPTH_WALLPAPER, false)
- binding.unzoomDepthWallpaper.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(UNZOOM_DEPTH_WALLPAPER, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.restartSystemUI() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Hide data disabled icon
- binding.hideDataDisabledIcon.isSwitchChecked = getBoolean(HIDE_DATA_DISABLED_ICON, false)
- binding.hideDataDisabledIcon.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HIDE_DATA_DISABLED_ICON, isChecked)
- }
- return root
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Home.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/Home.kt
deleted file mode 100644
index ce53109b2..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Home.kt
+++ /dev/null
@@ -1,338 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.LinearLayout
-import android.widget.TextView
-import androidx.appcompat.app.AppCompatActivity
-import androidx.navigation.Navigation.findNavController
-import androidx.navigation.fragment.NavHostFragment
-import com.drdisagree.iconify.BuildConfig
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.LATEST_VERSION_URL
-import com.drdisagree.iconify.common.Preferences.AUTO_UPDATE
-import com.drdisagree.iconify.common.Preferences.FIRST_INSTALL
-import com.drdisagree.iconify.common.Preferences.LAST_UPDATE_CHECK_TIME
-import com.drdisagree.iconify.common.Preferences.SHOW_HOME_CARD
-import com.drdisagree.iconify.common.Preferences.UPDATE_CHECK_TIME
-import com.drdisagree.iconify.common.Preferences.UPDATE_DETECTED
-import com.drdisagree.iconify.common.Preferences.VER_CODE
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.getLong
-import com.drdisagree.iconify.config.Prefs.putLong
-import com.drdisagree.iconify.databinding.FragmentHomeBinding
-import com.drdisagree.iconify.services.UpdateScheduler.scheduleUpdates
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.dialogs.LoadingDialog
-import com.drdisagree.iconify.ui.widgets.MenuWidget
-import com.drdisagree.iconify.utils.RootUtil.folderExists
-import com.drdisagree.iconify.utils.SystemUtil.restartDevice
-import com.drdisagree.iconify.utils.SystemUtil.saveBootId
-import com.drdisagree.iconify.utils.extension.TaskExecutor
-import com.google.android.material.bottomnavigation.BottomNavigationView
-import org.json.JSONObject
-import java.io.BufferedReader
-import java.io.InputStreamReader
-import java.net.HttpURLConnection
-import java.net.URL
-
-class Home : BaseFragment() {
-
- private lateinit var binding: FragmentHomeBinding
- private var checkForUpdate: CheckForUpdate? = null
- private var checkUpdate: LinearLayout? = null
- private var updateDesc: TextView? = null
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentHomeBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- binding.header.toolbar.setTitle(resources.getString(R.string.activity_title_home_page))
- (requireActivity() as AppCompatActivity).setSupportActionBar(binding.header.toolbar)
-
- val intent = requireActivity().intent
- if (intent != null && intent.getBooleanExtra(AppUpdates.KEY_NEW_UPDATE, false)) {
- (requireActivity().findViewById(R.id.bottomNavigationView) as BottomNavigationView).selectedItemId =
- R.id.settings
- NavHostFragment.findNavController(this).navigate(R.id.action_settings_to_appUpdates)
- intent.removeExtra(AppUpdates.Companion.KEY_NEW_UPDATE)
- } else {
- scheduleUpdates(appContext)
- }
-
- // New update available dialog
- val listView1 = LayoutInflater.from(requireActivity())
- .inflate(
- R.layout.view_new_update,
- binding.homePageList,
- false
- )
-
- checkUpdate = listView1.findViewById(R.id.check_update)
- binding.homePageList.addView(listView1)
- (checkUpdate as LinearLayout).visibility = View.GONE
- updateDesc = binding.homePageList.findViewById(R.id.update_desc)
-
- if (shouldCheckForUpdate()) {
- putLong(LAST_UPDATE_CHECK_TIME, System.currentTimeMillis())
-
- try {
- checkForUpdate = CheckForUpdate()
- checkForUpdate!!.execute()
- } catch (ignored: Exception) {
- }
- }
-
- // Reboot needed dialog
- val listView2 = LayoutInflater.from(requireActivity())
- .inflate(
- R.layout.view_reboot,
- binding.homePageList,
- false
- )
-
- val rebootReminder = listView2.findViewById(R.id.reboot_reminder)
- binding.homePageList.addView(listView2)
- rebootReminder.visibility = View.GONE
-
- if (shouldShowRebootDialog()) {
- rebootReminder.visibility = View.VISIBLE
-
- binding.homePageList.findViewById(R.id.btn_reboot).setOnClickListener {
- val rebootingDialog = LoadingDialog(requireActivity())
-
- rebootingDialog.show(resources.getString(R.string.rebooting_desc))
-
- Handler(Looper.getMainLooper()).postDelayed({
- rebootingDialog.hide()
- restartDevice()
- }, 5000)
- }
- }
-
- Prefs.putBoolean(FIRST_INSTALL, false)
- Prefs.putBoolean(UPDATE_DETECTED, false)
- Prefs.putInt(VER_CODE, BuildConfig.VERSION_CODE)
- saveBootId
-
- // Home page list items
- addItem(initHomePageList())
-
- binding.homeCard.container.visibility =
- if (getBoolean(SHOW_HOME_CARD, true)) View.VISIBLE else View.GONE
-
- binding.homeCard.button.setOnClickListener {
- binding.homeCard
- .container
- .animate()
- .setDuration(400)
- .translationX(binding.homeCard.container.width * 2f)
- .alpha(0f)
- .withEndAction {
- binding.homeCard.container.visibility = View.GONE
- Prefs.putBoolean(SHOW_HOME_CARD, false)
- }
- .start()
- }
-
- return view
- }
-
- private fun initHomePageList(): ArrayList> {
- val homePage = ArrayList>().apply {
- add(
- arrayOf(
- R.id.action_homePage_to_iconPack,
- appContextLocale.resources.getString(R.string.activity_title_icon_pack),
- appContextLocale.resources.getString(R.string.activity_desc_icon_pack),
- R.drawable.ic_styles_iconpack
- )
- )
- add(
- arrayOf(
- R.id.action_homePage_to_brightnessBar,
- appContextLocale.resources.getString(R.string.activity_title_brightness_bar),
- appContextLocale.resources.getString(R.string.activity_desc_brightness_bar),
- R.drawable.ic_styles_brightness
- )
- )
- add(
- arrayOf(
- R.id.action_homePage_to_qsPanelTile,
- appContextLocale.resources.getString(R.string.activity_title_qs_shape),
- appContextLocale.resources.getString(R.string.activity_desc_qs_shape),
- R.drawable.ic_styles_qs_shape
- )
- )
- add(
- arrayOf(
- R.id.action_homePage_to_notification,
- appContextLocale.resources.getString(R.string.activity_title_notification),
- appContextLocale.resources.getString(R.string.activity_desc_notification),
- R.drawable.ic_styles_notification
- )
- )
- add(
- arrayOf(
- R.id.action_homePage_to_progressBar,
- appContextLocale.resources.getString(R.string.activity_title_progress_bar),
- appContextLocale.resources.getString(R.string.activity_desc_progress_bar),
- R.drawable.ic_styles_progress
- )
- )
- add(
- arrayOf(
- R.id.action_homePage_to_switch1,
- appContextLocale.resources.getString(R.string.activity_title_switch),
- appContextLocale.resources.getString(R.string.activity_desc_switch),
- R.drawable.ic_styles_switch
- )
- )
- add(
- arrayOf(
- R.id.action_homePage_to_toastFrame,
- appContextLocale.resources.getString(R.string.activity_title_toast_frame),
- appContextLocale.resources.getString(R.string.activity_desc_toast_frame),
- R.drawable.ic_styles_toast_frame
- )
- )
- add(
- arrayOf(
- R.id.action_homePage_to_iconShape,
- appContextLocale.resources.getString(R.string.activity_title_icon_shape),
- appContextLocale.resources.getString(R.string.activity_desc_icon_shape),
- R.drawable.ic_styles_icon_shape
- )
- )
- }
-
- return homePage
- }
-
- private fun shouldShowRebootDialog() =
- !getBoolean(FIRST_INSTALL) && getBoolean(UPDATE_DETECTED) ||
- folderExists("/data/adb/modules_update/Iconify")
-
- private fun shouldCheckForUpdate(): Boolean {
- val lastChecked = getLong(LAST_UPDATE_CHECK_TIME, -1)
-
- return getBoolean(
- AUTO_UPDATE,
- true
- ) && (lastChecked == -1L || System.currentTimeMillis() - lastChecked >= getLong(
- UPDATE_CHECK_TIME,
- 0
- ))
- }
-
- // Function to add new item in list
- private fun addItem(pack: ArrayList>) {
- for (i in pack.indices) {
- val widget = MenuWidget(requireActivity())
-
- widget.setTitle(pack[i][1] as String)
- widget.setSummary(pack[i][2] as String)
- widget.setIcon(pack[i][3] as Int)
- widget.setEndArrowVisibility(View.VISIBLE)
-
- widget.setOnClickListener {
- findNavController(
- binding.getRoot()
- ).navigate((pack[i][0] as Int))
- }
-
- binding.homePageList.addView(widget)
- }
- }
-
- override fun onStop() {
- if (checkForUpdate?.status == TaskExecutor.Status.PENDING ||
- checkForUpdate?.status == TaskExecutor.Status.RUNNING
- ) {
- checkForUpdate?.cancel(true)
- }
-
- super.onStop()
- }
-
- private inner class CheckForUpdate : TaskExecutor() {
-
- var jsonURL: String = LATEST_VERSION_URL
-
- override fun onPreExecute() {}
-
- override fun doInBackground(vararg params: Int?): String? {
- var urlConnection: HttpURLConnection? = null
- var bufferedReader: BufferedReader? = null
-
- return try {
- val url = URL(jsonURL)
- urlConnection = url.openConnection() as HttpURLConnection
- urlConnection.connect()
-
- val inputStream = urlConnection.inputStream
- bufferedReader = BufferedReader(InputStreamReader(inputStream))
-
- val stringBuffer = StringBuilder()
- var line: String?
-
- while (bufferedReader.readLine().also { line = it } != null) {
- stringBuffer.append(line).append("\n")
- }
-
- if (stringBuffer.isEmpty()) {
- null
- } else {
- stringBuffer.toString()
- }
- } catch (e: Exception) {
- null
- } finally {
- urlConnection?.disconnect()
-
- if (bufferedReader != null) {
- try {
- bufferedReader.close()
- } catch (ignored: Exception) {
- }
- }
- }
- }
-
- override fun onPostExecute(result: String?) {
- if (result != null) {
- try {
- val latestVersion = JSONObject(result)
-
- if (latestVersion.getString(VER_CODE).toInt() > BuildConfig.VERSION_CODE) {
- checkUpdate!!.setOnClickListener {
- findNavController(
- requireActivity(),
- R.id.fragmentContainerView
- ).navigate(R.id.action_homePage_to_appUpdates)
- }
-
- updateDesc!!.text = resources.getString(
- R.string.update_dialog_desc,
- latestVersion.getString("versionName")
- )
- checkUpdate!!.visibility = View.VISIBLE
- }
- } catch (ignored: Exception) {
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/IconShape.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/IconShape.kt
deleted file mode 100644
index eca72dcf1..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/IconShape.kt
+++ /dev/null
@@ -1,316 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.annotation.SuppressLint
-import android.content.res.ColorStateList
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.LinearLayout
-import android.widget.TextView
-import android.widget.Toast
-import androidx.annotation.ColorInt
-import androidx.core.content.ContextCompat
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
-import com.drdisagree.iconify.common.Preferences.SELECTED_ICON_SHAPE
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.databinding.FragmentIconShapeBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.dialogs.LoadingDialog
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.compiler.OnDemandCompiler.buildOverlay
-import java.io.IOException
-import java.util.concurrent.atomic.AtomicBoolean
-
-class IconShape : BaseFragment() {
-
- private lateinit var binding: FragmentIconShapeBinding
- private var loadingDialog: LoadingDialog? = null
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentIconShapeBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_icon_shape
- )
-
- // Loading dialog while enabling or disabling pack
- loadingDialog = LoadingDialog(requireContext())
-
- // Icon masking shape list
- addItem(initIconShapeList())
- refreshBackground()
-
- return view
- }
-
- private fun initIconShapeList(): ArrayList> {
- val iconShapePreviewStyles = ArrayList>().apply {
- add(
- arrayOf(
- R.drawable.icon_shape_none,
- R.string.icon_mask_style_none
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_pebble,
- R.string.icon_mask_style_pebble
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_rounded_hexagon,
- R.string.icon_mask_style_hexagon
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_samsung,
- R.string.icon_mask_style_samsung
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_scroll,
- R.string.icon_mask_style_scroll
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_teardrops,
- R.string.icon_mask_style_teardrop
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_square,
- R.string.icon_mask_style_square
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_rounded_rectangle,
- R.string.icon_mask_style_rounded_rectangle
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_ios,
- R.string.icon_mask_style_ios
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_cloudy,
- R.string.icon_mask_style_cloudy
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_cylinder,
- R.string.icon_mask_style_cylinder
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_flower,
- R.string.icon_mask_style_flower
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_heart,
- R.string.icon_mask_style_heart
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_leaf,
- R.string.icon_mask_style_leaf
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_stretched,
- R.string.icon_mask_style_stretched
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_tapered_rectangle,
- R.string.icon_mask_style_tapered_rectangle
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_vessel,
- R.string.icon_mask_style_vessel
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_rohie_meow,
- R.string.icon_mask_style_rice_rohie_meow
- )
- )
- add(
- arrayOf(
- R.drawable.icon_shape_force_round,
- R.string.icon_mask_style_force_round
- )
- )
- }
-
- return iconShapePreviewStyles
- }
-
- // Function to add new item in list
- @SuppressLint("UseCompatLoadingForDrawables")
- private fun addItem(pack: ArrayList>) {
- @ColorInt val colorBackground = appContextLocale.resources.getColor(
- R.color.colorBackground,
- appContext.theme
- )
-
- for (i in pack.indices) {
- val list = LayoutInflater.from(requireContext())
- .inflate(
- R.layout.view_icon_shape,
- binding.iconShapePreviewContainer,
- false
- )
-
- val iconContainerBg = list.findViewById(R.id.mask_shape_bg)
- val iconContainerFg = list.findViewById(R.id.mask_shape_fg)
-
- iconContainerBg.background = ContextCompat.getDrawable(appContext, pack[i][0] as Int)
- iconContainerFg.background = ContextCompat.getDrawable(appContext, pack[i][0] as Int)
- iconContainerFg.setBackgroundTintList(ColorStateList.valueOf(colorBackground))
-
- val styleName = list.findViewById(R.id.shape_name)
- styleName.text = resources.getString(pack[i][1] as Int)
-
- list.setOnClickListener {
- if (i == 0) {
- Prefs.putInt(SELECTED_ICON_SHAPE, i)
- OverlayUtil.disableOverlay("IconifyComponentSIS.overlay")
-
- Toast.makeText(
- appContext,
- resources.getString(R.string.toast_disabled),
- Toast.LENGTH_SHORT
- ).show()
-
- refreshBackground()
- } else {
- if (!hasStoragePermission()) {
- requestStoragePermission(
- requireContext()
- )
- } else {
- // Show loading dialog
- loadingDialog!!.show(resources.getString(R.string.loading_dialog_wait))
-
- Thread {
- val hasErroredOut = AtomicBoolean(false)
-
- try {
- hasErroredOut.set(
- buildOverlay(
- "SIS",
- i,
- FRAMEWORK_PACKAGE,
- true
- )
- )
- } catch (e: IOException) {
- hasErroredOut.set(true)
- Log.e("IconShape", e.toString())
- }
-
- if (!hasErroredOut.get()) {
- Prefs.putInt(SELECTED_ICON_SHAPE, i)
- refreshBackground()
- }
-
- Handler(Looper.getMainLooper()).postDelayed({
- // Hide loading dialog
- loadingDialog!!.hide()
- if (!hasErroredOut.get()) {
- Toast.makeText(
- appContext,
- appContextLocale.resources
- .getString(R.string.toast_applied),
- Toast.LENGTH_SHORT
- ).show()
- } else {
- Toast.makeText(
- appContext,
- appContextLocale.resources
- .getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
- }
- }, 3000)
- }.start()
- }
- }
- }
-
- binding.iconShapePreviewContainer.addView(list)
- }
- }
-
- // Function to check for bg drawable changes
- private fun refreshBackground() {
- @ColorInt val colorSuccess = appContextLocale.resources.getColor(
- R.color.colorSuccess,
- appContext.theme
- )
- @ColorInt val textColorSecondary = appContextLocale.resources.getColor(
- R.color.textColorSecondary,
- appContext.theme
- )
-
- for (i in 0 until binding.iconShapePreviewContainer.childCount) {
- val child = binding.iconShapePreviewContainer.getChildAt(i)
- .findViewById(R.id.list_item_shape)
-
- val title = child.findViewById(R.id.shape_name)
- val iconContainerBg = child.findViewById(R.id.mask_shape_bg)
-
- if (i == Prefs.getInt(SELECTED_ICON_SHAPE, 0)) {
- iconContainerBg.setBackgroundTintList(ColorStateList.valueOf(colorSuccess))
- title.setTextColor(colorSuccess)
- } else {
- iconContainerBg.setBackgroundTintList(ColorStateList.valueOf(textColorSecondary))
- title.setTextColor(textColorSecondary)
- }
- }
- }
-
- override fun onDestroy() {
- loadingDialog?.dismiss()
-
- super.onDestroy()
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Settings.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/Settings.kt
deleted file mode 100644
index 1008153ef..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Settings.kt
+++ /dev/null
@@ -1,515 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.annotation.SuppressLint
-import android.app.Activity
-import android.content.ComponentName
-import android.content.DialogInterface
-import android.content.Intent
-import android.content.pm.PackageManager
-import android.net.Uri
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.Menu
-import android.view.MenuInflater
-import android.view.MenuItem
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import android.widget.Toast
-import androidx.activity.result.ActivityResult
-import androidx.activity.result.contract.ActivityResultContracts
-import androidx.appcompat.app.AppCompatActivity
-import androidx.navigation.Navigation.findNavController
-import com.drdisagree.iconify.BuildConfig
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const
-import com.drdisagree.iconify.common.Const.FRAGMENT_BACK_BUTTON_DELAY
-import com.drdisagree.iconify.common.Preferences
-import com.drdisagree.iconify.common.Preferences.APP_ICON
-import com.drdisagree.iconify.common.Preferences.APP_LANGUAGE
-import com.drdisagree.iconify.common.Preferences.APP_THEME
-import com.drdisagree.iconify.common.Preferences.AUTO_UPDATE
-import com.drdisagree.iconify.common.Preferences.EASTER_EGG
-import com.drdisagree.iconify.common.Preferences.FIRST_INSTALL
-import com.drdisagree.iconify.common.Preferences.ON_HOME_PAGE
-import com.drdisagree.iconify.common.Preferences.RESTART_SYSUI_AFTER_BOOT
-import com.drdisagree.iconify.common.Preferences.RESTART_SYSUI_BEHAVIOR_EXT
-import com.drdisagree.iconify.common.Preferences.SHOW_HOME_CARD
-import com.drdisagree.iconify.common.Preferences.SHOW_XPOSED_WARN
-import com.drdisagree.iconify.common.Preferences.UPDATE_OVER_WIFI
-import com.drdisagree.iconify.common.Resources.MODULE_DIR
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.putString
-import com.drdisagree.iconify.config.RPrefs
-import com.drdisagree.iconify.databinding.FragmentSettingsBinding
-import com.drdisagree.iconify.services.UpdateScheduler.scheduleUpdates
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.dialogs.LoadingDialog
-import com.drdisagree.iconify.utils.AppUtil.restartApplication
-import com.drdisagree.iconify.utils.CacheUtil.clearCache
-import com.drdisagree.iconify.utils.SystemUtil.disableBlur
-import com.drdisagree.iconify.utils.SystemUtil.disableRestartSystemuiAfterBoot
-import com.drdisagree.iconify.utils.SystemUtil.enableRestartSystemuiAfterBoot
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.restartSystemUI
-import com.drdisagree.iconify.utils.SystemUtil.saveBootId
-import com.drdisagree.iconify.utils.SystemUtil.saveVersionCode
-import com.drdisagree.iconify.utils.helper.ImportExport.exportSettings
-import com.drdisagree.iconify.utils.helper.ImportExport.importSettings
-import com.google.android.material.dialog.MaterialAlertDialogBuilder
-import com.topjohnwu.superuser.Shell
-import java.util.Date
-import java.util.concurrent.Executors
-
-class Settings : BaseFragment() {
-
- private lateinit var binding: FragmentSettingsBinding
- private var loadingDialog: LoadingDialog? = null
- private var clickTimestamps = LongArray(NUM_CLICKS_REQUIRED)
- private var oldestIndex = 0
- private var nextIndex = 0
-
- private var startExportActivityIntent = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result1: ActivityResult ->
- if (result1.resultCode == Activity.RESULT_OK) {
- val data = result1.data ?: return@registerForActivityResult
-
- Executors.newSingleThreadExecutor().execute {
- try {
- exportSettings(
- Prefs.prefs,
- appContext.contentResolver.openOutputStream(data.data!!)!!
- )
-
- Handler(Looper.getMainLooper()).post {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_export_settings_successfull),
- Toast.LENGTH_SHORT
- ).show()
- }
- } catch (exception: Exception) {
- Handler(Looper.getMainLooper()).post {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
- Log.e("Settings", "Error exporting settings", exception)
- }
- }
- }
- }
- }
-
- private var startImportActivityIntent = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result2: ActivityResult ->
- if (result2.resultCode == Activity.RESULT_OK) {
- val data = result2.data ?: return@registerForActivityResult
- MaterialAlertDialogBuilder(requireContext())
- .setTitle(requireContext().resources.getString(R.string.import_settings_confirmation_title))
- .setMessage(requireContext().resources.getString(R.string.import_settings_confirmation_desc))
- .setPositiveButton(
- requireContext().resources.getString(R.string.btn_positive)
- ) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
- loadingDialog!!.show(resources.getString(R.string.loading_dialog_wait))
- Executors.newSingleThreadExecutor().execute {
- try {
- val success = importSettings(
- Prefs.prefs,
- appContext.contentResolver.openInputStream(data.data!!)!!,
- true
- )
- Handler(Looper.getMainLooper()).post {
- loadingDialog!!.hide()
- if (success) {
- Toast.makeText(
- appContext,
- appContext.resources.getString(R.string.toast_import_settings_successfull),
- Toast.LENGTH_SHORT
- ).show()
- } else {
- Toast.makeText(
- appContext,
- appContext.resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
- } catch (exception: Exception) {
- Handler(Looper.getMainLooper()).post {
- Toast.makeText(
- appContext,
- appContext.resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
- Log.e("Settings", "Error importing settings", exception)
- }
- }
- }
- }
- .setNegativeButton(requireContext().resources.getString(R.string.btn_negative)) { dialog: DialogInterface, _: Int -> dialog.dismiss() }
- .show()
- }
- }
-
- @Suppress("deprecation")
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentSettingsBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- binding.header.toolbar.setTitle(resources.getString(R.string.activity_title_settings))
- (requireActivity() as AppCompatActivity).setSupportActionBar(binding.header.toolbar)
- setHasOptionsMenu(true)
- (requireActivity() as AppCompatActivity).supportActionBar?.setDisplayHomeAsUpEnabled(true)
- (requireActivity() as AppCompatActivity).supportActionBar?.setDisplayShowHomeEnabled(true)
- binding.header.toolbar.setNavigationOnClickListener {
- Handler(Looper.getMainLooper()).postDelayed(
- { getParentFragmentManager().popBackStack() }, FRAGMENT_BACK_BUTTON_DELAY.toLong()
- )
- }
-
- // Show loading dialog
- loadingDialog = LoadingDialog(requireActivity())
-
- // Language
- var currentLanguage =
- listOf(*resources.getStringArray(R.array.locale_code)).indexOf("en-US")
- val locales = resources.configuration.getLocales()
- val localeCodes = listOf(*resources.getStringArray(R.array.locale_code))
-
- for (i in 0 until locales.size()) {
- val languageCode = locales[i].language
- val countryCode = locales[i].country
- val languageFormat = "$languageCode-$countryCode"
-
- if (localeCodes.contains(Prefs.getString(APP_LANGUAGE, languageFormat))) {
- currentLanguage =
- localeCodes.indexOf(Prefs.getString(APP_LANGUAGE, languageFormat))
- break
- }
- }
-
- binding.settingsGeneral.appLanguage.setSelectedIndex(currentLanguage)
- binding.settingsGeneral.appLanguage.setOnItemSelectedListener { index: Int ->
- putString(
- APP_LANGUAGE,
- listOf(*resources.getStringArray(R.array.locale_code))[index]
- )
-
- restartApplication(requireActivity())
- }
-
- // App Icon
- binding.settingsGeneral.appIcon.setSelectedIndex(Prefs.getInt(APP_ICON, 0))
- binding.settingsGeneral.appIcon.setOnItemSelectedListener { index: Int ->
- Prefs.putInt(APP_ICON, index)
- val splashActivities =
- appContextLocale.resources.getStringArray(R.array.app_icon_identifier)
-
- changeIcon(splashActivities[index])
- }
-
- // App Theme
- binding.settingsGeneral.appTheme.setSelectedIndex(Prefs.getInt(APP_THEME, 2))
- binding.settingsGeneral.appTheme.setOnItemSelectedListener { index: Int ->
- Prefs.putInt(APP_THEME, index)
-
- restartApplication(requireActivity())
- }
-
- // Check for update
- binding.settingsUpdate.checkUpdate.setSummary(
- resources.getString(
- R.string.settings_current_version,
- BuildConfig.VERSION_NAME
- )
- )
- binding.settingsUpdate.checkUpdate.setOnClickListener {
- findNavController(view).navigate(
- R.id.action_settings_to_appUpdates
- )
- }
-
- // Auto update
- binding.settingsUpdate.autoUpdate.isSwitchChecked = Prefs.getBoolean(AUTO_UPDATE, true)
- binding.settingsUpdate.autoUpdate.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- Prefs.putBoolean(AUTO_UPDATE, isChecked)
- scheduleUpdates(requireContext().applicationContext)
- binding.settingsUpdate.autoUpdateWifiOnly.setEnabled(isChecked)
- }
-
- // Check over wifi only
- binding.settingsUpdate.autoUpdateWifiOnly.setEnabled(binding.settingsUpdate.autoUpdate.isSwitchChecked)
- binding.settingsUpdate.autoUpdateWifiOnly.isSwitchChecked =
- Prefs.getBoolean(UPDATE_OVER_WIFI, true)
- binding.settingsUpdate.autoUpdateWifiOnly.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- Prefs.putBoolean(UPDATE_OVER_WIFI, isChecked)
- }
-
- // Show xposed warn
- binding.settingsXposed.hideWarnMessage.isSwitchChecked =
- Prefs.getBoolean(SHOW_XPOSED_WARN, true)
- binding.settingsXposed.hideWarnMessage.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- Prefs.putBoolean(SHOW_XPOSED_WARN, isChecked)
- }
-
- // Restart systemui behavior
- binding.settingsXposed.modApplyingMethod.setSelectedIndex(
- RPrefs.getInt(RESTART_SYSUI_BEHAVIOR_EXT, 0)
- )
- binding.settingsXposed.modApplyingMethod.setOnItemSelectedListener { index: Int ->
- RPrefs.putInt(RESTART_SYSUI_BEHAVIOR_EXT, index)
- }
-
- // Restart systemui after boot
- binding.settingsMisc.restartSysuiAfterBoot.isSwitchChecked =
- Prefs.getBoolean(RESTART_SYSUI_AFTER_BOOT, false)
- binding.settingsMisc.restartSysuiAfterBoot.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- Prefs.putBoolean(RESTART_SYSUI_AFTER_BOOT, isChecked)
- if (isChecked) {
- enableRestartSystemuiAfterBoot()
- } else {
- disableRestartSystemuiAfterBoot()
- }
- }
-
- // Home page card
- binding.settingsMisc.homePageCard.isSwitchChecked = Prefs.getBoolean(SHOW_HOME_CARD, true)
- binding.settingsMisc.homePageCard.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- Prefs.putBoolean(SHOW_HOME_CARD, isChecked)
- }
- binding.settingsMisc.homePageCard.visibility =
- if (Preferences.isXposedOnlyMode) {
- View.GONE
- } else {
- View.VISIBLE
- }
-
- // Clear App Cache
- binding.settingsMisc.clearCache.setOnClickListener {
- clearCache(appContext)
-
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_clear_cache),
- Toast.LENGTH_SHORT
- ).show()
- }
-
- // Experimental features
- binding.settingsMisc.settingsMiscTitle.setOnClickListener { onEasterViewClicked() }
- binding.settingsMisc.experimentalFeatures.setOnClickListener {
- findNavController(
- view
- ).navigate(R.id.action_settings_to_experimental)
- }
- binding.settingsMisc.experimentalFeatures.visibility =
- if (Prefs.getBoolean(EASTER_EGG)) {
- View.VISIBLE
- } else {
- View.GONE
- }
-
- // Disable Everything
- binding.settingsMisc.buttonDisableEverything.setOnClickListener {
- MaterialAlertDialogBuilder(requireActivity())
- .setCancelable(true)
- .setTitle(requireContext().resources.getString(R.string.import_settings_confirmation_title))
- .setMessage(requireContext().resources.getString(R.string.import_settings_confirmation_desc))
- .setPositiveButton(getString(R.string.positive)) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
-
- // Show loading dialog
- loadingDialog!!.show(resources.getString(R.string.loading_dialog_wait))
- Executors.newSingleThreadExecutor().execute {
- disableEverything()
- Handler(Looper.getMainLooper()).postDelayed({
-
- // Hide loading dialog
- loadingDialog!!.hide()
-
- // Restart SystemUI
- restartSystemUI()
- }, 3000)
- }
- }
- .setNegativeButton(getString(R.string.negative)) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
- }
- .show()
- }
-
- binding.settingsMisc.buttonDisableEverything.visibility =
- if (Preferences.isXposedOnlyMode) {
- View.GONE
- } else {
- View.VISIBLE
- }
-
- // Github repository
- binding.settingsAbout.githubRepository.setOnClickListener {
- startActivity(
- Intent(Intent.ACTION_VIEW).setData(Uri.parse(Const.GITHUB_REPO))
- )
- }
-
- // Telegram group
- binding.settingsAbout.telegramGroup.setOnClickListener {
- val intent = Intent(Intent.ACTION_VIEW)
- intent.setData(Uri.parse(Const.TELEGRAM_GROUP))
- startActivity(intent)
- }
-
- // Credits
- binding.settingsAbout.credits.setOnClickListener {
- findNavController(view).navigate(
- R.id.action_settings_to_credits2
- )
- }
-
- return view
- }
-
- override fun onDestroy() {
- loadingDialog?.hide()
-
- super.onDestroy()
- }
-
- @Suppress("deprecation")
- @Deprecated("Deprecated in Java")
- override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
- menu.clear()
- inflater.inflate(R.menu.settings_menu, menu)
-
- super.onCreateOptionsMenu(menu, inflater)
- }
-
- @Suppress("deprecation")
- @Deprecated("Deprecated in Java")
- @SuppressLint("NonConstantResourceId")
- override fun onOptionsItemSelected(item: MenuItem): Boolean {
- when (item.itemId) {
- R.id.menu_changelog -> findNavController(requireView()).navigate(R.id.action_settings_to_changelog2)
- R.id.menu_export_settings -> importExportSettings(true)
- R.id.menu_import_settings -> importExportSettings(false)
- R.id.restart_systemui -> Handler(Looper.getMainLooper()).postDelayed(
- { restartSystemUI() },
- 300
- )
- }
-
- return super.onOptionsItemSelected(item)
- }
-
- private fun importExportSettings(export: Boolean) {
- if (!hasStoragePermission()) {
- requestStoragePermission(requireContext())
- } else {
- val fileIntent = Intent()
- fileIntent.setAction(if (export) Intent.ACTION_CREATE_DOCUMENT else Intent.ACTION_GET_CONTENT)
- fileIntent.setType("*/*")
- fileIntent.putExtra(Intent.EXTRA_TITLE, "configs" + ".iconify")
-
- if (export) {
- startExportActivityIntent.launch(fileIntent)
- } else {
- startImportActivityIntent.launch(fileIntent)
- }
- }
- }
-
- private fun changeIcon(splash: String) {
- val manager = requireActivity().packageManager
- val splashActivities =
- appContextLocale.resources.getStringArray(R.array.app_icon_identifier)
- for (splashActivity in splashActivities) {
- manager.setComponentEnabledSetting(
- ComponentName(
- requireActivity(),
- "com.drdisagree.iconify.$splashActivity"
- ),
- if (splash == splashActivity) {
- PackageManager.COMPONENT_ENABLED_STATE_ENABLED
- } else {
- PackageManager.COMPONENT_ENABLED_STATE_DISABLED
- },
- PackageManager.DONT_KILL_APP
- )
- }
- }
-
- private fun onEasterViewClicked() {
- val timeMillis = Date().time
-
- if (nextIndex == NUM_CLICKS_REQUIRED - 1 || oldestIndex > 0) {
- val diff = (timeMillis - clickTimestamps[oldestIndex]).toInt()
- if (diff < SECONDS_FOR_CLICKS * 1000) {
- if (!Prefs.getBoolean(EASTER_EGG)) {
- Prefs.putBoolean(EASTER_EGG, true)
-
- binding.settingsMisc.experimentalFeatures.visibility = View.VISIBLE
-
- Toast.makeText(
- requireContext(),
- requireContext().resources.getString(R.string.toast_easter_egg),
- Toast.LENGTH_SHORT
- ).show()
- } else {
- Toast.makeText(
- requireContext(),
- requireContext().resources.getString(R.string.toast_easter_egg_activated),
- Toast.LENGTH_SHORT
- ).show()
- }
-
- oldestIndex = 0
- nextIndex = 0
- } else {
- oldestIndex++
- }
- }
-
- clickTimestamps[nextIndex] = timeMillis
- nextIndex++
-
- if (nextIndex == NUM_CLICKS_REQUIRED) nextIndex = 0
- if (oldestIndex == NUM_CLICKS_REQUIRED) oldestIndex = 0
- }
-
- companion object {
- private const val SECONDS_FOR_CLICKS = 3.0
- private const val NUM_CLICKS_REQUIRED = 7
-
- fun disableEverything() {
- Prefs.clearAllPrefs()
- RPrefs.clearAllPrefs()
-
- saveBootId
- disableBlur(false)
- saveVersionCode()
-
- Prefs.putBoolean(ON_HOME_PAGE, true)
- Prefs.putBoolean(FIRST_INSTALL, false)
-
- Shell.cmd(
- "> $MODULE_DIR/system.prop; > $MODULE_DIR/post-exec.sh; for ol in $(cmd overlay list | grep -E '.x.*IconifyComponent' | sed -E 's/^.x..//'); do cmd overlay disable \$ol; done; killall com.android.systemui"
- ).submit()
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Statusbar.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/Statusbar.kt
deleted file mode 100644
index 9fe8e9b82..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Statusbar.kt
+++ /dev/null
@@ -1,366 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.RadioGroup
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
-import com.drdisagree.iconify.common.References.FABRICATED_SB_COLOR_SOURCE
-import com.drdisagree.iconify.common.References.FABRICATED_SB_COLOR_TINT
-import com.drdisagree.iconify.common.References.FABRICATED_SB_HEIGHT
-import com.drdisagree.iconify.common.References.FABRICATED_SB_LEFT_PADDING
-import com.drdisagree.iconify.common.References.FABRICATED_SB_RIGHT_PADDING
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.putString
-import com.drdisagree.iconify.databinding.FragmentStatusbarBinding
-import com.drdisagree.iconify.ui.activities.MainActivity
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.events.ColorDismissedEvent
-import com.drdisagree.iconify.ui.events.ColorSelectedEvent
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.color.ColorUtil.colorToSpecialHex
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.buildAndEnableOverlays
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.disableOverlays
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.enableOverlay
-import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
-import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
-import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
-import com.google.android.material.slider.Slider
-import org.greenrobot.eventbus.EventBus
-import org.greenrobot.eventbus.Subscribe
-
-
-class Statusbar : BaseFragment() {
-
- private lateinit var binding: FragmentStatusbarBinding
- private val finalSBLeftPadding = intArrayOf(Prefs.getInt(FABRICATED_SB_LEFT_PADDING, 8))
- private val finalSBRightPadding = intArrayOf(Prefs.getInt(FABRICATED_SB_RIGHT_PADDING, 8))
- private val finalSBHeight = intArrayOf(Prefs.getInt(FABRICATED_SB_HEIGHT, 28))
-
- private val sbLeftPaddingListener: Slider.OnSliderTouchListener =
- object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- finalSBLeftPadding[0] = slider.value.toInt()
- Prefs.putInt(FABRICATED_SB_LEFT_PADDING, finalSBLeftPadding[0])
-
- buildOverlayWithResource(
- requireContext(),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "status_bar_padding_start",
- finalSBLeftPadding[0].toString() + "dp"
- )
- )
- }
- }
-
- private val sbRightPaddingListener: Slider.OnSliderTouchListener =
- object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- finalSBRightPadding[0] = slider.value.toInt()
- Prefs.putInt(FABRICATED_SB_RIGHT_PADDING, finalSBRightPadding[0])
-
- buildOverlayWithResource(
- requireContext(),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "status_bar_padding_end",
- finalSBRightPadding[0].toString() + "dp"
- )
- )
- }
- }
-
- private val sbHeightListener: Slider.OnSliderTouchListener =
- object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- finalSBHeight[0] = slider.value.toInt()
- Prefs.putInt(FABRICATED_SB_HEIGHT, finalSBHeight[0])
-
- buildOverlayWithResource(
- requireContext(),
- ResourceEntry(
- FRAMEWORK_PACKAGE,
- "dimen",
- "status_bar_height",
- finalSBHeight[0].toString() + "dp"
- ),
- ResourceEntry(
- FRAMEWORK_PACKAGE,
- "dimen",
- "status_bar_height_default",
- finalSBHeight[0].toString() + "dp"
- ),
- ResourceEntry(
- FRAMEWORK_PACKAGE,
- "dimen",
- "status_bar_height_portrait",
- finalSBHeight[0].toString() + "dp"
- ),
- ResourceEntry(
- FRAMEWORK_PACKAGE,
- "dimen",
- "status_bar_height_landscape",
- finalSBHeight[0].toString() + "dp"
- )
- )
- }
- }
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentStatusbarBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_statusbar
- )
-
- // Statusbar left padding
- binding.sbLeftPadding.sliderValue = finalSBLeftPadding[0]
- binding.sbLeftPadding.setOnSliderTouchListener(sbLeftPaddingListener)
-
- // Reset left padding
- binding.sbLeftPadding.setResetClickListener {
- Prefs.putInt(FABRICATED_SB_LEFT_PADDING, 8)
-
- removeResourceFromOverlay(
- requireContext(),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "status_bar_padding_start")
- )
-
- true
- }
-
- // Statusbar right padding
- binding.sbRightPadding.sliderValue = finalSBRightPadding[0]
- binding.sbRightPadding.setOnSliderTouchListener(sbRightPaddingListener)
-
- // Reset right padding
- binding.sbRightPadding.setResetClickListener {
- Prefs.putInt(FABRICATED_SB_RIGHT_PADDING, 8)
-
- removeResourceFromOverlay(
- requireContext(),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "status_bar_padding_end")
- )
-
- true
- }
-
- // Statusbar height
- binding.sbHeight.sliderValue = finalSBHeight[0]
- binding.sbHeight.setOnSliderTouchListener(sbHeightListener)
-
- // Reset height
- binding.sbHeight.setResetClickListener {
- Prefs.putInt(FABRICATED_SB_HEIGHT, 28)
-
- removeResourceFromOverlay(
- requireContext(),
- ResourceEntry(FRAMEWORK_PACKAGE, "dimen", "status_bar_height"),
- ResourceEntry(FRAMEWORK_PACKAGE, "dimen", "status_bar_height_default"),
- ResourceEntry(FRAMEWORK_PACKAGE, "dimen", "status_bar_height_portrait"),
- ResourceEntry(FRAMEWORK_PACKAGE, "dimen", "status_bar_height_landscape")
- )
-
- true
- }
- colorSBTint = resources.getColor(R.color.colorAccent, appContext.theme).toString()
-
- //set current chosen style
- selectedStyle = Prefs.getString(FABRICATED_SB_COLOR_SOURCE)
- when {
- selectedStyle == "Monet" || Prefs.getBoolean("IconifyComponentSBTint.overlay") -> {
- binding.sbTintMonet.setChecked(true)
- putString(FABRICATED_SB_COLOR_SOURCE, "Monet")
- }
-
- selectedStyle == "System" -> {
- binding.sbTintSystem.setChecked(true)
- }
-
- selectedStyle == "Custom" -> {
- binding.sbTintCustom.setChecked(
- true
- )
- }
- }
-
- // Statusbar color source select
- binding.sbTintSourceSelector.setOnCheckedChangeListener { _: RadioGroup?, checkedId: Int ->
- when (checkedId) {
- R.id.sb_tint_system -> {
- if (selectedStyle != "System") {
- putString(FABRICATED_SB_COLOR_SOURCE, "System")
- resetSBColor()
- }
- }
-
- R.id.sb_tint_monet -> {
- if (selectedStyle != "Monet") {
- enableOverlay("IconifyComponentSBTint.overlay")
- putString(FABRICATED_SB_COLOR_SOURCE, "Monet")
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.restartSystemUI() },
- SWITCH_ANIMATION_DELAY
- )
- }
- }
-
- R.id.sb_tint_custom -> {
- (requireActivity() as MainActivity).showColorPickerDialog(
- dialogId = 1,
- defaultColor = colorSBTint!!.toInt(),
- showPresets = true,
- showAlphaSlider = false,
- showColorShades = true
- )
- }
- }
- }
-
- return view
- }
-
- @Suppress("unused")
- @Subscribe
- fun onColorSelected(event: ColorSelectedEvent) {
- if (event.dialogId == 1) {
- colorSBTint = event.selectedColor.toString()
- putString(FABRICATED_SB_COLOR_TINT, colorSBTint)
-
- applySBColor()
-
- putString(FABRICATED_SB_COLOR_SOURCE, "Custom")
-
- OverlayUtil.disableOverlay("IconifyComponentSBTint.overlay")
- }
- }
-
- @Suppress("unused")
- @Subscribe
- fun onDialogDismissed(event: ColorDismissedEvent) {
- if (event.dialogId == 1) {
- selectedStyle = Prefs.getString(FABRICATED_SB_COLOR_SOURCE)
- when (selectedStyle) {
- "System" -> binding.sbTintSystem.setChecked(true)
- "Monet" -> binding.sbTintMonet.setChecked(true)
- "Custom" -> binding.sbTintCustom.setChecked(true)
- }
- }
- }
-
- private fun applySBColor() {
- buildAndEnableOverlays(
- arrayOf(
- SYSTEMUI_PACKAGE,
- "colorSBTint1",
- "color",
- "dark_mode_icon_color_dual_tone_fill",
- colorToSpecialHex(colorSBTint!!.toInt())
- ), arrayOf(
- SYSTEMUI_PACKAGE,
- "colorSBTint2",
- "color",
- "dark_mode_icon_color_single_tone",
- colorToSpecialHex(colorSBTint!!.toInt())
- ), arrayOf(
- SYSTEMUI_PACKAGE,
- "colorSBTint3",
- "color",
- "dark_mode_qs_icon_color_dual_tone_fill",
- colorToSpecialHex(colorSBTint!!.toInt())
- ), arrayOf(
- SYSTEMUI_PACKAGE,
- "colorSBTint4",
- "color",
- "dark_mode_qs_icon_color_single_tone",
- colorToSpecialHex(colorSBTint!!.toInt())
- ), arrayOf(
- SYSTEMUI_PACKAGE,
- "colorSBTint5",
- "color",
- "light_mode_icon_color_dual_tone_fill",
- colorToSpecialHex(colorSBTint!!.toInt())
- ), arrayOf(
- SYSTEMUI_PACKAGE,
- "colorSBTint6",
- "color",
- "light_mode_icon_color_single_tone",
- colorToSpecialHex(colorSBTint!!.toInt())
- ), arrayOf(
- SYSTEMUI_PACKAGE,
- "colorSBTint7",
- "color",
- "status_bar_clock_color",
- colorToSpecialHex(colorSBTint!!.toInt())
- )
- )
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.restartSystemUI() },
- 1000
- )
- }
-
- private fun resetSBColor() {
- disableOverlays(
- "colorSBTint1",
- "colorSBTint2",
- "colorSBTint3",
- "colorSBTint4",
- "colorSBTint5",
- "colorSBTint6",
- "colorSBTint7"
- )
-
- OverlayUtil.disableOverlay("IconifyComponentSBTint.overlay")
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.restartSystemUI() },
- 1000
- )
- }
-
- override fun onStart() {
- super.onStart()
-
- EventBus.getDefault().register(this)
- }
-
- override fun onStop() {
- super.onStop()
-
- EventBus.getDefault().unregister(this)
- }
-
- companion object {
- private var colorSBTint: String? = null
- private var selectedStyle: String? = null
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/ToastFrame.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/ToastFrame.kt
deleted file mode 100644
index 2317f1c3e..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/ToastFrame.kt
+++ /dev/null
@@ -1,213 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.LinearLayout
-import android.widget.TextView
-import android.widget.Toast
-import androidx.core.content.ContextCompat
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
-import com.drdisagree.iconify.common.Preferences.SELECTED_TOAST_FRAME
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.databinding.FragmentToastFrameBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.dialogs.LoadingDialog
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.compiler.OnDemandCompiler.buildOverlay
-import java.io.IOException
-import java.util.concurrent.atomic.AtomicBoolean
-
-class ToastFrame : BaseFragment() {
-
- private lateinit var binding: FragmentToastFrameBinding
- private var loadingDialog: LoadingDialog? = null
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentToastFrameBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_toast_frame
- )
-
- // Loading dialog while enabling or disabling pack
- loadingDialog = LoadingDialog(requireContext())
-
- // Toast Frame style
- addItem(initToastFrameList())
-
- refreshBackground()
-
- return view
- }
-
- private fun initToastFrameList(): ArrayList> {
- val toastFrameStyle = ArrayList>().apply {
- add(arrayOf(R.drawable.toast_frame_style_1, R.string.style_0))
- add(arrayOf(R.drawable.toast_frame_style_1, R.string.style_1))
- add(arrayOf(R.drawable.toast_frame_style_2, R.string.style_2))
- add(arrayOf(R.drawable.toast_frame_style_3, R.string.style_3))
- add(arrayOf(R.drawable.toast_frame_style_4, R.string.style_4))
- add(arrayOf(R.drawable.toast_frame_style_5, R.string.style_5))
- add(arrayOf(R.drawable.toast_frame_style_6, R.string.style_6))
- add(arrayOf(R.drawable.toast_frame_style_7, R.string.style_7))
- add(arrayOf(R.drawable.toast_frame_style_8, R.string.style_8))
- add(arrayOf(R.drawable.toast_frame_style_9, R.string.style_9))
- add(arrayOf(R.drawable.toast_frame_style_10, R.string.style_10))
- add(arrayOf(R.drawable.toast_frame_style_11, R.string.style_11))
- }
-
- return toastFrameStyle
- }
-
- // Function to add new item in list
- @SuppressLint("UseCompatLoadingForDrawables")
- private fun addItem(pack: ArrayList>) {
- for (i in pack.indices) {
- val list = LayoutInflater.from(requireContext())
- .inflate(R.layout.view_toast_frame, binding.toastFrameContainer, false)
-
- val toastContainer = list.findViewById(R.id.toast_container)
- toastContainer.background = ContextCompat.getDrawable(appContext, pack[i][0] as Int)
-
- val styleName = list.findViewById(R.id.style_name)
- styleName.text = appContextLocale.resources.getString(pack[i][1] as Int)
-
- list.setOnClickListener {
- if (i == 0) {
- Prefs.putInt(SELECTED_TOAST_FRAME, -1)
-
- OverlayUtil.disableOverlay("IconifyComponentTSTFRM.overlay")
-
- Toast.makeText(
- appContext,
- appContextLocale.resources
- .getString(R.string.toast_disabled),
- Toast.LENGTH_SHORT
- ).show()
-
- return@setOnClickListener
- }
-
- if (!hasStoragePermission()) {
- requestStoragePermission(requireContext())
- } else {
- // Show loading dialog
- loadingDialog!!.show(appContextLocale.resources.getString(R.string.loading_dialog_wait))
-
- Thread {
- val hasErroredOut = AtomicBoolean(false)
-
- try {
- hasErroredOut.set(
- buildOverlay(
- "TSTFRM",
- i,
- FRAMEWORK_PACKAGE,
- true
- )
- )
- } catch (e: IOException) {
- hasErroredOut.set(true)
- Log.e("ToastFrame", e.toString())
- }
-
- if (!hasErroredOut.get()) {
- Prefs.putInt(SELECTED_TOAST_FRAME, i)
- refreshBackground()
- }
-
- Handler(Looper.getMainLooper()).postDelayed({
- // Hide loading dialog
- loadingDialog!!.hide()
-
- if (!hasErroredOut.get()) {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_applied),
- Toast.LENGTH_SHORT
- ).show()
- } else {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
- }
- }, 3000)
- }.start()
- }
- }
-
- binding.toastFrameContainer.addView(list)
- }
- }
-
- // Function to check for bg drawable changes
- private fun refreshBackground() {
- var selected = false
- for (i in 0 until binding.toastFrameContainer.childCount) {
- val child = binding.toastFrameContainer.getChildAt(i)
- .findViewById(R.id.list_item_toast)
-
- val title = child.findViewById(R.id.style_name)
-
- if (i == Prefs.getInt(SELECTED_TOAST_FRAME, -1)) {
- selected = true
- title.setTextColor(
- appContextLocale.resources.getColor(
- R.color.colorAccent,
- appContext.theme
- )
- )
- } else {
- title.setTextColor(
- appContextLocale.resources.getColor(
- R.color.textColorSecondary,
- appContext.theme
- )
- )
- }
- }
-
- if (!selected) {
- val child = binding.toastFrameContainer.getChildAt(0)
- .findViewById(R.id.list_item_toast)
-
- val title = child.findViewById(R.id.style_name)
-
- title.setTextColor(
- appContextLocale.resources.getColor(
- R.color.colorAccent,
- appContext.theme
- )
- )
- }
- }
-
- override fun onDestroy() {
- loadingDialog?.dismiss()
-
- super.onDestroy()
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Tweaks.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/Tweaks.kt
deleted file mode 100644
index 38363031b..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Tweaks.kt
+++ /dev/null
@@ -1,184 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Build
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.Toast
-import androidx.navigation.Navigation.findNavController
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.databinding.FragmentTweaksBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.ui.widgets.MenuWidget
-import com.drdisagree.iconify.utils.AppUtil.isLsposedInstalled
-
-class Tweaks : BaseFragment() {
-
- private lateinit var binding: FragmentTweaksBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentTweaksBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.navbar_tweaks
- )
-
- addItem(initTweaksItemList(view))
-
- return view
- }
-
- private fun initTweaksItemList(view: View): ArrayList> {
- val tweaksList = ArrayList>().apply {
- add(
- arrayOf(
- R.id.action_tweaks_to_colorEngine,
- resources.getString(R.string.activity_title_color_engine),
- resources.getString(R.string.activity_desc_color_engine),
- R.drawable.ic_tweaks_color
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_uiRoundness,
- resources.getString(R.string.activity_title_ui_roundness),
- resources.getString(R.string.activity_desc_ui_roundness),
- R.drawable.ic_tweaks_roundness
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_qsRowColumn,
- resources.getString(R.string.activity_title_qs_row_column),
- resources.getString(R.string.activity_desc_qs_row_column),
- R.drawable.ic_qs_row_column
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_qsIconLabel,
- resources.getString(R.string.activity_title_qs_icon_label),
- resources.getString(R.string.activity_desc_qs_icon_label),
- R.drawable.ic_qs_icon_and_label
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_qsTileSize,
- resources.getString(R.string.activity_title_qs_tile_size),
- resources.getString(R.string.activity_desc_qs_tile_size),
- R.drawable.ic_qs_tile_size
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_qsPanelMargin,
- resources.getString(R.string.activity_title_qs_panel_margin),
- resources.getString(R.string.activity_desc_qs_panel_margin),
- R.drawable.ic_qs_top_margin
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_statusbar,
- resources.getString(R.string.activity_title_statusbar),
- resources.getString(R.string.activity_desc_statusbar),
- R.drawable.ic_tweaks_statusbar
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_navigationBar,
- resources.getString(R.string.activity_title_navigation_bar),
- resources.getString(R.string.activity_desc_navigation_bar),
- R.drawable.ic_tweaks_navbar
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_mediaPlayer,
- resources.getString(R.string.activity_title_media_player),
- resources.getString(R.string.activity_desc_media_player),
- R.drawable.ic_tweaks_media
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_volumePanel,
- resources.getString(R.string.activity_title_volume_panel),
- resources.getString(R.string.activity_desc_volume_panel),
- R.drawable.ic_tweaks_volume
- )
- )
- add(
- arrayOf(
- R.id.action_tweaks_to_miscellaneous,
- resources.getString(R.string.activity_title_miscellaneous),
- resources.getString(R.string.activity_desc_miscellaneous),
- R.drawable.ic_tweaks_miscellaneous
- )
- )
- add(
- arrayOf(
- View.OnClickListener {
- // Check if LSPosed is installed or not
- if (!isLsposedInstalled) {
- Toast.makeText(
- appContext,
- resources.getString(R.string.toast_lsposed_not_found),
- Toast.LENGTH_SHORT
- ).show()
- return@OnClickListener
- }
- findNavController(view).navigate(R.id.action_tweaks_to_nav_xposed_menu)
- },
- resources.getString(R.string.activity_title_xposed_menu),
- resources.getString(R.string.activity_desc_xposed_menu),
- R.drawable.ic_tweaks_xposed_menu
- )
- )
- }
-
- return tweaksList
- }
-
- // Function to add new item in list
- private fun addItem(pack: ArrayList>) {
- for (i in pack.indices) {
- val menu = MenuWidget(requireActivity())
-
- menu.setTitle(pack[i][1] as String)
- menu.setSummary(pack[i][2] as String)
- menu.setIcon(pack[i][3] as Int)
- menu.setEndArrowVisibility(View.VISIBLE)
-
- if (pack[i][0] is View.OnClickListener) {
- menu.setOnClickListener(pack[i][0] as View.OnClickListener)
- } else if (pack[i][0] is Int) {
- menu.setOnClickListener {
- findNavController(
- binding.getRoot()
- ).navigate((pack[i][0] as Int))
- }
- }
-
- if (pack[i][1] == resources.getString(R.string.activity_title_media_player) && Build.VERSION.SDK_INT >= 33) {
- menu.visibility = View.GONE
- }
-
- binding.tweaksList.addView(menu)
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/VolumePanel.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/VolumePanel.kt
deleted file mode 100644
index 43dee18f2..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/VolumePanel.kt
+++ /dev/null
@@ -1,463 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.RadioGroup
-import android.widget.Toast
-import androidx.core.content.ContextCompat
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
-import com.drdisagree.iconify.common.Preferences.VOLUME_PANEL_BACKGROUND_WIDTH
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.databinding.FragmentVolumePanelBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.dialogs.InfoDialog
-import com.drdisagree.iconify.ui.dialogs.LoadingDialog
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.RootUtil.isApatchInstalled
-import com.drdisagree.iconify.utils.RootUtil.isKSUInstalled
-import com.drdisagree.iconify.utils.RootUtil.isMagiskInstalled
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.overlay.compiler.VolumeCompiler.buildModule
-import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
-import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
-import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
-import com.google.android.material.button.MaterialButton
-import java.util.concurrent.atomic.AtomicBoolean
-
-class VolumePanel : BaseFragment() {
-
- private lateinit var binding: FragmentVolumePanelBinding
- private var loadingDialog: LoadingDialog? = null
- private var infoDialog: InfoDialog? = null
- private var finalCheckedId = -1
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentVolumePanelBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_volume_panel
- )
-
- binding.thinBg.isChecked = Prefs.getInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0) == 1
- binding.thinBg.addOnCheckedChangeListener { button: MaterialButton, isChecked: Boolean ->
- if (button.isPressed) {
- if (!hasStoragePermission()) {
- requestStoragePermission(requireContext())
- binding.toggleButtonGroup.uncheck(binding.thinBg.id)
- } else {
- if (isChecked) {
- binding.toggleButtonGroup.uncheck(binding.thickBg.id)
- binding.toggleButtonGroup.uncheck(binding.noBg.id)
-
- Prefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 1)
-
- buildOverlayWithResource(
- requireContext(),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "volume_dialog_slider_width",
- "42dp"
- ),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "volume_dialog_track_width",
- "4dp"
- ),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "rounded_slider_track_inset",
- "22dp"
- )
- )
- } else {
- Prefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0)
-
- removeResourceFromOverlay(
- requireContext(),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_slider_width"),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_track_width"),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "rounded_slider_track_inset")
- )
- }
- }
- }
- }
-
- binding.thickBg.isChecked = Prefs.getInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0) == 2
- binding.thickBg.addOnCheckedChangeListener { button: MaterialButton, isChecked: Boolean ->
- if (button.isPressed) {
- if (!hasStoragePermission()) {
- requestStoragePermission(requireContext())
- binding.toggleButtonGroup.uncheck(binding.thickBg.id)
- } else {
- if (isChecked) {
- binding.toggleButtonGroup.uncheck(binding.thinBg.id)
- binding.toggleButtonGroup.uncheck(binding.noBg.id)
-
- Prefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 2)
-
- buildOverlayWithResource(
- requireContext(),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "volume_dialog_slider_width",
- "42dp"
- ),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "volume_dialog_track_width",
- "42dp"
- ),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "rounded_slider_track_inset",
- "0dp"
- )
- )
- } else {
- Prefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0)
-
- removeResourceFromOverlay(
- requireContext(),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_slider_width"),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_track_width"),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "rounded_slider_track_inset")
- )
- }
- }
- }
- }
-
- binding.noBg.isChecked = Prefs.getInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0) == 3
- binding.noBg.addOnCheckedChangeListener { button: MaterialButton, isChecked: Boolean ->
- if (button.isPressed) {
- if (!hasStoragePermission()) {
- requestStoragePermission(requireContext())
- binding.toggleButtonGroup.uncheck(binding.noBg.id)
- } else {
- if (isChecked) {
- binding.toggleButtonGroup.uncheck(binding.thinBg.id)
- binding.toggleButtonGroup.uncheck(binding.thickBg.id)
-
- Prefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 3)
-
- buildOverlayWithResource(
- requireContext(),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "volume_dialog_slider_width",
- "42dp"
- ),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "volume_dialog_track_width",
- "0dp"
- ),
- ResourceEntry(
- SYSTEMUI_PACKAGE,
- "dimen",
- "rounded_slider_track_inset",
- "24dp"
- )
- )
- } else {
- Prefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0)
-
- removeResourceFromOverlay(
- requireContext(),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_slider_width"),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_track_width"),
- ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "rounded_slider_track_inset")
- )
- }
- }
- }
- }
-
- // Loading dialog while creating modules
- loadingDialog = LoadingDialog(requireContext())
-
- // Credits dialog for volume style modules
- infoDialog = InfoDialog(requireContext())
-
- // Volume style
- binding.volumeStyle.volumeStyleInfo.setOnClickListener {
- infoDialog!!.show(
- R.string.read_carefully,
- R.string.volume_module_installation_guide
- )
- }
-
- binding.volumeStyle.volumeStyle1.clearCheck()
- binding.volumeStyle.volumeStyle2.clearCheck()
-
- binding.volumeStyle.volumeStyle1.setOnCheckedChangeListener(listener1)
- binding.volumeStyle.volumeStyle2.setOnCheckedChangeListener(listener2)
-
- val checkedId1 = binding.volumeStyle.volumeStyle1.checkedRadioButtonId
- val checkedId2 = binding.volumeStyle.volumeStyle2.checkedRadioButtonId
- finalCheckedId = if (checkedId1 == -1) checkedId2 else checkedId1
-
- binding.volumeStyle.volumeStyleCreateModule.setOnClickListener {
- if ((isKSUInstalled || isApatchInstalled) && !isMagiskInstalled) {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_only_magisk_supported),
- Toast.LENGTH_SHORT
- ).show()
-
- return@setOnClickListener
- }
-
- if (!hasStoragePermission()) {
- requestStoragePermission(requireContext())
- } else {
- if (finalCheckedId == -1) {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_select_style),
- Toast.LENGTH_SHORT
- ).show()
- } else {
- installVolumeModule(finalCheckedId)
- }
- }
- }
-
- return view
- }
-
- @SuppressLint("NonConstantResourceId")
- private fun installVolumeModule(volume: Int) {
- loadingDialog!!.show(resources.getString(R.string.loading_dialog_wait))
-
- val hasErroredOut = AtomicBoolean(false)
-
- val selectedStyle: String = when (volume) {
- R.id.gradient_style -> "VolumeGradient"
- R.id.doublelayer_style -> "VolumeDoubleLayer"
- R.id.shadedlayer_style -> "VolumeShadedLayer"
- R.id.neumorph_style -> "VolumeNeumorph"
- R.id.outline_style -> "VolumeOutline"
- R.id.neumorphoutline_style -> "VolumeNeumorphOutline"
- else -> return
- }
-
- Thread {
- try {
- hasErroredOut.set(buildModule(selectedStyle, SYSTEMUI_PACKAGE))
- } catch (e: Exception) {
- hasErroredOut.set(true)
- Log.e("VolumePanel", e.toString())
- }
-
- Handler(Looper.getMainLooper()).postDelayed({
- loadingDialog!!.hide()
-
- if (hasErroredOut.get()) {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
- } else {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_module_created),
- Toast.LENGTH_SHORT
- ).show()
- }
- }, 2000)
- }.start()
- }
-
- private fun updateVolumePreview(id: Int) {
- when (id) {
- R.id.gradient_style -> setVolumeDrawable(
- ringerDrawable = R.drawable.volume_gradient,
- progressDrawable = R.drawable.volume_gradient,
- ringerInverse = false,
- progressInverse = false
- )
-
- R.id.doublelayer_style -> setVolumeDrawable(
- ringerDrawable = R.drawable.volume_double_layer,
- progressDrawable = R.drawable.volume_double_layer,
- ringerInverse = false,
- progressInverse = false
- )
-
- R.id.shadedlayer_style -> setVolumeDrawable(
- ringerDrawable = R.drawable.volume_shaded_layer,
- progressDrawable = R.drawable.volume_shaded_layer,
- ringerInverse = false,
- progressInverse = false
- )
-
- R.id.neumorph_style -> setVolumeDrawable(
- ringerDrawable = R.drawable.volume_neumorph,
- progressDrawable = R.drawable.volume_neumorph,
- ringerInverse = false,
- progressInverse = false
- )
-
- R.id.outline_style -> setVolumeDrawable(
- ringerDrawable = R.drawable.volume_outline_ringer,
- progressDrawable = R.drawable.volume_outline,
- ringerInverse = true,
- progressInverse = false
- )
-
- R.id.neumorphoutline_style -> setVolumeDrawable(
- ringerDrawable = R.drawable.volume_neumorph_outline_ringer,
- progressDrawable = R.drawable.volume_neumorph_outline,
- ringerInverse = true,
- progressInverse = false
- )
- }
- }
-
- private fun setVolumeDrawable(
- ringerDrawable: Int,
- progressDrawable: Int,
- ringerInverse: Boolean,
- progressInverse: Boolean
- ) {
- binding.volumeThinBg.volumeRingerBg.background =
- ContextCompat.getDrawable(appContext, ringerDrawable)
- binding.volumeThinBg.volumeProgressDrawable.background =
- ContextCompat.getDrawable(appContext, progressDrawable)
- binding.volumeThickBg.volumeRingerBg.background =
- ContextCompat.getDrawable(appContext, ringerDrawable)
- binding.volumeThickBg.volumeProgressDrawable.background =
- ContextCompat.getDrawable(appContext, progressDrawable)
- binding.volumeNoBg.volumeRingerBg.background =
- ContextCompat.getDrawable(appContext, ringerDrawable)
- binding.volumeNoBg.volumeProgressDrawable.background =
- ContextCompat.getDrawable(appContext, progressDrawable)
-
- if (ringerInverse) {
- binding.volumeThinBg.volumeRingerIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimary
- )
- )
- binding.volumeThickBg.volumeRingerIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimary
- )
- )
- binding.volumeNoBg.volumeRingerIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimary
- )
- )
- } else {
- binding.volumeThinBg.volumeRingerIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimaryInverse
- )
- )
- binding.volumeThickBg.volumeRingerIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimaryInverse
- )
- )
- binding.volumeNoBg.volumeRingerIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimaryInverse
- )
- )
- }
- if (progressInverse) {
- binding.volumeThinBg.volumeProgressIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimary
- )
- )
- binding.volumeThickBg.volumeProgressIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimary
- )
- )
- binding.volumeNoBg.volumeProgressIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimary
- )
- )
- } else {
- binding.volumeThinBg.volumeProgressIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimaryInverse
- )
- )
- binding.volumeThickBg.volumeProgressIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimaryInverse
- )
- )
- binding.volumeNoBg.volumeProgressIcon.setBackgroundTintList(
- ContextCompat.getColorStateList(
- appContext, R.color.textColorPrimaryInverse
- )
- )
- }
- }
-
- override fun onDestroy() {
- loadingDialog?.dismiss()
-
- super.onDestroy()
- }
-
- private val listener1: RadioGroup.OnCheckedChangeListener =
- RadioGroup.OnCheckedChangeListener { _, checkedId ->
- if (checkedId != -1) {
- binding.volumeStyle.volumeStyle2.setOnCheckedChangeListener(null)
- binding.volumeStyle.volumeStyle2.clearCheck()
- binding.volumeStyle.volumeStyle2.setOnCheckedChangeListener(listener2)
- finalCheckedId = checkedId
- }
-
- updateVolumePreview(checkedId)
- }
-
- private val listener2: RadioGroup.OnCheckedChangeListener =
- RadioGroup.OnCheckedChangeListener { _, checkedId ->
- if (checkedId != -1) {
- binding.volumeStyle.volumeStyle1.setOnCheckedChangeListener(null)
- binding.volumeStyle.volumeStyle1.clearCheck()
- binding.volumeStyle.volumeStyle1.setOnCheckedChangeListener(listener1)
- finalCheckedId = checkedId
- }
-
- updateVolumePreview(checkedId)
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedBackgroundChip.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedBackgroundChip.kt
deleted file mode 100644
index 83ffa918e..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedBackgroundChip.kt
+++ /dev/null
@@ -1,244 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.annotation.SuppressLint
-import android.graphics.Color
-import android.os.Build
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import android.widget.LinearLayout
-import android.widget.TextView
-import androidx.core.content.ContextCompat
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.CHIP_QSSTATUSICONS_STYLE
-import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCKBG_STYLE
-import com.drdisagree.iconify.common.Preferences.QSPANEL_STATUSICONSBG_SWITCH
-import com.drdisagree.iconify.common.Preferences.STATUSBAR_CLOCKBG_SWITCH
-import com.drdisagree.iconify.common.Preferences.STATUSBAR_CLOCK_COLOR_CODE
-import com.drdisagree.iconify.common.Preferences.STATUSBAR_CLOCK_COLOR_OPTION
-import com.drdisagree.iconify.config.RPrefs
-import com.drdisagree.iconify.databinding.FragmentXposedBackgroundChipBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.enableOverlay
-
-class XposedBackgroundChip : BaseFragment() {
-
- private lateinit var binding: FragmentXposedBackgroundChipBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedBackgroundChipBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_background_chip
- )
-
- // Statusbar clock Chip
- binding.clockBgChip.isSwitchChecked = RPrefs.getBoolean(STATUSBAR_CLOCKBG_SWITCH, false)
- binding.clockBgChip.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- RPrefs.putBoolean(STATUSBAR_CLOCKBG_SWITCH, isChecked)
-
- binding.clockTextColor.setEnabled(isChecked)
- binding.clockTextColorPicker.setEnabled(isChecked)
-
- if (!isChecked) {
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- }
-
- // Statusbar clock chip style
- addItemStatusBar(initStatusBarChipStyles())
- refreshBackgroundStatusBar()
-
- // Statusbar Clock Color
- binding.clockTextColor.setEnabled(RPrefs.getBoolean(STATUSBAR_CLOCKBG_SWITCH, false))
- binding.clockTextColor.setSelectedIndex(RPrefs.getInt(STATUSBAR_CLOCK_COLOR_OPTION, 0))
- binding.clockTextColor.setOnItemSelectedListener { index: Int ->
- RPrefs.putInt(STATUSBAR_CLOCK_COLOR_OPTION, index)
- binding.clockTextColorPicker.visibility = if (index == 2) View.VISIBLE else View.GONE
- }
-
- // Clock Color Picker
- binding.clockTextColorPicker.setEnabled(
- RPrefs.getBoolean(
- STATUSBAR_CLOCKBG_SWITCH,
- false
- )
- )
- binding.clockTextColorPicker.visibility =
- if (RPrefs.getInt(STATUSBAR_CLOCK_COLOR_OPTION, 0) == 2) {
- View.VISIBLE
- } else {
- View.GONE
- }
- binding.clockTextColorPicker.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = RPrefs.getInt(STATUSBAR_CLOCK_COLOR_CODE, Color.WHITE),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.clockTextColorPicker.setOnColorSelectedListener { color: Int ->
- binding.clockTextColorPicker.previewColor = color
- RPrefs.putInt(STATUSBAR_CLOCK_COLOR_CODE, color)
- }
-
- // Status icons chip
- binding.statusIconsChip.isSwitchChecked =
- RPrefs.getBoolean(QSPANEL_STATUSICONSBG_SWITCH, false)
- binding.statusIconsChip.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- RPrefs.putBoolean(QSPANEL_STATUSICONSBG_SWITCH, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed({
- enableOverlay("IconifyComponentIXCC.overlay")
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }, SWITCH_ANIMATION_DELAY)
- }
-
- // Status icons chip style
- addItemStatusIcons(initStatusIconsChipStyles())
- refreshBackgroundStatusIcons()
-
- return view
- }
-
- private fun initStatusBarChipStyles(): ArrayList> {
- val statusBarChipStyle = ArrayList>().apply {
- add(arrayOf(R.drawable.chip_status_bar_1, R.string.style_1))
- add(arrayOf(R.drawable.chip_status_bar_2, R.string.style_2))
- add(arrayOf(R.drawable.chip_status_bar_3, R.string.style_3))
- add(arrayOf(R.drawable.chip_status_bar_4, R.string.style_4))
- add(arrayOf(R.drawable.chip_status_bar_5, R.string.style_5))
- add(arrayOf(R.drawable.chip_status_bar_6, R.string.style_6))
- add(arrayOf(R.drawable.chip_status_bar_7, R.string.style_7))
- }
-
- return statusBarChipStyle
- }
-
- private fun initStatusIconsChipStyles(): ArrayList> {
- val statusIconsChipStyle = ArrayList>().apply {
- add(arrayOf(R.drawable.chip_status_icons_1, R.string.style_1))
- add(arrayOf(R.drawable.chip_status_icons_2, R.string.style_2))
- add(arrayOf(R.drawable.chip_status_icons_3, R.string.style_3))
- add(arrayOf(R.drawable.chip_status_icons_4, R.string.style_4))
- add(arrayOf(R.drawable.chip_status_icons_5, R.string.style_5))
- add(arrayOf(R.drawable.chip_status_icons_6, R.string.style_6))
- }
-
- return statusIconsChipStyle
- }
-
- // Function to add new item in list
- @SuppressLint("UseCompatLoadingForDrawables")
- private fun addItemStatusBar(pack: ArrayList>) {
- for (i in pack.indices) {
- val list = LayoutInflater.from(requireContext())
- .inflate(
- R.layout.view_status_bar_chip,
- binding.statusBarChipContainer,
- false
- )
-
- val clockContainer = list.findViewById(R.id.clock_container)
- clockContainer.background = ContextCompat.getDrawable(appContext, pack[i][0] as Int)
-
- val styleName = list.findViewById(R.id.style_name)
- styleName.text = resources.getString(pack[i][1] as Int)
-
- list.setOnClickListener {
- RPrefs.putInt(CHIP_STATUSBAR_CLOCKBG_STYLE, i)
- refreshBackgroundStatusBar()
- }
-
- binding.statusBarChipContainer.addView(list)
- }
- }
-
- // Function to check for bg drawable changes
- private fun refreshBackgroundStatusBar() {
- for (i in 0 until binding.statusBarChipContainer.childCount) {
- val child = binding.statusBarChipContainer.getChildAt(i)
- .findViewById(R.id.list_item_chip)
-
- val title = child.findViewById(R.id.style_name)
-
- if (i == RPrefs.getInt(CHIP_STATUSBAR_CLOCKBG_STYLE, 0)) {
- title.setTextColor(resources.getColor(R.color.colorAccent, appContext.theme))
- } else {
- title.setTextColor(resources.getColor(R.color.textColorSecondary, appContext.theme))
- }
- }
- }
-
- // Function to add new item in list
- private fun addItemStatusIcons(pack: ArrayList>) {
- for (i in pack.indices) {
- val list = LayoutInflater.from(requireContext())
- .inflate(R.layout.view_status_icons_chip, binding.statusIconsChipContainer, false)
-
- val iconContainer = list.findViewById(R.id.clock_container)
- iconContainer.background = ContextCompat.getDrawable(appContext, pack[i][0] as Int)
-
- val styleName = list.findViewById(R.id.style_name)
- styleName.text = resources.getString(pack[i][1] as Int)
-
- list.setOnClickListener {
- RPrefs.putInt(CHIP_QSSTATUSICONS_STYLE, i)
-
- refreshBackgroundStatusIcons()
-
- if (RPrefs.getBoolean(
- QSPANEL_STATUSICONSBG_SWITCH,
- false
- ) && Build.VERSION.SDK_INT < 33
- ) {
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.doubleToggleDarkMode() },
- SWITCH_ANIMATION_DELAY
- )
- }
- }
- binding.statusIconsChipContainer.addView(list)
- }
- }
-
- // Function to check for bg drawable changes
- private fun refreshBackgroundStatusIcons() {
- for (i in 0 until binding.statusIconsChipContainer.childCount) {
- val child = binding.statusIconsChipContainer.getChildAt(i)
- .findViewById(R.id.list_item_chip)
-
- val title = child.findViewById(R.id.style_name)
-
- if (i == RPrefs.getInt(CHIP_QSSTATUSICONS_STYLE, 0)) {
- title.setTextColor(resources.getColor(R.color.colorAccent, appContext.theme))
- } else {
- title.setTextColor(resources.getColor(R.color.textColorSecondary, appContext.theme))
- }
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedBatteryStyle.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedBatteryStyle.kt
deleted file mode 100644
index f37bf0cd8..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedBatteryStyle.kt
+++ /dev/null
@@ -1,514 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.graphics.Color
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_CIRCLE
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_DEFAULT
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_DEFAULT_LANDSCAPE
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_DEFAULT_RLANDSCAPE
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_DOTTED_CIRCLE
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_FILLED_CIRCLE
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYL
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYM
-import com.drdisagree.iconify.common.Preferences.BATTERY_STYLE_LANDSCAPE_IOS_16
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_BLEND_COLOR
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_COLOR
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_MARGIN_LEFT
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_MARGIN_RIGHT
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_STYLE
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_SWITCH
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_WIDTH_HEIGHT
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_DIMENSION
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_FILL_ALPHA
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_FILL_COLOR
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_FILL_GRAD_COLOR
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_HEIGHT
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_HIDE_BATTERY
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_HIDE_PERCENTAGE
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_INSIDE_PERCENTAGE
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_LAYOUT_REVERSE
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_MARGIN_BOTTOM
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_MARGIN_LEFT
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_MARGIN_RIGHT
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_MARGIN_TOP
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_PERIMETER_ALPHA
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_POWERSAVE_FILL_COLOR
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_POWERSAVE_INDICATOR_COLOR
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_RAINBOW_FILL_COLOR
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_STYLE
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_SWAP_PERCENTAGE
-import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_WIDTH
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.getInt
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.config.RPrefs.putInt
-import com.drdisagree.iconify.databinding.FragmentXposedBatteryStyleBinding
-import com.drdisagree.iconify.databinding.ViewXposedBatteryChargingIconBinding
-import com.drdisagree.iconify.databinding.ViewXposedBatteryColorBinding
-import com.drdisagree.iconify.databinding.ViewXposedBatteryDimensionBinding
-import com.drdisagree.iconify.databinding.ViewXposedBatteryMiscBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.getBatteryDrawables
-import com.drdisagree.iconify.ui.utils.ViewHelper.getChargingIcons
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.google.android.material.slider.Slider
-
-
-class XposedBatteryStyle : BaseFragment() {
-
- private lateinit var binding: FragmentXposedBatteryStyleBinding
- private lateinit var bindingMiscSettings: ViewXposedBatteryMiscBinding
- private lateinit var bindingCustomColors: ViewXposedBatteryColorBinding
- private lateinit var bindingCustomDimens: ViewXposedBatteryDimensionBinding
- private lateinit var bindingChargingIcon: ViewXposedBatteryChargingIconBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedBatteryStyleBinding.inflate(inflater, container, false)
- bindingMiscSettings = ViewXposedBatteryMiscBinding.bind(binding.getRoot())
- bindingCustomColors = ViewXposedBatteryColorBinding.bind(binding.getRoot())
- bindingCustomDimens = ViewXposedBatteryDimensionBinding.bind(binding.getRoot())
- bindingChargingIcon = ViewXposedBatteryChargingIconBinding.bind(binding.getRoot())
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_battery_style
- )
-
- // Custom battery style
- binding.customBatteryStyle.setSelectedIndex(getInt(CUSTOM_BATTERY_STYLE, 0))
- binding.customBatteryStyle.setDrawable(getBatteryDrawables(requireContext()))
- binding.customBatteryStyle.setOnItemClickListener { index: Int ->
- selectedBatteryStyle = index
- binding.customBatteryStyle.setCurrentValue(index.toString())
- updateLayoutVisibility()
- }
- selectedBatteryStyle = getInt(CUSTOM_BATTERY_STYLE, 0)
-
- // Apply battery style
- binding.applyBatteryStyle.setOnClickListener {
- putInt(CUSTOM_BATTERY_STYLE, selectedBatteryStyle)
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- miscSettings()
- customColors()
- customDimension()
- customChargingIcon()
- updateLayoutVisibility()
-
- return view
- }
-
- private fun miscSettings() {
- // Battery width
- bindingMiscSettings.batteryWidth.sliderValue = getInt(CUSTOM_BATTERY_WIDTH, 20)
- bindingMiscSettings.batteryWidth.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_WIDTH,
- slider.value.toInt()
- )
- }
- bindingMiscSettings.batteryWidth.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- if (selectedBatteryStyle < 3) {
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- }
- })
-
- // Battery height
- bindingMiscSettings.batteryHeight.sliderValue = getInt(CUSTOM_BATTERY_HEIGHT, 20)
- bindingMiscSettings.batteryHeight.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_HEIGHT,
- slider.value.toInt()
- )
- }
- bindingMiscSettings.batteryHeight.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- if (selectedBatteryStyle < 3) {
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- }
- })
-
- // Hide percentage
- bindingMiscSettings.hidePercentage.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_HIDE_PERCENTAGE, false)
- bindingMiscSettings.hidePercentage.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(CUSTOM_BATTERY_HIDE_PERCENTAGE, isSwitchChecked)
- updateLayoutVisibility()
- }
-
- // Inside percentage
- bindingMiscSettings.insidePercentage.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_INSIDE_PERCENTAGE, false)
- bindingMiscSettings.insidePercentage.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(
- CUSTOM_BATTERY_INSIDE_PERCENTAGE,
- isSwitchChecked
- )
- }
-
- // Hide battery
- bindingMiscSettings.hideBattery.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_HIDE_BATTERY, false)
- bindingMiscSettings.hideBattery.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(CUSTOM_BATTERY_HIDE_BATTERY, isSwitchChecked)
- updateLayoutVisibility()
- }
-
- // Reverse layout
- bindingMiscSettings.reverseLayout.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_SWAP_PERCENTAGE, false)
- bindingMiscSettings.reverseLayout.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(
- CUSTOM_BATTERY_SWAP_PERCENTAGE,
- isSwitchChecked
- )
- }
-
- // Rotate layout
- bindingMiscSettings.rotateLayout.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_LAYOUT_REVERSE, false)
- bindingMiscSettings.rotateLayout.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(
- CUSTOM_BATTERY_LAYOUT_REVERSE,
- isSwitchChecked
- )
- }
- }
-
- private fun customColors() {
- // Perimeter alpha
- bindingCustomColors.perimeterAlpha.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_PERIMETER_ALPHA, false)
- bindingCustomColors.perimeterAlpha.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(
- CUSTOM_BATTERY_PERIMETER_ALPHA,
- isSwitchChecked
- )
- }
-
- // Fill alpha
- bindingCustomColors.fillAlpha.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_FILL_ALPHA, false)
- bindingCustomColors.fillAlpha.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(
- CUSTOM_BATTERY_FILL_ALPHA,
- isSwitchChecked
- )
- }
-
- // Rainbow color
- bindingCustomColors.rainbowColor.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_RAINBOW_FILL_COLOR, false)
- bindingCustomColors.rainbowColor.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(
- CUSTOM_BATTERY_RAINBOW_FILL_COLOR,
- isSwitchChecked
- )
- }
-
- // Blend color
- bindingCustomColors.blendColor.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_BLEND_COLOR, false)
- bindingCustomColors.blendColor.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(CUSTOM_BATTERY_BLEND_COLOR, isSwitchChecked)
- updateLayoutVisibility()
- }
-
- // Fill color picker
- bindingCustomColors.fillColor.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(CUSTOM_BATTERY_FILL_COLOR, Color.BLACK),
- showPresets = true,
- showAlphaSlider = false,
- showColorShades = true
- )
- bindingCustomColors.fillColor.setOnColorSelectedListener { color: Int ->
- putInt(
- CUSTOM_BATTERY_FILL_COLOR,
- color
- )
- }
-
- // Fill gradient color picker
- bindingCustomColors.fillGradientColor.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(CUSTOM_BATTERY_FILL_GRAD_COLOR, Color.BLACK),
- showPresets = true,
- showAlphaSlider = false,
- showColorShades = true
- )
- bindingCustomColors.fillGradientColor.setOnColorSelectedListener { color: Int ->
- putInt(
- CUSTOM_BATTERY_FILL_GRAD_COLOR,
- color
- )
- }
-
- // Charging fill color picker
- bindingCustomColors.chargingFillColor.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(CUSTOM_BATTERY_CHARGING_COLOR, Color.BLACK),
- showPresets = true,
- showAlphaSlider = false,
- showColorShades = true
- )
- bindingCustomColors.chargingFillColor.setOnColorSelectedListener { color: Int ->
- putInt(
- CUSTOM_BATTERY_CHARGING_COLOR,
- color
- )
- }
-
- // Power save fill color picker
- bindingCustomColors.powersaveFillColor.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(CUSTOM_BATTERY_POWERSAVE_FILL_COLOR, Color.BLACK),
- showPresets = true,
- showAlphaSlider = false,
- showColorShades = true
- )
- bindingCustomColors.powersaveFillColor.setOnColorSelectedListener { color: Int ->
- putInt(
- CUSTOM_BATTERY_POWERSAVE_FILL_COLOR,
- color
- )
- }
-
- // Power save icon color picker
- bindingCustomColors.powersaveIconColor.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(CUSTOM_BATTERY_POWERSAVE_INDICATOR_COLOR, Color.BLACK),
- showPresets = true,
- showAlphaSlider = false,
- showColorShades = true
- )
- bindingCustomColors.powersaveIconColor.setOnColorSelectedListener { color: Int ->
- putInt(
- CUSTOM_BATTERY_POWERSAVE_INDICATOR_COLOR,
- color
- )
- }
- }
-
- private fun customDimension() {
- // Custom dimensions
- bindingCustomDimens.customDimensions.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_DIMENSION, false)
- bindingCustomDimens.customDimensions.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(CUSTOM_BATTERY_DIMENSION, isSwitchChecked)
- updateLayoutVisibility()
- }
-
- // Battery margin left
- bindingCustomDimens.batteryMarginLeft.sliderValue =
- getInt(CUSTOM_BATTERY_MARGIN_LEFT, 4)
- bindingCustomDimens.batteryMarginLeft.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_MARGIN_LEFT,
- slider.value.toInt()
- )
- }
-
- // Battery margin right
- bindingCustomDimens.batteryMarginRight.sliderValue =
- getInt(CUSTOM_BATTERY_MARGIN_RIGHT, 4)
- bindingCustomDimens.batteryMarginRight.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_MARGIN_RIGHT,
- slider.value.toInt()
- )
- }
-
- // Battery margin top
- bindingCustomDimens.batteryMarginTop.sliderValue =
- getInt(CUSTOM_BATTERY_MARGIN_TOP, 0)
- bindingCustomDimens.batteryMarginTop.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_MARGIN_TOP,
- slider.value.toInt()
- )
- }
-
- // Battery margin bottom
- bindingCustomDimens.batteryMarginBottom.sliderValue =
- getInt(CUSTOM_BATTERY_MARGIN_BOTTOM, 0)
- bindingCustomDimens.batteryMarginBottom.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_MARGIN_BOTTOM,
- slider.value.toInt()
- )
- }
- }
-
- private fun customChargingIcon() {
- // Enable charging icon
- bindingChargingIcon.enableChargingIcon.isSwitchChecked =
- getBoolean(CUSTOM_BATTERY_CHARGING_ICON_SWITCH, false)
- bindingChargingIcon.enableChargingIcon.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(CUSTOM_BATTERY_CHARGING_ICON_SWITCH, isSwitchChecked)
- updateLayoutVisibility()
- }
-
- // Charging icon style
- bindingChargingIcon.chargingIconStyle.setSelectedIndex(
- getInt(
- CUSTOM_BATTERY_CHARGING_ICON_STYLE,
- 0
- )
- )
- bindingChargingIcon.chargingIconStyle.setDrawable(getChargingIcons(requireContext()))
- bindingChargingIcon.chargingIconStyle.setCurrentValue(
- getInt(
- CUSTOM_BATTERY_CHARGING_ICON_STYLE,
- 0
- ).toString()
- )
- bindingChargingIcon.chargingIconStyle.setOnItemClickListener { index: Int ->
- bindingChargingIcon.chargingIconStyle.setCurrentValue(index.toString())
- putInt(CUSTOM_BATTERY_CHARGING_ICON_STYLE, index)
- }
-
- // Charging icon margin left
- bindingChargingIcon.chargingIconMarginLeft.sliderValue =
- getInt(CUSTOM_BATTERY_CHARGING_ICON_MARGIN_LEFT, 1)
- bindingChargingIcon.chargingIconMarginLeft.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_CHARGING_ICON_MARGIN_LEFT,
- slider.value.toInt()
- )
- }
-
- // Charging icon margin right
- bindingChargingIcon.chargingIconMarginRight.sliderValue =
- getInt(CUSTOM_BATTERY_CHARGING_ICON_MARGIN_RIGHT, 0)
- bindingChargingIcon.chargingIconMarginRight.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_CHARGING_ICON_MARGIN_RIGHT,
- slider.value.toInt()
- )
- }
-
- // Charging icon size
- bindingChargingIcon.chargingIconSize.sliderValue =
- getInt(CUSTOM_BATTERY_CHARGING_ICON_WIDTH_HEIGHT, 14)
- bindingChargingIcon.chargingIconSize.setOnSliderChangeListener { slider: Slider, _: Float, _: Boolean ->
- putInt(
- CUSTOM_BATTERY_CHARGING_ICON_WIDTH_HEIGHT,
- slider.value.toInt()
- )
- }
- }
-
- private fun updateLayoutVisibility() {
- val selectedIndex = selectedBatteryStyle
- val batteryStyles = listOf(*resources.getStringArray(R.array.custom_battery_style))
- val showAdvancedCustomizations =
- selectedIndex >= batteryStyles.indexOf(getString(R.string.battery_landscape_battery_a)) &&
- selectedIndex <= batteryStyles.indexOf(getString(R.string.battery_landscape_battery_o))
- val showColorPickers = bindingCustomColors.blendColor.isSwitchChecked
- val showRainbowBattery =
- batteryStyles.indexOf(getString(R.string.battery_landscape_battery_i)) == selectedIndex ||
- batteryStyles.indexOf(getString(R.string.battery_landscape_battery_j)) == selectedIndex
- val showCommonCustomizations = selectedIndex != 0
- val showBatteryDimensions =
- selectedIndex > 2 && bindingCustomDimens.customDimensions.isSwitchChecked
- val showPercentage =
- selectedIndex != BATTERY_STYLE_DEFAULT &&
- selectedIndex != BATTERY_STYLE_DEFAULT_LANDSCAPE &&
- selectedIndex != BATTERY_STYLE_DEFAULT_RLANDSCAPE &&
- selectedIndex != BATTERY_STYLE_LANDSCAPE_IOS_16 &&
- selectedIndex != BATTERY_STYLE_LANDSCAPE_BATTERYL &&
- selectedIndex != BATTERY_STYLE_LANDSCAPE_BATTERYM
- val showInsidePercentage =
- showPercentage && !bindingMiscSettings.hidePercentage.isSwitchChecked
- val showChargingIconCustomization =
- selectedIndex > 2 && bindingChargingIcon.enableChargingIcon.isSwitchChecked
- val showReverseLayout = selectedIndex > 2 && showInsidePercentage
- val circleBattery = selectedIndex == BATTERY_STYLE_CIRCLE ||
- selectedIndex == BATTERY_STYLE_DOTTED_CIRCLE ||
- selectedIndex == BATTERY_STYLE_FILLED_CIRCLE
- val visibilityAdvanced = if (showAdvancedCustomizations) View.VISIBLE else View.GONE
- val visibilityBlendColor =
- if (showAdvancedCustomizations || circleBattery) View.VISIBLE else View.GONE
- val visibilityColorPickers =
- if ((showAdvancedCustomizations || circleBattery) && showColorPickers) View.VISIBLE else View.GONE
- val visibilityRainbow =
- if ((showAdvancedCustomizations || circleBattery) && showRainbowBattery) View.VISIBLE else View.GONE
- val visibilityWh = if (selectedIndex > 2) View.VISIBLE else View.GONE
- val visibilityDimensions = if (showBatteryDimensions) View.VISIBLE else View.GONE
- val visibilityPercentage = if (showPercentage) View.VISIBLE else View.GONE
- val visibilityInsidePercentage = if (showInsidePercentage) View.VISIBLE else View.GONE
- val visibilityReverseLayout = if (showReverseLayout) View.VISIBLE else View.GONE
- val visibilityChargingIconSwitch = if (selectedIndex > 2) View.VISIBLE else View.GONE
- val visibilityChargingIconCustomization =
- if (showChargingIconCustomization) View.VISIBLE else View.GONE
-
- // Misc settings
- bindingMiscSettings.batteryWidth.setEnabled(showCommonCustomizations)
- bindingMiscSettings.batteryHeight.setEnabled(showCommonCustomizations)
- bindingMiscSettings.hidePercentage.visibility = visibilityPercentage
- bindingMiscSettings.insidePercentage.visibility = visibilityInsidePercentage
- bindingMiscSettings.hideBattery.visibility = visibilityChargingIconSwitch
- bindingMiscSettings.reverseLayout.visibility = visibilityReverseLayout
- bindingMiscSettings.rotateLayout.visibility = visibilityAdvanced
-
- // Custom colors
- bindingCustomColors.perimeterAlpha.visibility = visibilityAdvanced
- bindingCustomColors.fillAlpha.visibility = visibilityAdvanced
- bindingCustomColors.rainbowColor.visibility = visibilityRainbow
- bindingCustomColors.blendColor.visibility = visibilityBlendColor
- bindingCustomColors.colorPickers.visibility = visibilityColorPickers
-
- // Custom dimensions
- bindingCustomDimens.customDimensions.visibility = visibilityWh
- bindingCustomDimens.batteryMarginLeft.visibility = visibilityDimensions
- bindingCustomDimens.batteryMarginTop.visibility = visibilityDimensions
- bindingCustomDimens.batteryMarginRight.visibility = visibilityDimensions
- bindingCustomDimens.batteryMarginBottom.visibility = visibilityDimensions
-
- // Custom charging icon
- bindingChargingIcon.enableChargingIcon.visibility = visibilityChargingIconSwitch
- bindingChargingIcon.chargingIconCustContainer.visibility =
- visibilityChargingIconCustomization
- }
-
- companion object {
- private var selectedBatteryStyle = 0
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedDepthWallpaper.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedDepthWallpaper.kt
deleted file mode 100644
index 17ae285c0..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedDepthWallpaper.kt
+++ /dev/null
@@ -1,239 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.app.Activity
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import android.widget.Toast
-import androidx.activity.result.ActivityResult
-import androidx.activity.result.contract.ActivityResultContracts
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER
-import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_CHANGED
-import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_FADE_ANIMATION
-import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_FOREGROUND_ALPHA
-import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER
-import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_PARALLAX_EFFECT
-import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_SWITCH
-import com.drdisagree.iconify.common.Resources.DEPTH_WALL_BG_DIR
-import com.drdisagree.iconify.common.Resources.DEPTH_WALL_FG_DIR
-import com.drdisagree.iconify.config.RPrefs
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.getInt
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.config.RPrefs.putInt
-import com.drdisagree.iconify.databinding.FragmentXposedDepthWallpaperBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.FileUtil.getRealPath
-import com.drdisagree.iconify.utils.FileUtil.moveToIconifyHiddenDir
-import com.drdisagree.iconify.utils.SystemUtil
-import com.google.android.material.slider.Slider
-
-class XposedDepthWallpaper : BaseFragment() {
-
- private lateinit var binding: FragmentXposedDepthWallpaperBinding
-
- private var intentForegroundImage = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result: ActivityResult ->
- if (result.resultCode == Activity.RESULT_OK) {
- val data = result.data
- val path = getRealPath(data)
-
- if (path != null && moveToIconifyHiddenDir(path, DEPTH_WALL_FG_DIR)) {
- putBoolean(
- DEPTH_WALLPAPER_CHANGED,
- !binding.depthWallpaper.isSwitchChecked
- )
- putBoolean(
- DEPTH_WALLPAPER_CHANGED,
- binding.depthWallpaper.isSwitchChecked
- )
-
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_selected_successfully),
- Toast.LENGTH_SHORT
- ).show()
- } else {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_rename_file),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
- }
-
- private var intentBackgroundImage = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result: ActivityResult ->
- if (result.resultCode == Activity.RESULT_OK) {
- val data = result.data
- val path = getRealPath(data)
-
- if (path != null && moveToIconifyHiddenDir(path, DEPTH_WALL_BG_DIR)) {
- putBoolean(
- DEPTH_WALLPAPER_CHANGED,
- !binding.depthWallpaper.isSwitchChecked
- )
- putBoolean(
- DEPTH_WALLPAPER_CHANGED,
- binding.depthWallpaper.isSwitchChecked
- )
-
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_selected_successfully),
- Toast.LENGTH_SHORT
- ).show()
- } else {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_rename_file),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
- }
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedDepthWallpaperBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_depth_wallpaper
- )
-
- // Enable depth wallpaper
- binding.depthWallpaper.isSwitchChecked = getBoolean(DEPTH_WALLPAPER_SWITCH, false)
- binding.depthWallpaper.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(DEPTH_WALLPAPER_SWITCH, isSwitchChecked)
- updateEnabledState()
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Foreground image
- binding.foregroundImage.setEnabled(binding.depthWallpaper.isSwitchChecked)
- binding.foregroundImage.setActivityResultLauncher(intentForegroundImage)
-
- // Background image
- binding.backgroundImage.setEnabled(binding.depthWallpaper.isSwitchChecked)
- binding.backgroundImage.setActivityResultLauncher(intentBackgroundImage)
-
- // Foreground alpha
- binding.foregroundAlpha.setEnabled(binding.depthWallpaper.isSwitchChecked)
- binding.foregroundAlpha.sliderValue = getInt(DEPTH_WALLPAPER_FOREGROUND_ALPHA, 80)
- binding.foregroundAlpha.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(DEPTH_WALLPAPER_FOREGROUND_ALPHA, slider.value.toInt())
- }
- })
-
- // Fade animation
- binding.wallpaperFadeAnimation.setEnabled(binding.depthWallpaper.isSwitchChecked)
- binding.wallpaperFadeAnimation.isSwitchChecked =
- getBoolean(DEPTH_WALLPAPER_FADE_ANIMATION, false)
- binding.wallpaperFadeAnimation.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(
- DEPTH_WALLPAPER_FADE_ANIMATION,
- isSwitchChecked
- )
- }
-
- // Parallax effect
- binding.parallaxEffect.setEnabled(binding.depthWallpaper.isSwitchChecked)
- binding.parallaxEffect.isSwitchChecked = getBoolean(DEPTH_WALLPAPER_PARALLAX_EFFECT, false)
- binding.parallaxEffect.setSwitchChangeListener { _: CompoundButton?, isSwitchChecked: Boolean ->
- putBoolean(DEPTH_WALLPAPER_PARALLAX_EFFECT, isSwitchChecked)
- updateEnabledState()
- }
-
- // Foreground sensitivity
- binding.foregroundSensitivity.sliderValue = RPrefs.getFloat(
- DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER,
- 3.0f
- ).toInt()
- binding.foregroundSensitivity.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- RPrefs.putFloat(DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER, slider.value)
- }
- })
- binding.foregroundSensitivity.setResetClickListener {
- RPrefs.clearPref(DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER)
- true
- }
-
- // Background sensitivity
- binding.backgroundSensitivity.sliderValue = RPrefs.getFloat(
- DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER,
- 1.0f
- ).toInt()
- binding.backgroundSensitivity.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- RPrefs.putFloat(DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER, slider.value)
- }
- })
- binding.backgroundSensitivity.setResetClickListener {
- RPrefs.clearPref(DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER)
- true
- }
-
- updateEnabledState()
-
- return view
- }
-
- private fun updateEnabledState() {
- val isDepthWallpaperEnabled = binding.depthWallpaper.isSwitchChecked
-
- binding.wallpaperFadeAnimation.setEnabled(isDepthWallpaperEnabled)
- binding.foregroundImage.setEnabled(isDepthWallpaperEnabled)
- binding.backgroundImage.setEnabled(isDepthWallpaperEnabled)
- binding.foregroundAlpha.setEnabled(isDepthWallpaperEnabled)
- binding.parallaxEffect.setEnabled(isDepthWallpaperEnabled)
- binding.foregroundSensitivity.setEnabled(isDepthWallpaperEnabled)
- binding.backgroundSensitivity.setEnabled(isDepthWallpaperEnabled)
-
- val isParallaxEffectEnabled = binding.parallaxEffect.isSwitchChecked
-
- binding.backgroundSensitivity.visibility = if (isParallaxEffectEnabled) {
- View.VISIBLE
- } else {
- View.GONE
- }
- binding.foregroundSensitivity.visibility = if (isParallaxEffectEnabled) {
- View.VISIBLE
- } else {
- View.GONE
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedHeaderClock.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedHeaderClock.kt
deleted file mode 100644
index 20c939d37..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedHeaderClock.kt
+++ /dev/null
@@ -1,410 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.annotation.SuppressLint
-import android.app.Activity
-import android.graphics.Color
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import android.widget.Toast
-import androidx.activity.result.ActivityResult
-import androidx.activity.result.contract.ActivityResultContracts
-import androidx.core.content.ContextCompat
-import androidx.recyclerview.widget.LinearSnapHelper
-import androidx.recyclerview.widget.RecyclerView
-import androidx.recyclerview.widget.SnapHelper
-import com.drdisagree.iconify.BuildConfig
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_CENTERED
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT1
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT2
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT3
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_TEXT1
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_CODE_TEXT2
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_COLOR_SWITCH
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_FONT_SWITCH
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_FONT_TEXT_SCALING
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_LANDSCAPE_SWITCH
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_SIDEMARGIN
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_STYLE
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_SWITCH
-import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_TOPMARGIN
-import com.drdisagree.iconify.common.Resources.HEADER_CLOCK_FONT_DIR
-import com.drdisagree.iconify.common.Resources.HEADER_CLOCK_LAYOUT
-import com.drdisagree.iconify.config.RPrefs.clearPref
-import com.drdisagree.iconify.config.RPrefs.clearPrefs
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.getInt
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.config.RPrefs.putInt
-import com.drdisagree.iconify.databinding.FragmentXposedHeaderClockBinding
-import com.drdisagree.iconify.ui.adapters.ClockPreviewAdapter
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.models.ClockModel
-import com.drdisagree.iconify.ui.utils.CarouselLayoutManager
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.FileUtil.getRealPath
-import com.drdisagree.iconify.utils.FileUtil.moveToIconifyHiddenDir
-import com.drdisagree.iconify.utils.SystemUtil
-import com.google.android.material.slider.Slider
-
-class XposedHeaderClock : BaseFragment() {
-
- private lateinit var binding: FragmentXposedHeaderClockBinding
- private var totalClocks: Int = 1
-
- private var startActivityIntent = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result: ActivityResult ->
- if (result.resultCode == Activity.RESULT_OK) {
- val data = result.data
- val path = getRealPath(data)
-
- if (path != null && moveToIconifyHiddenDir(path, HEADER_CLOCK_FONT_DIR)) {
- binding.headerClockFont.setEnableButtonVisibility(View.VISIBLE)
- } else {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_rename_file),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
- }
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedHeaderClockBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_header_clock
- )
-
- // Enable header clock
- binding.enableHeaderClock.isSwitchChecked = getBoolean(HEADER_CLOCK_SWITCH, false)
- binding.enableHeaderClock.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HEADER_CLOCK_SWITCH, isChecked)
- updateEnabled(isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- updateEnabled(getBoolean(HEADER_CLOCK_SWITCH, false))
-
- // Header clock style
- val snapHelper: SnapHelper = LinearSnapHelper()
- val carouselLayoutManager = CarouselLayoutManager(
- requireContext(),
- RecyclerView.HORIZONTAL,
- false
- )
- carouselLayoutManager.setMinifyDistance(0.8f)
-
- binding.rvHeaderClockPreview.setLayoutManager(carouselLayoutManager)
- binding.rvHeaderClockPreview.setAdapter(initHeaderClockStyles())
- binding.rvHeaderClockPreview.setHasFixedSize(true)
- snapHelper.attachToRecyclerView(binding.rvHeaderClockPreview)
-
- // if index exceeds limit, set to highest available
- var headerClockStyle = getInt(HEADER_CLOCK_STYLE, 0)
- if (headerClockStyle >= totalClocks) {
- headerClockStyle = totalClocks - 1
- putInt(HEADER_CLOCK_STYLE, headerClockStyle)
- }
- binding.rvHeaderClockPreview.scrollToPosition(headerClockStyle)
-
- // Lockscreen clock font picker
- binding.headerClockFont.setActivityResultLauncher(startActivityIntent)
- binding.headerClockFont.setDisableButtonVisibility(
- if (getBoolean(
- HEADER_CLOCK_FONT_SWITCH,
- false
- )
- ) View.VISIBLE else View.GONE
- )
- binding.headerClockFont.setEnableButtonOnClickListener {
- putBoolean(HEADER_CLOCK_FONT_SWITCH, false)
- putBoolean(HEADER_CLOCK_FONT_SWITCH, true)
-
- binding.headerClockFont.setEnableButtonVisibility(View.GONE)
- binding.headerClockFont.setDisableButtonVisibility(View.VISIBLE)
- }
- binding.headerClockFont.setDisableButtonOnClickListener {
- putBoolean(HEADER_CLOCK_FONT_SWITCH, false)
-
- binding.headerClockFont.setDisableButtonVisibility(View.GONE)
- }
-
- // Custom clock color
- binding.headerClockCustomColor.isSwitchChecked =
- getBoolean(HEADER_CLOCK_COLOR_SWITCH, false)
- binding.headerClockCustomColor.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HEADER_CLOCK_COLOR_SWITCH, isChecked)
-
- clearPrefs(
- HEADER_CLOCK_COLOR_CODE_ACCENT1,
- HEADER_CLOCK_COLOR_CODE_ACCENT2,
- HEADER_CLOCK_COLOR_CODE_ACCENT3,
- HEADER_CLOCK_COLOR_CODE_TEXT1,
- HEADER_CLOCK_COLOR_CODE_TEXT2
- )
-
- binding.headerClockColorPicker.visibility = if (isChecked) View.VISIBLE else View.GONE
-
- if (!isChecked) {
- binding.colorPickerAccent1.previewColor = ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent1_300
- )
- binding.colorPickerAccent2.previewColor = ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent2_300
- )
- binding.colorPickerAccent3.previewColor = ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent3_300
- )
-
- binding.colorPickerText1.previewColor = Color.WHITE
- binding.colorPickerText2.previewColor = Color.BLACK
- }
- }
- binding.headerClockColorPicker.visibility =
- if (getBoolean(HEADER_CLOCK_COLOR_SWITCH, false)) {
- View.VISIBLE
- } else {
- View.GONE
- }
-
- // Clock color picker accent 1
- binding.colorPickerAccent1.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- HEADER_CLOCK_COLOR_CODE_ACCENT1,
- ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent1_300
- )
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerAccent1.setOnColorSelectedListener { color: Int ->
- binding.colorPickerAccent1.previewColor = color
-
- putInt(HEADER_CLOCK_COLOR_CODE_ACCENT1, color)
- }
-
- // Clock color picker accent 2
- binding.colorPickerAccent2.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- HEADER_CLOCK_COLOR_CODE_ACCENT2,
- ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent2_300
- )
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerAccent2.setOnColorSelectedListener { color: Int ->
- binding.colorPickerAccent2.previewColor = color
-
- putInt(HEADER_CLOCK_COLOR_CODE_ACCENT2, color)
- }
-
- // Clock color picker accent 3
- binding.colorPickerAccent3.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- HEADER_CLOCK_COLOR_CODE_ACCENT3,
- ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent3_300
- )
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerAccent3.setOnColorSelectedListener { color: Int ->
- binding.colorPickerAccent3.previewColor = color
-
- putInt(HEADER_CLOCK_COLOR_CODE_ACCENT3, color)
- }
-
- // Clock color picker text 1
- binding.colorPickerText1.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- HEADER_CLOCK_COLOR_CODE_TEXT1,
- Color.WHITE
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerText1.setOnColorSelectedListener { color: Int ->
- binding.colorPickerText1.previewColor = color
-
- putInt(HEADER_CLOCK_COLOR_CODE_TEXT1, color)
- }
-
- // Clock color picker text 2
- binding.colorPickerText2.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- HEADER_CLOCK_COLOR_CODE_TEXT2,
- Color.BLACK
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerText2.setOnColorSelectedListener { color: Int ->
- binding.colorPickerText2.previewColor = color
-
- putInt(HEADER_CLOCK_COLOR_CODE_TEXT2, color)
- }
-
- // Text Scaling
- binding.headerClockTextscaling.sliderValue =
- getInt(HEADER_CLOCK_FONT_TEXT_SCALING, 10)
- binding.headerClockTextscaling.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(HEADER_CLOCK_FONT_TEXT_SCALING, slider.value.toInt())
- }
- })
- binding.headerClockTextscaling.setResetClickListener {
- clearPref(HEADER_CLOCK_FONT_TEXT_SCALING)
-
- true
- }
-
- // Header clock side margin
- binding.headerClockSideMargin.sliderValue = getInt(HEADER_CLOCK_SIDEMARGIN, 0)
- binding.headerClockSideMargin.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(HEADER_CLOCK_SIDEMARGIN, slider.value.toInt())
- }
- })
-
- // Header clock top margin
- binding.headerClockTopMargin.sliderValue = getInt(HEADER_CLOCK_TOPMARGIN, 8)
- binding.headerClockTopMargin.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(HEADER_CLOCK_TOPMARGIN, slider.value.toInt())
- }
- })
-
- // Center clock
- binding.centerClock.isSwitchChecked = getBoolean(HEADER_CLOCK_CENTERED, false)
- binding.centerClock.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(
- HEADER_CLOCK_CENTERED,
- isChecked
- )
- }
-
- // Hide in landscape
- binding.hideHeaderClockLandscape.isSwitchChecked =
- getBoolean(HEADER_CLOCK_LANDSCAPE_SWITCH, true)
- binding.hideHeaderClockLandscape.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(
- HEADER_CLOCK_LANDSCAPE_SWITCH,
- isChecked
- )
- }
-
- return view
- }
-
- @SuppressLint("DiscouragedApi")
- private fun initHeaderClockStyles(): ClockPreviewAdapter {
- val headerClock = ArrayList()
- var maxIndex = 0
-
- while (requireContext()
- .resources
- .getIdentifier(
- HEADER_CLOCK_LAYOUT + maxIndex,
- "layout",
- BuildConfig.APPLICATION_ID
- ) != 0
- ) {
- maxIndex++
- }
-
- totalClocks = maxIndex
-
- for (i in 0 until maxIndex) {
- headerClock.add(
- ClockModel(
- if (i == 0) {
- requireContext().getString(R.string.clock_none)
- } else {
- requireContext().getString(R.string.clock_style_name, i)
- },
- requireContext()
- .resources
- .getIdentifier(
- HEADER_CLOCK_LAYOUT + i,
- "layout",
- BuildConfig.APPLICATION_ID
- )
- )
- )
- }
-
- return ClockPreviewAdapter(
- requireContext(),
- headerClock,
- HEADER_CLOCK_SWITCH,
- HEADER_CLOCK_STYLE
- )
- }
-
- private fun updateEnabled(enabled: Boolean) {
- binding.headerClockFont.setEnabled(enabled)
- binding.headerClockCustomColor.setEnabled(enabled)
- binding.colorPickerAccent1.setEnabled(enabled)
- binding.colorPickerAccent2.setEnabled(enabled)
- binding.colorPickerAccent3.setEnabled(enabled)
- binding.colorPickerText1.setEnabled(enabled)
- binding.colorPickerText2.setEnabled(enabled)
- binding.headerClockTextscaling.setEnabled(enabled)
- binding.headerClockSideMargin.setEnabled(enabled)
- binding.headerClockTopMargin.setEnabled(enabled)
- binding.centerClock.setEnabled(enabled)
- binding.hideHeaderClockLandscape.setEnabled(enabled)
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedHeaderImage.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedHeaderImage.kt
deleted file mode 100644
index 0acfad928..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedHeaderImage.kt
+++ /dev/null
@@ -1,158 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.app.Activity
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import android.widget.Toast
-import androidx.activity.result.ActivityResult
-import androidx.activity.result.contract.ActivityResultContracts
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_ALPHA
-import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_BOTTOM_FADE_AMOUNT
-import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_HEIGHT
-import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_LANDSCAPE_SWITCH
-import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_SWITCH
-import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_ZOOMTOFIT
-import com.drdisagree.iconify.common.Resources.HEADER_IMAGE_DIR
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.getInt
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.config.RPrefs.putInt
-import com.drdisagree.iconify.databinding.FragmentXposedHeaderImageBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.FileUtil.getRealPath
-import com.drdisagree.iconify.utils.FileUtil.moveToIconifyHiddenDir
-import com.google.android.material.slider.Slider
-
-class XposedHeaderImage : BaseFragment() {
-
- private lateinit var binding: FragmentXposedHeaderImageBinding
-
- private var startActivityIntent = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result: ActivityResult ->
- if (result.resultCode == Activity.RESULT_OK) {
- val data = result.data
- val path = getRealPath(data)
-
- if (path != null && moveToIconifyHiddenDir(path, HEADER_IMAGE_DIR)) {
- binding.headerImage.setEnableButtonVisibility(View.VISIBLE)
- } else {
- Toast.makeText(
- appContext,
- resources.getString(R.string.toast_rename_file),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
- }
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedHeaderImageBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_header_image
- )
-
- // Header image picker
- binding.headerImage.setActivityResultLauncher(startActivityIntent)
- binding.headerImage.setEnableButtonOnClickListener {
- putBoolean(HEADER_IMAGE_SWITCH, false)
- putBoolean(HEADER_IMAGE_SWITCH, true)
-
- binding.headerImage.setEnableButtonVisibility(View.GONE)
- binding.headerImage.setDisableButtonVisibility(View.VISIBLE)
-
- updateEnabledState()
- }
-
- binding.headerImage.setDisableButtonVisibility(
- if (getBoolean(HEADER_IMAGE_SWITCH, false)) {
- View.VISIBLE
- } else {
- View.GONE
- }
- )
-
- binding.headerImage.setDisableButtonOnClickListener {
- putBoolean(HEADER_IMAGE_SWITCH, false)
-
- binding.headerImage.setDisableButtonVisibility(View.GONE)
-
- updateEnabledState()
- }
-
- // Image height
- binding.headerImageHeight.sliderValue = getInt(HEADER_IMAGE_HEIGHT, 140)
- binding.headerImageHeight.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(HEADER_IMAGE_HEIGHT, slider.value.toInt())
- }
- })
-
- // Image alpha
- binding.headerImageAlpha.sliderValue = getInt(HEADER_IMAGE_ALPHA, 100)
- binding.headerImageAlpha.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(HEADER_IMAGE_ALPHA, slider.value.toInt())
- }
- })
-
- // Image bottom fade amount
- binding.headerImageBottomFade.sliderValue =
- getInt(HEADER_IMAGE_BOTTOM_FADE_AMOUNT, 40)
- binding.headerImageBottomFade.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(HEADER_IMAGE_BOTTOM_FADE_AMOUNT, slider.value.toInt())
- }
- })
-
- // Header image zoom to fit
- binding.zoomToFit.isSwitchChecked = getBoolean(HEADER_IMAGE_ZOOMTOFIT, false)
- binding.zoomToFit.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HEADER_IMAGE_ZOOMTOFIT, isChecked)
- }
-
- // Header image hide in landscape
- binding.hideInLandscape.isSwitchChecked =
- getBoolean(HEADER_IMAGE_LANDSCAPE_SWITCH, true)
- binding.hideInLandscape.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HEADER_IMAGE_LANDSCAPE_SWITCH, isChecked)
- }
-
- updateEnabledState()
-
- return view
- }
-
- private fun updateEnabledState() {
- val enabled = getBoolean(HEADER_IMAGE_SWITCH, false)
-
- binding.headerImageHeight.setEnabled(enabled)
- binding.headerImageAlpha.setEnabled(enabled)
- binding.headerImageBottomFade.setEnabled(enabled)
- binding.zoomToFit.setEnabled(enabled)
- binding.hideInLandscape.setEnabled(enabled)
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedLockscreenClock.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedLockscreenClock.kt
deleted file mode 100644
index ded345c0d..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedLockscreenClock.kt
+++ /dev/null
@@ -1,407 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.annotation.SuppressLint
-import android.app.Activity
-import android.graphics.Color
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import android.widget.Toast
-import androidx.activity.result.ActivityResult
-import androidx.activity.result.contract.ActivityResultContracts
-import androidx.core.content.ContextCompat
-import androidx.recyclerview.widget.LinearSnapHelper
-import androidx.recyclerview.widget.RecyclerView
-import androidx.recyclerview.widget.SnapHelper
-import com.drdisagree.iconify.BuildConfig
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Dynamic.isAtleastA14
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_BOTTOMMARGIN
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT1
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT2
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT3
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_TEXT1
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_CODE_TEXT2
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_COLOR_SWITCH
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_FONT_LINEHEIGHT
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_FONT_SWITCH
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_FONT_TEXT_SCALING
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_STYLE
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_SWITCH
-import com.drdisagree.iconify.common.Preferences.LSCLOCK_TOPMARGIN
-import com.drdisagree.iconify.common.Resources.LOCKSCREEN_CLOCK_LAYOUT
-import com.drdisagree.iconify.common.Resources.LSCLOCK_FONT_DIR
-import com.drdisagree.iconify.config.RPrefs.clearPref
-import com.drdisagree.iconify.config.RPrefs.clearPrefs
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.getInt
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.config.RPrefs.putInt
-import com.drdisagree.iconify.databinding.FragmentXposedLockscreenClockBinding
-import com.drdisagree.iconify.ui.adapters.ClockPreviewAdapter
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.models.ClockModel
-import com.drdisagree.iconify.ui.utils.CarouselLayoutManager
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.FileUtil.getRealPath
-import com.drdisagree.iconify.utils.FileUtil.moveToIconifyHiddenDir
-import com.drdisagree.iconify.utils.SystemUtil
-import com.google.android.material.slider.Slider
-import com.topjohnwu.superuser.Shell
-
-class XposedLockscreenClock : BaseFragment() {
-
- private lateinit var binding: FragmentXposedLockscreenClockBinding
- private var totalClocks: Int = 1
-
- private var startActivityIntent = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result: ActivityResult ->
- if (result.resultCode == Activity.RESULT_OK) {
- val data = result.data
- val path = getRealPath(data)
-
- if (path != null && moveToIconifyHiddenDir(path, LSCLOCK_FONT_DIR)) {
- binding.lockscreenClockFont.setEnableButtonVisibility(View.VISIBLE)
- } else {
- Toast.makeText(
- appContext,
- appContextLocale.resources.getString(R.string.toast_rename_file),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
- }
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedLockscreenClockBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_lockscreen_clock
- )
-
- // Enable lockscreen clock
- binding.enableLockscreenClock.isSwitchChecked = getBoolean(LSCLOCK_SWITCH, false)
- binding.enableLockscreenClock.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- if (isChecked && isAtleastA14) {
- Shell.cmd(
- "adb shell settings put secure lock_screen_custom_clock_face default"
- ).exec()
- }
-
- putBoolean(LSCLOCK_SWITCH, isChecked)
-
- updateEnabled(isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- updateEnabled(getBoolean(LSCLOCK_SWITCH, false))
-
- // Lockscreen clock style
- val snapHelper: SnapHelper = LinearSnapHelper()
- val carouselLayoutManager = CarouselLayoutManager(
- requireContext(),
- RecyclerView.HORIZONTAL,
- false
- )
- carouselLayoutManager.setMinifyDistance(0.8f)
-
- binding.rvLockscreenClockPreview.setLayoutManager(carouselLayoutManager)
- binding.rvLockscreenClockPreview.setAdapter(initLockscreenClockStyles())
- binding.rvLockscreenClockPreview.setHasFixedSize(true)
- snapHelper.attachToRecyclerView(binding.rvLockscreenClockPreview)
-
- // if index exceeds limit, set to highest available
- var lsClockStyle = getInt(LSCLOCK_STYLE, 0)
- if (lsClockStyle >= totalClocks) {
- lsClockStyle = totalClocks - 1
- putInt(LSCLOCK_STYLE, lsClockStyle)
- }
- binding.rvLockscreenClockPreview.scrollToPosition(lsClockStyle)
-
- // Lockscreen clock font picker
- binding.lockscreenClockFont.setActivityResultLauncher(startActivityIntent)
- binding.lockscreenClockFont.setDisableButtonVisibility(
- if (getBoolean(
- LSCLOCK_FONT_SWITCH,
- false
- )
- ) View.VISIBLE else View.GONE
- )
- binding.lockscreenClockFont.setEnableButtonOnClickListener {
- putBoolean(LSCLOCK_FONT_SWITCH, false)
- putBoolean(LSCLOCK_FONT_SWITCH, true)
-
- binding.lockscreenClockFont.setEnableButtonVisibility(View.GONE)
- binding.lockscreenClockFont.setDisableButtonVisibility(View.VISIBLE)
- }
- binding.lockscreenClockFont.setDisableButtonOnClickListener {
- putBoolean(LSCLOCK_FONT_SWITCH, false)
-
- binding.lockscreenClockFont.setDisableButtonVisibility(View.GONE)
- }
-
- // Custom clock color
- binding.lsClockCustomColor.isSwitchChecked =
- getBoolean(LSCLOCK_COLOR_SWITCH, false)
- binding.lsClockCustomColor.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(LSCLOCK_COLOR_SWITCH, isChecked)
-
- clearPrefs(
- LSCLOCK_COLOR_CODE_ACCENT1,
- LSCLOCK_COLOR_CODE_ACCENT2,
- LSCLOCK_COLOR_CODE_ACCENT3,
- LSCLOCK_COLOR_CODE_TEXT1,
- LSCLOCK_COLOR_CODE_TEXT2
- )
-
- binding.lsClockColorPicker.visibility = if (isChecked) View.VISIBLE else View.GONE
-
- if (!isChecked) {
- binding.colorPickerAccent1.previewColor = ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent1_300
- )
- binding.colorPickerAccent2.previewColor = ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent2_300
- )
- binding.colorPickerAccent3.previewColor = ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent3_300
- )
-
- binding.colorPickerText1.previewColor = Color.WHITE
- binding.colorPickerText2.previewColor = Color.BLACK
- }
- }
- binding.lsClockColorPicker.visibility =
- if (getBoolean(LSCLOCK_COLOR_SWITCH, false)) View.VISIBLE else View.GONE
-
- // Clock color picker accent 1
- binding.colorPickerAccent1.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- LSCLOCK_COLOR_CODE_ACCENT1,
- ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent1_300
- )
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerAccent1.setOnColorSelectedListener { color: Int ->
- binding.colorPickerAccent1.previewColor = color
-
- putInt(LSCLOCK_COLOR_CODE_ACCENT1, color)
- }
-
- // Clock color picker accent 2
- binding.colorPickerAccent2.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- LSCLOCK_COLOR_CODE_ACCENT2,
- ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent2_300
- )
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerAccent2.setOnColorSelectedListener { color: Int ->
- binding.colorPickerAccent2.previewColor = color
-
- putInt(LSCLOCK_COLOR_CODE_ACCENT2, color)
- }
-
- // Clock color picker accent 3
- binding.colorPickerAccent3.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- LSCLOCK_COLOR_CODE_ACCENT3,
- ContextCompat.getColor(
- requireContext(),
- android.R.color.system_accent3_300
- )
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerAccent3.setOnColorSelectedListener { color: Int ->
- binding.colorPickerAccent3.previewColor = color
-
- putInt(LSCLOCK_COLOR_CODE_ACCENT3, color)
- }
-
- // Clock color picker text 1
- binding.colorPickerText1.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- LSCLOCK_COLOR_CODE_TEXT1,
- Color.WHITE
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerText1.setOnColorSelectedListener { color: Int ->
- binding.colorPickerText1.previewColor = color
-
- putInt(LSCLOCK_COLOR_CODE_TEXT1, color)
- }
-
- // Clock color picker text 2
- binding.colorPickerText2.setColorPickerListener(
- activity = requireActivity(),
- defaultColor = getInt(
- LSCLOCK_COLOR_CODE_TEXT2,
- Color.BLACK
- ),
- showPresets = true,
- showAlphaSlider = true,
- showColorShades = true
- )
- binding.colorPickerText2.setOnColorSelectedListener { color: Int ->
- binding.colorPickerText2.previewColor = color
-
- putInt(LSCLOCK_COLOR_CODE_TEXT2, color)
- }
-
- // Line height
- binding.lsclockLineHeight.sliderValue = getInt(LSCLOCK_FONT_LINEHEIGHT, 0)
- binding.lsclockLineHeight.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(LSCLOCK_FONT_LINEHEIGHT, slider.value.toInt())
- }
- })
- binding.lsclockLineHeight.setResetClickListener {
- clearPref(LSCLOCK_FONT_LINEHEIGHT)
-
- true
- }
-
- // Text Scaling
- binding.lsClockTextscaling.sliderValue = getInt(LSCLOCK_FONT_TEXT_SCALING, 10)
- binding.lsClockTextscaling.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(LSCLOCK_FONT_TEXT_SCALING, slider.value.toInt())
- }
- })
- binding.lsClockTextscaling.setResetClickListener {
- clearPref(LSCLOCK_FONT_TEXT_SCALING)
-
- true
- }
-
- // Top margin
- binding.lsclockTopMargin.sliderValue = getInt(LSCLOCK_TOPMARGIN, 100)
- binding.lsclockTopMargin.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(LSCLOCK_TOPMARGIN, slider.value.toInt())
- }
- })
-
- // Bottom margin
- binding.lsclockBottomMargin.sliderValue = getInt(LSCLOCK_BOTTOMMARGIN, 40)
- binding.lsclockBottomMargin.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(LSCLOCK_BOTTOMMARGIN, slider.value.toInt())
- }
- })
-
- return view
- }
-
- @SuppressLint("DiscouragedApi")
- private fun initLockscreenClockStyles(): ClockPreviewAdapter {
- val lsClock = ArrayList()
- var maxIndex = 0
-
- while (requireContext()
- .resources
- .getIdentifier(
- LOCKSCREEN_CLOCK_LAYOUT + maxIndex,
- "layout",
- BuildConfig.APPLICATION_ID
- ) != 0
- ) {
- maxIndex++
- }
-
- totalClocks = maxIndex
-
- for (i in 0 until maxIndex) {
- lsClock.add(
- ClockModel(
- if (i == 0) {
- requireContext().getString(R.string.clock_none)
- } else {
- requireContext().getString(R.string.clock_style_name, i)
- },
- requireContext()
- .resources
- .getIdentifier(
- LOCKSCREEN_CLOCK_LAYOUT + i,
- "layout",
- BuildConfig.APPLICATION_ID
- )
- )
- )
- }
-
- return ClockPreviewAdapter(
- requireContext(),
- lsClock,
- LSCLOCK_SWITCH,
- LSCLOCK_STYLE
- )
- }
-
- private fun updateEnabled(enabled: Boolean) {
- binding.lockscreenClockFont.setEnabled(enabled)
- binding.lsClockCustomColor.setEnabled(enabled)
- binding.colorPickerAccent1.setEnabled(enabled)
- binding.colorPickerAccent2.setEnabled(enabled)
- binding.colorPickerAccent3.setEnabled(enabled)
- binding.colorPickerText1.setEnabled(enabled)
- binding.colorPickerText2.setEnabled(enabled)
- binding.lsclockLineHeight.setEnabled(enabled)
- binding.lsClockTextscaling.setEnabled(enabled)
- binding.lsclockTopMargin.setEnabled(enabled)
- binding.lsclockBottomMargin.setEnabled(enabled)
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedMenu.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedMenu.kt
deleted file mode 100644
index 0f5d4eaa2..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedMenu.kt
+++ /dev/null
@@ -1,539 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.annotation.SuppressLint
-import android.app.Activity
-import android.content.BroadcastReceiver
-import android.content.ComponentName
-import android.content.Context
-import android.content.DialogInterface
-import android.content.Intent
-import android.content.IntentFilter
-import android.os.Build
-import android.os.Bundle
-import android.os.CountDownTimer
-import android.os.Handler
-import android.os.Looper
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.Menu
-import android.view.MenuInflater
-import android.view.MenuItem
-import android.view.View
-import android.view.ViewGroup
-import android.widget.Toast
-import androidx.activity.result.ActivityResult
-import androidx.activity.result.contract.ActivityResultContracts
-import androidx.appcompat.app.AppCompatActivity
-import androidx.navigation.Navigation.findNavController
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.Iconify.Companion.appContextLocale
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.ACTION_HOOK_CHECK_REQUEST
-import com.drdisagree.iconify.common.Const.ACTION_HOOK_CHECK_RESULT
-import com.drdisagree.iconify.common.Preferences
-import com.drdisagree.iconify.common.Preferences.SHOW_XPOSED_WARN
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.RPrefs
-import com.drdisagree.iconify.databinding.FragmentXposedMenuBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.widgets.MenuWidget
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.SystemUtil.disableBlur
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.restartSystemUI
-import com.drdisagree.iconify.utils.extension.ObservableVariable
-import com.drdisagree.iconify.utils.helper.ImportExport.exportSettings
-import com.drdisagree.iconify.utils.helper.ImportExport.importSettings
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.disableOverlays
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.google.android.material.dialog.MaterialAlertDialogBuilder
-import java.util.concurrent.Executors
-
-class XposedMenu : BaseFragment() {
-
- private lateinit var binding: FragmentXposedMenuBinding
-
- private val handler = Handler(Looper.getMainLooper())
- private var intentFilterHookedSystemUI = IntentFilter()
- private var isHookSuccessful = false
-
- private val checkSystemUIHooked: Runnable = object : Runnable {
- override fun run() {
- checkXposedHooked()
- handler.postDelayed(this, 1000)
- }
- }
-
- private val receiverHookedSystemui: BroadcastReceiver = object : BroadcastReceiver() {
- override fun onReceive(context: Context, intent: Intent) {
- if (intent.action == ACTION_HOOK_CHECK_RESULT) {
- isHookSuccessful = true
- isXposedHooked.setValue(true)
- }
- }
- }
-
- private var startExportActivityIntent = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result1: ActivityResult ->
- if (result1.resultCode == Activity.RESULT_OK) {
- val data = result1.data ?: return@registerForActivityResult
-
- try {
- exportSettings(
- RPrefs.prefs,
- requireContext().contentResolver.openOutputStream(data.data!!)!!
- )
-
- Toast.makeText(
- requireContext(),
- requireContext().resources.getString(R.string.toast_export_settings_successfull),
- Toast.LENGTH_SHORT
- ).show()
- } catch (exception: Exception) {
- Toast.makeText(
- requireContext(),
- requireContext().resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
-
- Log.e("Settings", "Error exporting settings", exception)
- }
- }
- }
-
- private var startImportActivityIntent = registerForActivityResult(
- ActivityResultContracts.StartActivityForResult()
- ) { result2: ActivityResult ->
- if (result2.resultCode == Activity.RESULT_OK) {
- val data = result2.data ?: return@registerForActivityResult
-
- MaterialAlertDialogBuilder(requireContext())
- .setTitle(requireContext().resources.getString(R.string.import_settings_confirmation_title))
- .setMessage(requireContext().resources.getString(R.string.import_settings_confirmation_desc))
- .setPositiveButton(requireContext().resources.getString(R.string.btn_positive)) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
-
- Executors.newSingleThreadExecutor().execute {
- try {
- val success = importSettings(
- RPrefs.prefs,
- appContext.contentResolver.openInputStream(data.data!!)!!,
- false
- )
-
- if (success) {
- Handler(Looper.getMainLooper()).post {
- Toast.makeText(
- appContext,
- appContext.resources.getString(R.string.toast_import_settings_successfull),
- Toast.LENGTH_SHORT
- ).show()
- }
-
- restartSystemUI()
- } else {
- Handler(Looper.getMainLooper()).post {
- Toast.makeText(
- appContext,
- appContext.resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
- } catch (exception: Exception) {
- Handler(Looper.getMainLooper()).post {
- Toast.makeText(
- appContext,
- appContext.resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
-
- Log.e("Settings", "Error exporting settings", exception)
- }
- }
- }
- }
- .setNegativeButton(requireContext().resources.getString(R.string.btn_negative)) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
- }
- .show()
- }
- }
-
- @SuppressLint("UnspecifiedRegisterReceiverFlag")
- @Suppress("deprecation")
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedMenuBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- binding.header.toolbar.setTitle(resources.getString(R.string.activity_title_xposed_menu))
- (requireActivity() as AppCompatActivity).setSupportActionBar(binding.header.toolbar)
- setHasOptionsMenu(true)
-
- if (!Preferences.isXposedOnlyMode) {
- (requireActivity() as AppCompatActivity).supportActionBar
- ?.setDisplayHomeAsUpEnabled(true)
- (requireActivity() as AppCompatActivity).supportActionBar
- ?.setDisplayShowHomeEnabled(true)
- binding.header.toolbar.setNavigationOnClickListener {
- findNavController(view).popBackStack()
- }
- }
-
- // Xposed hook check
- intentFilterHookedSystemUI.addAction(ACTION_HOOK_CHECK_RESULT)
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- requireContext().registerReceiver(
- receiverHookedSystemui,
- intentFilterHookedSystemUI,
- Context.RECEIVER_EXPORTED
- )
- } else {
- requireContext().registerReceiver(
- receiverHookedSystemui,
- intentFilterHookedSystemUI
- )
- }
- binding.xposedHookCheck.container.setOnClickListener {
- try {
- val intent = Intent(Intent.ACTION_MAIN)
- intent.setComponent(
- ComponentName(
- "org.lsposed.manager",
- "org.lsposed.manager.ui.activity.MainActivity"
- )
- )
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
- startActivity(intent)
- } catch (ignored: Exception) {
- }
- }
- isXposedHooked.setOnChangeListener { newValue: Boolean? ->
- try {
- if (newValue == true) {
- if (binding.xposedHookCheck.container.visibility != View.GONE) {
- binding.xposedHookCheck.container.visibility = View.GONE
- }
- } else {
- if (binding.xposedHookCheck.container.visibility != View.VISIBLE) {
- binding.xposedHookCheck.container.visibility = View.VISIBLE
- }
- }
- } catch (ignored: Exception) {
- }
- }
- isXposedHooked.setValue(false)
- handler.post(checkSystemUIHooked)
-
- // Xposed menu list items
- addItem(initXposedMenuListItems())
-
- return view
- }
-
- private fun initXposedMenuListItems(): ArrayList> {
- val xposedMenu = ArrayList>().apply {
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedTransparencyBlur,
- appContextLocale.resources.getString(R.string.activity_title_transparency_blur),
- appContextLocale.resources.getString(R.string.activity_desc_transparency_blur),
- R.drawable.ic_xposed_transparency_blur
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedQuickSettings,
- appContextLocale.resources.getString(R.string.activity_title_quick_settings),
- appContextLocale.resources.getString(R.string.activity_desc_quick_settings),
- R.drawable.ic_xposed_quick_settings
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedThemes,
- appContextLocale.resources.getString(R.string.activity_title_themes),
- appContextLocale.resources.getString(R.string.activity_desc_themes),
- R.drawable.ic_xposed_themes
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedBatteryStyle,
- appContextLocale.resources.getString(R.string.activity_title_battery_style),
- appContextLocale.resources.getString(R.string.activity_desc_battery_style),
- R.drawable.ic_colored_battery
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu_to_xposedVolumePanel,
- appContextLocale.resources.getString(R.string.activity_title_volume_panel),
- appContextLocale.resources.getString(R.string.activity_desc_volume_panel),
- R.drawable.ic_tweaks_volume
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedHeaderImage,
- appContextLocale.resources.getString(R.string.activity_title_header_image),
- appContextLocale.resources.getString(R.string.activity_desc_header_image),
- R.drawable.ic_xposed_header_image
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedHeaderClock,
- appContextLocale.resources.getString(R.string.activity_title_header_clock),
- appContextLocale.resources.getString(R.string.activity_desc_header_clock),
- R.drawable.ic_xposed_header_clock
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedLockscreenClock,
- appContextLocale.resources.getString(R.string.activity_title_lockscreen_clock),
- appContextLocale.resources.getString(R.string.activity_desc_lockscreen_clock),
- R.drawable.ic_xposed_lockscreen
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedDepthWallpaper,
- appContextLocale.resources.getString(R.string.activity_title_depth_wallpaper),
- appContextLocale.resources.getString(R.string.activity_desc_depth_wallpaper),
- R.drawable.ic_xposed_depth_wallpaper
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedBackgroundChip,
- appContextLocale.resources.getString(R.string.activity_title_background_chip),
- appContextLocale.resources.getString(R.string.activity_desc_background_chip),
- R.drawable.ic_xposed_background_chip
- )
- )
- add(
- arrayOf(
- R.id.action_xposedMenu2_to_xposedOthers,
- appContextLocale.resources.getString(R.string.activity_title_xposed_others),
- appContextLocale.resources.getString(R.string.activity_desc_xposed_others),
- R.drawable.ic_xposed_misc
- )
- )
- }
-
- return xposedMenu
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- super.onViewCreated(view, savedInstanceState)
- if (Prefs.getBoolean(SHOW_XPOSED_WARN, true)) {
- MaterialAlertDialogBuilder(requireContext())
- .setTitle(requireContext().resources.getString(R.string.attention))
- .setMessage(
- buildString {
- append(
- (if (Preferences.isXposedOnlyMode) {
- appContextLocale.resources.getString(
- R.string.xposed_only_desc
- ) + "\n\n"
- } else {
- ""
- })
- )
- append(appContextLocale.resources.getString(R.string.lsposed_warn))
- }
- )
- .setPositiveButton(requireContext().resources.getString(R.string.understood)) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
- }
- .setNegativeButton(requireContext().resources.getString(R.string.dont_show_again)) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
-
- Prefs.putBoolean(SHOW_XPOSED_WARN, false)
- }
- .setCancelable(true)
- .show()
- }
- }
-
- @Deprecated("Deprecated in Java")
- @Suppress("deprecation")
- override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
- menu.clear()
- inflater.inflate(R.menu.xposed_menu, menu)
-
- super.onCreateOptionsMenu(menu, inflater)
- }
-
- @Deprecated("Deprecated in Java")
- @SuppressLint("NonConstantResourceId")
- @Suppress("deprecation")
- override fun onOptionsItemSelected(item: MenuItem): Boolean {
- when (item.itemId) {
- android.R.id.home -> {
- findNavController(binding.getRoot()).popBackStack()
- return true
- }
-
- R.id.menu_export_settings -> importExportSettings(true)
- R.id.menu_import_settings -> importExportSettings(false)
- R.id.menu_reset_settings -> resetSettings()
- R.id.restart_systemui -> Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.restartSystemUI() },
- 300
- )
- }
-
- return super.onOptionsItemSelected(item)
- }
-
- // Function to add new item in list
- private fun addItem(pack: ArrayList>) {
- for (i in pack.indices) {
- val menu = MenuWidget(requireActivity())
-
- menu.setTitle(pack[i][1] as String)
- menu.setSummary(pack[i][2] as String)
- menu.setIcon(pack[i][3] as Int)
- menu.setEndArrowVisibility(View.VISIBLE)
- menu.setOnClickListener {
- findNavController(menu).navigate(
- (pack[i][0] as Int)
- )
- }
-
- binding.xposedList.addView(menu)
- }
- }
-
- private fun importExportSettings(export: Boolean) {
- if (!hasStoragePermission()) {
- requestStoragePermission(requireContext())
- } else {
- val fileIntent = Intent()
- fileIntent.setAction(if (export) Intent.ACTION_CREATE_DOCUMENT else Intent.ACTION_GET_CONTENT)
- fileIntent.setType("*/*")
- fileIntent.putExtra(Intent.EXTRA_TITLE, "xposed_configs" + ".iconify")
-
- if (export) {
- startExportActivityIntent.launch(fileIntent)
- } else {
- startImportActivityIntent.launch(fileIntent)
- }
- }
- }
-
- private fun resetSettings() {
- MaterialAlertDialogBuilder(requireContext())
- .setTitle(requireContext().resources.getString(R.string.import_settings_confirmation_title))
- .setMessage(requireContext().resources.getString(R.string.import_settings_confirmation_desc))
- .setPositiveButton(
- requireContext().resources.getString(R.string.btn_positive)
- ) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
-
- Handler(Looper.getMainLooper()).post {
- try {
- RPrefs.clearAllPrefs()
-
- disableBlur(false)
-
- disableOverlays(
- "quick_qs_offset_height",
- "qqs_layout_margin_top",
- "qs_header_row_min_height",
- "quick_qs_total_height",
- "qs_panel_padding_top",
- "qs_panel_padding_top_combined_headers"
- )
-
- OverlayUtil.disableOverlays(
- "IconifyComponentQSLT.overlay",
- "IconifyComponentQSDT.overlay"
- )
-
- restartSystemUI()
- } catch (exception: Exception) {
- Toast.makeText(
- requireContext(),
- requireContext().resources.getString(R.string.toast_error),
- Toast.LENGTH_SHORT
- ).show()
-
- Log.e("Settings", "Error importing settings", exception)
- }
- }
- }
- .setNegativeButton(requireContext().resources.getString(R.string.btn_negative)) { dialog: DialogInterface, _: Int ->
- dialog.dismiss()
- }
- .show()
- }
-
- private fun checkXposedHooked() {
-
- isHookSuccessful = false
-
- object : CountDownTimer(1600, 800) {
- override fun onTick(millisUntilFinished: Long) {
- if (isHookSuccessful) {
- cancel()
- }
- }
-
- override fun onFinish() {
- if (!isHookSuccessful) {
- isXposedHooked.setValue(false)
- }
- }
- }.start()
-
- Thread {
- try {
- requireContext().sendBroadcast(Intent().setAction(ACTION_HOOK_CHECK_REQUEST))
- } catch (ignored: Exception) {
- }
- }.start()
- }
-
- override fun onDestroy() {
- try {
- handler.removeCallbacks(checkSystemUIHooked)
- } catch (ignored: Exception) {
- }
-
- super.onDestroy()
- }
-
- override fun onResume() {
- super.onResume()
-
- try {
- isXposedHooked.notifyChanged()
- handler.post(checkSystemUIHooked)
- } catch (ignored: Exception) {
- }
- }
-
- override fun onPause() {
- try {
- handler.removeCallbacks(checkSystemUIHooked)
- } catch (ignored: Exception) {
- }
-
- super.onPause()
- }
-
- companion object {
- private val isXposedHooked = ObservableVariable()
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedOthers.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedOthers.kt
deleted file mode 100644
index af0d7be5f..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedOthers.kt
+++ /dev/null
@@ -1,160 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Build
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.FIXED_STATUS_ICONS_SIDEMARGIN
-import com.drdisagree.iconify.common.Preferences.FIXED_STATUS_ICONS_SWITCH
-import com.drdisagree.iconify.common.Preferences.FIXED_STATUS_ICONS_TOPMARGIN
-import com.drdisagree.iconify.common.Preferences.HIDE_LOCKSCREEN_CARRIER
-import com.drdisagree.iconify.common.Preferences.HIDE_LOCKSCREEN_LOCK_ICON
-import com.drdisagree.iconify.common.Preferences.HIDE_LOCKSCREEN_STATUSBAR
-import com.drdisagree.iconify.common.Preferences.HIDE_STATUS_ICONS_SWITCH
-import com.drdisagree.iconify.common.Preferences.QSPANEL_HIDE_CARRIER
-import com.drdisagree.iconify.common.Preferences.QSPANEL_STATUSICONSBG_SWITCH
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.getInt
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.config.RPrefs.putInt
-import com.drdisagree.iconify.databinding.FragmentXposedOthersBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.google.android.material.slider.Slider
-
-class XposedOthers : BaseFragment() {
-
- private lateinit var binding: FragmentXposedOthersBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedOthersBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_xposed_others
- )
-
- // Hide carrier group
- binding.hideQsCarrierGroup.isSwitchChecked = getBoolean(QSPANEL_HIDE_CARRIER, false)
- binding.hideQsCarrierGroup.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(QSPANEL_HIDE_CARRIER, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Hide status icons
- binding.hideStatusIcons.isSwitchChecked = getBoolean(HIDE_STATUS_ICONS_SWITCH, false)
- binding.hideStatusIcons.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HIDE_STATUS_ICONS_SWITCH, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Hide lockscreen carrier
- binding.hideLockscreenCarrier.isSwitchChecked = getBoolean(HIDE_LOCKSCREEN_CARRIER, false)
- binding.hideLockscreenCarrier.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HIDE_LOCKSCREEN_CARRIER, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Hide lockscreen statusbar
- binding.hideLockscreenStatusbar.isSwitchChecked =
- getBoolean(HIDE_LOCKSCREEN_STATUSBAR, false)
- binding.hideLockscreenStatusbar.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HIDE_LOCKSCREEN_STATUSBAR, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Hide lockscreen lock icon
- binding.hideLockscreenLockIcon.isSwitchChecked =
- getBoolean(HIDE_LOCKSCREEN_LOCK_ICON, false)
- binding.hideLockscreenLockIcon.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HIDE_LOCKSCREEN_LOCK_ICON, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Fixed status icons
- binding.fixedStatusIcons.isSwitchChecked = getBoolean(FIXED_STATUS_ICONS_SWITCH, false)
- binding.fixedStatusIcons.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- binding.statusIconsTopMargin.setEnabled(isChecked)
- binding.statusIconsSideMargin.setEnabled(isChecked)
-
- putBoolean(FIXED_STATUS_ICONS_SWITCH, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Status icons top margin
- if (Build.VERSION.SDK_INT >= 33) {
- binding.statusIconsTopMargin.setSliderValueTo(250)
- }
- binding.statusIconsTopMargin.sliderValue = getInt(FIXED_STATUS_ICONS_TOPMARGIN, 8)
- binding.statusIconsTopMargin.setEnabled(
- if (Build.VERSION.SDK_INT >= 33) {
- getBoolean(QSPANEL_STATUSICONSBG_SWITCH, false) ||
- getBoolean(FIXED_STATUS_ICONS_SWITCH, false)
- } else {
- getBoolean(FIXED_STATUS_ICONS_SWITCH, false)
- }
- )
- binding.statusIconsTopMargin.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(FIXED_STATUS_ICONS_TOPMARGIN, slider.value.toInt())
- }
- })
-
- // Status icons side margin
- binding.statusIconsSideMargin.sliderValue = getInt(FIXED_STATUS_ICONS_SIDEMARGIN, 0)
- binding.statusIconsSideMargin.setEnabled(
- getBoolean(FIXED_STATUS_ICONS_SWITCH, false)
- )
- binding.statusIconsSideMargin.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(FIXED_STATUS_ICONS_SIDEMARGIN, slider.value.toInt())
- }
- })
- return view
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedQuickSettings.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedQuickSettings.kt
deleted file mode 100644
index c9c43dac4..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedQuickSettings.kt
+++ /dev/null
@@ -1,184 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.HIDE_QSLABEL_SWITCH
-import com.drdisagree.iconify.common.Preferences.HIDE_QS_FOOTER_BUTTONS
-import com.drdisagree.iconify.common.Preferences.HIDE_QS_SILENT_TEXT
-import com.drdisagree.iconify.common.Preferences.QQS_TOPMARGIN
-import com.drdisagree.iconify.common.Preferences.QS_TEXT_ALWAYS_WHITE
-import com.drdisagree.iconify.common.Preferences.QS_TEXT_FOLLOW_ACCENT
-import com.drdisagree.iconify.common.Preferences.QS_TOPMARGIN
-import com.drdisagree.iconify.common.Preferences.VERTICAL_QSTILE_SWITCH
-import com.drdisagree.iconify.config.RPrefs.clearPref
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.getInt
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.config.RPrefs.putInt
-import com.drdisagree.iconify.databinding.FragmentXposedQuickSettingsBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.google.android.material.slider.Slider
-
-class XposedQuickSettings : BaseFragment() {
-
- private lateinit var binding: FragmentXposedQuickSettingsBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedQuickSettingsBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_quick_settings
- )
-
- // Vertical QS Tile
- binding.verticalTile.isSwitchChecked = getBoolean(VERTICAL_QSTILE_SWITCH, false)
- binding.verticalTile.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(VERTICAL_QSTILE_SWITCH, isChecked)
-
- binding.hideTileLabel.setEnabled(isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Hide label for vertical tiles
- binding.hideTileLabel.setEnabled(binding.verticalTile.isSwitchChecked)
- binding.hideTileLabel.isSwitchChecked = getBoolean(HIDE_QSLABEL_SWITCH, false)
- binding.hideTileLabel.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HIDE_QSLABEL_SWITCH, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.doubleToggleDarkMode() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // QQS panel top margin slider
- binding.qqsTopMargin.sliderValue = getInt(QQS_TOPMARGIN, 100)
- binding.qqsTopMargin.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(QQS_TOPMARGIN, slider.value.toInt())
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- })
- binding.qqsTopMargin.setResetClickListener {
- clearPref(QQS_TOPMARGIN)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
-
- true
- }
-
- // QS panel top margin slider
- binding.qsTopMargin.sliderValue = getInt(QS_TOPMARGIN, 100)
- binding.qsTopMargin.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(QS_TOPMARGIN, slider.value.toInt())
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- })
- binding.qsTopMargin.setResetClickListener {
- clearPref(QS_TOPMARGIN)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
-
- true
- }
-
- // QS text always white
- binding.labelWhite.isSwitchChecked = getBoolean(QS_TEXT_ALWAYS_WHITE, false)
- binding.labelWhite.setSwitchChangeListener(qsTextWhiteListener)
-
- // QS text follow accent
- binding.labelAccent.isSwitchChecked = getBoolean(QS_TEXT_FOLLOW_ACCENT, false)
- binding.labelAccent.setSwitchChangeListener(qsTextAccentListener)
-
- // Hide silent text
- binding.hideSilentText.isSwitchChecked = getBoolean(HIDE_QS_SILENT_TEXT, false)
- binding.hideSilentText.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HIDE_QS_SILENT_TEXT, isChecked)
- }
-
- // Hide footer buttons
- binding.hideFooterButtons.isSwitchChecked = getBoolean(HIDE_QS_FOOTER_BUTTONS, false)
- binding.hideFooterButtons.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(HIDE_QS_FOOTER_BUTTONS, isChecked)
- }
-
- return view
- }
-
- private var qsTextWhiteListener: CompoundButton.OnCheckedChangeListener =
- CompoundButton.OnCheckedChangeListener { _, isChecked ->
- if (isChecked) {
- putBoolean(QS_TEXT_FOLLOW_ACCENT, false)
-
- binding.labelAccent.setSwitchChangeListener(null)
- binding.labelAccent.isSwitchChecked = false
- binding.labelAccent.setSwitchChangeListener(qsTextAccentListener)
- }
-
- putBoolean(QS_TEXT_ALWAYS_WHITE, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- private var qsTextAccentListener: CompoundButton.OnCheckedChangeListener =
- CompoundButton.OnCheckedChangeListener { _: CompoundButton?, isChecked: Boolean ->
- if (isChecked) {
- putBoolean(QS_TEXT_ALWAYS_WHITE, false)
-
- binding.labelWhite.setSwitchChangeListener(null)
- binding.labelWhite.isSwitchChecked = false
- binding.labelWhite.setSwitchChangeListener(qsTextWhiteListener)
- }
-
- putBoolean(QS_TEXT_FOLLOW_ACCENT, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedThemes.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedThemes.kt
deleted file mode 100644
index ae180bb6b..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedThemes.kt
+++ /dev/null
@@ -1,159 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Dynamic.isAtleastA14
-import com.drdisagree.iconify.common.Preferences.BLACK_QSPANEL
-import com.drdisagree.iconify.common.Preferences.DUALTONE_QSPANEL
-import com.drdisagree.iconify.common.Preferences.FIX_NOTIFICATION_COLOR
-import com.drdisagree.iconify.common.Preferences.FIX_QS_TILE_COLOR
-import com.drdisagree.iconify.common.Preferences.FLUID_NOTIF_TRANSPARENCY
-import com.drdisagree.iconify.common.Preferences.FLUID_POWERMENU_TRANSPARENCY
-import com.drdisagree.iconify.common.Preferences.FLUID_QSPANEL
-import com.drdisagree.iconify.common.Preferences.LIGHT_QSPANEL
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.databinding.FragmentXposedThemesBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-
-class XposedThemes : BaseFragment() {
-
- private lateinit var binding: FragmentXposedThemesBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedThemesBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_themes
- )
-
- // Light Theme
- binding.lightTheme.isSwitchChecked = getBoolean(LIGHT_QSPANEL, false)
- binding.lightTheme.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(LIGHT_QSPANEL, isChecked)
-
- binding.dualTone.setEnabled(isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- binding.dualTone.setEnabled(binding.lightTheme.isSwitchChecked)
-
- // Dual Tone
- binding.dualTone.isSwitchChecked = getBoolean(DUALTONE_QSPANEL, false)
- binding.dualTone.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(DUALTONE_QSPANEL, isChecked)
- }
-
- // Pixel Black Theme
- binding.blackTheme.isSwitchChecked = getBoolean(BLACK_QSPANEL, false)
- binding.blackTheme.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(BLACK_QSPANEL, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Fluid QS Theme
- binding.fluidQsTheme.isSwitchChecked = getBoolean(FLUID_QSPANEL, false)
- binding.fluidQsTheme.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(FLUID_QSPANEL, isChecked)
-
- binding.fluidNotifTheme.setEnabled(isChecked)
- binding.fluidPowermenuTheme.setEnabled(isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- binding.fluidNotifTheme.setEnabled(binding.fluidQsTheme.isSwitchChecked)
- binding.fluidPowermenuTheme.setEnabled(binding.fluidQsTheme.isSwitchChecked)
-
- // Fluid QS Notification Transparency
- binding.fluidNotifTheme.isSwitchChecked = getBoolean(FLUID_NOTIF_TRANSPARENCY, false)
- binding.fluidNotifTheme.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(FLUID_NOTIF_TRANSPARENCY, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Fluid QS Power Menu Transparency
- binding.fluidPowermenuTheme.isSwitchChecked =
- getBoolean(FLUID_POWERMENU_TRANSPARENCY, false)
- binding.fluidPowermenuTheme.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(FLUID_POWERMENU_TRANSPARENCY, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Others section
- binding.sectionOthers.visibility = if (isAtleastA14) {
- View.VISIBLE
- } else {
- View.GONE
- }
-
- // Fix qs tile color
- binding.fixQsTileColor.visibility = if (isAtleastA14) {
- View.VISIBLE
- } else {
- View.GONE
- }
- binding.fixQsTileColor.isSwitchChecked = getBoolean(FIX_QS_TILE_COLOR, false)
- binding.fixQsTileColor.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(FIX_QS_TILE_COLOR, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Fix notification color
- binding.fixNotificationColor.visibility = if (isAtleastA14) {
- View.VISIBLE
- } else {
- View.GONE
- }
- binding.fixNotificationColor.isSwitchChecked = getBoolean(FIX_NOTIFICATION_COLOR, false)
- binding.fixNotificationColor.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(FIX_NOTIFICATION_COLOR, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- return view
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedTransparencyBlur.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedTransparencyBlur.kt
deleted file mode 100644
index b91566648..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedTransparencyBlur.kt
+++ /dev/null
@@ -1,187 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.AGGRESSIVE_QSPANEL_BLUR_SWITCH
-import com.drdisagree.iconify.common.Preferences.BLUR_RADIUS_VALUE
-import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_SHADE_SWITCH
-import com.drdisagree.iconify.common.Preferences.NOTIF_TRANSPARENCY_SWITCH
-import com.drdisagree.iconify.common.Preferences.QSALPHA_LEVEL
-import com.drdisagree.iconify.common.Preferences.QSPANEL_BLUR_SWITCH
-import com.drdisagree.iconify.common.Preferences.QS_TRANSPARENCY_SWITCH
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.getInt
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.config.RPrefs.putInt
-import com.drdisagree.iconify.databinding.FragmentXposedTransparencyBlurBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.SystemUtil.disableBlur
-import com.drdisagree.iconify.utils.SystemUtil.enableBlur
-import com.drdisagree.iconify.utils.SystemUtil.isBlurEnabled
-import com.google.android.material.slider.Slider
-
-class XposedTransparencyBlur : BaseFragment() {
-
- private lateinit var binding: FragmentXposedTransparencyBlurBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedTransparencyBlurBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_transparency_blur
- )
-
- // Qs Panel & Notification Shade Transparency
- binding.transparentQsPanel.isSwitchChecked = getBoolean(QS_TRANSPARENCY_SWITCH, false)
- binding.transparentQsPanel.setSwitchChangeListener(qsTransparencyListener)
- binding.transparentNotifShade.isSwitchChecked = getBoolean(NOTIF_TRANSPARENCY_SWITCH, false)
- binding.transparentNotifShade.setSwitchChangeListener(notifTransparencyListener)
- binding.keepLockscreenShade.setEnabled(binding.transparentQsPanel.isSwitchChecked || binding.transparentNotifShade.isSwitchChecked)
- binding.keepLockscreenShade.isSwitchChecked = getBoolean(LOCKSCREEN_SHADE_SWITCH, false)
- binding.keepLockscreenShade.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(LOCKSCREEN_SHADE_SWITCH, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Transparency Alpha
- binding.transparencySlider.setEnabled(binding.transparentQsPanel.isSwitchChecked || binding.transparentNotifShade.isSwitchChecked)
- binding.transparencySlider.sliderValue = getInt(QSALPHA_LEVEL, 60)
- binding.transparencySlider.setOnSliderTouchListener(object :
- Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(QSALPHA_LEVEL, slider.value.toInt())
- }
- })
- binding.transparencySlider.setResetClickListener {
- putInt(QSALPHA_LEVEL, 60)
-
- true
- }
-
- // Qs Panel Blur Enabler
- putBoolean(QSPANEL_BLUR_SWITCH, isBlurEnabled(false))
- binding.blur.isSwitchChecked = getBoolean(QSPANEL_BLUR_SWITCH, false)
- binding.blur.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(QSPANEL_BLUR_SWITCH, isChecked)
-
- if (isChecked) {
- enableBlur(false)
- } else {
- binding.aggressiveBlur.isSwitchChecked = false
- disableBlur(false)
- }
-
- binding.aggressiveBlur.visibility = if (isChecked) View.VISIBLE else View.GONE
- }
-
- // Aggressive Qs Panel Blur Enabler
- putBoolean(AGGRESSIVE_QSPANEL_BLUR_SWITCH, isBlurEnabled(true))
- binding.aggressiveBlur.visibility =
- if (binding.blur.isSwitchChecked) {
- View.VISIBLE
- } else {
- View.GONE
- }
- binding.aggressiveBlur.isSwitchChecked = getBoolean(AGGRESSIVE_QSPANEL_BLUR_SWITCH, false)
- binding.aggressiveBlur.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(AGGRESSIVE_QSPANEL_BLUR_SWITCH, isChecked)
-
- if (isChecked) {
- enableBlur(true)
- } else {
- disableBlur(true)
- }
- }
-
- // Blur Intensity
- binding.blurIntensity.sliderValue = getInt(BLUR_RADIUS_VALUE, 23)
- binding.blurIntensity.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
- override fun onStartTrackingTouch(slider: Slider) {}
-
- override fun onStopTrackingTouch(slider: Slider) {
- putInt(BLUR_RADIUS_VALUE, slider.value.toInt())
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
- })
- binding.blurIntensity.setResetClickListener {
- putInt(BLUR_RADIUS_VALUE, 23)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
-
- true
- }
-
- return view
- }
-
- private var qsTransparencyListener: CompoundButton.OnCheckedChangeListener =
- CompoundButton.OnCheckedChangeListener { _, isChecked ->
- putBoolean(QS_TRANSPARENCY_SWITCH, isChecked)
-
- if (isChecked) {
- putBoolean(NOTIF_TRANSPARENCY_SWITCH, false)
- binding.transparentNotifShade.setSwitchChangeListener(null)
- binding.transparentNotifShade.isSwitchChecked = false
- binding.transparentNotifShade.setSwitchChangeListener(notifTransparencyListener)
- }
-
- binding.keepLockscreenShade.setEnabled(binding.transparentQsPanel.isSwitchChecked || binding.transparentNotifShade.isSwitchChecked)
- binding.transparencySlider.setEnabled(binding.transparentQsPanel.isSwitchChecked || binding.transparentNotifShade.isSwitchChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- private var notifTransparencyListener: CompoundButton.OnCheckedChangeListener =
- CompoundButton.OnCheckedChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(NOTIF_TRANSPARENCY_SWITCH, isChecked)
-
- if (isChecked) {
- putBoolean(QS_TRANSPARENCY_SWITCH, false)
- binding.transparentQsPanel.setSwitchChangeListener(null)
- binding.transparentQsPanel.isSwitchChecked = false
- binding.transparentQsPanel.setSwitchChangeListener(qsTransparencyListener)
- }
-
- binding.keepLockscreenShade.setEnabled(binding.transparentQsPanel.isSwitchChecked || binding.transparentNotifShade.isSwitchChecked)
- binding.transparencySlider.setEnabled(binding.transparentQsPanel.isSwitchChecked || binding.transparentNotifShade.isSwitchChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedVolumePanel.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedVolumePanel.kt
deleted file mode 100644
index 621a9de8b..000000000
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/XposedVolumePanel.kt
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.drdisagree.iconify.ui.fragments
-
-import android.os.Bundle
-import android.os.Handler
-import android.os.Looper
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CompoundButton
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
-import com.drdisagree.iconify.common.Preferences.VOLUME_PANEL_PERCENTAGE
-import com.drdisagree.iconify.common.Preferences.VOLUME_PANEL_SAFETY_WARNING
-import com.drdisagree.iconify.config.RPrefs.getBoolean
-import com.drdisagree.iconify.config.RPrefs.putBoolean
-import com.drdisagree.iconify.databinding.FragmentXposedVolumePanelBinding
-import com.drdisagree.iconify.ui.base.BaseFragment
-import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-
-class XposedVolumePanel : BaseFragment() {
-
- private lateinit var binding: FragmentXposedVolumePanelBinding
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View {
- binding = FragmentXposedVolumePanelBinding.inflate(inflater, container, false)
- val view: View = binding.getRoot()
-
- // Header
- setHeader(
- requireContext(),
- getParentFragmentManager(),
- binding.header.toolbar,
- R.string.activity_title_volume_panel
- )
-
- // Volume percentage
- binding.volumePercentage.isSwitchChecked = getBoolean(VOLUME_PANEL_PERCENTAGE, false)
- binding.volumePercentage.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(VOLUME_PANEL_PERCENTAGE, isChecked)
-
- Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
- SWITCH_ANIMATION_DELAY
- )
- }
-
- // Safety warning
- binding.safetyWarning.isSwitchChecked = getBoolean(VOLUME_PANEL_SAFETY_WARNING, true)
- binding.safetyWarning.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- putBoolean(VOLUME_PANEL_SAFETY_WARNING, isChecked)
- }
-
- return view
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/BrightnessBar.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/BrightnessBar.kt
similarity index 98%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/BrightnessBar.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/BrightnessBar.kt
index 091372178..438c88a40 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/BrightnessBar.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/BrightnessBar.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.os.Bundle
import android.view.LayoutInflater
@@ -64,7 +64,7 @@ class BrightnessBar : BaseFragment() {
val brightnessBarActivityList = ArrayList().apply {
add(
MenuModel(
- R.id.action_brightnessBar_to_brightnessBarPixel,
+ BrightnessBarPixel(),
resources.getString(R.string.activity_title_pixel_variant),
resources.getString(R.string.activity_desc_pixel_variant),
R.drawable.ic_pixel_device
@@ -73,6 +73,7 @@ class BrightnessBar : BaseFragment() {
}
return MenuAdapter(
+ parentFragmentManager,
requireContext(),
brightnessBarActivityList
)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/BrightnessBarPixel.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/BrightnessBarPixel.kt
similarity index 99%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/BrightnessBarPixel.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/BrightnessBarPixel.kt
index 6c44967e8..bad96b49c 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/BrightnessBarPixel.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/BrightnessBarPixel.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.os.Bundle
import android.view.LayoutInflater
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/CellularIcons.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/CellularIcons.kt
new file mode 100644
index 000000000..31f7c6af5
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/CellularIcons.kt
@@ -0,0 +1,123 @@
+package com.drdisagree.iconify.ui.fragments.home
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.recyclerview.widget.LinearLayoutManager
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.databinding.FragmentIconPackBinding
+import com.drdisagree.iconify.ui.adapters.IconPackAdapter
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.ui.models.IconPackModel
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.utils.overlay.manager.SignalIconManager
+import java.util.Locale
+
+class CellularIcons : BaseFragment() {
+
+ private lateinit var binding: FragmentIconPackBinding
+ private var loadingDialog: LoadingDialog? = null
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentIconPackBinding.inflate(inflater, container, false)
+ val view: View = binding.getRoot()
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_cellular_icons
+ )
+
+ // Loading dialog while enabling or disabling pack
+ loadingDialog = LoadingDialog(requireContext())
+
+ // RecyclerView
+ binding.iconPackContainer.setLayoutManager(LinearLayoutManager(requireContext()))
+
+ binding.iconPackContainer.setAdapter(initIconPackItems())
+ binding.iconPackContainer.setHasFixedSize(true)
+
+ return view
+ }
+
+ @Suppress("DiscouragedApi")
+ private fun initIconPackItems(): IconPackAdapter {
+ val iconPackList = ArrayList().apply {
+ val themes = listOf(
+ "Aquarium", "Aurora", "Bars", "Butterfly", "Circle", "Daun",
+ "Dec", "Deep", "Dora", "ZigZag", "Equal", "Faint UI",
+ "Fan", "Lorn", "Gradicon", "Huawei", "Inside", "iOS",
+ "Mini", "Nothing Dot", "Odin", "Pills", "Plumpy", "Rel",
+ "Roman", "Round", "Scroll", "Sea", "Sneaky", "Stack",
+ "Stroke", "Wannui", "Wavy", "Windows", "Wing", "Xperia"
+ )
+
+ val packageName = BuildConfig.APPLICATION_ID
+
+ themes.forEachIndexed { _, themeName ->
+ val themeResourceName = themeName.replace(" ", "_").lowercase(Locale.ROOT)
+
+ add(
+ IconPackModel(
+ themeName,
+ 0,
+ resources.getIdentifier(
+ "preview_${themeResourceName}_ic_signal_cellular_1_4_bar",
+ "drawable",
+ packageName
+ ),
+ resources.getIdentifier(
+ "preview_${themeResourceName}_ic_signal_cellular_2_4_bar",
+ "drawable",
+ packageName
+ ),
+ resources.getIdentifier(
+ "preview_${themeResourceName}_ic_signal_cellular_2_4_bar",
+ "drawable",
+ packageName
+ ),
+ resources.getIdentifier(
+ "preview_${themeResourceName}_ic_signal_cellular_4_4_bar",
+ "drawable",
+ packageName
+ )
+ )
+ )
+ }
+ }
+
+ return IconPackAdapter(
+ requireContext(),
+ iconPackList,
+ loadingDialog!!,
+ "SGIC",
+ onButtonClick
+ )
+ }
+
+ private val onButtonClick = object : IconPackAdapter.OnButtonClick {
+
+ override fun onEnableClick(position: Int, item: IconPackModel) {
+ SignalIconManager.enableOverlay(n = position + 1, "SGIC")
+ }
+
+ override fun onDisableClick(position: Int, item: IconPackModel) {
+ SignalIconManager.disableOverlay(n = position + 1, "SGIC")
+ }
+ }
+
+ override fun onDestroy() {
+ loadingDialog?.dismiss()
+
+ super.onDestroy()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Home.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Home.kt
new file mode 100644
index 000000000..95ef31716
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Home.kt
@@ -0,0 +1,109 @@
+package com.drdisagree.iconify.ui.fragments.home
+
+import android.os.Bundle
+import android.view.View
+import androidx.preference.Preference
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.FIRST_INSTALL
+import com.drdisagree.iconify.common.Preferences.UPDATE_DETECTED
+import com.drdisagree.iconify.common.Preferences.VER_CODE
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.config.RPrefs.putInt
+import com.drdisagree.iconify.services.UpdateScheduler.scheduleUpdates
+import com.drdisagree.iconify.ui.activities.MainActivity.Companion.replaceFragment
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.fragments.settings.AppUpdates
+import com.drdisagree.iconify.ui.preferences.UpdateCheckerPreference
+import com.drdisagree.iconify.utils.SystemUtils.saveBootId
+import com.google.android.material.appbar.AppBarLayout
+import com.google.android.material.bottomnavigation.BottomNavigationView
+
+class Home : ControlledPreferenceFragmentCompat(), AppBarLayout.OnOffsetChangedListener {
+
+ private lateinit var appBarLayout: AppBarLayout
+
+ override val title: String
+ get() = getString(R.string.app_name)
+
+ override val backButtonEnabled: Boolean
+ get() = false
+
+ override val layoutResource: Int
+ get() = R.xml.home
+
+ override val hasMenu: Boolean
+ get() = false
+
+ override val themeResource: Int
+ get() = R.style.PrefsThemeCollapsingToolbar
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+
+ val intent = requireActivity().intent
+ if (intent != null && intent.getBooleanExtra(AppUpdates.KEY_NEW_UPDATE, false)) {
+ (requireActivity().findViewById(R.id.bottomNavigationView) as BottomNavigationView)
+ .selectedItemId = R.id.settings
+ replaceFragment(parentFragmentManager, AppUpdates())
+ intent.removeExtra(AppUpdates.KEY_NEW_UPDATE)
+ } else {
+ scheduleUpdates(appContext)
+ }
+
+ appBarLayout = view.findViewById(R.id.appBarLayout)
+ appBarLayout.addOnOffsetChangedListener(this)
+
+ if (isToolbarFullyExpanded) {
+ listView.scrollToPosition(0)
+ }
+
+ putBoolean(FIRST_INSTALL, false)
+ putBoolean(UPDATE_DETECTED, false)
+ putInt(VER_CODE, BuildConfig.VERSION_CODE)
+ saveBootId
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ findPreference("newUpdate")?.apply {
+ onPreferenceClickListener =
+ Preference.OnPreferenceClickListener {
+ replaceFragment(parentFragmentManager, AppUpdates())
+ true
+ }
+
+ checkForUpdate()
+ }
+ }
+
+ override fun onOffsetChanged(appBarLayout: AppBarLayout?, verticalOffset: Int) {
+ if (verticalOffset == 0) {
+ if (!isToolbarFullyExpanded) {
+ listView.scrollToPosition(0)
+ isToolbarFullyExpanded = true
+ }
+ } else {
+ isToolbarFullyExpanded = false
+ }
+ }
+
+ override fun onResume() {
+ super.onResume()
+
+ if (isToolbarFullyExpanded) {
+ listView.scrollToPosition(0)
+ }
+ }
+
+ override fun onDestroyView() {
+ super.onDestroyView()
+ appBarLayout.removeOnOffsetChangedListener(this)
+ }
+
+ companion object {
+ private var isToolbarFullyExpanded = true
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/IconPack.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/IconPack.kt
similarity index 79%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/IconPack.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/IconPack.kt
index 48eb3b59f..9d840f588 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/IconPack.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/IconPack.kt
@@ -1,21 +1,18 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import androidx.recyclerview.widget.ConcatAdapter
import androidx.recyclerview.widget.LinearLayoutManager
import com.drdisagree.iconify.R
import com.drdisagree.iconify.databinding.FragmentIconPackBinding
import com.drdisagree.iconify.ui.adapters.IconPackAdapter
-import com.drdisagree.iconify.ui.adapters.MenuAdapter
-import com.drdisagree.iconify.ui.adapters.SectionTitleAdapter
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.models.IconPackModel
-import com.drdisagree.iconify.ui.models.MenuModel
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.utils.overlay.manager.IconPackManager
class IconPack : BaseFragment() {
@@ -44,53 +41,12 @@ class IconPack : BaseFragment() {
// RecyclerView
binding.iconPackContainer.setLayoutManager(LinearLayoutManager(requireContext()))
- val adapter = ConcatAdapter(
- initActivityItems(),
- SectionTitleAdapter(
- requireContext(),
- R.layout.view_section_title,
- R.string.icon_pack_styles
- ),
- initIconPackItems()
- )
-
- binding.iconPackContainer.setAdapter(adapter)
+ binding.iconPackContainer.setAdapter(initIconPackItems())
binding.iconPackContainer.setHasFixedSize(true)
return view
}
- private fun initActivityItems(): MenuAdapter {
- val iconPackActivityList = ArrayList().apply {
- add(
- MenuModel(
- R.id.action_iconPack_to_coloredBattery,
- resources.getString(R.string.activity_title_colored_battery),
- resources.getString(R.string.activity_desc_colored_battery),
- R.drawable.ic_colored_battery
- )
- )
- add(
- MenuModel(
- R.id.action_iconPack_to_mediaIcons,
- resources.getString(R.string.activity_title_media_icons),
- resources.getString(R.string.activity_desc_media_icons),
- R.drawable.ic_media_player_icon
- )
- )
- add(
- MenuModel(
- R.id.action_iconPack_to_settingsIcons,
- resources.getString(R.string.activity_title_settings_icons),
- resources.getString(R.string.activity_desc_settings_icons),
- R.drawable.ic_settings_icon_pack
- )
- )
- }
-
- return MenuAdapter(requireContext(), iconPackActivityList)
- }
-
private fun initIconPackItems(): IconPackAdapter {
val iconPackList = ArrayList().apply {
add(
@@ -238,10 +194,23 @@ class IconPack : BaseFragment() {
return IconPackAdapter(
requireContext(),
iconPackList,
- loadingDialog!!
+ loadingDialog!!,
+ "IPSUI",
+ onButtonClick
)
}
+ private val onButtonClick = object : IconPackAdapter.OnButtonClick {
+
+ override fun onEnableClick(position: Int, item: IconPackModel) {
+ IconPackManager.enableOverlay(index = position + 1, "IPAS", "IPSUI")
+ }
+
+ override fun onDisableClick(position: Int, item: IconPackModel) {
+ IconPackManager.disableOverlay(index = position + 1, "IPAS", "IPSUI")
+ }
+ }
+
override fun onDestroy() {
loadingDialog?.dismiss()
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/IconShape.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/IconShape.kt
new file mode 100644
index 000000000..091d02487
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/IconShape.kt
@@ -0,0 +1,288 @@
+package com.drdisagree.iconify.ui.fragments.home
+
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.Toast
+import androidx.recyclerview.widget.GridLayoutManager
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
+import com.drdisagree.iconify.common.Preferences.SELECTED_ICON_SHAPE
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.databinding.FragmentIconShapeBinding
+import com.drdisagree.iconify.ui.adapters.IconShapeAdapter
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.ui.models.IconShapeModel
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.compiler.OnDemandCompiler.buildOverlay
+import java.io.IOException
+import java.util.concurrent.atomic.AtomicBoolean
+
+class IconShape : BaseFragment() {
+
+ private lateinit var binding: FragmentIconShapeBinding
+ private var loadingDialog: LoadingDialog? = null
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentIconShapeBinding.inflate(inflater, container, false)
+ val view: View = binding.getRoot()
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_icon_shape
+ )
+
+ // Loading dialog while enabling or disabling pack
+ loadingDialog = LoadingDialog(requireContext())
+
+ // Icon masking shape list
+ val gridLayoutManager = GridLayoutManager(appContext, 3) // 3 columns
+ gridLayoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
+ override fun getSpanSize(position: Int): Int {
+ val totalItemCount = binding.iconShapeContainer.adapter?.itemCount ?: return 1
+ val spanCount = gridLayoutManager.spanCount
+
+ // Calculate the number of items in the last row
+ val itemsInLastRow = totalItemCount % spanCount
+ return if (position >= totalItemCount - itemsInLastRow) {
+ // Adjust span size for the last row
+ when (itemsInLastRow) {
+ 1 -> spanCount // 1 item spans all columns
+ 2 -> spanCount / 2 // 2 items span half of the columns each
+ else -> 1 // Default span size (1 column each)
+ }
+ } else {
+ 1 // Default span size (1 column each)
+ }
+ }
+ }
+ binding.iconShapeContainer.layoutManager = gridLayoutManager
+ binding.iconShapeContainer.adapter = initIconShapeList()
+ binding.iconShapeContainer.setHasFixedSize(true)
+
+ return view
+ }
+
+ private fun initIconShapeList(): IconShapeAdapter {
+ val iconShapePreviewStyles = ArrayList().apply {
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_none,
+ R.string.icon_mask_style_none
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_pebble,
+ R.string.icon_mask_style_pebble
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_rounded_hexagon,
+ R.string.icon_mask_style_hexagon
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_samsung,
+ R.string.icon_mask_style_samsung
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_scroll,
+ R.string.icon_mask_style_scroll
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_teardrops,
+ R.string.icon_mask_style_teardrop
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_square,
+ R.string.icon_mask_style_square
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_rounded_rectangle,
+ R.string.icon_mask_style_rounded_rectangle
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_ios,
+ R.string.icon_mask_style_ios
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_cloudy,
+ R.string.icon_mask_style_cloudy
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_cylinder,
+ R.string.icon_mask_style_cylinder
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_flower,
+ R.string.icon_mask_style_flower
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_heart,
+ R.string.icon_mask_style_heart
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_leaf,
+ R.string.icon_mask_style_leaf
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_stretched,
+ R.string.icon_mask_style_stretched
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_tapered_rectangle,
+ R.string.icon_mask_style_tapered_rectangle
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_vessel,
+ R.string.icon_mask_style_vessel
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_rohie_meow,
+ R.string.icon_mask_style_rice_rohie_meow
+ )
+ )
+ add(
+ IconShapeModel(
+ R.drawable.icon_shape_force_round,
+ R.string.icon_mask_style_force_round
+ )
+ )
+ }
+
+ return IconShapeAdapter(
+ appContext,
+ iconShapePreviewStyles,
+ onShapeClick
+ )
+ }
+
+ private val onShapeClick = object : IconShapeAdapter.OnShapeClick {
+ override fun onShapeClick(position: Int, item: IconShapeModel) {
+
+ if (position == 0) {
+ RPrefs.putInt(SELECTED_ICON_SHAPE, 0)
+ OverlayUtils.disableOverlay("IconifyComponentSIS.overlay")
+
+ Toast.makeText(
+ appContext,
+ resources.getString(R.string.toast_disabled),
+ Toast.LENGTH_SHORT
+ ).show()
+ loadingDialog!!.hide()
+ return
+ }
+
+ if (!hasStoragePermission()) {
+ requestStoragePermission(
+ requireContext()
+ )
+ } else {
+ // Show loading dialog
+ loadingDialog!!.show(resources.getString(R.string.loading_dialog_wait))
+
+ Thread {
+ val hasErroredOut = AtomicBoolean(false)
+
+ try {
+ hasErroredOut.set(
+ buildOverlay(
+ "SIS",
+ position,
+ FRAMEWORK_PACKAGE,
+ true
+ )
+ )
+ } catch (e: IOException) {
+ hasErroredOut.set(true)
+ Log.e("IconShape", e.toString())
+ }
+
+ if (!hasErroredOut.get()) {
+ RPrefs.putInt(SELECTED_ICON_SHAPE, position)
+ refreshAdapter()
+ }
+
+ Handler(Looper.getMainLooper()).postDelayed({
+ // Hide loading dialog
+ loadingDialog!!.hide()
+ if (!hasErroredOut.get()) {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources
+ .getString(R.string.toast_applied),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources
+ .getString(R.string.toast_error),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }, 3000)
+ }.start()
+ }
+ }
+ }
+
+ private fun refreshAdapter() {
+ val ad = binding.iconShapeContainer.adapter as IconShapeAdapter
+ ad.notifyChange()
+ }
+
+ override fun onDestroy() {
+ loadingDialog?.dismiss()
+
+ super.onDestroy()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/MediaIcons.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/MediaIcons.kt
similarity index 94%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/MediaIcons.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/MediaIcons.kt
index 052dea5ff..d690c20f1 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/MediaIcons.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/MediaIcons.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.graphics.drawable.Drawable
import android.os.Build
@@ -13,15 +13,15 @@ import android.widget.TextView
import androidx.core.content.ContextCompat
import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.config.Prefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getBoolean
import com.drdisagree.iconify.databinding.FragmentMediaIconsBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.AppUtil.getAppIcon
-import com.drdisagree.iconify.utils.AppUtil.getAppName
-import com.drdisagree.iconify.utils.AppUtil.isAppInstalledRoot
-import com.drdisagree.iconify.utils.AppUtil.launchApp
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
+import com.drdisagree.iconify.utils.AppUtils.getAppIcon
+import com.drdisagree.iconify.utils.AppUtils.getAppName
+import com.drdisagree.iconify.utils.AppUtils.isAppInstalledRoot
+import com.drdisagree.iconify.utils.AppUtils.launchApp
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
import com.drdisagree.iconify.utils.overlay.manager.MediaPlayerIconManager.enableOverlay
import com.google.android.material.button.MaterialButton
import com.google.android.material.button.MaterialButtonToggleGroup
@@ -239,7 +239,7 @@ class MediaIcons : BaseFragment() {
if (isChecked) {
enableOverlay(idx, finalI)
} else {
- OverlayUtil.disableOverlay("IconifyComponentMPIP$idx$finalI.overlay")
+ OverlayUtils.disableOverlay("IconifyComponentMPIP$idx$finalI.overlay")
}
refreshBackground()
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Notification.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Notification.kt
similarity index 93%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/Notification.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Notification.kt
index 31ef57a41..ad6e14d53 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Notification.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Notification.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.os.Bundle
import android.view.LayoutInflater
@@ -51,7 +51,7 @@ class Notification : BaseFragment() {
R.layout.view_section_title_notif,
R.string.notification_styles
),
- initNotifItems()
+ initNotificationItems()
)
binding.notificationsContainer.setAdapter(adapter)
@@ -61,10 +61,10 @@ class Notification : BaseFragment() {
}
private fun initActivityItems(): MenuAdapter {
- val notifActivityList = ArrayList().apply {
+ val notificationActivityList = ArrayList().apply {
add(
MenuModel(
- R.id.action_notification_to_notificationPixel,
+ NotificationPixel(),
resources.getString(R.string.activity_title_pixel_variant),
resources.getString(R.string.activity_desc_pixel_variant),
R.drawable.ic_pixel_device
@@ -73,13 +73,14 @@ class Notification : BaseFragment() {
}
return MenuAdapter(
+ parentFragmentManager,
requireContext(),
- notifActivityList
+ notificationActivityList
)
}
- private fun initNotifItems(): NotificationAdapter {
- val notifList = ArrayList().apply {
+ private fun initNotificationItems(): NotificationAdapter {
+ val notificationList = ArrayList().apply {
add(
NotificationModel(
"Default",
@@ -204,7 +205,7 @@ class Notification : BaseFragment() {
return NotificationAdapter(
requireContext(),
- notifList,
+ notificationList,
loadingDialog!!,
"NFN"
)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/NotificationPixel.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/NotificationPixel.kt
similarity index 99%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/NotificationPixel.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/NotificationPixel.kt
index 418d4754a..0475809ef 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/NotificationPixel.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/NotificationPixel.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.os.Bundle
import android.view.LayoutInflater
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/ProgressBar.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/ProgressBar.kt
similarity index 98%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/ProgressBar.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/ProgressBar.kt
index d87dcd134..170ac1670 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/ProgressBar.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/ProgressBar.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.os.Bundle
import android.view.LayoutInflater
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelTile.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/QsPanelTile.kt
similarity index 97%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelTile.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/QsPanelTile.kt
index da31606f1..e43cae6b0 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelTile.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/QsPanelTile.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.annotation.SuppressLint
import android.content.res.Configuration
@@ -67,7 +67,7 @@ class QsPanelTile : BaseFragment() {
val qsShapeActivityList = ArrayList().apply {
add(
MenuModel(
- R.id.action_qsPanelTile_to_qsPanelTilePixel,
+ QsPanelTilePixel(),
resources.getString(R.string.activity_title_pixel_variant),
resources.getString(R.string.activity_desc_pixel_variant),
R.drawable.ic_pixel_device
@@ -75,7 +75,11 @@ class QsPanelTile : BaseFragment() {
)
}
- return MenuAdapter(requireContext(), qsShapeActivityList)
+ return MenuAdapter(
+ parentFragmentManager,
+ requireContext(),
+ qsShapeActivityList
+ )
}
private fun initQsShapeItems(): QsShapeAdapter {
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelTilePixel.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/QsPanelTilePixel.kt
similarity index 99%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelTilePixel.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/QsPanelTilePixel.kt
index c746ec857..84f88571e 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelTilePixel.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/QsPanelTilePixel.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.annotation.SuppressLint
import android.content.res.Configuration
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/SettingsIcons.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/SettingsIcons.kt
similarity index 88%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/SettingsIcons.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/SettingsIcons.kt
index 051533954..d4007f97b 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/SettingsIcons.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/SettingsIcons.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.os.Bundle
import android.os.Handler
@@ -20,15 +20,15 @@ import com.drdisagree.iconify.common.Preferences.SELECTED_SETTINGS_ICONS_COLOR
import com.drdisagree.iconify.common.Preferences.SELECTED_SETTINGS_ICONS_SET
import com.drdisagree.iconify.common.Preferences.SELECTED_SETTINGS_ICONS_SHAPE
import com.drdisagree.iconify.common.Preferences.SELECTED_SETTINGS_ICONS_SIZE
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.clearPrefs
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.clearPrefs
import com.drdisagree.iconify.databinding.FragmentSettingsIconsBinding
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.enableOverlays
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlays
import com.drdisagree.iconify.utils.overlay.manager.SettingsIconResourceManager.buildOverlay
import java.io.IOException
import java.util.concurrent.atomic.AtomicBoolean
@@ -58,31 +58,31 @@ class SettingsIcons : Fragment() {
loadingDialog = LoadingDialog(requireContext())
// Retrieve previously saved preferences
- selectedIcon = Prefs.getInt(SELECTED_SETTINGS_ICONS_SET, 1)
+ selectedIcon = RPrefs.getInt(SELECTED_SETTINGS_ICONS_SET, 1)
// Background style
- binding.bgStyle.setSelectedIndex(Prefs.getInt(SELECTED_SETTINGS_ICONS_BG, 1) - 1)
+ binding.bgStyle.setSelectedIndex(RPrefs.getInt(SELECTED_SETTINGS_ICONS_BG, 1) - 1)
binding.bgStyle.setOnItemSelectedListener { index: Int ->
selectedBackground = index + 1
}
selectedBackground = binding.bgStyle.getSelectedIndex() + 1
// Background Shape
- binding.bgShape.setSelectedIndex(Prefs.getInt(SELECTED_SETTINGS_ICONS_SHAPE, 1) - 1)
+ binding.bgShape.setSelectedIndex(RPrefs.getInt(SELECTED_SETTINGS_ICONS_SHAPE, 1) - 1)
binding.bgShape.setOnItemSelectedListener { index: Int ->
selectedShape = index + 1
}
selectedShape = binding.bgShape.getSelectedIndex() + 1
// Icon Size
- binding.iconSize.setSelectedIndex(Prefs.getInt(SELECTED_SETTINGS_ICONS_SIZE, 1) - 1)
+ binding.iconSize.setSelectedIndex(RPrefs.getInt(SELECTED_SETTINGS_ICONS_SIZE, 1) - 1)
binding.iconSize.setOnItemSelectedListener { index: Int ->
selectedSize = index + 1
}
selectedSize = binding.iconSize.getSelectedIndex() + 1
// Icon color
- binding.iconColor.setSelectedIndex(Prefs.getInt(SELECTED_SETTINGS_ICONS_COLOR, 1) - 1)
+ binding.iconColor.setSelectedIndex(RPrefs.getInt(SELECTED_SETTINGS_ICONS_COLOR, 1) - 1)
binding.iconColor.setOnItemSelectedListener { index: Int ->
selectedIconColor = index + 1
}
@@ -115,7 +115,7 @@ class SettingsIcons : Fragment() {
refreshBackground()
// Enable and disable button
- if (Prefs.getBoolean("IconifyComponentSIP1.overlay")) {
+ if (RPrefs.getBoolean("IconifyComponentSIP1.overlay")) {
binding.disableSettingsIcons.visibility = View.VISIBLE
}
binding.enableSettingsIcons.setOnClickListener {
@@ -146,11 +146,11 @@ class SettingsIcons : Fragment() {
Handler(Looper.getMainLooper()).post {
if (!hasErroredOut.get()) {
- Prefs.putInt(SELECTED_SETTINGS_ICONS_SET, selectedIcon)
- Prefs.putInt(SELECTED_SETTINGS_ICONS_BG, selectedBackground)
- Prefs.putInt(SELECTED_SETTINGS_ICONS_SHAPE, selectedShape)
- Prefs.putInt(SELECTED_SETTINGS_ICONS_SIZE, selectedSize)
- Prefs.putInt(SELECTED_SETTINGS_ICONS_COLOR, selectedIconColor)
+ RPrefs.putInt(SELECTED_SETTINGS_ICONS_SET, selectedIcon)
+ RPrefs.putInt(SELECTED_SETTINGS_ICONS_BG, selectedBackground)
+ RPrefs.putInt(SELECTED_SETTINGS_ICONS_SHAPE, selectedShape)
+ RPrefs.putInt(SELECTED_SETTINGS_ICONS_SIZE, selectedSize)
+ RPrefs.putInt(SELECTED_SETTINGS_ICONS_COLOR, selectedIconColor)
binding.disableSettingsIcons.visibility = View.VISIBLE
binding.iconPacksList.getChildAt(selectedIcon - 1)
@@ -181,7 +181,7 @@ class SettingsIcons : Fragment() {
}
}
binding.disableSettingsIcons.setOnClickListener {
- binding.iconPacksList.getChildAt(Prefs.getInt(SELECTED_SETTINGS_ICONS_SET, 1) - 1)
+ binding.iconPacksList.getChildAt(RPrefs.getInt(SELECTED_SETTINGS_ICONS_SET, 1) - 1)
.findViewById(R.id.icon_selected).visibility = View.INVISIBLE
clearPrefs(
@@ -192,7 +192,7 @@ class SettingsIcons : Fragment() {
binding.disableSettingsIcons.visibility = View.GONE
- OverlayUtil.disableOverlays(
+ OverlayUtils.disableOverlays(
"IconifyComponentSIP1.overlay",
"IconifyComponentSIP2.overlay",
"IconifyComponentSIP3.overlay"
@@ -291,7 +291,7 @@ class SettingsIcons : Fragment() {
itemSelected(
child,
- Prefs.getInt(SELECTED_SETTINGS_ICONS_SET, 1) == i + 1,
+ RPrefs.getInt(SELECTED_SETTINGS_ICONS_SET, 1) == i + 1,
i + 1
)
}
@@ -349,8 +349,8 @@ class SettingsIcons : Fragment() {
)
)
parent.findViewById(R.id.icon_selected).visibility =
- if (Prefs.getBoolean("IconifyComponentSIP1.overlay") &&
- Prefs.getInt(SELECTED_SETTINGS_ICONS_SET, 1) == selectedIndex
+ if (RPrefs.getBoolean("IconifyComponentSIP1.overlay") &&
+ RPrefs.getInt(SELECTED_SETTINGS_ICONS_SET, 1) == selectedIndex
) View.VISIBLE else View.INVISIBLE
parent.findViewById(R.id.iconpack_desc).setAlpha(0.8f)
} else {
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Switch.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Switch.kt
similarity index 98%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/Switch.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Switch.kt
index 6e4efd6ab..ec2bdbb7b 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Switch.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/Switch.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.home
import android.os.Bundle
import android.view.LayoutInflater
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/ToastFrame.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/ToastFrame.kt
new file mode 100644
index 000000000..5360857b0
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/ToastFrame.kt
@@ -0,0 +1,239 @@
+package com.drdisagree.iconify.ui.fragments.home
+
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.Toast
+import androidx.recyclerview.widget.GridLayoutManager
+import androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
+import com.drdisagree.iconify.common.Preferences.SELECTED_TOAST_FRAME
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.databinding.FragmentToastFrameBinding
+import com.drdisagree.iconify.ui.adapters.ToastAdapter
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.ui.models.ToastModel
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.compiler.OnDemandCompiler.buildOverlay
+import java.io.IOException
+import java.util.concurrent.atomic.AtomicBoolean
+
+class ToastFrame : BaseFragment() {
+
+ private lateinit var binding: FragmentToastFrameBinding
+ private var loadingDialog: LoadingDialog? = null
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentToastFrameBinding.inflate(inflater, container, false)
+ val view: View = binding.getRoot()
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_toast_frame
+ )
+
+ // Loading dialog while enabling or disabling pack
+ loadingDialog = LoadingDialog(requireContext())
+
+ // Toast Frame style
+ val gridLayout = GridLayoutManager(requireContext(), 2)
+ gridLayout.spanSizeLookup = object : SpanSizeLookup() {
+ override fun getSpanSize(position: Int): Int {
+ val lastIndex = binding.toastStylesContainer.adapter?.itemCount?.minus(1) ?: 0
+
+ return if (position == lastIndex && lastIndex % gridLayout.spanCount == 0) {
+ 2
+ } else {
+ 1
+ }
+ }
+ }
+ binding.toastStylesContainer.setLayoutManager(gridLayout)
+ binding.toastStylesContainer.setAdapter(initToastFrameItems())
+ binding.toastStylesContainer.setHasFixedSize(true)
+
+ return view
+ }
+
+ private fun initToastFrameItems(): ToastAdapter {
+ val selectedStyle = getInt(SELECTED_TOAST_FRAME, -1)
+ val toastFrameStyle = ArrayList().apply {
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_1,
+ appContextLocale.resources.getString(R.string.style_0)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_1,
+ String.format(appContextLocale.resources.getString(R.string.style), 1)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_2,
+ String.format(appContextLocale.resources.getString(R.string.style), 2)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_3,
+ String.format(appContextLocale.resources.getString(R.string.style), 3)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_4,
+ String.format(appContextLocale.resources.getString(R.string.style), 4)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_5,
+ String.format(appContextLocale.resources.getString(R.string.style), 5)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_6,
+ String.format(appContextLocale.resources.getString(R.string.style), 6)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_7,
+ String.format(appContextLocale.resources.getString(R.string.style), 7)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_8,
+ String.format(appContextLocale.resources.getString(R.string.style), 8)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_9,
+ String.format(appContextLocale.resources.getString(R.string.style), 9)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_10,
+ String.format(appContextLocale.resources.getString(R.string.style), 10)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_11,
+ String.format(appContextLocale.resources.getString(R.string.style), 11)
+ )
+ )
+ add(
+ ToastModel(
+ R.drawable.toast_frame_style_12,
+ String.format(appContextLocale.resources.getString(R.string.style), 12)
+ )
+ )
+ }
+
+ return ToastAdapter(
+ requireContext(),
+ toastFrameStyle,
+ onToastClick
+ )
+ }
+
+ private val onToastClick = object : ToastAdapter.OnToastClick {
+ override fun onToastClick(position: Int, item: ToastModel) {
+
+ if (!hasStoragePermission()) {
+ requestStoragePermission(appContext)
+ return
+ }
+
+ if (position == 0) {
+ RPrefs.putInt(SELECTED_TOAST_FRAME, -1)
+ OverlayUtils.disableOverlay("IconifyComponentTSTFRM.overlay")
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_disabled),
+ Toast.LENGTH_SHORT
+ ).show()
+ return
+ }
+
+ // Show loading dialog
+ loadingDialog!!.show(appContextLocale.resources.getString(R.string.loading_dialog_wait))
+
+ Thread {
+ val hasErroredOut = AtomicBoolean(false)
+
+ try {
+ hasErroredOut.set(
+ buildOverlay(
+ "TSTFRM",
+ position,
+ FRAMEWORK_PACKAGE,
+ true
+ )
+ )
+ } catch (e: IOException) {
+ hasErroredOut.set(true)
+ Log.e("ToastFrame", e.toString())
+ }
+
+ if (!hasErroredOut.get()) {
+ RPrefs.putInt(SELECTED_TOAST_FRAME, position)
+ val ad = binding.toastStylesContainer.adapter as ToastAdapter
+ ad.notifyChange()
+ }
+
+ Handler(Looper.getMainLooper()).postDelayed({
+ // Hide loading dialog
+ loadingDialog!!.hide()
+
+ if (!hasErroredOut.get()) {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_applied),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_error),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }, 3000)
+ }.start()
+ }
+ }
+
+ override fun onDestroy() {
+ loadingDialog?.dismiss()
+
+ super.onDestroy()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/WiFiIcons.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/WiFiIcons.kt
new file mode 100644
index 000000000..5cefd0db4
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/home/WiFiIcons.kt
@@ -0,0 +1,119 @@
+package com.drdisagree.iconify.ui.fragments.home
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.recyclerview.widget.LinearLayoutManager
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.databinding.FragmentIconPackBinding
+import com.drdisagree.iconify.ui.adapters.IconPackAdapter
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.ui.models.IconPackModel
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.utils.overlay.manager.SignalIconManager
+import java.util.Locale
+
+class WiFiIcons : BaseFragment() {
+
+ private lateinit var binding: FragmentIconPackBinding
+ private var loadingDialog: LoadingDialog? = null
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentIconPackBinding.inflate(inflater, container, false)
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_wifi_icons
+ )
+
+ // Loading dialog while enabling or disabling pack
+ loadingDialog = LoadingDialog(requireContext())
+
+ // RecyclerView
+ binding.iconPackContainer.setLayoutManager(LinearLayoutManager(requireContext()))
+
+ binding.iconPackContainer.setAdapter(initIconPackItems())
+ binding.iconPackContainer.setHasFixedSize(true)
+
+ return binding.getRoot()
+ }
+
+ @Suppress("DiscouragedApi")
+ private fun initIconPackItems(): IconPackAdapter {
+ val iconPackList = ArrayList().apply {
+ val themes = listOf(
+ "Aurora", "Bars", "Dora", "Faint UI", "Lorn", "Gradicon",
+ "Inside", "Nothing Dot", "Plumpy", "Round", "Sneaky", "Stroke",
+ "Wavy", "Weed", "Xperia", "ZigZag"
+ )
+
+ val packageName = BuildConfig.APPLICATION_ID
+
+ themes.forEachIndexed { _, themeName ->
+ val themeResourceName = themeName.replace(" ", "_").lowercase(Locale.ROOT)
+
+ add(
+ IconPackModel(
+ themeName,
+ 0,
+ resources.getIdentifier(
+ "preview_${themeResourceName}_ic_wifi_signal_1",
+ "drawable",
+ packageName
+ ),
+ resources.getIdentifier(
+ "preview_${themeResourceName}_ic_wifi_signal_2",
+ "drawable",
+ packageName
+ ),
+ resources.getIdentifier(
+ "preview_${themeResourceName}_ic_wifi_signal_3",
+ "drawable",
+ packageName
+ ),
+ resources.getIdentifier(
+ "preview_${themeResourceName}_ic_wifi_signal_4",
+ "drawable",
+ packageName
+ )
+ )
+ )
+ }
+ }
+
+ return IconPackAdapter(
+ requireContext(),
+ iconPackList,
+ loadingDialog!!,
+ "WIFI",
+ onButtonClick
+ )
+ }
+
+ private val onButtonClick = object : IconPackAdapter.OnButtonClick {
+
+ override fun onEnableClick(position: Int, item: IconPackModel) {
+ SignalIconManager.enableOverlay(n = position + 1, "WIFI")
+ }
+
+ override fun onDisableClick(position: Int, item: IconPackModel) {
+ SignalIconManager.disableOverlay(n = position + 1, "WIFI")
+ }
+ }
+
+ override fun onDestroy() {
+ loadingDialog?.dismiss()
+
+ super.onDestroy()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/AppUpdates.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/AppUpdates.kt
similarity index 97%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/AppUpdates.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/AppUpdates.kt
index 434f444ea..53e43dbb2 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/AppUpdates.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/AppUpdates.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.settings
import android.content.Intent
import android.net.Uri
@@ -23,8 +23,8 @@ import com.drdisagree.iconify.common.Const.LATEST_VERSION_URL
import com.drdisagree.iconify.common.Preferences.UPDATE_CHECK_TIME
import com.drdisagree.iconify.common.Preferences.UPDATE_SCHEDULE
import com.drdisagree.iconify.common.Preferences.VER_CODE
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.putLong
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.putLong
import com.drdisagree.iconify.databinding.FragmentAppUpdatesBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.dp2px
@@ -60,9 +60,9 @@ class AppUpdates : BaseFragment() {
)
// Update Schedule
- binding.updateSchedule.setSelectedIndex(Prefs.getInt(UPDATE_SCHEDULE, 1))
+ binding.updateSchedule.setSelectedIndex(RPrefs.getInt(UPDATE_SCHEDULE, 1))
binding.updateSchedule.setOnItemSelectedListener { index: Int ->
- Prefs.putInt(UPDATE_SCHEDULE, index)
+ RPrefs.putInt(UPDATE_SCHEDULE, index)
when (index) {
0 -> putLong(UPDATE_CHECK_TIME, 6)
1 -> putLong(UPDATE_CHECK_TIME, 12)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Changelog.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Changelog.kt
similarity index 99%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/Changelog.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Changelog.kt
index 86674bdc7..815e42de0 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Changelog.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Changelog.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.settings
import android.content.Intent
import android.net.Uri
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Credits.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Credits.kt
similarity index 97%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/Credits.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Credits.kt
index fc05d2f2f..f563fcecc 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Credits.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Credits.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.settings
import android.os.Bundle
import android.view.LayoutInflater
@@ -155,6 +155,15 @@ class Credits : BaseFragment() {
val contributorsList = ArrayList().apply {
add(InfoModel(resources.getString(R.string.section_title_contributors)))
+ add(
+ InfoModel(
+ requireContext(),
+ "Luigi",
+ appContextLocale.resources.getString(R.string.info_contributor_desc),
+ "https://github.com/DHD2280",
+ R.drawable.ic_user
+ )
+ )
add(
InfoModel(
requireContext(),
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Experimental.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Experimental.kt
new file mode 100644
index 000000000..fb246e210
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Experimental.kt
@@ -0,0 +1,217 @@
+package com.drdisagree.iconify.ui.fragments.settings
+
+import android.Manifest
+import android.annotation.SuppressLint
+import android.app.NotificationChannel
+import android.app.NotificationManager
+import android.app.PendingIntent
+import android.content.Context
+import android.content.Intent
+import android.content.pm.PackageManager
+import android.os.Build
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.CompoundButton
+import android.widget.Toast
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.core.app.NotificationCompat
+import androidx.core.content.ContextCompat
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
+import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_OVERLAP
+import com.drdisagree.iconify.common.Preferences.HIDE_DATA_DISABLED_ICON
+import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_GAP_EXPANDED
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.config.RPrefs.putInt
+import com.drdisagree.iconify.databinding.FragmentExperimentalBinding
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.dialogs.EditTextDialog
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.utils.SystemUtils
+import com.google.android.material.slider.Slider
+import kotlin.random.Random
+
+class Experimental : BaseFragment() {
+
+ private lateinit var binding: FragmentExperimentalBinding
+ private lateinit var notificationManager: NotificationManager
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ notificationManager =
+ requireContext().getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
+ }
+
+ @SuppressLint("InlinedApi")
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentExperimentalBinding.inflate(inflater, container, false)
+ val root: View = binding.getRoot()
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_experimental
+ )
+
+ // Header image overlap
+ binding.headerImageOverlap.isSwitchChecked = getBoolean(HEADER_IMAGE_OVERLAP, false)
+ binding.headerImageOverlap.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ putBoolean(HEADER_IMAGE_OVERLAP, isChecked)
+
+ Handler(Looper.getMainLooper()).postDelayed(
+ { SystemUtils.restartSystemUI() },
+ SWITCH_ANIMATION_DELAY
+ )
+ }
+
+ // Hide data disabled icon
+ binding.hideDataDisabledIcon.isSwitchChecked = getBoolean(HIDE_DATA_DISABLED_ICON, false)
+ binding.hideDataDisabledIcon.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ putBoolean(HIDE_DATA_DISABLED_ICON, isChecked)
+ }
+
+ // OP QS Header Gap Expanded
+ binding.opQsGapExpanded.apply {
+ visibility = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
+ View.VISIBLE
+ } else {
+ View.GONE
+ }
+ sliderValue = getInt(OP_QS_HEADER_GAP_EXPANDED, 0)
+ setResetClickListener {
+ putInt(OP_QS_HEADER_GAP_EXPANDED, 0)
+
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+
+ true
+ }
+ setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
+ override fun onStartTrackingTouch(slider: Slider) {}
+
+ override fun onStopTrackingTouch(slider: Slider) {
+ putInt(OP_QS_HEADER_GAP_EXPANDED, slider.value.toInt())
+
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ })
+ }
+
+ // Send notification
+ binding.sendNotification.setOnClickListener {
+ val permissionGranted = hasNotificationPermission()
+
+ if (!permissionGranted) {
+ requestNotificationPermission.launch(Manifest.permission.POST_NOTIFICATIONS)
+ return@setOnClickListener
+ }
+
+ showCustomNotificationDialog()
+ }
+
+ return root
+ }
+
+ private fun showCustomNotificationDialog() {
+ EditTextDialog(requireContext(), View.generateViewId()).apply {
+ setDialogListener(object : EditTextDialog.EditTextDialogListener {
+ override fun onOkPressed(dialogId: Int, newText: String) {
+ if (newText.isNotEmpty()) {
+ sendCustomNotification(requireContext(), newText, notificationManager)
+ } else {
+ Toast.makeText(
+ requireContext(),
+ "Please enter a message",
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+ })
+
+ show("Notification Body", "Enter notification message", "Enter message", "")
+ }
+ }
+
+ private val requestNotificationPermission = registerForActivityResult(
+ ActivityResultContracts.RequestPermission()
+ ) { result: Boolean ->
+ if (result) {
+ showCustomNotificationDialog()
+ } else {
+ Toast.makeText(
+ requireContext(),
+ "Permission not granted",
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+
+ private fun createChannel(notificationManager: NotificationManager) {
+ val channel = NotificationChannel(
+ "TEST_NOTIFICATION_CHANNEL",
+ "Test Notification",
+ NotificationManager.IMPORTANCE_DEFAULT
+ )
+ channel.description = "This channel is for testing purposes"
+
+ notificationManager.createNotificationChannel(channel)
+ }
+
+ private fun sendCustomNotification(
+ context: Context,
+ message: String,
+ notificationManager: NotificationManager
+ ) {
+ createChannel(notificationManager)
+
+ val intent = Intent(context, MainActivity::class.java).apply {
+ flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
+ }
+ val pendingIntent = PendingIntent.getActivity(
+ context,
+ 0,
+ intent,
+ PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
+ )
+
+ val notification = NotificationCompat.Builder(context, "TEST_NOTIFICATION_CHANNEL")
+ .setSmallIcon(R.drawable.ic_launcher_fg)
+ .setContentTitle(getString(R.string.derived_app_name))
+ .setContentText(message)
+ .setPriority(NotificationCompat.PRIORITY_DEFAULT)
+ .setContentIntent(pendingIntent)
+ .setAutoCancel(true)
+ .build()
+
+ notificationManager.notify(Random.nextInt(), notification)
+ }
+
+ private fun hasNotificationPermission(): Boolean {
+ return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ ContextCompat.checkSelfPermission(
+ requireContext(), Manifest.permission.POST_NOTIFICATIONS
+ ) == PackageManager.PERMISSION_GRANTED
+ } else {
+ true
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Settings.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Settings.kt
new file mode 100644
index 000000000..b51db4c19
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/settings/Settings.kt
@@ -0,0 +1,209 @@
+package com.drdisagree.iconify.ui.fragments.settings
+
+import android.content.ComponentName
+import android.content.DialogInterface
+import android.content.Intent
+import android.content.pm.PackageManager
+import android.net.Uri
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.widget.Toast
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const
+import com.drdisagree.iconify.common.Preferences.APP_ICON
+import com.drdisagree.iconify.common.Preferences.APP_LANGUAGE
+import com.drdisagree.iconify.common.Preferences.APP_THEME
+import com.drdisagree.iconify.common.Preferences.FIRST_INSTALL
+import com.drdisagree.iconify.common.Preferences.ON_HOME_PAGE
+import com.drdisagree.iconify.common.Preferences.RESTART_SYSUI_AFTER_BOOT
+import com.drdisagree.iconify.common.Resources.MODULE_DIR
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.ui.preferences.PreferenceMenu
+import com.drdisagree.iconify.utils.AppUtils.restartApplication
+import com.drdisagree.iconify.utils.CacheUtils.clearCache
+import com.drdisagree.iconify.utils.SystemUtils.disableBlur
+import com.drdisagree.iconify.utils.SystemUtils.disableRestartSystemuiAfterBoot
+import com.drdisagree.iconify.utils.SystemUtils.enableRestartSystemuiAfterBoot
+import com.drdisagree.iconify.utils.SystemUtils.restartSystemUI
+import com.drdisagree.iconify.utils.SystemUtils.saveBootId
+import com.drdisagree.iconify.utils.SystemUtils.saveVersionCode
+import com.drdisagree.iconify.utils.weather.WeatherConfig
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+import com.topjohnwu.superuser.Shell
+import java.util.concurrent.Executors
+
+class Settings : ControlledPreferenceFragmentCompat() {
+
+ private var loadingDialog: LoadingDialog? = null
+
+ override val title: String
+ get() = getString(R.string.settings_title)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.settings
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override val menuResource: Int
+ get() = R.menu.settings_menu
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ // Initialize loading dialog
+ loadingDialog = LoadingDialog(requireActivity())
+ }
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ APP_LANGUAGE -> {
+ restartApplication(requireActivity())
+ }
+
+ APP_ICON -> {
+ val splashActivities = appContextLocale.resources
+ .getStringArray(R.array.app_icon_identifier)
+ changeIcon(RPrefs.getString(key, splashActivities[0])!!)
+ }
+
+ APP_THEME -> {
+ restartApplication(requireActivity())
+ }
+
+ RESTART_SYSUI_AFTER_BOOT -> {
+ if (RPrefs.getBoolean(key, false)) {
+ enableRestartSystemuiAfterBoot()
+ } else {
+ disableRestartSystemuiAfterBoot()
+ }
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ findPreference("clearAppCache")?.setOnPreferenceClickListener {
+ clearCache(appContext)
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_clear_cache),
+ Toast.LENGTH_SHORT
+ ).show()
+ true
+ }
+
+ findPreference("disableEverything")?.setOnPreferenceClickListener {
+ MaterialAlertDialogBuilder(requireActivity())
+ .setCancelable(true)
+ .setTitle(requireContext().resources.getString(R.string.import_settings_confirmation_title))
+ .setMessage(requireContext().resources.getString(R.string.import_settings_confirmation_desc))
+ .setPositiveButton(getString(R.string.positive)) { dialog: DialogInterface, _: Int ->
+ dialog.dismiss()
+
+ // Show loading dialog
+ loadingDialog?.show(resources.getString(R.string.loading_dialog_wait))
+
+ Executors.newSingleThreadExecutor().execute {
+ Settings.disableEverything()
+ Handler(Looper.getMainLooper()).postDelayed({
+
+ // Hide loading dialog
+ loadingDialog?.hide()
+
+ // Restart SystemUI
+ restartSystemUI()
+ }, 3000)
+ }
+ }
+ .setNegativeButton(getString(R.string.negative)) { dialog: DialogInterface, _: Int ->
+ dialog.dismiss()
+ }
+ .show()
+ true
+ }
+
+ findPreference("iconifyGitHub")?.setOnPreferenceClickListener {
+ startActivity(
+ Intent(Intent.ACTION_VIEW).apply {
+ data = Uri.parse(Const.GITHUB_REPO)
+ }
+ )
+ true
+ }
+
+ findPreference("iconifyTelegram")?.setOnPreferenceClickListener {
+ startActivity(
+ Intent(Intent.ACTION_VIEW).apply {
+ data = Uri.parse(Const.TELEGRAM_GROUP)
+ }
+ )
+ true
+ }
+
+ findPreference("iconifyTranslate")?.setOnPreferenceClickListener {
+ startActivity(
+ Intent(Intent.ACTION_VIEW).apply {
+ data = Uri.parse(Const.ICONIFY_CROWDIN)
+ }
+ )
+ true
+ }
+ }
+
+ private fun changeIcon(splash: String) {
+ val manager = requireActivity().packageManager
+ val splashActivities = appContextLocale.resources
+ .getStringArray(R.array.app_icon_identifier)
+
+ for (splashActivity in splashActivities) {
+ manager.setComponentEnabledSetting(
+ ComponentName(
+ requireActivity(),
+ "com.drdisagree.iconify.$splashActivity"
+ ),
+ if (splash == splashActivity) {
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+ } else {
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED
+ },
+ PackageManager.DONT_KILL_APP
+ )
+ }
+ }
+
+ override fun onDestroy() {
+ loadingDialog?.hide()
+
+ super.onDestroy()
+ }
+
+ companion object {
+ fun disableEverything() {
+ WeatherConfig.clear(appContext)
+ RPrefs.clearAllPrefs()
+
+ saveBootId
+ disableBlur(false)
+ saveVersionCode()
+
+ RPrefs.putBoolean(ON_HOME_PAGE, true)
+ RPrefs.putBoolean(FIRST_INSTALL, false)
+
+ Shell.cmd(
+ "> $MODULE_DIR/system.prop; > $MODULE_DIR/post-exec.sh; for ol in $(cmd overlay list | grep -E '.x.*IconifyComponent' | sed -E 's/^.x..//'); do cmd overlay disable \$ol; done; killall com.android.systemui"
+ ).submit()
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/BasicColors.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/BasicColors.kt
similarity index 94%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/BasicColors.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/BasicColors.kt
index d1aa659f3..c24dc7eb8 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/BasicColors.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/BasicColors.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.graphics.drawable.GradientDrawable
import android.os.Bundle
@@ -21,18 +21,18 @@ import com.drdisagree.iconify.common.Preferences.CUSTOM_PRIMARY_COLOR_SWITCH
import com.drdisagree.iconify.common.Preferences.CUSTOM_SECONDARY_COLOR_SWITCH
import com.drdisagree.iconify.common.References.ICONIFY_COLOR_ACCENT_PRIMARY
import com.drdisagree.iconify.common.References.ICONIFY_COLOR_ACCENT_SECONDARY
-import com.drdisagree.iconify.config.Prefs.clearPrefs
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.getString
-import com.drdisagree.iconify.config.Prefs.putBoolean
-import com.drdisagree.iconify.config.Prefs.putString
+import com.drdisagree.iconify.config.RPrefs.clearPrefs
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getString
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.config.RPrefs.putString
import com.drdisagree.iconify.databinding.FragmentBasicColorsBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.color.ColorUtil.colorToSpecialHex
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.buildAndEnableOverlays
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.disableOverlays
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.isOverlayDisabled
+import com.drdisagree.iconify.utils.color.ColorUtils.colorToSpecialHex
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.buildAndEnableOverlays
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.disableOverlays
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.isOverlayDisabled
class BasicColors : BaseFragment() {
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/ColorEngine.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/ColorEngine.kt
similarity index 83%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/ColorEngine.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/ColorEngine.kt
index d48609b20..255d2c6fa 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/ColorEngine.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/ColorEngine.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.os.Bundle
import android.os.Handler
@@ -7,21 +7,21 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.CompoundButton
-import androidx.navigation.Navigation.findNavController
import com.drdisagree.iconify.R
import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
import com.drdisagree.iconify.common.Preferences.COLOR_ACCENT_PRIMARY
import com.drdisagree.iconify.common.Preferences.COLOR_ACCENT_SECONDARY
-import com.drdisagree.iconify.common.Preferences.STR_NULL
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.getString
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getString
import com.drdisagree.iconify.databinding.FragmentColorEngineBinding
+import com.drdisagree.iconify.ui.activities.MainActivity.Companion.replaceFragment
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.changeOverlayState
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.enableOverlay
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.isOverlayDisabled
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.changeOverlayState
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlay
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlays
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlay
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.isOverlayDisabled
class ColorEngine : BaseFragment() {
@@ -46,12 +46,12 @@ class ColorEngine : BaseFragment() {
// Basic colors
binding.basicColors.setOnClickListener {
- findNavController(view).navigate(R.id.action_colorEngine_to_basicColors)
+ replaceFragment(parentFragmentManager, BasicColors())
}
// Monet engine
binding.monetEngine.setOnClickListener {
- findNavController(view).navigate(R.id.action_colorEngine_to_monetEngine)
+ replaceFragment(parentFragmentManager, MonetEngine())
}
// Apply monet accent and gradient
@@ -77,19 +77,17 @@ class ColorEngine : BaseFragment() {
binding.minimalQspanel.setSwitchChangeListener(minimalQsListener)
// Disable Monet
- binding.disableMonet.isSwitchChecked = getBoolean("IconifyComponentDM.overlay")
- binding.disableMonet.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
- Handler(Looper.getMainLooper()).postDelayed(
- {
- if (isChecked) {
- enableOverlay("IconifyComponentDM.overlay")
- } else {
- OverlayUtil.disableOverlay("IconifyComponentDM.overlay")
- }
- }, SWITCH_ANIMATION_DELAY
- )
+ binding.systemMonet.isSwitchChecked = !getBoolean("IconifyComponentDM.overlay")
+ binding.systemMonet.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ Handler(Looper.getMainLooper()).postDelayed({
+ if (!isChecked) {
+ enableOverlay("IconifyComponentDM.overlay")
+ } else {
+ disableOverlay("IconifyComponentDM.overlay")
+ }
+ }, SWITCH_ANIMATION_DELAY)
}
-
+
return view
}
@@ -99,7 +97,7 @@ class ColorEngine : BaseFragment() {
}
private fun disableMonetAccent() {
- OverlayUtil.disableOverlays("IconifyComponentAMAC.overlay")
+ disableOverlays("IconifyComponentAMAC.overlay")
}
private fun enableMonetGradient() {
@@ -108,7 +106,7 @@ class ColorEngine : BaseFragment() {
}
private fun disableMonetGradient() {
- OverlayUtil.disableOverlay("IconifyComponentAMGC.overlay")
+ disableOverlay("IconifyComponentAMGC.overlay")
}
private fun shouldUseDefaultColors(): Boolean {
@@ -117,13 +115,13 @@ class ColorEngine : BaseFragment() {
private fun applyDefaultColors() {
if (shouldUseDefaultColors()) {
- if (getString(COLOR_ACCENT_PRIMARY) == STR_NULL) {
+ if (getString(COLOR_ACCENT_PRIMARY) == null) {
BasicColors.applyDefaultPrimaryColors()
} else {
BasicColors.applyPrimaryColors()
}
- if (getString(COLOR_ACCENT_SECONDARY) == STR_NULL) {
+ if (getString(COLOR_ACCENT_SECONDARY) == null) {
BasicColors.applyDefaultSecondaryColors()
} else {
BasicColors.applySecondaryColors()
@@ -154,7 +152,7 @@ class ColorEngine : BaseFragment() {
true
)
} else {
- OverlayUtil.disableOverlay("IconifyComponentQSST.overlay")
+ disableOverlay("IconifyComponentQSST.overlay")
}
}, SWITCH_ANIMATION_DELAY)
}
@@ -223,7 +221,7 @@ class ColorEngine : BaseFragment() {
true
)
} else {
- OverlayUtil.disableOverlay("IconifyComponentQSPBD.overlay")
+ disableOverlay("IconifyComponentQSPBD.overlay")
}
}, SWITCH_ANIMATION_DELAY)
}
@@ -254,7 +252,7 @@ class ColorEngine : BaseFragment() {
true
)
} else {
- OverlayUtil.disableOverlay("IconifyComponentQSPBA.overlay")
+ disableOverlay("IconifyComponentQSPBA.overlay")
}
}, SWITCH_ANIMATION_DELAY)
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/ColoredBattery.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/ColoredBattery.kt
similarity index 80%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/ColoredBattery.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/ColoredBattery.kt
index f18bbda8c..a1ba88909 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/ColoredBattery.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/ColoredBattery.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.os.Bundle
import android.os.Handler
@@ -16,19 +16,18 @@ import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
import com.drdisagree.iconify.common.Preferences.COLORED_BATTERY_CHECK
import com.drdisagree.iconify.common.Preferences.COLORED_BATTERY_SWITCH
-import com.drdisagree.iconify.common.Preferences.STR_NULL
import com.drdisagree.iconify.common.References.FABRICATED_BATTERY_COLOR_BG
import com.drdisagree.iconify.common.References.FABRICATED_BATTERY_COLOR_FG
import com.drdisagree.iconify.common.References.FABRICATED_COLORED_BATTERY
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.putString
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.putString
import com.drdisagree.iconify.databinding.FragmentColoredBatteryBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.color.ColorUtil.colorToSpecialHex
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.buildAndEnableOverlay
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.isOverlayEnabled
+import com.drdisagree.iconify.utils.color.ColorUtils.colorToSpecialHex
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.buildAndEnableOverlay
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.isOverlayEnabled
class ColoredBattery : BaseFragment() {
@@ -52,11 +51,11 @@ class ColoredBattery : BaseFragment() {
// Enable colored battery
binding.enableColoredBattery.isSwitchChecked =
- if (Prefs.getString(COLORED_BATTERY_CHECK, STR_NULL) == STR_NULL) {
+ if (RPrefs.getString(COLORED_BATTERY_CHECK) == null) {
isOverlayEnabled("IconifyComponentIPSUI2.overlay") ||
isOverlayEnabled("IconifyComponentIPSUI4.overlay")
} else {
- Prefs.getBoolean(COLORED_BATTERY_SWITCH)
+ RPrefs.getBoolean(COLORED_BATTERY_SWITCH)
}
binding.enableColoredBattery.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
@@ -73,7 +72,7 @@ class ColoredBattery : BaseFragment() {
)
} else {
putString(COLORED_BATTERY_CHECK, "Off")
- FabricatedUtil.disableOverlay(FABRICATED_COLORED_BATTERY)
+ FabricatedUtils.disableOverlay(FABRICATED_COLORED_BATTERY)
buildAndEnableOverlay(
FRAMEWORK_PACKAGE,
FABRICATED_COLORED_BATTERY,
@@ -82,11 +81,11 @@ class ColoredBattery : BaseFragment() {
"0"
)
- if (Prefs.getString(FABRICATED_BATTERY_COLOR_BG) != STR_NULL) FabricatedUtil.disableOverlay(
+ if (RPrefs.getString(FABRICATED_BATTERY_COLOR_BG) != null) FabricatedUtils.disableOverlay(
FABRICATED_BATTERY_COLOR_BG
)
- if (Prefs.getString(FABRICATED_BATTERY_COLOR_FG) != STR_NULL) FabricatedUtil.disableOverlay(
+ if (RPrefs.getString(FABRICATED_BATTERY_COLOR_FG) != null) FabricatedUtils.disableOverlay(
FABRICATED_BATTERY_COLOR_FG
)
}
@@ -105,25 +104,26 @@ class ColoredBattery : BaseFragment() {
).show()
}
- Prefs.putBoolean(COLORED_BATTERY_SWITCH, isChecked)
+ RPrefs.putBoolean(COLORED_BATTERY_SWITCH, isChecked)
}, SWITCH_ANIMATION_DELAY
)
}
- colorBackground = if (Prefs.getString(FABRICATED_BATTERY_COLOR_BG) != STR_NULL) {
- Prefs.getString(FABRICATED_BATTERY_COLOR_BG)
+ colorBackground = if (RPrefs.getString(FABRICATED_BATTERY_COLOR_BG) != null) {
+ RPrefs.getString(FABRICATED_BATTERY_COLOR_BG)
} else {
(-0xf0f10).toString()
}
- colorFilled = if (Prefs.getString(FABRICATED_BATTERY_COLOR_FG) != STR_NULL) {
- Prefs.getString(FABRICATED_BATTERY_COLOR_FG)
+ colorFilled = if (RPrefs.getString(FABRICATED_BATTERY_COLOR_FG) != null) {
+ RPrefs.getString(FABRICATED_BATTERY_COLOR_FG)
} else {
(-0xf0f10).toString()
}
// Battery background color
binding.batteryBackgroundColor.setColorPickerListener(
- activity = requireActivity(), defaultColor = colorBackground!!.toInt(),
+ activity = requireActivity(),
+ defaultColor = colorBackground!!.toInt(),
showPresets = true,
showAlphaSlider = false,
showColorShades = true
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/MediaPlayer.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/MediaPlayer.kt
similarity index 79%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/MediaPlayer.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/MediaPlayer.kt
index 2d62eac75..27101b4a3 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/MediaPlayer.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/MediaPlayer.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.os.Bundle
import android.view.LayoutInflater
@@ -6,12 +6,12 @@ import android.view.View
import android.view.ViewGroup
import android.widget.CompoundButton
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.config.Prefs
+import com.drdisagree.iconify.config.RPrefs
import com.drdisagree.iconify.databinding.FragmentMediaPlayerBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.changeOverlayState
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.changeOverlayState
class MediaPlayer : BaseFragment() {
@@ -35,7 +35,7 @@ class MediaPlayer : BaseFragment() {
refreshPreview()
- binding.mpAccent.isSwitchChecked = Prefs.getBoolean("IconifyComponentMPA.overlay")
+ binding.mpAccent.isSwitchChecked = RPrefs.getBoolean("IconifyComponentMPA.overlay")
binding.mpAccent.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
if (isChecked) {
binding.mpSystem.isSwitchChecked = false
@@ -50,13 +50,13 @@ class MediaPlayer : BaseFragment() {
true
)
} else {
- OverlayUtil.disableOverlay("IconifyComponentMPA.overlay")
+ OverlayUtils.disableOverlay("IconifyComponentMPA.overlay")
}
refreshPreview()
}
- binding.mpSystem.isSwitchChecked = Prefs.getBoolean("IconifyComponentMPS.overlay")
+ binding.mpSystem.isSwitchChecked = RPrefs.getBoolean("IconifyComponentMPS.overlay")
binding.mpSystem.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
if (isChecked) {
binding.mpAccent.isSwitchChecked = false
@@ -71,13 +71,13 @@ class MediaPlayer : BaseFragment() {
true
)
} else {
- OverlayUtil.disableOverlay("IconifyComponentMPS.overlay")
+ OverlayUtils.disableOverlay("IconifyComponentMPS.overlay")
}
refreshPreview()
}
- binding.mpPitchBlack.isSwitchChecked = Prefs.getBoolean("IconifyComponentMPB.overlay")
+ binding.mpPitchBlack.isSwitchChecked = RPrefs.getBoolean("IconifyComponentMPB.overlay")
binding.mpPitchBlack.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
if (isChecked) {
binding.mpAccent.isSwitchChecked = false
@@ -92,7 +92,7 @@ class MediaPlayer : BaseFragment() {
true
)
} else {
- OverlayUtil.disableOverlay("IconifyComponentMPB.overlay")
+ OverlayUtils.disableOverlay("IconifyComponentMPB.overlay")
}
refreshPreview()
@@ -107,11 +107,11 @@ class MediaPlayer : BaseFragment() {
binding.mpSystemPreview.previewMpSystem.visibility = View.GONE
when {
- Prefs.getBoolean("IconifyComponentMPA.overlay") -> {
+ RPrefs.getBoolean("IconifyComponentMPA.overlay") -> {
binding.mpAccentPreview.previewMpAccent.visibility = View.VISIBLE
}
- Prefs.getBoolean("IconifyComponentMPB.overlay") -> {
+ RPrefs.getBoolean("IconifyComponentMPB.overlay") -> {
binding.mpPitchBlackPreview.previewMpBlack.visibility = View.VISIBLE
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Miscellaneous.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Miscellaneous.kt
similarity index 92%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/Miscellaneous.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Miscellaneous.kt
index 1452b34bc..f8ae14ce8 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/Miscellaneous.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Miscellaneous.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.os.Build
import android.os.Bundle
@@ -16,19 +16,18 @@ import com.drdisagree.iconify.common.Preferences.NOTCH_BAR_KILLER_SWITCH
import com.drdisagree.iconify.common.Preferences.PROGRESS_WAVE_ANIMATION_SWITCH
import com.drdisagree.iconify.common.Preferences.TABLET_LANDSCAPE_SWITCH
import com.drdisagree.iconify.common.References.FABRICATED_TABLET_HEADER
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.getBoolean
import com.drdisagree.iconify.databinding.FragmentMiscellaneousBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.restartSystemUI
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.buildAndEnableOverlay
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.enableOverlay
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.restartSystemUI
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.buildAndEnableOverlay
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlay
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
@@ -69,7 +68,7 @@ class Miscellaneous : BaseFragment() {
return@setSwitchChangeListener
}
- Prefs.putBoolean(TABLET_LANDSCAPE_SWITCH, isChecked)
+ RPrefs.putBoolean(TABLET_LANDSCAPE_SWITCH, isChecked)
val resourceEntry1 = ResourceEntry(
SYSTEMUI_PACKAGE,
@@ -220,7 +219,7 @@ class Miscellaneous : BaseFragment() {
return@setSwitchChangeListener
}
- Prefs.putBoolean(NOTCH_BAR_KILLER_SWITCH, isChecked)
+ RPrefs.putBoolean(NOTCH_BAR_KILLER_SWITCH, isChecked)
if (isChecked) {
buildOverlayWithResource(
@@ -275,7 +274,7 @@ class Miscellaneous : BaseFragment() {
binding.tabletHeader.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
Handler(Looper.getMainLooper()).postDelayed(
{
- Prefs.putBoolean(FABRICATED_TABLET_HEADER, isChecked)
+ RPrefs.putBoolean(FABRICATED_TABLET_HEADER, isChecked)
if (isChecked) {
buildAndEnableOverlay(
@@ -286,7 +285,7 @@ class Miscellaneous : BaseFragment() {
"1"
)
} else {
- FabricatedUtil.disableOverlay(FABRICATED_TABLET_HEADER)
+ FabricatedUtils.disableOverlay(FABRICATED_TABLET_HEADER)
}
}, SWITCH_ANIMATION_DELAY
)
@@ -300,7 +299,7 @@ class Miscellaneous : BaseFragment() {
if (isChecked) {
enableOverlay("IconifyComponentPCBG.overlay")
} else {
- OverlayUtil.disableOverlay("IconifyComponentPCBG.overlay")
+ OverlayUtils.disableOverlay("IconifyComponentPCBG.overlay")
}
restartSystemUI()
@@ -328,7 +327,7 @@ class Miscellaneous : BaseFragment() {
return@setSwitchChangeListener
}
- Prefs.putBoolean(PROGRESS_WAVE_ANIMATION_SWITCH, isChecked)
+ RPrefs.putBoolean(PROGRESS_WAVE_ANIMATION_SWITCH, isChecked)
if (isChecked) {
buildOverlayWithResource(
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/MonetEngine.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/MonetEngine.kt
similarity index 95%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/MonetEngine.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/MonetEngine.kt
index f66e8b8bb..92c79dd96 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/MonetEngine.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/MonetEngine.kt
@@ -1,5 +1,6 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
+import android.annotation.SuppressLint
import android.app.Activity
import android.content.DialogInterface
import android.content.Intent
@@ -12,8 +13,6 @@ import android.util.Log
import android.util.TypedValue
import android.view.Gravity
import android.view.LayoutInflater
-import android.view.Menu
-import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
@@ -43,32 +42,31 @@ import com.drdisagree.iconify.common.Preferences.MONET_PRIMARY_COLOR
import com.drdisagree.iconify.common.Preferences.MONET_SECONDARY_ACCENT_SATURATION
import com.drdisagree.iconify.common.Preferences.MONET_SECONDARY_COLOR
import com.drdisagree.iconify.common.Preferences.MONET_STYLE
-import com.drdisagree.iconify.common.Preferences.STR_NULL
-import com.drdisagree.iconify.config.Prefs.clearPrefs
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.getInt
-import com.drdisagree.iconify.config.Prefs.getString
-import com.drdisagree.iconify.config.Prefs.prefs
-import com.drdisagree.iconify.config.Prefs.putBoolean
-import com.drdisagree.iconify.config.Prefs.putInt
-import com.drdisagree.iconify.config.Prefs.putString
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.clearPrefs
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.config.RPrefs.getString
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.config.RPrefs.putInt
+import com.drdisagree.iconify.config.RPrefs.putString
import com.drdisagree.iconify.databinding.FragmentMonetEngineBinding
import com.drdisagree.iconify.ui.activities.MainActivity
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.events.ColorSelectedEvent
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.color.ColorSchemeUtil.generateColorPalette
-import com.drdisagree.iconify.utils.color.ColorUtil.colorNames
-import com.drdisagree.iconify.utils.color.ColorUtil.getSystemColors
-import com.drdisagree.iconify.utils.color.ColorUtil.setLightness
-import com.drdisagree.iconify.utils.color.ColorUtil.setSaturation
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.color.ColorSchemeUtils.generateColorPalette
+import com.drdisagree.iconify.utils.color.ColorUtils.colorNames
+import com.drdisagree.iconify.utils.color.ColorUtils.getSystemColors
+import com.drdisagree.iconify.utils.color.ColorUtils.setLightness
+import com.drdisagree.iconify.utils.color.ColorUtils.setSaturation
import com.drdisagree.iconify.utils.helper.ImportExport.exportSettings
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.disableOverlays
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.changeOverlayState
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.disableOverlays
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.changeOverlayState
import com.drdisagree.iconify.utils.overlay.manager.MonetEngineManager.buildOverlay
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.slider.Slider
@@ -88,7 +86,7 @@ class MonetEngine : BaseFragment() {
private lateinit var binding: FragmentMonetEngineBinding
private lateinit var colorTableRows: Array
- private var isDarkMode = SystemUtil.isDarkMode
+ private var isDarkMode = SystemUtils.isDarkMode
private var showApplyButton = false
private var showDisableButton = false
@@ -108,7 +106,7 @@ class MonetEngine : BaseFragment() {
try {
exportSettings(
- prefs,
+ RPrefs.getPrefs,
requireContext().contentResolver.openOutputStream(data.data!!)!!
)
@@ -144,7 +142,7 @@ class MonetEngine : BaseFragment() {
Handler(Looper.getMainLooper()).post {
try {
val success = importMonetSettings(
- prefs,
+ RPrefs.getPrefs,
requireContext().contentResolver.openInputStream(data.data!!)!!
)
@@ -204,7 +202,7 @@ class MonetEngine : BaseFragment() {
binding.monetEngine.systemNeutral2
)
- isDarkMode = SystemUtil.isDarkMode
+ isDarkMode = SystemUtils.isDarkMode
selectedStyle = getString(
MONET_STYLE,
appContextLocale.resources.getString(R.string.monet_tonalspot)
@@ -417,7 +415,7 @@ class MonetEngine : BaseFragment() {
binding.enableCustomMonet.setOnClickListener {
if (!hasStoragePermission()) {
requestStoragePermission(requireContext())
- } else if (selectedStyle == STR_NULL) {
+ } else if (selectedStyle == null) {
Toast.makeText(
appContext,
appContextLocale.resources.getString(R.string.toast_select_style),
@@ -510,7 +508,7 @@ class MonetEngine : BaseFragment() {
putBoolean(MONET_ENGINE_SWITCH, false)
clearPrefs(MONET_PRIMARY_COLOR, MONET_SECONDARY_COLOR)
- OverlayUtil.disableOverlays(
+ OverlayUtils.disableOverlays(
"IconifyComponentDM.overlay",
"IconifyComponentME.overlay"
)
@@ -560,19 +558,19 @@ class MonetEngine : BaseFragment() {
}
}
- if (!binding.floatingActionMenu.isShown()) {
+ if (!binding.floatingActionMenu.isShown) {
binding.enableCustomMonet.hide()
binding.disableCustomMonet.hide()
}
binding.floatingActionMenu.setOnClickListener {
- if (showApplyButton && !binding.enableCustomMonet.isShown()) {
+ if (showApplyButton && !binding.enableCustomMonet.isShown) {
binding.enableCustomMonet.show()
} else {
binding.enableCustomMonet.hide()
}
- if (showDisableButton && !binding.disableCustomMonet.isShown()) {
+ if (showDisableButton && !binding.disableCustomMonet.isShown) {
binding.disableCustomMonet.show()
} else {
binding.disableCustomMonet.hide()
@@ -582,6 +580,7 @@ class MonetEngine : BaseFragment() {
return view
}
+ @SuppressLint("SetTextI18n")
private fun assignStockColorsToPalette() {
val systemColors = getSystemColors(requireContext())
val temp: MutableList> = ArrayList()
@@ -608,9 +607,9 @@ class MonetEngine : BaseFragment() {
textView.rotation = 270f
textView.setTextColor(calculateTextColor(systemColors[i][j]))
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10f)
- textView.setAlpha(0.8f)
- textView.setMaxLines(1)
- textView.setSingleLine(true)
+ textView.alpha = 0.8f
+ textView.maxLines = 1
+ textView.isSingleLine = true
textView.setAutoSizeTextTypeUniformWithConfiguration(
1,
20,
@@ -984,14 +983,6 @@ class MonetEngine : BaseFragment() {
return status
}
- @Deprecated("Deprecated in Java")
- override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
- menu.clear()
- inflater.inflate(R.menu.monet_menu, menu)
-
- super.onCreateOptionsMenu(menu, inflater)
- }
-
@Deprecated("Deprecated in Java")
override fun onOptionsItemSelected(item: MenuItem): Boolean {
val itemID = item.itemId
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/NavigationBar.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/NavigationBar.kt
similarity index 96%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/NavigationBar.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/NavigationBar.kt
index cd53a2e9f..d9b589aa6 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/NavigationBar.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/NavigationBar.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.os.Bundle
import android.os.Handler
@@ -23,19 +23,19 @@ import com.drdisagree.iconify.common.Preferences.PILL_SHAPE_SWITCH
import com.drdisagree.iconify.common.References.FABRICATED_PILL_BOTTOM_SPACE
import com.drdisagree.iconify.common.References.FABRICATED_PILL_THICKNESS
import com.drdisagree.iconify.common.References.FABRICATED_PILL_WIDTH
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.getInt
-import com.drdisagree.iconify.config.Prefs.putBoolean
-import com.drdisagree.iconify.config.Prefs.putInt
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.config.RPrefs.putInt
import com.drdisagree.iconify.databinding.FragmentNavigationBarBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.restartSystemUI
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.enableOverlay
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.restartSystemUI
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlay
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
@@ -283,7 +283,7 @@ class NavigationBar : BaseFragment() {
handleHidePill(isSwitchChecked)
Handler(Looper.getMainLooper()).postDelayed(
- { SystemUtil.handleSystemUIRestart() },
+ { SystemUtils.handleSystemUIRestart() },
2000
)
}, SWITCH_ANIMATION_DELAY)
@@ -303,7 +303,7 @@ class NavigationBar : BaseFragment() {
enableOverlay("IconifyComponentNBMonetPill.overlay")
restartSystemUI()
} else {
- OverlayUtil.disableOverlay("IconifyComponentNBMonetPill.overlay")
+ OverlayUtils.disableOverlay("IconifyComponentNBMonetPill.overlay")
restartSystemUI()
}
}, SWITCH_ANIMATION_DELAY
@@ -317,7 +317,7 @@ class NavigationBar : BaseFragment() {
if (isSwitchChecked) {
enableOverlay("IconifyComponentNBHideKBButton.overlay")
} else {
- OverlayUtil.disableOverlay("IconifyComponentNBHideKBButton.overlay")
+ OverlayUtils.disableOverlay("IconifyComponentNBHideKBButton.overlay")
}
}, SWITCH_ANIMATION_DELAY
)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsIconLabel.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsIconLabel.kt
similarity index 93%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/QsIconLabel.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsIconLabel.kt
index 470d9f0eb..eede0031f 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsIconLabel.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsIconLabel.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.os.Bundle
import android.os.Handler
@@ -16,23 +16,22 @@ import com.drdisagree.iconify.common.Preferences.QS_HIDE_LABEL_SWITCH
import com.drdisagree.iconify.common.Preferences.QS_TEXT_COLOR_VARIANT
import com.drdisagree.iconify.common.Preferences.QS_TEXT_COLOR_VARIANT_NORMAL
import com.drdisagree.iconify.common.Preferences.QS_TEXT_COLOR_VARIANT_PIXEL
-import com.drdisagree.iconify.common.Preferences.STR_NULL
import com.drdisagree.iconify.common.References.FABRICATED_QS_ICON_SIZE
import com.drdisagree.iconify.common.References.FABRICATED_QS_MOVE_ICON
import com.drdisagree.iconify.common.References.FABRICATED_QS_TEXT_SIZE
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.getString
-import com.drdisagree.iconify.config.Prefs.putBoolean
-import com.drdisagree.iconify.config.Prefs.putString
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getString
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.config.RPrefs.putString
import com.drdisagree.iconify.databinding.FragmentQsIconLabelBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.changeOverlayState
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.disableOverlays
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.enableOverlay
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.changeOverlayState
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlays
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlay
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
@@ -62,7 +61,7 @@ class QsIconLabel : BaseFragment() {
// Text Size
val finalTextSize = intArrayOf(14)
- if (getString(FABRICATED_QS_TEXT_SIZE) != STR_NULL) {
+ if (getString(FABRICATED_QS_TEXT_SIZE) != null) {
finalTextSize[0] = getString(FABRICATED_QS_TEXT_SIZE)!!.toInt()
binding.textSize.sliderValue = finalTextSize[0]
}
@@ -100,7 +99,7 @@ class QsIconLabel : BaseFragment() {
// Icon Size
val finalIconSize = intArrayOf(20)
- if (getString(FABRICATED_QS_ICON_SIZE) != STR_NULL) {
+ if (getString(FABRICATED_QS_ICON_SIZE) != null) {
finalIconSize[0] = getString(FABRICATED_QS_ICON_SIZE)!!.toInt()
binding.iconSize.sliderValue = finalIconSize[0]
}
@@ -260,7 +259,7 @@ class QsIconLabel : BaseFragment() {
enableOverlay(replaceVariant("IconifyComponentQST1.overlay"))
} else {
- OverlayUtil.disableOverlay(replaceVariant("IconifyComponentQST1.overlay"))
+ OverlayUtils.disableOverlay(replaceVariant("IconifyComponentQST1.overlay"))
}
handleCommonOverlay()
@@ -298,7 +297,7 @@ class QsIconLabel : BaseFragment() {
enableOverlay(replaceVariant("IconifyComponentQST2.overlay"))
} else {
- OverlayUtil.disableOverlay(replaceVariant("IconifyComponentQST2.overlay"))
+ OverlayUtils.disableOverlay(replaceVariant("IconifyComponentQST2.overlay"))
}
handleCommonOverlay()
@@ -336,7 +335,7 @@ class QsIconLabel : BaseFragment() {
enableOverlay(replaceVariant("IconifyComponentQST3.overlay"))
} else {
- OverlayUtil.disableOverlay(replaceVariant("IconifyComponentQST3.overlay"))
+ OverlayUtils.disableOverlay(replaceVariant("IconifyComponentQST3.overlay"))
}
handleCommonOverlay()
@@ -373,7 +372,7 @@ class QsIconLabel : BaseFragment() {
enableOverlay(replaceVariant("IconifyComponentQST4.overlay"))
} else {
- OverlayUtil.disableOverlay(replaceVariant("IconifyComponentQST4.overlay"))
+ OverlayUtils.disableOverlay(replaceVariant("IconifyComponentQST4.overlay"))
}
handleCommonOverlay()
@@ -411,7 +410,7 @@ class QsIconLabel : BaseFragment() {
enableOverlay(replaceVariant("IconifyComponentQST5.overlay"))
} else {
- OverlayUtil.disableOverlay(replaceVariant("IconifyComponentQST5.overlay"))
+ OverlayUtils.disableOverlay(replaceVariant("IconifyComponentQST5.overlay"))
}
handleCommonOverlay()
@@ -456,12 +455,12 @@ class QsIconLabel : BaseFragment() {
}
}
binding.hideLabel.setBeforeSwitchChangeListener {
- isHideLabelContainerClicked.set( true )
+ isHideLabelContainerClicked.set(true)
}
// Move Icon
val finalMoveIcon = intArrayOf(16)
- if (getString(FABRICATED_QS_MOVE_ICON) != STR_NULL) {
+ if (getString(FABRICATED_QS_MOVE_ICON) != null) {
finalMoveIcon[0] = getString(FABRICATED_QS_MOVE_ICON)!!.toInt()
binding.moveIcon.sliderValue = finalMoveIcon[0]
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelMargin.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsPanelMargin.kt
similarity index 97%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelMargin.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsPanelMargin.kt
index c11fccac4..ecebb123b 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsPanelMargin.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsPanelMargin.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.os.Bundle
import android.os.Handler
@@ -13,15 +13,15 @@ import com.drdisagree.iconify.common.Preferences.LAND_QQS_TOP_MARGIN
import com.drdisagree.iconify.common.Preferences.LAND_QS_TOP_MARGIN
import com.drdisagree.iconify.common.Preferences.PORT_QQS_TOP_MARGIN
import com.drdisagree.iconify.common.Preferences.PORT_QS_TOP_MARGIN
-import com.drdisagree.iconify.config.Prefs.clearPrefs
-import com.drdisagree.iconify.config.Prefs.getInt
-import com.drdisagree.iconify.config.Prefs.putInt
+import com.drdisagree.iconify.config.RPrefs.clearPrefs
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.config.RPrefs.putInt
import com.drdisagree.iconify.databinding.FragmentQsPanelMarginBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsRowColumn.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsRowColumn.kt
similarity index 83%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/QsRowColumn.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsRowColumn.kt
index 3b3367cf3..2678f5ad8 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsRowColumn.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsRowColumn.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.content.DialogInterface
import android.os.Bundle
@@ -19,13 +19,13 @@ import com.drdisagree.iconify.common.References.FABRICATED_QQS_TILE
import com.drdisagree.iconify.common.References.FABRICATED_QS_COLUMN
import com.drdisagree.iconify.common.References.FABRICATED_QS_ROW
import com.drdisagree.iconify.common.References.FABRICATED_QS_TILE
-import com.drdisagree.iconify.config.Prefs
+import com.drdisagree.iconify.config.RPrefs
import com.drdisagree.iconify.databinding.FragmentQsRowColumnBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.buildAndEnableOverlays
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil.disableOverlays
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.buildAndEnableOverlays
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.disableOverlays
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.slider.Slider
@@ -54,7 +54,7 @@ class QsRowColumn : BaseFragment() {
loadingDialog = LoadingDialog(requireContext())
// Quick QsPanel Row
- val finalQqsRow = intArrayOf(Prefs.getInt(FABRICATED_QQS_ROW, 2))
+ val finalQqsRow = intArrayOf(RPrefs.getInt(FABRICATED_QQS_ROW, 2))
binding.qqsRow.sliderValue = finalQqsRow[0]
binding.qqsRow.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
override fun onStartTrackingTouch(slider: Slider) {}
@@ -65,7 +65,7 @@ class QsRowColumn : BaseFragment() {
})
// QsPanel Row
- val finalQsRow = intArrayOf(Prefs.getInt(FABRICATED_QS_ROW, 4))
+ val finalQsRow = intArrayOf(RPrefs.getInt(FABRICATED_QS_ROW, 4))
binding.qsRow.sliderValue = finalQsRow[0]
binding.qsRow.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
override fun onStartTrackingTouch(slider: Slider) {}
@@ -76,7 +76,7 @@ class QsRowColumn : BaseFragment() {
})
// QsPanel Column
- val finalQsColumn = intArrayOf(Prefs.getInt(FABRICATED_QS_COLUMN, 2))
+ val finalQsColumn = intArrayOf(RPrefs.getInt(FABRICATED_QS_COLUMN, 2))
binding.qsColumn.sliderValue = finalQsColumn[0]
binding.qsColumn.setOnSliderTouchListener(object : Slider.OnSliderTouchListener {
override fun onStartTrackingTouch(slider: Slider) {}
@@ -91,12 +91,12 @@ class QsRowColumn : BaseFragment() {
// Show loading dialog
loadingDialog!!.show(resources.getString(R.string.loading_dialog_wait))
Thread {
- Prefs.putBoolean(QS_ROW_COLUMN_SWITCH, true)
- Prefs.putInt(FABRICATED_QQS_ROW, finalQqsRow[0])
- Prefs.putInt(FABRICATED_QS_ROW, finalQsRow[0])
- Prefs.putInt(FABRICATED_QS_COLUMN, finalQsColumn[0])
- Prefs.putInt(FABRICATED_QQS_TILE, finalQqsRow[0] * finalQsColumn[0])
- Prefs.putInt(FABRICATED_QS_TILE, finalQsColumn[0] * finalQsRow[0])
+ RPrefs.putBoolean(QS_ROW_COLUMN_SWITCH, true)
+ RPrefs.putInt(FABRICATED_QQS_ROW, finalQqsRow[0])
+ RPrefs.putInt(FABRICATED_QS_ROW, finalQsRow[0])
+ RPrefs.putInt(FABRICATED_QS_COLUMN, finalQsColumn[0])
+ RPrefs.putInt(FABRICATED_QQS_TILE, finalQqsRow[0] * finalQsColumn[0])
+ RPrefs.putInt(FABRICATED_QS_TILE, finalQsColumn[0] * finalQsRow[0])
applyRowColumn()
@@ -122,7 +122,7 @@ class QsRowColumn : BaseFragment() {
// Reset button
binding.qsRowColumnReset.visibility =
- if (Prefs.getBoolean(QS_ROW_COLUMN_SWITCH)) {
+ if (RPrefs.getBoolean(QS_ROW_COLUMN_SWITCH)) {
View.VISIBLE
} else {
View.GONE
@@ -135,7 +135,7 @@ class QsRowColumn : BaseFragment() {
resetRowColumn()
Handler(Looper.getMainLooper()).post {
- Prefs.putBoolean(QS_ROW_COLUMN_SWITCH, false)
+ RPrefs.putBoolean(QS_ROW_COLUMN_SWITCH, false)
Handler(Looper.getMainLooper()).postDelayed({
// Hide loading dialog
loadingDialog!!.hide()
@@ -153,7 +153,7 @@ class QsRowColumn : BaseFragment() {
}.start()
}
- if (Prefs.getBoolean(ALERT_DIALOG_QSROWCOL, true)) {
+ if (RPrefs.getBoolean(ALERT_DIALOG_QSROWCOL, true)) {
MaterialAlertDialogBuilder(requireContext())
.setTitle(resources.getString(R.string.hey_there))
.setMessage(resources.getString(R.string.qs_row_column_warn_desc))
@@ -162,7 +162,7 @@ class QsRowColumn : BaseFragment() {
}
.setNegativeButton(getString(R.string.dont_show_again)) { dialog: DialogInterface, _: Int ->
dialog.dismiss()
- Prefs.putBoolean(ALERT_DIALOG_QSROWCOL, false)
+ RPrefs.putBoolean(ALERT_DIALOG_QSROWCOL, false)
}
.setCancelable(true)
.show()
@@ -185,28 +185,28 @@ class QsRowColumn : BaseFragment() {
FABRICATED_QQS_ROW,
"integer",
"quick_qs_panel_max_rows",
- Prefs.getInt(FABRICATED_QQS_ROW, 2).toString()
+ RPrefs.getInt(FABRICATED_QQS_ROW, 2).toString()
),
arrayOf(
SYSTEMUI_PACKAGE,
FABRICATED_QS_ROW,
"integer",
"quick_settings_max_rows",
- Prefs.getInt(FABRICATED_QS_ROW, 4).toString()
+ RPrefs.getInt(FABRICATED_QS_ROW, 4).toString()
),
arrayOf(
SYSTEMUI_PACKAGE,
FABRICATED_QS_COLUMN,
"integer",
"quick_settings_num_columns",
- Prefs.getInt(FABRICATED_QS_COLUMN, 2).toString()
+ RPrefs.getInt(FABRICATED_QS_COLUMN, 2).toString()
),
arrayOf(
SYSTEMUI_PACKAGE,
FABRICATED_QQS_TILE,
"integer",
"quick_qs_panel_max_tiles",
- (Prefs.getInt(FABRICATED_QQS_ROW, 2) * Prefs.getInt(
+ (RPrefs.getInt(FABRICATED_QQS_ROW, 2) * RPrefs.getInt(
FABRICATED_QS_COLUMN,
2
)).toString()
@@ -216,7 +216,7 @@ class QsRowColumn : BaseFragment() {
FABRICATED_QS_TILE,
"integer",
"quick_settings_min_num_tiles",
- (Prefs.getInt(FABRICATED_QS_COLUMN, 2) * Prefs.getInt(
+ (RPrefs.getInt(FABRICATED_QS_COLUMN, 2) * RPrefs.getInt(
FABRICATED_QS_ROW,
4
)).toString()
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsTileSize.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsTileSize.kt
similarity index 88%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/QsTileSize.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsTileSize.kt
index e2b7fe644..7bb417c97 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/QsTileSize.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/QsTileSize.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.os.Bundle
import android.os.Handler
@@ -12,14 +12,14 @@ import com.drdisagree.iconify.common.Preferences.LAND_QSTILE_EXPANDED_HEIGHT
import com.drdisagree.iconify.common.Preferences.LAND_QSTILE_NONEXPANDED_HEIGHT
import com.drdisagree.iconify.common.Preferences.PORT_QSTILE_EXPANDED_HEIGHT
import com.drdisagree.iconify.common.Preferences.PORT_QSTILE_NONEXPANDED_HEIGHT
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.clearPrefs
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.clearPrefs
import com.drdisagree.iconify.databinding.FragmentQsTileSizeBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
@@ -51,7 +51,7 @@ class QsTileSize : BaseFragment() {
loadingDialog = LoadingDialog(requireContext())
// Portrait non expanded height
- val portNonExpandedHeight = intArrayOf(Prefs.getInt(PORT_QSTILE_NONEXPANDED_HEIGHT, 60))
+ val portNonExpandedHeight = intArrayOf(RPrefs.getInt(PORT_QSTILE_NONEXPANDED_HEIGHT, 60))
binding.portNonexpandedHeight.sliderValue = portNonExpandedHeight[0]
binding.portNonexpandedHeight.setOnSliderTouchListener(object :
Slider.OnSliderTouchListener {
@@ -69,7 +69,7 @@ class QsTileSize : BaseFragment() {
}
// Portrait Expanded height
- val portExpandedHeight = intArrayOf(Prefs.getInt(PORT_QSTILE_EXPANDED_HEIGHT, 80))
+ val portExpandedHeight = intArrayOf(RPrefs.getInt(PORT_QSTILE_EXPANDED_HEIGHT, 80))
binding.portExpandedHeight.sliderValue = portExpandedHeight[0]
binding.portExpandedHeight.setOnSliderTouchListener(object :
Slider.OnSliderTouchListener {
@@ -87,7 +87,7 @@ class QsTileSize : BaseFragment() {
}
// Landscape non expanded height
- val landNonExpandedHeight = intArrayOf(Prefs.getInt(LAND_QSTILE_NONEXPANDED_HEIGHT, 60))
+ val landNonExpandedHeight = intArrayOf(RPrefs.getInt(LAND_QSTILE_NONEXPANDED_HEIGHT, 60))
binding.landNonexpandedHeight.sliderValue = landNonExpandedHeight[0]
binding.landNonexpandedHeight.setOnSliderTouchListener(object :
Slider.OnSliderTouchListener {
@@ -105,7 +105,7 @@ class QsTileSize : BaseFragment() {
}
// Landscape Expanded height
- val landExpandedHeight = intArrayOf(Prefs.getInt(LAND_QSTILE_EXPANDED_HEIGHT, 80))
+ val landExpandedHeight = intArrayOf(RPrefs.getInt(LAND_QSTILE_EXPANDED_HEIGHT, 80))
binding.landExpandedHeight.sliderValue = landExpandedHeight[0]
binding.landExpandedHeight.setOnSliderTouchListener(object :
Slider.OnSliderTouchListener {
@@ -176,10 +176,10 @@ class QsTileSize : BaseFragment() {
)
if (!hasErroredOut.get()) {
- Prefs.putInt(PORT_QSTILE_NONEXPANDED_HEIGHT, portNonExpandedHeight[0])
- Prefs.putInt(PORT_QSTILE_EXPANDED_HEIGHT, portExpandedHeight[0])
- Prefs.putInt(LAND_QSTILE_NONEXPANDED_HEIGHT, landNonExpandedHeight[0])
- Prefs.putInt(LAND_QSTILE_EXPANDED_HEIGHT, landExpandedHeight[0])
+ RPrefs.putInt(PORT_QSTILE_NONEXPANDED_HEIGHT, portNonExpandedHeight[0])
+ RPrefs.putInt(PORT_QSTILE_EXPANDED_HEIGHT, portExpandedHeight[0])
+ RPrefs.putInt(LAND_QSTILE_NONEXPANDED_HEIGHT, landNonExpandedHeight[0])
+ RPrefs.putInt(LAND_QSTILE_EXPANDED_HEIGHT, landExpandedHeight[0])
}
Handler(Looper.getMainLooper()).postDelayed({
@@ -273,10 +273,10 @@ class QsTileSize : BaseFragment() {
}
private val isQsTileHeightEnabled: Boolean
- get() = Prefs.getInt(PORT_QSTILE_NONEXPANDED_HEIGHT, 60) != 60 ||
- Prefs.getInt(PORT_QSTILE_EXPANDED_HEIGHT, 80) != 80 ||
- Prefs.getInt(LAND_QSTILE_NONEXPANDED_HEIGHT, 60) != 60 ||
- Prefs.getInt(LAND_QSTILE_EXPANDED_HEIGHT, 80) != 80
+ get() = RPrefs.getInt(PORT_QSTILE_NONEXPANDED_HEIGHT, 60) != 60 ||
+ RPrefs.getInt(PORT_QSTILE_EXPANDED_HEIGHT, 80) != 80 ||
+ RPrefs.getInt(LAND_QSTILE_NONEXPANDED_HEIGHT, 60) != 60 ||
+ RPrefs.getInt(LAND_QSTILE_EXPANDED_HEIGHT, 80) != 80
override fun onDestroy() {
loadingDialog?.dismiss()
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Statusbar.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Statusbar.kt
new file mode 100644
index 000000000..7e21b364d
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Statusbar.kt
@@ -0,0 +1,366 @@
+package com.drdisagree.iconify.ui.fragments.tweaks
+
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.RadioGroup
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
+import com.drdisagree.iconify.common.Const.SWITCH_ANIMATION_DELAY
+import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
+import com.drdisagree.iconify.common.References.FABRICATED_SB_COLOR_SOURCE
+import com.drdisagree.iconify.common.References.FABRICATED_SB_COLOR_TINT
+import com.drdisagree.iconify.common.References.FABRICATED_SB_HEIGHT
+import com.drdisagree.iconify.common.References.FABRICATED_SB_LEFT_PADDING
+import com.drdisagree.iconify.common.References.FABRICATED_SB_RIGHT_PADDING
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.putString
+import com.drdisagree.iconify.databinding.FragmentStatusbarBinding
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.events.ColorDismissedEvent
+import com.drdisagree.iconify.ui.events.ColorSelectedEvent
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.color.ColorUtils.colorToSpecialHex
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.buildAndEnableOverlays
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils.disableOverlays
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlay
+import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
+import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
+import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
+import com.google.android.material.slider.Slider
+import org.greenrobot.eventbus.EventBus
+import org.greenrobot.eventbus.Subscribe
+
+
+class Statusbar : BaseFragment() {
+
+ private lateinit var binding: FragmentStatusbarBinding
+ private val finalSBLeftPadding = intArrayOf(RPrefs.getInt(FABRICATED_SB_LEFT_PADDING, 8))
+ private val finalSBRightPadding = intArrayOf(RPrefs.getInt(FABRICATED_SB_RIGHT_PADDING, 8))
+ private val finalSBHeight = intArrayOf(RPrefs.getInt(FABRICATED_SB_HEIGHT, 28))
+
+ private val sbLeftPaddingListener: Slider.OnSliderTouchListener =
+ object : Slider.OnSliderTouchListener {
+ override fun onStartTrackingTouch(slider: Slider) {}
+
+ override fun onStopTrackingTouch(slider: Slider) {
+ finalSBLeftPadding[0] = slider.value.toInt()
+ RPrefs.putInt(FABRICATED_SB_LEFT_PADDING, finalSBLeftPadding[0])
+
+ buildOverlayWithResource(
+ requireContext(),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "status_bar_padding_start",
+ finalSBLeftPadding[0].toString() + "dp"
+ )
+ )
+ }
+ }
+
+ private val sbRightPaddingListener: Slider.OnSliderTouchListener =
+ object : Slider.OnSliderTouchListener {
+ override fun onStartTrackingTouch(slider: Slider) {}
+
+ override fun onStopTrackingTouch(slider: Slider) {
+ finalSBRightPadding[0] = slider.value.toInt()
+ RPrefs.putInt(FABRICATED_SB_RIGHT_PADDING, finalSBRightPadding[0])
+
+ buildOverlayWithResource(
+ requireContext(),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "status_bar_padding_end",
+ finalSBRightPadding[0].toString() + "dp"
+ )
+ )
+ }
+ }
+
+ private val sbHeightListener: Slider.OnSliderTouchListener =
+ object : Slider.OnSliderTouchListener {
+ override fun onStartTrackingTouch(slider: Slider) {}
+
+ override fun onStopTrackingTouch(slider: Slider) {
+ finalSBHeight[0] = slider.value.toInt()
+ RPrefs.putInt(FABRICATED_SB_HEIGHT, finalSBHeight[0])
+
+ buildOverlayWithResource(
+ requireContext(),
+ ResourceEntry(
+ FRAMEWORK_PACKAGE,
+ "dimen",
+ "status_bar_height",
+ finalSBHeight[0].toString() + "dp"
+ ),
+ ResourceEntry(
+ FRAMEWORK_PACKAGE,
+ "dimen",
+ "status_bar_height_default",
+ finalSBHeight[0].toString() + "dp"
+ ),
+ ResourceEntry(
+ FRAMEWORK_PACKAGE,
+ "dimen",
+ "status_bar_height_portrait",
+ finalSBHeight[0].toString() + "dp"
+ ),
+ ResourceEntry(
+ FRAMEWORK_PACKAGE,
+ "dimen",
+ "status_bar_height_landscape",
+ finalSBHeight[0].toString() + "dp"
+ )
+ )
+ }
+ }
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentStatusbarBinding.inflate(inflater, container, false)
+ val view: View = binding.getRoot()
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_statusbar
+ )
+
+ // Statusbar left padding
+ binding.sbLeftPadding.sliderValue = finalSBLeftPadding[0]
+ binding.sbLeftPadding.setOnSliderTouchListener(sbLeftPaddingListener)
+
+ // Reset left padding
+ binding.sbLeftPadding.setResetClickListener {
+ RPrefs.putInt(FABRICATED_SB_LEFT_PADDING, 8)
+
+ removeResourceFromOverlay(
+ requireContext(),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "status_bar_padding_start")
+ )
+
+ true
+ }
+
+ // Statusbar right padding
+ binding.sbRightPadding.sliderValue = finalSBRightPadding[0]
+ binding.sbRightPadding.setOnSliderTouchListener(sbRightPaddingListener)
+
+ // Reset right padding
+ binding.sbRightPadding.setResetClickListener {
+ RPrefs.putInt(FABRICATED_SB_RIGHT_PADDING, 8)
+
+ removeResourceFromOverlay(
+ requireContext(),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "status_bar_padding_end")
+ )
+
+ true
+ }
+
+ // Statusbar height
+ binding.sbHeight.sliderValue = finalSBHeight[0]
+ binding.sbHeight.setOnSliderTouchListener(sbHeightListener)
+
+ // Reset height
+ binding.sbHeight.setResetClickListener {
+ RPrefs.putInt(FABRICATED_SB_HEIGHT, 28)
+
+ removeResourceFromOverlay(
+ requireContext(),
+ ResourceEntry(FRAMEWORK_PACKAGE, "dimen", "status_bar_height"),
+ ResourceEntry(FRAMEWORK_PACKAGE, "dimen", "status_bar_height_default"),
+ ResourceEntry(FRAMEWORK_PACKAGE, "dimen", "status_bar_height_portrait"),
+ ResourceEntry(FRAMEWORK_PACKAGE, "dimen", "status_bar_height_landscape")
+ )
+
+ true
+ }
+ colorSBTint = resources.getColor(R.color.colorAccent, appContext.theme).toString()
+
+ //set current chosen style
+ selectedStyle = RPrefs.getString(FABRICATED_SB_COLOR_SOURCE)
+ when {
+ selectedStyle == "Monet" || RPrefs.getBoolean("IconifyComponentSBTint.overlay") -> {
+ binding.sbTintMonet.setChecked(true)
+ putString(FABRICATED_SB_COLOR_SOURCE, "Monet")
+ }
+
+ selectedStyle == "System" -> {
+ binding.sbTintSystem.setChecked(true)
+ }
+
+ selectedStyle == "Custom" -> {
+ binding.sbTintCustom.setChecked(
+ true
+ )
+ }
+ }
+
+ // Statusbar color source select
+ binding.sbTintSourceSelector.setOnCheckedChangeListener { _: RadioGroup?, checkedId: Int ->
+ when (checkedId) {
+ R.id.sb_tint_system -> {
+ if (selectedStyle != "System") {
+ putString(FABRICATED_SB_COLOR_SOURCE, "System")
+ resetSBColor()
+ }
+ }
+
+ R.id.sb_tint_monet -> {
+ if (selectedStyle != "Monet") {
+ enableOverlay("IconifyComponentSBTint.overlay")
+ putString(FABRICATED_SB_COLOR_SOURCE, "Monet")
+ Handler(Looper.getMainLooper()).postDelayed(
+ { SystemUtils.restartSystemUI() },
+ SWITCH_ANIMATION_DELAY
+ )
+ }
+ }
+
+ R.id.sb_tint_custom -> {
+ (requireActivity() as MainActivity).showColorPickerDialog(
+ dialogId = 1,
+ defaultColor = colorSBTint!!.toInt(),
+ showPresets = true,
+ showAlphaSlider = false,
+ showColorShades = true
+ )
+ }
+ }
+ }
+
+ return view
+ }
+
+ @Suppress("unused")
+ @Subscribe
+ fun onColorSelected(event: ColorSelectedEvent) {
+ if (event.dialogId == 1) {
+ colorSBTint = event.selectedColor.toString()
+ putString(FABRICATED_SB_COLOR_TINT, colorSBTint)
+
+ applySBColor()
+
+ putString(FABRICATED_SB_COLOR_SOURCE, "Custom")
+
+ OverlayUtils.disableOverlay("IconifyComponentSBTint.overlay")
+ }
+ }
+
+ @Suppress("unused")
+ @Subscribe
+ fun onDialogDismissed(event: ColorDismissedEvent) {
+ if (event.dialogId == 1) {
+ selectedStyle = RPrefs.getString(FABRICATED_SB_COLOR_SOURCE)
+ when (selectedStyle) {
+ "System" -> binding.sbTintSystem.setChecked(true)
+ "Monet" -> binding.sbTintMonet.setChecked(true)
+ "Custom" -> binding.sbTintCustom.setChecked(true)
+ }
+ }
+ }
+
+ private fun applySBColor() {
+ buildAndEnableOverlays(
+ arrayOf(
+ SYSTEMUI_PACKAGE,
+ "colorSBTint1",
+ "color",
+ "dark_mode_icon_color_dual_tone_fill",
+ colorToSpecialHex(colorSBTint!!.toInt())
+ ), arrayOf(
+ SYSTEMUI_PACKAGE,
+ "colorSBTint2",
+ "color",
+ "dark_mode_icon_color_single_tone",
+ colorToSpecialHex(colorSBTint!!.toInt())
+ ), arrayOf(
+ SYSTEMUI_PACKAGE,
+ "colorSBTint3",
+ "color",
+ "dark_mode_qs_icon_color_dual_tone_fill",
+ colorToSpecialHex(colorSBTint!!.toInt())
+ ), arrayOf(
+ SYSTEMUI_PACKAGE,
+ "colorSBTint4",
+ "color",
+ "dark_mode_qs_icon_color_single_tone",
+ colorToSpecialHex(colorSBTint!!.toInt())
+ ), arrayOf(
+ SYSTEMUI_PACKAGE,
+ "colorSBTint5",
+ "color",
+ "light_mode_icon_color_dual_tone_fill",
+ colorToSpecialHex(colorSBTint!!.toInt())
+ ), arrayOf(
+ SYSTEMUI_PACKAGE,
+ "colorSBTint6",
+ "color",
+ "light_mode_icon_color_single_tone",
+ colorToSpecialHex(colorSBTint!!.toInt())
+ ), arrayOf(
+ SYSTEMUI_PACKAGE,
+ "colorSBTint7",
+ "color",
+ "status_bar_clock_color",
+ colorToSpecialHex(colorSBTint!!.toInt())
+ )
+ )
+
+ Handler(Looper.getMainLooper()).postDelayed(
+ { SystemUtils.restartSystemUI() },
+ 1000
+ )
+ }
+
+ private fun resetSBColor() {
+ disableOverlays(
+ "colorSBTint1",
+ "colorSBTint2",
+ "colorSBTint3",
+ "colorSBTint4",
+ "colorSBTint5",
+ "colorSBTint6",
+ "colorSBTint7"
+ )
+
+ OverlayUtils.disableOverlay("IconifyComponentSBTint.overlay")
+
+ Handler(Looper.getMainLooper()).postDelayed(
+ { SystemUtils.restartSystemUI() },
+ 1000
+ )
+ }
+
+ override fun onStart() {
+ super.onStart()
+
+ EventBus.getDefault().register(this)
+ }
+
+ override fun onStop() {
+ super.onStop()
+
+ EventBus.getDefault().unregister(this)
+ }
+
+ companion object {
+ private var colorSBTint: String? = null
+ private var selectedStyle: String? = null
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Tweaks.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Tweaks.kt
new file mode 100644
index 000000000..ea03bccf2
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/Tweaks.kt
@@ -0,0 +1,19 @@
+package com.drdisagree.iconify.ui.fragments.tweaks
+
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+
+class Tweaks : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.navbar_tweaks)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.tweaks
+
+ override val hasMenu: Boolean
+ get() = true
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/UiRoundness.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/UiRoundness.kt
similarity index 94%
rename from app/src/main/java/com/drdisagree/iconify/ui/fragments/UiRoundness.kt
rename to app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/UiRoundness.kt
index 11873a5d4..8d23d8512 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/fragments/UiRoundness.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/UiRoundness.kt
@@ -1,4 +1,4 @@
-package com.drdisagree.iconify.ui.fragments
+package com.drdisagree.iconify.ui.fragments.tweaks
import android.content.res.Configuration
import android.graphics.drawable.GradientDrawable
@@ -15,14 +15,13 @@ import com.drdisagree.iconify.Iconify.Companion.appContext
import com.drdisagree.iconify.Iconify.Companion.appContextLocale
import com.drdisagree.iconify.R
import com.drdisagree.iconify.common.Preferences.UI_CORNER_RADIUS
-import com.drdisagree.iconify.config.Prefs
import com.drdisagree.iconify.config.RPrefs
import com.drdisagree.iconify.databinding.FragmentUiRoundnessBinding
import com.drdisagree.iconify.ui.base.BaseFragment
import com.drdisagree.iconify.ui.dialogs.LoadingDialog
import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
import com.drdisagree.iconify.utils.overlay.manager.RoundnessManager.buildOverlay
import com.google.android.material.slider.Slider
import java.io.IOException
@@ -70,7 +69,7 @@ class UiRoundness : BaseFragment() {
binding.autoBrightness.background as GradientDrawable
)
- val finalUiCornerRadius = intArrayOf(Prefs.getInt(UI_CORNER_RADIUS, 28))
+ val finalUiCornerRadius = intArrayOf(RPrefs.getInt(UI_CORNER_RADIUS, 28))
if (finalUiCornerRadius[0] == 28) {
binding.cornerRadiusOutput.text =
@@ -146,7 +145,7 @@ class UiRoundness : BaseFragment() {
Handler(Looper.getMainLooper()).post {
if (!hasErroredOut.get()) {
- Prefs.putInt(UI_CORNER_RADIUS, finalUiCornerRadius[0])
+ RPrefs.putInt(UI_CORNER_RADIUS, finalUiCornerRadius[0])
RPrefs.putInt(UI_CORNER_RADIUS, finalUiCornerRadius[0])
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/VolumePanel.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/VolumePanel.kt
new file mode 100644
index 000000000..43906b7fa
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/tweaks/VolumePanel.kt
@@ -0,0 +1,463 @@
+package com.drdisagree.iconify.ui.fragments.tweaks
+
+import android.annotation.SuppressLint
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.RadioGroup
+import android.widget.Toast
+import androidx.core.content.ContextCompat
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
+import com.drdisagree.iconify.common.Preferences.VOLUME_PANEL_BACKGROUND_WIDTH
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.databinding.FragmentVolumePanelBinding
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.dialogs.InfoDialog
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.utils.RootUtils.isApatchInstalled
+import com.drdisagree.iconify.utils.RootUtils.isKSUInstalled
+import com.drdisagree.iconify.utils.RootUtils.isMagiskInstalled
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.overlay.compiler.VolumeCompiler.buildModule
+import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceEntry
+import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.buildOverlayWithResource
+import com.drdisagree.iconify.utils.overlay.manager.resource.ResourceManager.removeResourceFromOverlay
+import com.google.android.material.button.MaterialButton
+import java.util.concurrent.atomic.AtomicBoolean
+
+class VolumePanel : BaseFragment() {
+
+ private lateinit var binding: FragmentVolumePanelBinding
+ private var loadingDialog: LoadingDialog? = null
+ private var infoDialog: InfoDialog? = null
+ private var finalCheckedId = -1
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentVolumePanelBinding.inflate(inflater, container, false)
+ val view: View = binding.getRoot()
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_volume_panel
+ )
+
+ binding.thinBg.isChecked = RPrefs.getInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0) == 1
+ binding.thinBg.addOnCheckedChangeListener { button: MaterialButton, isChecked: Boolean ->
+ if (button.isPressed) {
+ if (!hasStoragePermission()) {
+ requestStoragePermission(requireContext())
+ binding.toggleButtonGroup.uncheck(binding.thinBg.id)
+ } else {
+ if (isChecked) {
+ binding.toggleButtonGroup.uncheck(binding.thickBg.id)
+ binding.toggleButtonGroup.uncheck(binding.noBg.id)
+
+ RPrefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 1)
+
+ buildOverlayWithResource(
+ requireContext(),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "volume_dialog_slider_width",
+ "42dp"
+ ),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "volume_dialog_track_width",
+ "4dp"
+ ),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "rounded_slider_track_inset",
+ "22dp"
+ )
+ )
+ } else {
+ RPrefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0)
+
+ removeResourceFromOverlay(
+ requireContext(),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_slider_width"),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_track_width"),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "rounded_slider_track_inset")
+ )
+ }
+ }
+ }
+ }
+
+ binding.thickBg.isChecked = RPrefs.getInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0) == 2
+ binding.thickBg.addOnCheckedChangeListener { button: MaterialButton, isChecked: Boolean ->
+ if (button.isPressed) {
+ if (!hasStoragePermission()) {
+ requestStoragePermission(requireContext())
+ binding.toggleButtonGroup.uncheck(binding.thickBg.id)
+ } else {
+ if (isChecked) {
+ binding.toggleButtonGroup.uncheck(binding.thinBg.id)
+ binding.toggleButtonGroup.uncheck(binding.noBg.id)
+
+ RPrefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 2)
+
+ buildOverlayWithResource(
+ requireContext(),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "volume_dialog_slider_width",
+ "42dp"
+ ),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "volume_dialog_track_width",
+ "42dp"
+ ),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "rounded_slider_track_inset",
+ "0dp"
+ )
+ )
+ } else {
+ RPrefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0)
+
+ removeResourceFromOverlay(
+ requireContext(),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_slider_width"),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_track_width"),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "rounded_slider_track_inset")
+ )
+ }
+ }
+ }
+ }
+
+ binding.noBg.isChecked = RPrefs.getInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0) == 3
+ binding.noBg.addOnCheckedChangeListener { button: MaterialButton, isChecked: Boolean ->
+ if (button.isPressed) {
+ if (!hasStoragePermission()) {
+ requestStoragePermission(requireContext())
+ binding.toggleButtonGroup.uncheck(binding.noBg.id)
+ } else {
+ if (isChecked) {
+ binding.toggleButtonGroup.uncheck(binding.thinBg.id)
+ binding.toggleButtonGroup.uncheck(binding.thickBg.id)
+
+ RPrefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 3)
+
+ buildOverlayWithResource(
+ requireContext(),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "volume_dialog_slider_width",
+ "42dp"
+ ),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "volume_dialog_track_width",
+ "0dp"
+ ),
+ ResourceEntry(
+ SYSTEMUI_PACKAGE,
+ "dimen",
+ "rounded_slider_track_inset",
+ "24dp"
+ )
+ )
+ } else {
+ RPrefs.putInt(VOLUME_PANEL_BACKGROUND_WIDTH, 0)
+
+ removeResourceFromOverlay(
+ requireContext(),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_slider_width"),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "volume_dialog_track_width"),
+ ResourceEntry(SYSTEMUI_PACKAGE, "dimen", "rounded_slider_track_inset")
+ )
+ }
+ }
+ }
+ }
+
+ // Loading dialog while creating modules
+ loadingDialog = LoadingDialog(requireContext())
+
+ // Credits dialog for volume style modules
+ infoDialog = InfoDialog(requireContext())
+
+ // Volume style
+ binding.volumeStyle.volumeStyleInfo.setOnClickListener {
+ infoDialog!!.show(
+ R.string.read_carefully,
+ R.string.volume_module_installation_guide
+ )
+ }
+
+ binding.volumeStyle.volumeStyle1.clearCheck()
+ binding.volumeStyle.volumeStyle2.clearCheck()
+
+ binding.volumeStyle.volumeStyle1.setOnCheckedChangeListener(listener1)
+ binding.volumeStyle.volumeStyle2.setOnCheckedChangeListener(listener2)
+
+ val checkedId1 = binding.volumeStyle.volumeStyle1.checkedRadioButtonId
+ val checkedId2 = binding.volumeStyle.volumeStyle2.checkedRadioButtonId
+ finalCheckedId = if (checkedId1 == -1) checkedId2 else checkedId1
+
+ binding.volumeStyle.volumeStyleCreateModule.setOnClickListener {
+ if ((isKSUInstalled || isApatchInstalled) && !isMagiskInstalled) {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_only_magisk_supported),
+ Toast.LENGTH_SHORT
+ ).show()
+
+ return@setOnClickListener
+ }
+
+ if (!hasStoragePermission()) {
+ requestStoragePermission(requireContext())
+ } else {
+ if (finalCheckedId == -1) {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_select_style),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ installVolumeModule(finalCheckedId)
+ }
+ }
+ }
+
+ return view
+ }
+
+ @SuppressLint("NonConstantResourceId")
+ private fun installVolumeModule(volume: Int) {
+ loadingDialog!!.show(resources.getString(R.string.loading_dialog_wait))
+
+ val hasErroredOut = AtomicBoolean(false)
+
+ val selectedStyle: String = when (volume) {
+ R.id.gradient_style -> "VolumeGradient"
+ R.id.doublelayer_style -> "VolumeDoubleLayer"
+ R.id.shadedlayer_style -> "VolumeShadedLayer"
+ R.id.neumorph_style -> "VolumeNeumorph"
+ R.id.outline_style -> "VolumeOutline"
+ R.id.neumorphoutline_style -> "VolumeNeumorphOutline"
+ else -> return
+ }
+
+ Thread {
+ try {
+ hasErroredOut.set(buildModule(selectedStyle, SYSTEMUI_PACKAGE))
+ } catch (e: Exception) {
+ hasErroredOut.set(true)
+ Log.e("VolumePanel", e.toString())
+ }
+
+ Handler(Looper.getMainLooper()).postDelayed({
+ loadingDialog!!.hide()
+
+ if (hasErroredOut.get()) {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_error),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_module_created),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }, 2000)
+ }.start()
+ }
+
+ private fun updateVolumePreview(id: Int) {
+ when (id) {
+ R.id.gradient_style -> setVolumeDrawable(
+ ringerDrawable = R.drawable.volume_gradient,
+ progressDrawable = R.drawable.volume_gradient,
+ ringerInverse = false,
+ progressInverse = false
+ )
+
+ R.id.doublelayer_style -> setVolumeDrawable(
+ ringerDrawable = R.drawable.volume_double_layer,
+ progressDrawable = R.drawable.volume_double_layer,
+ ringerInverse = false,
+ progressInverse = false
+ )
+
+ R.id.shadedlayer_style -> setVolumeDrawable(
+ ringerDrawable = R.drawable.volume_shaded_layer,
+ progressDrawable = R.drawable.volume_shaded_layer,
+ ringerInverse = false,
+ progressInverse = false
+ )
+
+ R.id.neumorph_style -> setVolumeDrawable(
+ ringerDrawable = R.drawable.volume_neumorph,
+ progressDrawable = R.drawable.volume_neumorph,
+ ringerInverse = false,
+ progressInverse = false
+ )
+
+ R.id.outline_style -> setVolumeDrawable(
+ ringerDrawable = R.drawable.volume_outline_ringer,
+ progressDrawable = R.drawable.volume_outline,
+ ringerInverse = true,
+ progressInverse = false
+ )
+
+ R.id.neumorphoutline_style -> setVolumeDrawable(
+ ringerDrawable = R.drawable.volume_neumorph_outline_ringer,
+ progressDrawable = R.drawable.volume_neumorph_outline,
+ ringerInverse = true,
+ progressInverse = false
+ )
+ }
+ }
+
+ private fun setVolumeDrawable(
+ ringerDrawable: Int,
+ progressDrawable: Int,
+ ringerInverse: Boolean,
+ progressInverse: Boolean
+ ) {
+ binding.volumeThinBg.volumeRingerBg.background =
+ ContextCompat.getDrawable(appContext, ringerDrawable)
+ binding.volumeThinBg.volumeProgressDrawable.background =
+ ContextCompat.getDrawable(appContext, progressDrawable)
+ binding.volumeThickBg.volumeRingerBg.background =
+ ContextCompat.getDrawable(appContext, ringerDrawable)
+ binding.volumeThickBg.volumeProgressDrawable.background =
+ ContextCompat.getDrawable(appContext, progressDrawable)
+ binding.volumeNoBg.volumeRingerBg.background =
+ ContextCompat.getDrawable(appContext, ringerDrawable)
+ binding.volumeNoBg.volumeProgressDrawable.background =
+ ContextCompat.getDrawable(appContext, progressDrawable)
+
+ if (ringerInverse) {
+ binding.volumeThinBg.volumeRingerIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimary
+ )
+ )
+ binding.volumeThickBg.volumeRingerIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimary
+ )
+ )
+ binding.volumeNoBg.volumeRingerIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimary
+ )
+ )
+ } else {
+ binding.volumeThinBg.volumeRingerIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimaryInverse
+ )
+ )
+ binding.volumeThickBg.volumeRingerIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimaryInverse
+ )
+ )
+ binding.volumeNoBg.volumeRingerIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimaryInverse
+ )
+ )
+ }
+ if (progressInverse) {
+ binding.volumeThinBg.volumeProgressIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimary
+ )
+ )
+ binding.volumeThickBg.volumeProgressIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimary
+ )
+ )
+ binding.volumeNoBg.volumeProgressIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimary
+ )
+ )
+ } else {
+ binding.volumeThinBg.volumeProgressIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimaryInverse
+ )
+ )
+ binding.volumeThickBg.volumeProgressIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimaryInverse
+ )
+ )
+ binding.volumeNoBg.volumeProgressIcon.setBackgroundTintList(
+ ContextCompat.getColorStateList(
+ appContext, R.color.textColorPrimaryInverse
+ )
+ )
+ }
+ }
+
+ override fun onDestroy() {
+ loadingDialog?.dismiss()
+
+ super.onDestroy()
+ }
+
+ private val listener1: RadioGroup.OnCheckedChangeListener =
+ RadioGroup.OnCheckedChangeListener { _, checkedId ->
+ if (checkedId != -1) {
+ binding.volumeStyle.volumeStyle2.setOnCheckedChangeListener(null)
+ binding.volumeStyle.volumeStyle2.clearCheck()
+ binding.volumeStyle.volumeStyle2.setOnCheckedChangeListener(listener2)
+ finalCheckedId = checkedId
+ }
+
+ updateVolumePreview(checkedId)
+ }
+
+ private val listener2: RadioGroup.OnCheckedChangeListener =
+ RadioGroup.OnCheckedChangeListener { _, checkedId ->
+ if (checkedId != -1) {
+ binding.volumeStyle.volumeStyle1.setOnCheckedChangeListener(null)
+ binding.volumeStyle.volumeStyle1.clearCheck()
+ binding.volumeStyle.volumeStyle1.setOnCheckedChangeListener(listener1)
+ finalCheckedId = checkedId
+ }
+
+ updateVolumePreview(checkedId)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/BackgroundChip.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/BackgroundChip.kt
new file mode 100644
index 000000000..7d1dac154
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/BackgroundChip.kt
@@ -0,0 +1,45 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_SWITCH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_SWITCH
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+
+class BackgroundChip : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_background_chip)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_background_chip
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ CHIP_STATUSBAR_CLOCK_SWITCH -> {
+ if (!getBoolean(key)) {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+
+ CHIP_STATUS_ICONS_SWITCH -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/BatteryStyle.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/BatteryStyle.kt
new file mode 100644
index 000000000..44e16cc2b
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/BatteryStyle.kt
@@ -0,0 +1,67 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.os.Bundle
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_STYLE
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_HEIGHT
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_STYLE
+import com.drdisagree.iconify.common.Preferences.CUSTOM_BATTERY_WIDTH
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.adapters.ListPreferenceAdapter
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.preferences.BottomSheetListPreference
+import com.drdisagree.iconify.ui.utils.ViewHelper.getBatteryDrawables
+import com.drdisagree.iconify.ui.utils.ViewHelper.getChargingIcons
+
+class BatteryStyle : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_battery_style)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_battery_style
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ CUSTOM_BATTERY_STYLE -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+
+ CUSTOM_BATTERY_WIDTH,
+ CUSTOM_BATTERY_HEIGHT -> {
+ if (RPrefs.getString(CUSTOM_BATTERY_STYLE, "0")!!.toInt() < 3) {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ findPreference(CUSTOM_BATTERY_STYLE)?.apply {
+ createDefaultAdapter(getBatteryDrawables(requireContext()))
+ setAdapterType(ListPreferenceAdapter.TYPE_BATTERY_ICONS)
+ }
+
+ findPreference(CUSTOM_BATTERY_CHARGING_ICON_STYLE)?.apply {
+ createDefaultAdapter(getChargingIcons(requireContext()))
+ setAdapterType(ListPreferenceAdapter.TYPE_BATTERY_ICONS)
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/ClockChip.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/ClockChip.kt
new file mode 100644
index 000000000..ff8ebda04
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/ClockChip.kt
@@ -0,0 +1,426 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.content.res.Configuration
+import android.graphics.Color
+import android.graphics.PorterDuff
+import android.graphics.PorterDuffXfermode
+import android.graphics.drawable.Drawable
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.view.ViewTreeObserver
+import android.widget.CompoundButton
+import androidx.coordinatorlayout.widget.CoordinatorLayout
+import androidx.core.content.ContextCompat
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_ACCENT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_END_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_GRADIENT_DIRECTION
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_PADDING_BOTTOM
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_PADDING_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_PADDING_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_PADDING_TOP
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_START_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_ACCENT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_DASH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_DASH_GAP
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_DASH_WIDTH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_SWITCH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_WIDTH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STYLE_CHANGED
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_TEXT_COLOR_CODE
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_TEXT_COLOR_OPTION
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.databinding.FragmentXposedClockChipBinding
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.xposed.modules.utils.ViewHelper.toPx
+import com.drdisagree.iconify.xposed.modules.views.ChipDrawable
+import com.drdisagree.iconify.xposed.modules.views.ChipDrawable.GradientDirection.Companion.toIndex
+import com.google.android.material.slider.Slider
+import eightbitlab.com.blurview.RenderEffectBlur
+
+class ClockChip : BaseFragment() {
+
+ private lateinit var binding: FragmentXposedClockChipBinding
+
+ private var customTextColorIndex: Int = getInt(CHIP_STATUSBAR_CLOCK_TEXT_COLOR_OPTION, 0)
+ private var customTextColor: Int = getInt(CHIP_STATUSBAR_CLOCK_TEXT_COLOR_CODE, Color.WHITE)
+ private var accentFillEnabled: Boolean = getBoolean(CHIP_STATUSBAR_CLOCK_ACCENT, true)
+ private var startColor: Int = getInt(CHIP_STATUSBAR_CLOCK_START_COLOR, Color.RED)
+ private var endColor: Int = getInt(CHIP_STATUSBAR_CLOCK_END_COLOR, Color.BLUE)
+ private var gradientDirection: ChipDrawable.GradientDirection =
+ ChipDrawable.GradientDirection.fromIndex(
+ getInt(
+ CHIP_STATUSBAR_CLOCK_GRADIENT_DIRECTION,
+ ChipDrawable.GradientDirection.LEFT_RIGHT.toIndex()
+ )
+ )
+ private var padding: IntArray = intArrayOf(
+ getInt(CHIP_STATUSBAR_CLOCK_PADDING_LEFT, 8),
+ getInt(CHIP_STATUSBAR_CLOCK_PADDING_TOP, 4),
+ getInt(CHIP_STATUSBAR_CLOCK_PADDING_RIGHT, 8),
+ getInt(CHIP_STATUSBAR_CLOCK_PADDING_BOTTOM, 4)
+ )
+ private var strokeEnabled: Boolean = getBoolean(CHIP_STATUSBAR_CLOCK_STROKE_SWITCH)
+ private var strokeWidth: Int = getInt(CHIP_STATUSBAR_CLOCK_STROKE_WIDTH, 2)
+ private var accentBorderEnabled: Boolean = getBoolean(CHIP_STATUSBAR_CLOCK_STROKE_ACCENT, true)
+ private var strokeColor: Int = getInt(CHIP_STATUSBAR_CLOCK_STROKE_COLOR, Color.GREEN)
+ private var dashedBorderEnabled: Boolean = getBoolean(CHIP_STATUSBAR_CLOCK_STROKE_DASH)
+ private var dashWidth: Int = getInt(CHIP_STATUSBAR_CLOCK_STROKE_DASH_WIDTH, 4)
+ private var dashGap: Int = getInt(CHIP_STATUSBAR_CLOCK_STROKE_DASH_GAP, 4)
+ private var cornerRadii = floatArrayOf(
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT, 28).toFloat(),
+ )
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentXposedClockChipBinding.inflate(inflater, container, false)
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_clock_chip
+ )
+
+ binding.header.appBarLayout.viewTreeObserver.addOnGlobalLayoutListener(object :
+ ViewTreeObserver.OnGlobalLayoutListener {
+ override fun onGlobalLayout() {
+ binding.header.appBarLayout.viewTreeObserver.removeOnGlobalLayoutListener(this)
+
+ val windowInsetsCompat = ViewCompat.getRootWindowInsets(binding.root)
+ val statusBarHeight =
+ windowInsetsCompat?.isVisible(WindowInsetsCompat.Type.statusBars())?.let {
+ windowInsetsCompat.getInsets(WindowInsetsCompat.Type.statusBars()).top
+ } ?: 0
+
+ val headerHeight = binding.header.appBarLayout.height
+
+ val params = binding.blurView.layoutParams as CoordinatorLayout.LayoutParams
+ params.topMargin = headerHeight
+ binding.blurView.layoutParams = params
+
+ val blurViewHeight = binding.header.appBarLayout.height
+
+ binding.linearLayout.setPadding(
+ binding.linearLayout.paddingLeft,
+ blurViewHeight - statusBarHeight,
+ binding.linearLayout.paddingRight,
+ binding.linearLayout.paddingBottom
+ )
+ }
+ })
+
+ val windowBackground: Drawable? = requireActivity().window.decorView.background
+ binding.blurView.setupWith(binding.root, RenderEffectBlur())
+ .setFrameClearDrawable(windowBackground)
+ .setBlurRadius(8f)
+
+ binding.clockTextColor.setSelectedIndex(getInt(CHIP_STATUSBAR_CLOCK_TEXT_COLOR_OPTION, 0))
+ binding.clockTextColor.setOnItemSelectedListener { index: Int ->
+ customTextColorIndex = index
+ updateVisibility()
+ }
+
+ binding.clockTextColorPicker.apply {
+ setColorPickerListener(
+ activity = requireActivity(),
+ defaultColor = customTextColor,
+ showPresets = true,
+ showAlphaSlider = true,
+ showColorShades = true
+ )
+ setOnColorSelectedListener { color: Int ->
+ customTextColor = color
+ updateVisibility()
+ }
+ }
+
+ binding.accentFillColor.isSwitchChecked = accentFillEnabled
+ binding.accentFillColor.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ accentFillEnabled = isChecked
+ updateVisibility()
+ }
+
+ binding.gradientDirection.setSelectedIndex(gradientDirection.toIndex())
+ binding.gradientDirection.setOnItemSelectedListener { index: Int ->
+ gradientDirection = ChipDrawable.GradientDirection.entries.toTypedArray()[index]
+ updateVisibility()
+ }
+
+ binding.fillStartColor.apply {
+ setColorPickerListener(
+ activity = requireActivity(),
+ defaultColor = startColor,
+ showPresets = true,
+ showAlphaSlider = true,
+ showColorShades = true
+ )
+ setOnColorSelectedListener { color: Int ->
+ startColor = color
+ updateVisibility()
+ }
+ }
+
+ binding.fillEndColor.apply {
+ setColorPickerListener(
+ activity = requireActivity(),
+ defaultColor = endColor,
+ showPresets = true,
+ showAlphaSlider = true,
+ showColorShades = true
+ )
+ setOnColorSelectedListener { color: Int ->
+ endColor = color
+ updateVisibility()
+ }
+ }
+
+ binding.enableBorder.isSwitchChecked = strokeEnabled
+ binding.enableBorder.setSwitchChangeListener { _: CompoundButton?, enabled: Boolean ->
+ strokeEnabled = enabled
+ updateVisibility()
+ }
+
+ binding.accentBorderColor.isSwitchChecked = accentBorderEnabled
+ binding.accentBorderColor.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ accentBorderEnabled = isChecked
+ updateVisibility()
+ }
+
+ binding.borderColor.apply {
+ setColorPickerListener(
+ activity = requireActivity(),
+ defaultColor = strokeColor,
+ showPresets = true,
+ showAlphaSlider = true,
+ showColorShades = true
+ )
+ setOnColorSelectedListener { color: Int ->
+ strokeColor = color
+ updateVisibility()
+ }
+ }
+
+ binding.borderThickness.sliderValue = strokeWidth
+ binding.borderThickness.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ strokeWidth = value.toInt()
+ updateVisibility()
+ }
+
+ binding.dashedBorder.isSwitchChecked = dashedBorderEnabled
+ binding.dashedBorder.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ dashedBorderEnabled = isChecked
+ updateVisibility()
+ }
+
+ binding.dashWidth.sliderValue = dashWidth
+ binding.dashWidth.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ dashWidth = value.toInt()
+ updateVisibility()
+ }
+
+ binding.dashGap.sliderValue = dashGap
+ binding.dashGap.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ dashGap = value.toInt()
+ updateVisibility()
+ }
+
+ binding.paddingLeft.sliderValue = padding[0]
+ binding.paddingLeft.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ padding[0] = value.toInt()
+ updateVisibility()
+ }
+
+ binding.paddingRight.sliderValue = padding[2]
+ binding.paddingRight.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ padding[2] = value.toInt()
+ updateVisibility()
+ }
+
+ binding.paddingTop.sliderValue = padding[1]
+ binding.paddingTop.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ padding[1] = value.toInt()
+ updateVisibility()
+ }
+
+ binding.paddingBottom.sliderValue = padding[3]
+ binding.paddingBottom.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ padding[3] = value.toInt()
+ updateVisibility()
+ }
+
+ binding.cornerRadiusTopLeft.sliderValue = cornerRadii[0].toInt()
+ binding.cornerRadiusTopLeft.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ cornerRadii[0] = value
+ cornerRadii[1] = value
+ updateVisibility()
+ }
+
+ binding.cornerRadiusTopRight.sliderValue = cornerRadii[2].toInt()
+ binding.cornerRadiusTopRight.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ cornerRadii[2] = value
+ cornerRadii[3] = value
+ updateVisibility()
+ }
+
+ binding.cornerRadiusBottomLeft.sliderValue = cornerRadii[6].toInt()
+ binding.cornerRadiusBottomLeft.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ cornerRadii[6] = value
+ cornerRadii[7] = value
+ updateVisibility()
+ }
+
+ binding.cornerRadiusBottomRight.sliderValue = cornerRadii[4].toInt()
+ binding.cornerRadiusBottomRight.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ cornerRadii[4] = value
+ cornerRadii[5] = value
+ updateVisibility()
+ }
+
+ binding.btnApply.setOnClickListener {
+ RPrefs.apply {
+ putInt(CHIP_STATUSBAR_CLOCK_TEXT_COLOR_OPTION, customTextColorIndex)
+ putInt(CHIP_STATUSBAR_CLOCK_TEXT_COLOR_CODE, customTextColor)
+ putBoolean(CHIP_STATUSBAR_CLOCK_ACCENT, accentFillEnabled)
+ putInt(CHIP_STATUSBAR_CLOCK_START_COLOR, startColor)
+ putInt(CHIP_STATUSBAR_CLOCK_END_COLOR, endColor)
+ putInt(CHIP_STATUSBAR_CLOCK_GRADIENT_DIRECTION, gradientDirection.toIndex())
+ putInt(CHIP_STATUSBAR_CLOCK_PADDING_LEFT, padding[0])
+ putInt(CHIP_STATUSBAR_CLOCK_PADDING_TOP, padding[1])
+ putInt(CHIP_STATUSBAR_CLOCK_PADDING_RIGHT, padding[2])
+ putInt(CHIP_STATUSBAR_CLOCK_PADDING_BOTTOM, padding[3])
+ putBoolean(CHIP_STATUSBAR_CLOCK_STROKE_SWITCH, strokeEnabled)
+ putInt(CHIP_STATUSBAR_CLOCK_STROKE_WIDTH, strokeWidth)
+ putBoolean(CHIP_STATUSBAR_CLOCK_STROKE_ACCENT, accentBorderEnabled)
+ putInt(CHIP_STATUSBAR_CLOCK_STROKE_COLOR, strokeColor)
+ putBoolean(CHIP_STATUSBAR_CLOCK_STROKE_DASH, dashedBorderEnabled)
+ putInt(CHIP_STATUSBAR_CLOCK_STROKE_DASH_WIDTH, dashWidth)
+ putInt(CHIP_STATUSBAR_CLOCK_STROKE_DASH_GAP, dashGap)
+ putInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT, cornerRadii[0].toInt())
+ putInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT, cornerRadii[0].toInt())
+ putInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT, cornerRadii[2].toInt())
+ putInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT, cornerRadii[2].toInt())
+ putInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT, cornerRadii[4].toInt())
+ putInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT, cornerRadii[4].toInt())
+ putInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT, cornerRadii[6].toInt())
+ putInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT, cornerRadii[6].toInt())
+
+ putBoolean(
+ CHIP_STATUSBAR_CLOCK_STYLE_CHANGED,
+ !getBoolean(CHIP_STATUSBAR_CLOCK_STYLE_CHANGED)
+ )
+ }
+ }
+
+ updateVisibility()
+
+ return binding.getRoot()
+ }
+
+ private fun updateVisibility() {
+ val textColorPicker = if (customTextColorIndex == 2) View.VISIBLE else View.GONE
+
+ binding.clockTextColorPicker.visibility = textColorPicker
+
+ val accentFillEnabled =
+ if (binding.accentFillColor.isSwitchChecked) View.GONE else View.VISIBLE
+
+ binding.gradientDirection.visibility = accentFillEnabled
+ binding.fillStartColor.visibility = accentFillEnabled
+ binding.fillEndColor.visibility = accentFillEnabled
+
+ val borderEnabled = if (binding.enableBorder.isSwitchChecked) View.VISIBLE else View.GONE
+
+ binding.accentBorderColor.visibility = borderEnabled
+ binding.borderThickness.visibility = borderEnabled
+ binding.dashedBorder.visibility = borderEnabled
+
+ val accentBorderColor =
+ if (binding.accentBorderColor.isSwitchChecked || !binding.enableBorder.isSwitchChecked) View.GONE else View.VISIBLE
+
+ binding.borderColor.visibility = accentBorderColor
+
+ val dashedBorderEnabled = if (binding.dashedBorder.isSwitchChecked) {
+ if (!binding.enableBorder.isSwitchChecked) View.GONE else View.VISIBLE
+ } else View.GONE
+
+ binding.dashWidth.visibility = dashedBorderEnabled
+ binding.dashGap.visibility = dashedBorderEnabled
+
+ val isDarkMode =
+ requireContext().resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_YES ==
+ Configuration.UI_MODE_NIGHT_YES
+
+ when (customTextColorIndex) {
+ 0 -> {
+ binding.previewClock.paint.xfermode = null
+ binding.previewClock.setTextColor(
+ ContextCompat.getColor(
+ requireContext(),
+ if (isDarkMode) {
+ R.color.white
+ } else {
+ R.color.black
+ }
+ )
+ )
+ }
+
+ 1 -> {
+ binding.previewClock.paint.xfermode = PorterDuffXfermode(PorterDuff.Mode.DST_OUT)
+ }
+
+ 2 -> {
+ binding.previewClock.paint.xfermode = null
+ binding.previewClock.setTextColor(customTextColor)
+ }
+ }
+
+ binding.previewClock.setPadding(
+ requireContext().toPx(padding[0]),
+ requireContext().toPx(padding[1]),
+ requireContext().toPx(padding[2]),
+ requireContext().toPx(padding[3])
+ )
+
+ binding.previewClock.background = ChipDrawable.createChipDrawable(
+ context = requireContext(),
+ accentFill = this.accentFillEnabled,
+ startColor = startColor,
+ endColor = endColor,
+ gradientDirection = gradientDirection,
+ padding = intArrayOf(0, 0, 0, 0),
+ strokeEnabled = strokeEnabled,
+ accentStroke = accentBorderEnabled,
+ strokeWidth = strokeWidth,
+ strokeColor = strokeColor,
+ dashedBorderEnabled = this.dashedBorderEnabled,
+ dashWidth = dashWidth,
+ dashGap = dashGap,
+ cornerRadii = cornerRadii
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/DepthWallpaper.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/DepthWallpaper.kt
new file mode 100644
index 000000000..684f7344f
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/DepthWallpaper.kt
@@ -0,0 +1,148 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.app.Activity
+import android.os.Build
+import android.os.Bundle
+import android.widget.Toast
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.contract.ActivityResultContracts
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_CHANGED
+import com.drdisagree.iconify.common.Preferences.DEPTH_WALLPAPER_SWITCH
+import com.drdisagree.iconify.common.Resources.DEPTH_WALL_BG_DIR
+import com.drdisagree.iconify.common.Resources.DEPTH_WALL_FG_DIR
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.preferences.FilePickerPreference
+import com.drdisagree.iconify.ui.preferences.SwitchPreference
+import com.drdisagree.iconify.utils.FileUtils.getRealPath
+import com.drdisagree.iconify.utils.FileUtils.launchFilePicker
+import com.drdisagree.iconify.utils.FileUtils.moveToIconifyHiddenDir
+import com.drdisagree.iconify.xposed.modules.utils.BitmapSubjectSegmenter
+import com.google.android.gms.common.moduleinstall.ModuleAvailabilityResponse
+
+class DepthWallpaper : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_depth_wallpaper)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_depth_wallpaper
+
+ override val hasMenu: Boolean
+ get() = true
+
+ private var startActivityIntentForBackgroundImage = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ if (result.resultCode == Activity.RESULT_OK) {
+ val data = result.data
+ val path = getRealPath(data)
+
+ if (path != null && moveToIconifyHiddenDir(path, DEPTH_WALL_BG_DIR)) {
+ putBoolean(DEPTH_WALLPAPER_CHANGED, false)
+ putBoolean(DEPTH_WALLPAPER_CHANGED, true)
+
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_applied),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_rename_file),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+ }
+
+ private var startActivityIntentForForegroundImage = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ if (result.resultCode == Activity.RESULT_OK) {
+ val data = result.data
+ val path = getRealPath(data)
+
+ if (path != null && moveToIconifyHiddenDir(path, DEPTH_WALL_FG_DIR)) {
+ putBoolean(DEPTH_WALLPAPER_CHANGED, false)
+ putBoolean(DEPTH_WALLPAPER_CHANGED, true)
+
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_applied),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_rename_file),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+ }
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ DEPTH_WALLPAPER_SWITCH -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ findPreference(DEPTH_WALLPAPER_SWITCH)?.apply {
+ if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU) {
+ setSummary(
+ getString(
+ R.string.enable_depth_wallpaper_desc,
+ getString(R.string.use_custom_lockscreen_clock)
+ )
+ )
+ } else {
+ BitmapSubjectSegmenter(requireContext())
+ .checkModelAvailability { moduleAvailabilityResponse: ModuleAvailabilityResponse? ->
+ setSummary(
+ getString(
+ R.string.enable_depth_wallpaper_desc,
+ getString(
+ if (moduleAvailabilityResponse?.areModulesAvailable() == true) {
+ R.string.depth_wallpaper_model_ready
+ } else {
+ R.string.depth_wallpaper_model_not_available
+ }
+ )
+ )
+ )
+ }
+ }
+ }
+
+ findPreference("xposed_depthwallpaperbgimagepicker")?.apply {
+ setOnButtonClick {
+ launchFilePicker(context, "image", startActivityIntentForBackgroundImage)
+ }
+ }
+
+ findPreference("xposed_depthwallpaperfgimagepicker")?.apply {
+ setOnButtonClick {
+ launchFilePicker(context, "image", startActivityIntentForForegroundImage)
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/HeaderClock.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/HeaderClock.kt
new file mode 100644
index 000000000..073c93380
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/HeaderClock.kt
@@ -0,0 +1,139 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.annotation.SuppressLint
+import android.app.Activity
+import android.os.Bundle
+import android.widget.Toast
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.contract.ActivityResultContracts
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_FONT_SWITCH
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_STYLE
+import com.drdisagree.iconify.common.Preferences.HEADER_CLOCK_SWITCH
+import com.drdisagree.iconify.common.Resources.HEADER_CLOCK_FONT_DIR
+import com.drdisagree.iconify.common.Resources.HEADER_CLOCK_LAYOUT
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.adapters.ClockPreviewAdapter
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.models.ClockModel
+import com.drdisagree.iconify.ui.preferences.FilePickerPreference
+import com.drdisagree.iconify.ui.preferences.RecyclerPreference
+import com.drdisagree.iconify.utils.FileUtils.getRealPath
+import com.drdisagree.iconify.utils.FileUtils.launchFilePicker
+import com.drdisagree.iconify.utils.FileUtils.moveToIconifyHiddenDir
+
+class HeaderClock : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_header_clock)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_header_clock
+
+ override val hasMenu: Boolean
+ get() = true
+
+ private var startActivityIntent = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ if (result.resultCode == Activity.RESULT_OK) {
+ val data = result.data
+ val path = getRealPath(data)
+
+ if (path != null && moveToIconifyHiddenDir(path, HEADER_CLOCK_FONT_DIR)) {
+ putBoolean(HEADER_CLOCK_FONT_SWITCH, false)
+ putBoolean(HEADER_CLOCK_FONT_SWITCH, true)
+
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_applied),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_rename_file),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+ }
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ HEADER_CLOCK_SWITCH -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ findPreference(HEADER_CLOCK_STYLE)?.apply {
+ setAdapter(initHeaderClockStyles())
+ setPreference(HEADER_CLOCK_STYLE, 0)
+ }
+
+ findPreference("xposed_headerclockfontpicker")?.apply {
+ setOnButtonClick {
+ launchFilePicker(context, "font", startActivityIntent)
+ }
+ }
+ }
+
+ @SuppressLint("DiscouragedApi")
+ private fun initHeaderClockStyles(): ClockPreviewAdapter {
+ val headerClock = ArrayList()
+ var maxIndex = 0
+
+ while (requireContext()
+ .resources
+ .getIdentifier(
+ HEADER_CLOCK_LAYOUT + maxIndex,
+ "layout",
+ BuildConfig.APPLICATION_ID
+ ) != 0
+ ) {
+ maxIndex++
+ }
+
+ for (i in 0 until maxIndex) {
+ headerClock.add(
+ ClockModel(
+ if (i == 0) {
+ requireContext().getString(R.string.clock_none)
+ } else {
+ requireContext().getString(R.string.clock_style_name, i)
+ },
+ requireContext()
+ .resources
+ .getIdentifier(
+ HEADER_CLOCK_LAYOUT + i,
+ "layout",
+ BuildConfig.APPLICATION_ID
+ )
+ )
+ )
+ }
+
+ return ClockPreviewAdapter(
+ requireContext(),
+ headerClock,
+ HEADER_CLOCK_SWITCH,
+ HEADER_CLOCK_STYLE
+ )
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/HeaderImage.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/HeaderImage.kt
new file mode 100644
index 000000000..f224e76be
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/HeaderImage.kt
@@ -0,0 +1,69 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.app.Activity
+import android.os.Bundle
+import android.widget.Toast
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.contract.ActivityResultContracts
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.HEADER_IMAGE_SWITCH
+import com.drdisagree.iconify.common.Resources.HEADER_IMAGE_DIR
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.preferences.FilePickerPreference
+import com.drdisagree.iconify.utils.FileUtils.getRealPath
+import com.drdisagree.iconify.utils.FileUtils.launchFilePicker
+import com.drdisagree.iconify.utils.FileUtils.moveToIconifyHiddenDir
+
+class HeaderImage : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_header_image)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_header_image
+
+ override val hasMenu: Boolean
+ get() = true
+
+ private var startActivityIntent = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ if (result.resultCode == Activity.RESULT_OK) {
+ val data = result.data
+ val path = getRealPath(data)
+
+ if (path != null && moveToIconifyHiddenDir(path, HEADER_IMAGE_DIR)) {
+ putBoolean(HEADER_IMAGE_SWITCH, false)
+ putBoolean(HEADER_IMAGE_SWITCH, true)
+
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_applied),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_rename_file),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ findPreference("xposed_headerimagepicker")?.apply {
+ setOnButtonClick {
+ launchFilePicker(context, "image", startActivityIntent)
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LocationBrowse.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LocationBrowse.kt
new file mode 100644
index 000000000..d7be85936
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LocationBrowse.kt
@@ -0,0 +1,245 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.annotation.SuppressLint
+import android.content.Context
+import android.net.Uri
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.text.Editable
+import android.text.Spannable
+import android.text.SpannableString
+import android.text.TextWatcher
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.MenuItem
+import android.view.View
+import android.view.ViewGroup
+import android.widget.EditText
+import android.widget.FrameLayout
+import android.widget.TextView
+import androidx.appcompat.app.AppCompatActivity
+import androidx.fragment.app.setFragmentResult
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.ui.activities.MainActivity.Companion.popCurrentFragment
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.drawables.TintedDrawableSpan
+import com.drdisagree.iconify.utils.NetworkUtils
+import com.drdisagree.iconify.utils.weather.WeatherConfig
+import com.google.android.material.appbar.MaterialToolbar
+import org.json.JSONObject
+import java.util.Locale
+import java.util.concurrent.ExecutorService
+import java.util.concurrent.Executors
+
+open class LocationBrowse : BaseFragment() {
+
+ private val mLocationBrowseList: MutableList = ArrayList()
+ private var mAdapter: LocationListAdapter? = null
+ private val mExecutorService: ExecutorService = Executors.newSingleThreadExecutor()
+ private val mHandler = Handler(Looper.getMainLooper())
+ private var mQueryString: String? = null
+ private var mProgressBar: FrameLayout? = null
+
+ private val mQueryRunnable = Runnable {
+ mExecutorService.submit {
+ getLocations(mQueryString)
+ }
+ }
+
+ private open class LocationBrowseItem(
+ val cityExt: String,
+ private val mCountryId: String,
+ val city: String,
+ val lat: Double,
+ val lon: Double
+ ) {
+ protected val id: String
+ get() = "$city,$mCountryId"
+
+ override fun equals(other: Any?): Boolean {
+ return (other is LocationBrowseItem) && this.id == other.id
+ }
+
+ override fun hashCode(): Int {
+ var result = cityExt.hashCode()
+ result = 31 * result + mCountryId.hashCode()
+ result = 31 * result + city.hashCode()
+ result = 31 * result + lat.hashCode()
+ result = 31 * result + lon.hashCode()
+ return result
+ }
+ }
+
+ inner class LocationListAdapter : RecyclerView.Adapter() {
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
+ val inflater = LayoutInflater.from(parent.context)
+ return ViewHolder(
+ inflater.inflate(
+ R.layout.view_list_item_location_browse,
+ parent,
+ false
+ )
+ )
+ }
+
+ override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+ val city = mLocationBrowseList[position]
+
+ holder.itemView.findViewById(R.id.location_city).text = city.city
+ holder.itemView.findViewById(R.id.location_city_ext).text = city.cityExt
+
+ holder.itemView.setOnClickListener {
+ WeatherConfig.apply {
+ setLocationId(requireContext(), city.lat.toString(), city.lon.toString())
+ setLocationName(requireContext(), city.city)
+ }
+ val resultBundle = Bundle().apply {
+ putString(DATA_LOCATION_NAME, city.city)
+ putDouble(DATA_LOCATION_LAT, city.lat)
+ putDouble(DATA_LOCATION_LON, city.lon)
+ }
+ setFragmentResult(DATA_LOCATION_KEY, resultBundle)
+ popCurrentFragment(parentFragmentManager)
+ }
+ }
+
+ override fun getItemCount(): Int = mLocationBrowseList.size
+
+ inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view)
+ }
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ return inflater.inflate(R.layout.fragment_xposed_location_browse, container, false)
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+
+ val toolbar: MaterialToolbar = view.findViewById(R.id.toolbar)
+ toolbar.setTitle(R.string.custom_location_title)
+ (activity as AppCompatActivity).setSupportActionBar(toolbar)
+ (activity as AppCompatActivity).supportActionBar?.setDisplayHomeAsUpEnabled(true)
+
+ mProgressBar = view.findViewById(R.id.query_progressbar)
+
+ val queryPattern: EditText = view.findViewById(R.id.query_pattern_text)
+ queryPattern.addTextChangedListener(object : TextWatcher {
+ override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
+
+ @SuppressLint("NotifyDataSetChanged")
+ override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
+ mHandler.removeCallbacks(mQueryRunnable)
+ mQueryString = s.toString()
+ if (mQueryString.isNullOrEmpty()) {
+ hideProgress()
+ mLocationBrowseList.clear()
+ mAdapter?.notifyDataSetChanged()
+ } else {
+ showProgress()
+ mHandler.postDelayed(mQueryRunnable, 750)
+ }
+ }
+
+ override fun afterTextChanged(s: Editable) {}
+ })
+
+ mAdapter = LocationListAdapter()
+ val queryList: RecyclerView = view.findViewById(R.id.query_result)
+ queryList.adapter = mAdapter
+ queryList.layoutManager = LinearLayoutManager(requireContext())
+ }
+
+ @Deprecated("Deprecated in Java")
+ @Suppress("deprecation")
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ when (item.itemId) {
+ android.R.id.home -> {
+ activity?.finish()
+ return true
+ }
+
+ else -> return super.onOptionsItemSelected(item)
+ }
+ }
+
+ @SuppressLint("NotifyDataSetChanged")
+ protected fun getLocations(input: String?) {
+ mLocationBrowseList.clear()
+
+ try {
+ val lang = Locale.getDefault().language.replaceFirst("_".toRegex(), "-")
+ val url = String.format(URL_PLACES, Uri.encode(input?.trim { it <= ' ' }), lang)
+ val response: String = NetworkUtils.downloadUrlMemoryAsString(url)
+ val jsonResults = JSONObject(response).getJSONArray("geonames")
+ val count = jsonResults.length()
+ Log.d(TAG, "URL = $url returning a response of count = $count")
+
+ for (i in 0 until count) {
+ val result = jsonResults.getJSONObject(i)
+
+ val population = if (result.has("population")) result.getInt("population") else 0
+ if (population == 0) continue
+
+ val city = result.getString("name")
+ val country = result.getString("countryName")
+ val countryId = result.getString("countryId")
+ val adminName = if (result.has("adminName1")) result.getString("adminName1") else ""
+ val cityExt = (if (adminName.isNullOrEmpty()) "" else "$adminName, ") + country
+ val lat = result.getDouble("lat")
+ val lon = result.getDouble("lng")
+
+ val locationItem = LocationBrowseItem(cityExt, countryId, city, lat, lon)
+ if (!mLocationBrowseList.contains(locationItem)) {
+ mLocationBrowseList.add(locationItem)
+ if (mLocationBrowseList.size == 5) break
+ }
+ }
+ } catch (e: Exception) {
+ Log.e(TAG, "Received malformed location data input=$input", e)
+ } finally {
+ mHandler.post {
+ hideProgress()
+ mAdapter?.notifyDataSetChanged()
+ }
+ }
+ }
+
+ private fun showProgress() {
+ mProgressBar?.visibility = View.VISIBLE
+ }
+
+ private fun hideProgress() {
+ mProgressBar?.visibility = View.GONE
+ }
+
+ companion object {
+ private val TAG = LocationBrowse::class.java.simpleName
+
+ const val DATA_LOCATION_KEY = "locationRequestKey"
+ const val DATA_LOCATION_NAME = "location_name"
+ const val DATA_LOCATION_LAT = "location_lat"
+ const val DATA_LOCATION_LON = "location_lon"
+
+ private const val URL_PLACES =
+ "https://secure.geonames.org/searchJSON?name_startsWith=%s&lang=%s&username=omnijaws&maxRows=20"
+
+ fun prefixTextWithIcon(context: Context, iconRes: Int, msg: CharSequence): CharSequence {
+ // Update the hint to contain the icon.
+ // Prefix the original hint with two spaces. The first space gets replaced by the icon
+ // using span. The second space is used for a singe space character between the hint
+ // and the icon.
+ val spanned = SpannableString(" $msg")
+ spanned.setSpan(
+ TintedDrawableSpan(context, iconRes),
+ 0, 1, Spannable.SPAN_EXCLUSIVE_INCLUSIVE
+ )
+ return spanned
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenClock.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenClock.kt
new file mode 100644
index 000000000..10e499c83
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenClock.kt
@@ -0,0 +1,148 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.annotation.SuppressLint
+import android.app.Activity
+import android.os.Bundle
+import android.widget.Toast
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.contract.ActivityResultContracts
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Dynamic.isAtleastA14
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_FONT_SWITCH
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_STYLE
+import com.drdisagree.iconify.common.Preferences.LSCLOCK_SWITCH
+import com.drdisagree.iconify.common.Resources.LOCKSCREEN_CLOCK_LAYOUT
+import com.drdisagree.iconify.common.Resources.LSCLOCK_FONT_DIR
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.adapters.ClockPreviewAdapter
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.models.ClockModel
+import com.drdisagree.iconify.ui.preferences.FilePickerPreference
+import com.drdisagree.iconify.ui.preferences.RecyclerPreference
+import com.drdisagree.iconify.utils.FileUtils.getRealPath
+import com.drdisagree.iconify.utils.FileUtils.launchFilePicker
+import com.drdisagree.iconify.utils.FileUtils.moveToIconifyHiddenDir
+import com.topjohnwu.superuser.Shell
+
+class LockscreenClock : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_lockscreen_clock)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_lockscreen_clock
+
+ override val hasMenu: Boolean
+ get() = true
+
+ private var startActivityIntent = registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result: ActivityResult ->
+ if (result.resultCode == Activity.RESULT_OK) {
+ val data = result.data
+ val path = getRealPath(data)
+
+ if (path != null && moveToIconifyHiddenDir(path, LSCLOCK_FONT_DIR)) {
+ putBoolean(LSCLOCK_FONT_SWITCH, false)
+ putBoolean(LSCLOCK_FONT_SWITCH, true)
+
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_applied),
+ Toast.LENGTH_SHORT
+ ).show()
+ } else {
+ Toast.makeText(
+ appContext,
+ appContextLocale.resources.getString(R.string.toast_rename_file),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+ }
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ LSCLOCK_SWITCH -> {
+ if (getBoolean(key) && isAtleastA14) {
+ Shell.cmd(
+ "settings put secure lock_screen_custom_clock_face default"
+ ).exec()
+ }
+
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ findPreference(LSCLOCK_STYLE)?.apply {
+ setAdapter(initLockscreenClockStyles())
+ setPreference(LSCLOCK_STYLE, 0)
+ }
+
+ findPreference("xposed_lockscreenclockfontpicker")?.apply {
+ setOnButtonClick {
+ launchFilePicker(context, "font", startActivityIntent)
+ }
+ }
+ }
+
+ @SuppressLint("DiscouragedApi")
+ private fun initLockscreenClockStyles(): ClockPreviewAdapter {
+ val lsClock = ArrayList()
+ var maxIndex = 0
+
+ while (requireContext()
+ .resources
+ .getIdentifier(
+ LOCKSCREEN_CLOCK_LAYOUT + maxIndex,
+ "layout",
+ BuildConfig.APPLICATION_ID
+ ) != 0
+ ) {
+ maxIndex++
+ }
+
+ for (i in 0 until maxIndex) {
+ lsClock.add(
+ ClockModel(
+ if (i == 0) {
+ requireContext().getString(R.string.clock_none)
+ } else {
+ requireContext().getString(R.string.clock_style_name, i)
+ },
+ requireContext()
+ .resources
+ .getIdentifier(
+ LOCKSCREEN_CLOCK_LAYOUT + i,
+ "layout",
+ BuildConfig.APPLICATION_ID
+ )
+ )
+ )
+ }
+
+ return ClockPreviewAdapter(
+ requireContext(),
+ lsClock,
+ LSCLOCK_SWITCH,
+ LSCLOCK_STYLE
+ )
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenWeather.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenWeather.kt
new file mode 100644
index 000000000..39a9159da
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenWeather.kt
@@ -0,0 +1,61 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.WEATHER_OWM_KEY
+import com.drdisagree.iconify.common.Preferences.WEATHER_PROVIDER
+import com.drdisagree.iconify.common.Preferences.WEATHER_SWITCH
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.WeatherPreferenceFragment
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+
+class LockscreenWeather : WeatherPreferenceFragment() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_lockscreen_weather)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_lockscreen_weather
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun getMainSwitchKey(): String {
+ return WEATHER_SWITCH
+ }
+
+ private fun showOwnKeyDialog() {
+ MaterialAlertDialogBuilder(requireContext())
+ .setTitle(appContextLocale.getString(R.string.weather_provider_owm_key_title))
+ .setMessage(appContextLocale.getString(R.string.weather_provider_owm_key_message))
+ .setCancelable(false)
+ .setPositiveButton(appContextLocale.getString(R.string.understood), null)
+ .create()
+ .show()
+ }
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ WEATHER_SWITCH -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+
+ WEATHER_PROVIDER -> {
+ if (RPrefs.getString(WEATHER_PROVIDER) == "1" && RPrefs.getString(WEATHER_OWM_KEY)
+ .isNullOrEmpty()
+ ) {
+ showOwnKeyDialog()
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenWidget.kt
new file mode 100644
index 000000000..a4a3be7fd
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/LockscreenWidget.kt
@@ -0,0 +1,143 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.os.Bundle
+import android.text.TextUtils
+import androidx.preference.Preference
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.EXTRA_WIDGET_1_KEY
+import com.drdisagree.iconify.common.Preferences.EXTRA_WIDGET_2_KEY
+import com.drdisagree.iconify.common.Preferences.EXTRA_WIDGET_3_KEY
+import com.drdisagree.iconify.common.Preferences.EXTRA_WIDGET_4_KEY
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_ENABLED
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_WIDGETS_EXTRAS
+import com.drdisagree.iconify.common.Preferences.MAIN_WIDGET_1_KEY
+import com.drdisagree.iconify.common.Preferences.MAIN_WIDGET_2_KEY
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.services.WeatherScheduler
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.utils.OmniJawsClient
+import com.drdisagree.iconify.utils.weather.WeatherConfig
+import java.util.stream.Collectors
+
+class LockscreenWidget : ControlledPreferenceFragmentCompat() {
+
+ private lateinit var mWeatherClient: OmniJawsClient
+
+ private val widgetKeysMap: MutableMap = HashMap()
+ private val initialWidgetKeysMap: MutableMap = HashMap()
+
+ private lateinit var mMainWidget1: Preference
+ private lateinit var mMainWidget2: Preference
+ private lateinit var mExtraWidget1: Preference
+ private lateinit var mExtraWidget2: Preference
+ private lateinit var mExtraWidget3: Preference
+ private lateinit var mExtraWidget4: Preference
+ private lateinit var mDeviceInfoWidgetPref: Preference
+
+ private var mWidgetPreferences: List? = null
+
+ override val title: String
+ get() = getString(R.string.activity_title_lockscreen_widget)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_lockscreen_widget
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ if (key == null) return
+
+ saveInitialPreferences()
+
+ var mainWidgetsList: List = listOf(
+ RPrefs.getString(MAIN_WIDGET_1_KEY, "none")!!,
+ RPrefs.getString(MAIN_WIDGET_2_KEY, "none")!!
+ )
+ var extraWidgetsList: List = listOf(
+ RPrefs.getString(EXTRA_WIDGET_1_KEY, "none")!!,
+ RPrefs.getString(EXTRA_WIDGET_2_KEY, "none")!!,
+ RPrefs.getString(EXTRA_WIDGET_3_KEY, "none")!!,
+ RPrefs.getString(EXTRA_WIDGET_4_KEY, "none")!!
+ )
+
+ mainWidgetsList = replaceEmptyWithNone(mainWidgetsList)
+ extraWidgetsList = replaceEmptyWithNone(extraWidgetsList)
+
+ val mainWidgets = TextUtils.join(",", mainWidgetsList)
+ val extraWidgets = TextUtils.join(",", extraWidgetsList)
+
+ val wasWeatherEnabled: Boolean = WeatherConfig.isEnabled(requireContext())
+
+ RPrefs.putString(LOCKSCREEN_WIDGETS, mainWidgets)
+ RPrefs.putString(LOCKSCREEN_WIDGETS_EXTRAS, extraWidgets)
+
+ val weatherEnabled =
+ mainWidgets.contains("weather") || extraWidgets.contains("weather")
+
+ if (weatherEnabled && wasWeatherEnabled && mWeatherClient.weatherInfo != null) {
+ if (System.currentTimeMillis() - mWeatherClient.weatherInfo!!.timeStamp > 3600000) {
+ WeatherScheduler.scheduleUpdateNow(requireContext())
+ }
+ } else if (weatherEnabled) {
+ WeatherScheduler.scheduleUpdates(requireContext())
+ WeatherScheduler.scheduleUpdateNow(requireContext())
+ }
+
+ when (key) {
+ LOCKSCREEN_WIDGETS_ENABLED -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ mWeatherClient = OmniJawsClient(requireContext())
+ mWeatherClient.queryWeather()
+
+ mMainWidget1 = findPreference(MAIN_WIDGET_1_KEY)!!
+ mMainWidget2 = findPreference(MAIN_WIDGET_2_KEY)!!
+ mExtraWidget1 = findPreference(EXTRA_WIDGET_1_KEY)!!
+ mExtraWidget2 = findPreference(EXTRA_WIDGET_2_KEY)!!
+ mExtraWidget3 = findPreference(EXTRA_WIDGET_3_KEY)!!
+ mExtraWidget4 = findPreference(EXTRA_WIDGET_4_KEY)!!
+ mDeviceInfoWidgetPref = findPreference(LOCKSCREEN_WIDGETS_DEVICE_WIDGET)!!
+
+ mWidgetPreferences = listOf(
+ mMainWidget1,
+ mMainWidget2,
+ mExtraWidget1,
+ mExtraWidget2,
+ mExtraWidget3,
+ mExtraWidget4,
+ mDeviceInfoWidgetPref
+ )
+ }
+
+ private fun replaceEmptyWithNone(inputList: List): MutableList {
+ return inputList.stream()
+ .map { s: String? -> if (TextUtils.isEmpty(s)) "none" else s }
+ .collect(Collectors.toList())
+ }
+
+ private fun saveInitialPreferences() {
+ initialWidgetKeysMap.clear()
+
+ for (widgetPref in mWidgetPreferences!!) {
+ initialWidgetKeysMap[widgetPref] = widgetKeysMap[widgetPref]
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/OpQsHeader.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/OpQsHeader.kt
new file mode 100644
index 000000000..2516bc889
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/OpQsHeader.kt
@@ -0,0 +1,40 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_EXPANSION_Y
+import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_HIDE_STOCK_MEDIA
+import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_SWITCH
+import com.drdisagree.iconify.common.Preferences.OP_QS_HEADER_TOP_MARGIN
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+
+class OpQsHeader : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_op_qs_header)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_op_qs_header
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ OP_QS_HEADER_SWITCH,
+ OP_QS_HEADER_HIDE_STOCK_MEDIA,
+ OP_QS_HEADER_TOP_MARGIN,
+ OP_QS_HEADER_EXPANSION_Y -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Others.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Others.kt
new file mode 100644
index 000000000..3887042cf
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Others.kt
@@ -0,0 +1,52 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.os.Build
+import android.os.Bundle
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.FIXED_STATUS_ICONS_SWITCH
+import com.drdisagree.iconify.common.Preferences.FIXED_STATUS_ICONS_TOPMARGIN
+import com.drdisagree.iconify.common.Preferences.HIDE_LOCKSCREEN_LOCK_ICON
+import com.drdisagree.iconify.common.Preferences.HIDE_STATUS_ICONS_SWITCH
+import com.drdisagree.iconify.common.Preferences.QSPANEL_HIDE_CARRIER
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.preferences.SliderPreference
+
+class Others : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_xposed_others)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_others
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ QSPANEL_HIDE_CARRIER,
+ HIDE_STATUS_ICONS_SWITCH,
+ HIDE_LOCKSCREEN_LOCK_ICON,
+ FIXED_STATUS_ICONS_SWITCH -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ findPreference(FIXED_STATUS_ICONS_TOPMARGIN)?.setMax(250f)
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/QuickSettings.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/QuickSettings.kt
new file mode 100644
index 000000000..e2e6e17ac
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/QuickSettings.kt
@@ -0,0 +1,84 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.os.Bundle
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.CUSTOM_QS_MARGIN
+import com.drdisagree.iconify.common.Preferences.HIDE_QSLABEL_SWITCH
+import com.drdisagree.iconify.common.Preferences.HIDE_QS_ON_LOCKSCREEN
+import com.drdisagree.iconify.common.Preferences.HIDE_QS_SILENT_TEXT
+import com.drdisagree.iconify.common.Preferences.QQS_TOPMARGIN
+import com.drdisagree.iconify.common.Preferences.QS_TEXT_ALWAYS_WHITE
+import com.drdisagree.iconify.common.Preferences.QS_TEXT_FOLLOW_ACCENT
+import com.drdisagree.iconify.common.Preferences.QS_TOPMARGIN
+import com.drdisagree.iconify.common.Preferences.VERTICAL_QSTILE_SWITCH
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.preferences.SwitchPreference
+
+class QuickSettings : ControlledPreferenceFragmentCompat() {
+
+ private var alwaysWhitePreference: SwitchPreference? = null
+ private var followAccentPreference: SwitchPreference? = null
+
+ override val title: String
+ get() = getString(R.string.activity_title_quick_settings)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_quick_settings
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ VERTICAL_QSTILE_SWITCH,
+ HIDE_QSLABEL_SWITCH,
+ CUSTOM_QS_MARGIN,
+ QQS_TOPMARGIN,
+ QS_TOPMARGIN,
+ HIDE_QS_ON_LOCKSCREEN,
+ HIDE_QS_SILENT_TEXT -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+
+ QS_TEXT_ALWAYS_WHITE -> {
+ if (getBoolean(key)) {
+ putBoolean(QS_TEXT_FOLLOW_ACCENT, false)
+ followAccentPreference?.isChecked = false
+ }
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+
+ QS_TEXT_FOLLOW_ACCENT -> {
+ if (getBoolean(key)) {
+ putBoolean(QS_TEXT_ALWAYS_WHITE, false)
+ alwaysWhitePreference?.isChecked = false
+ }
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ alwaysWhitePreference = findPreference(QS_TEXT_ALWAYS_WHITE)
+ followAccentPreference = findPreference(QS_TEXT_FOLLOW_ACCENT)
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/StatusIconsChip.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/StatusIconsChip.kt
new file mode 100644
index 000000000..de79b5e26
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/StatusIconsChip.kt
@@ -0,0 +1,382 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.graphics.Color
+import android.graphics.drawable.Drawable
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.view.ViewTreeObserver
+import android.widget.CompoundButton
+import androidx.coordinatorlayout.widget.CoordinatorLayout
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_ACCENT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_END_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_GRADIENT_DIRECTION
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_PADDING_BOTTOM
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_PADDING_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_PADDING_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_PADDING_TOP
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_START_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_ACCENT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_DASH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_DASH_GAP
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_DASH_WIDTH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_SWITCH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUSBAR_CLOCK_STROKE_WIDTH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_ACCENT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_END_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_GRADIENT_DIRECTION
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_PADDING_BOTTOM
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_PADDING_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_PADDING_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_PADDING_TOP
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_RADIUS_BOTTOM_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_RADIUS_BOTTOM_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_RADIUS_TOP_LEFT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_RADIUS_TOP_RIGHT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_START_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_STROKE_ACCENT
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_STROKE_COLOR
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_STROKE_DASH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_STROKE_DASH_GAP
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_STROKE_DASH_WIDTH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_STROKE_SWITCH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_STROKE_WIDTH
+import com.drdisagree.iconify.common.Preferences.CHIP_STATUS_ICONS_STYLE_CHANGED
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.databinding.FragmentXposedStatusIconsChipBinding
+import com.drdisagree.iconify.ui.base.BaseFragment
+import com.drdisagree.iconify.ui.utils.ViewHelper.setHeader
+import com.drdisagree.iconify.xposed.modules.utils.ViewHelper.toPx
+import com.drdisagree.iconify.xposed.modules.views.ChipDrawable
+import com.drdisagree.iconify.xposed.modules.views.ChipDrawable.GradientDirection.Companion.toIndex
+import com.google.android.material.slider.Slider
+import eightbitlab.com.blurview.RenderEffectBlur
+
+class StatusIconsChip : BaseFragment() {
+
+ private lateinit var binding: FragmentXposedStatusIconsChipBinding
+
+ private var accentFillEnabled: Boolean = getBoolean(CHIP_STATUSBAR_CLOCK_ACCENT, true)
+ private var startColor: Int = getInt(CHIP_STATUSBAR_CLOCK_START_COLOR, Color.RED)
+ private var endColor: Int = getInt(CHIP_STATUSBAR_CLOCK_END_COLOR, Color.BLUE)
+ private var gradientDirection: ChipDrawable.GradientDirection =
+ ChipDrawable.GradientDirection.fromIndex(
+ getInt(
+ CHIP_STATUSBAR_CLOCK_GRADIENT_DIRECTION,
+ ChipDrawable.GradientDirection.LEFT_RIGHT.toIndex()
+ )
+ )
+ private var padding: IntArray = intArrayOf(
+ getInt(CHIP_STATUSBAR_CLOCK_PADDING_LEFT, 8),
+ getInt(CHIP_STATUSBAR_CLOCK_PADDING_TOP, 4),
+ getInt(CHIP_STATUSBAR_CLOCK_PADDING_RIGHT, 8),
+ getInt(CHIP_STATUSBAR_CLOCK_PADDING_BOTTOM, 4)
+ )
+ private var strokeEnabled: Boolean = getBoolean(CHIP_STATUSBAR_CLOCK_STROKE_SWITCH)
+ private var strokeWidth: Int = getInt(CHIP_STATUSBAR_CLOCK_STROKE_WIDTH, 2)
+ private var accentBorderEnabled: Boolean = getBoolean(CHIP_STATUSBAR_CLOCK_STROKE_ACCENT, true)
+ private var strokeColor: Int = getInt(CHIP_STATUSBAR_CLOCK_STROKE_COLOR, Color.GREEN)
+ private var dashedBorderEnabled: Boolean = getBoolean(CHIP_STATUSBAR_CLOCK_STROKE_DASH)
+ private var dashWidth: Int = getInt(CHIP_STATUSBAR_CLOCK_STROKE_DASH_WIDTH, 4)
+ private var dashGap: Int = getInt(CHIP_STATUSBAR_CLOCK_STROKE_DASH_GAP, 4)
+ private var cornerRadii = floatArrayOf(
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_LEFT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_TOP_RIGHT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_RIGHT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT, 28).toFloat(),
+ getInt(CHIP_STATUSBAR_CLOCK_RADIUS_BOTTOM_LEFT, 28).toFloat(),
+ )
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View {
+ binding = FragmentXposedStatusIconsChipBinding.inflate(inflater, container, false)
+
+ // Header
+ setHeader(
+ requireContext(),
+ getParentFragmentManager(),
+ binding.header.toolbar,
+ R.string.activity_title_clock_chip
+ )
+
+ binding.header.appBarLayout.viewTreeObserver.addOnGlobalLayoutListener(object :
+ ViewTreeObserver.OnGlobalLayoutListener {
+ override fun onGlobalLayout() {
+ binding.header.appBarLayout.viewTreeObserver.removeOnGlobalLayoutListener(this)
+
+ val windowInsetsCompat = ViewCompat.getRootWindowInsets(binding.root)
+ val statusBarHeight =
+ windowInsetsCompat?.isVisible(WindowInsetsCompat.Type.statusBars())?.let {
+ windowInsetsCompat.getInsets(WindowInsetsCompat.Type.statusBars()).top
+ } ?: 0
+
+ val headerHeight = binding.header.appBarLayout.height
+
+ val params = binding.blurView.layoutParams as CoordinatorLayout.LayoutParams
+ params.topMargin = headerHeight
+ binding.blurView.layoutParams = params
+
+ val blurViewHeight = binding.header.appBarLayout.height
+
+ binding.linearLayout.setPadding(
+ binding.linearLayout.paddingLeft,
+ blurViewHeight - statusBarHeight,
+ binding.linearLayout.paddingRight,
+ binding.linearLayout.paddingBottom
+ )
+ }
+ })
+
+ val windowBackground: Drawable? = requireActivity().window.decorView.background
+ binding.blurView.setupWith(binding.root, RenderEffectBlur())
+ .setFrameClearDrawable(windowBackground)
+ .setBlurRadius(8f)
+
+ binding.accentFillColor.isSwitchChecked = accentFillEnabled
+ binding.accentFillColor.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ accentFillEnabled = isChecked
+ updateVisibility()
+ }
+
+ binding.gradientDirection.setSelectedIndex(gradientDirection.toIndex())
+ binding.gradientDirection.setOnItemSelectedListener { index: Int ->
+ gradientDirection = ChipDrawable.GradientDirection.entries.toTypedArray()[index]
+ updateVisibility()
+ }
+
+ binding.fillStartColor.apply {
+ setColorPickerListener(
+ activity = requireActivity(),
+ defaultColor = startColor,
+ showPresets = true,
+ showAlphaSlider = true,
+ showColorShades = true
+ )
+ setOnColorSelectedListener { color: Int ->
+ startColor = color
+ updateVisibility()
+ }
+ }
+
+ binding.fillEndColor.apply {
+ setColorPickerListener(
+ activity = requireActivity(),
+ defaultColor = endColor,
+ showPresets = true,
+ showAlphaSlider = true,
+ showColorShades = true
+ )
+ setOnColorSelectedListener { color: Int ->
+ endColor = color
+ updateVisibility()
+ }
+ }
+
+ binding.enableBorder.isSwitchChecked = strokeEnabled
+ binding.enableBorder.setSwitchChangeListener { _: CompoundButton?, enabled: Boolean ->
+ strokeEnabled = enabled
+ updateVisibility()
+ }
+
+ binding.accentBorderColor.isSwitchChecked = accentBorderEnabled
+ binding.accentBorderColor.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ accentBorderEnabled = isChecked
+ updateVisibility()
+ }
+
+ binding.borderColor.apply {
+ setColorPickerListener(
+ activity = requireActivity(),
+ defaultColor = strokeColor,
+ showPresets = true,
+ showAlphaSlider = true,
+ showColorShades = true
+ )
+ setOnColorSelectedListener { color: Int ->
+ strokeColor = color
+ updateVisibility()
+ }
+ }
+
+ binding.borderThickness.sliderValue = strokeWidth
+ binding.borderThickness.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ strokeWidth = value.toInt()
+ updateVisibility()
+ }
+
+ binding.dashedBorder.isSwitchChecked = dashedBorderEnabled
+ binding.dashedBorder.setSwitchChangeListener { _: CompoundButton?, isChecked: Boolean ->
+ dashedBorderEnabled = isChecked
+ updateVisibility()
+ }
+
+ binding.dashWidth.sliderValue = dashWidth
+ binding.dashWidth.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ dashWidth = value.toInt()
+ updateVisibility()
+ }
+
+ binding.dashGap.sliderValue = dashGap
+ binding.dashGap.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ dashGap = value.toInt()
+ updateVisibility()
+ }
+
+ binding.paddingLeft.sliderValue = padding[0]
+ binding.paddingLeft.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ padding[0] = value.toInt()
+ updateVisibility()
+ }
+
+ binding.paddingRight.sliderValue = padding[2]
+ binding.paddingRight.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ padding[2] = value.toInt()
+ updateVisibility()
+ }
+
+ binding.paddingTop.sliderValue = padding[1]
+ binding.paddingTop.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ padding[1] = value.toInt()
+ updateVisibility()
+ }
+
+ binding.paddingBottom.sliderValue = padding[3]
+ binding.paddingBottom.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ padding[3] = value.toInt()
+ updateVisibility()
+ }
+
+ binding.cornerRadiusTopLeft.sliderValue = cornerRadii[0].toInt()
+ binding.cornerRadiusTopLeft.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ cornerRadii[0] = value
+ cornerRadii[1] = value
+ updateVisibility()
+ }
+
+ binding.cornerRadiusTopRight.sliderValue = cornerRadii[2].toInt()
+ binding.cornerRadiusTopRight.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ cornerRadii[2] = value
+ cornerRadii[3] = value
+ updateVisibility()
+ }
+
+ binding.cornerRadiusBottomLeft.sliderValue = cornerRadii[6].toInt()
+ binding.cornerRadiusBottomLeft.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ cornerRadii[6] = value
+ cornerRadii[7] = value
+ updateVisibility()
+ }
+
+ binding.cornerRadiusBottomRight.sliderValue = cornerRadii[4].toInt()
+ binding.cornerRadiusBottomRight.setOnSliderChangeListener { _: Slider?, value: Float, _: Boolean ->
+ cornerRadii[4] = value
+ cornerRadii[5] = value
+ updateVisibility()
+ }
+
+ binding.btnApply.setOnClickListener {
+ RPrefs.apply {
+ putBoolean(CHIP_STATUS_ICONS_ACCENT, accentFillEnabled)
+ putInt(CHIP_STATUS_ICONS_START_COLOR, startColor)
+ putInt(CHIP_STATUS_ICONS_END_COLOR, endColor)
+ putInt(CHIP_STATUS_ICONS_GRADIENT_DIRECTION, gradientDirection.toIndex())
+ putInt(CHIP_STATUS_ICONS_PADDING_LEFT, padding[0])
+ putInt(CHIP_STATUS_ICONS_PADDING_TOP, padding[1])
+ putInt(CHIP_STATUS_ICONS_PADDING_RIGHT, padding[2])
+ putInt(CHIP_STATUS_ICONS_PADDING_BOTTOM, padding[3])
+ putBoolean(CHIP_STATUS_ICONS_STROKE_SWITCH, strokeEnabled)
+ putInt(CHIP_STATUS_ICONS_STROKE_WIDTH, strokeWidth)
+ putBoolean(CHIP_STATUS_ICONS_STROKE_ACCENT, accentBorderEnabled)
+ putInt(CHIP_STATUS_ICONS_STROKE_COLOR, strokeColor)
+ putBoolean(CHIP_STATUS_ICONS_STROKE_DASH, dashedBorderEnabled)
+ putInt(CHIP_STATUS_ICONS_STROKE_DASH_WIDTH, dashWidth)
+ putInt(CHIP_STATUS_ICONS_STROKE_DASH_GAP, dashGap)
+ putInt(CHIP_STATUS_ICONS_RADIUS_TOP_LEFT, cornerRadii[0].toInt())
+ putInt(CHIP_STATUS_ICONS_RADIUS_TOP_LEFT, cornerRadii[0].toInt())
+ putInt(CHIP_STATUS_ICONS_RADIUS_TOP_RIGHT, cornerRadii[2].toInt())
+ putInt(CHIP_STATUS_ICONS_RADIUS_TOP_RIGHT, cornerRadii[2].toInt())
+ putInt(CHIP_STATUS_ICONS_RADIUS_BOTTOM_RIGHT, cornerRadii[4].toInt())
+ putInt(CHIP_STATUS_ICONS_RADIUS_BOTTOM_RIGHT, cornerRadii[4].toInt())
+ putInt(CHIP_STATUS_ICONS_RADIUS_BOTTOM_LEFT, cornerRadii[6].toInt())
+ putInt(CHIP_STATUS_ICONS_RADIUS_BOTTOM_LEFT, cornerRadii[6].toInt())
+
+ putBoolean(
+ CHIP_STATUS_ICONS_STYLE_CHANGED,
+ !getBoolean(CHIP_STATUS_ICONS_STYLE_CHANGED)
+ )
+ }
+ }
+
+ updateVisibility()
+
+ return binding.getRoot()
+ }
+
+ private fun updateVisibility() {
+ val accentFillEnabled =
+ if (binding.accentFillColor.isSwitchChecked) View.GONE else View.VISIBLE
+
+ binding.gradientDirection.visibility = accentFillEnabled
+ binding.fillStartColor.visibility = accentFillEnabled
+ binding.fillEndColor.visibility = accentFillEnabled
+
+ val borderEnabled = if (binding.enableBorder.isSwitchChecked) View.VISIBLE else View.GONE
+
+ binding.accentBorderColor.visibility = borderEnabled
+ binding.borderThickness.visibility = borderEnabled
+ binding.dashedBorder.visibility = borderEnabled
+
+ val accentBorderColor =
+ if (binding.accentBorderColor.isSwitchChecked || !binding.enableBorder.isSwitchChecked) View.GONE else View.VISIBLE
+
+ binding.borderColor.visibility = accentBorderColor
+
+ val dashedBorderEnabled = if (binding.dashedBorder.isSwitchChecked) {
+ if (!binding.enableBorder.isSwitchChecked) View.GONE else View.VISIBLE
+ } else View.GONE
+
+ binding.dashWidth.visibility = dashedBorderEnabled
+ binding.dashGap.visibility = dashedBorderEnabled
+
+ binding.previewClock.setPadding(
+ requireContext().toPx(padding[0]),
+ requireContext().toPx(padding[1]),
+ requireContext().toPx(padding[2]),
+ requireContext().toPx(padding[3])
+ )
+
+ binding.previewClock.background = ChipDrawable.createChipDrawable(
+ context = requireContext(),
+ accentFill = this.accentFillEnabled,
+ startColor = startColor,
+ endColor = endColor,
+ gradientDirection = gradientDirection,
+ padding = intArrayOf(0, 0, 0, 0),
+ strokeEnabled = strokeEnabled,
+ accentStroke = accentBorderEnabled,
+ strokeWidth = strokeWidth,
+ strokeColor = strokeColor,
+ dashedBorderEnabled = this.dashedBorderEnabled,
+ dashWidth = dashWidth,
+ dashGap = dashGap,
+ cornerRadii = cornerRadii
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Statusbar.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Statusbar.kt
new file mode 100644
index 000000000..46cea7d02
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Statusbar.kt
@@ -0,0 +1,38 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.COLORED_STATUSBAR_ICON
+import com.drdisagree.iconify.common.Preferences.HIDE_LOCKSCREEN_CARRIER
+import com.drdisagree.iconify.common.Preferences.HIDE_LOCKSCREEN_STATUSBAR
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+
+class Statusbar : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_statusbar)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_statusbar
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ COLORED_STATUSBAR_ICON,
+ HIDE_LOCKSCREEN_CARRIER,
+ HIDE_LOCKSCREEN_STATUSBAR -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Themes.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Themes.kt
new file mode 100644
index 000000000..32657963d
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Themes.kt
@@ -0,0 +1,48 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.BLACK_QSPANEL
+import com.drdisagree.iconify.common.Preferences.FIX_NOTIFICATION_COLOR
+import com.drdisagree.iconify.common.Preferences.FIX_NOTIFICATION_FOOTER_BUTTON_COLOR
+import com.drdisagree.iconify.common.Preferences.FIX_QS_TILE_COLOR
+import com.drdisagree.iconify.common.Preferences.FLUID_NOTIF_TRANSPARENCY
+import com.drdisagree.iconify.common.Preferences.FLUID_POWERMENU_TRANSPARENCY
+import com.drdisagree.iconify.common.Preferences.FLUID_QSPANEL
+import com.drdisagree.iconify.common.Preferences.LIGHT_QSPANEL
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+
+class Themes : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_themes)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_themes
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ LIGHT_QSPANEL,
+ BLACK_QSPANEL,
+ FLUID_QSPANEL,
+ FLUID_NOTIF_TRANSPARENCY,
+ FLUID_POWERMENU_TRANSPARENCY,
+ FIX_QS_TILE_COLOR,
+ FIX_NOTIFICATION_COLOR,
+ FIX_NOTIFICATION_FOOTER_BUTTON_COLOR -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/TransparencyBlur.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/TransparencyBlur.kt
new file mode 100644
index 000000000..11bee5aae
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/TransparencyBlur.kt
@@ -0,0 +1,116 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.os.Bundle
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.AGGRESSIVE_QSPANEL_BLUR_SWITCH
+import com.drdisagree.iconify.common.Preferences.BLUR_RADIUS_VALUE
+import com.drdisagree.iconify.common.Preferences.LOCKSCREEN_SHADE_SWITCH
+import com.drdisagree.iconify.common.Preferences.NOTIF_TRANSPARENCY_SWITCH
+import com.drdisagree.iconify.common.Preferences.QSPANEL_BLUR_SWITCH
+import com.drdisagree.iconify.common.Preferences.QS_TRANSPARENCY_SWITCH
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.preferences.SwitchPreference
+import com.drdisagree.iconify.utils.SystemUtils.disableBlur
+import com.drdisagree.iconify.utils.SystemUtils.enableBlur
+import com.drdisagree.iconify.utils.SystemUtils.isBlurEnabled
+
+class TransparencyBlur : ControlledPreferenceFragmentCompat() {
+
+ private var transparentQsPreference: SwitchPreference? = null
+ private var transparentNotificationPreference: SwitchPreference? = null
+
+ override val title: String
+ get() = getString(R.string.activity_title_transparency_blur)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_transparency_blur
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ QS_TRANSPARENCY_SWITCH -> {
+ if (getBoolean(key)) {
+ putBoolean(NOTIF_TRANSPARENCY_SWITCH, false)
+ transparentNotificationPreference?.isChecked = false
+ }
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+
+ NOTIF_TRANSPARENCY_SWITCH -> {
+ if (getBoolean(key)) {
+ putBoolean(QS_TRANSPARENCY_SWITCH, false)
+ transparentQsPreference?.isChecked = false
+ }
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+
+ LOCKSCREEN_SHADE_SWITCH -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+
+ QSPANEL_BLUR_SWITCH -> {
+ if (getBoolean(key)) {
+ enableBlur(force = false)
+ } else {
+ putBoolean(AGGRESSIVE_QSPANEL_BLUR_SWITCH, false)
+ disableBlur(force = false)
+ }
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresDeviceRestart = true
+ )
+ }
+
+ AGGRESSIVE_QSPANEL_BLUR_SWITCH -> {
+ if (getBoolean(key)) {
+ enableBlur(force = true)
+ } else {
+ disableBlur(force = true)
+ }
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresDeviceRestart = true
+ )
+ }
+
+ BLUR_RADIUS_VALUE -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ transparentQsPreference = findPreference(QS_TRANSPARENCY_SWITCH)
+ transparentNotificationPreference = findPreference(NOTIF_TRANSPARENCY_SWITCH)
+
+ findPreference(QSPANEL_BLUR_SWITCH)?.isChecked =
+ isBlurEnabled(force = false)
+
+ findPreference(AGGRESSIVE_QSPANEL_BLUR_SWITCH)?.isChecked =
+ isBlurEnabled(force = true)
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/VolumePanel.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/VolumePanel.kt
new file mode 100644
index 000000000..d2aa01614
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/VolumePanel.kt
@@ -0,0 +1,39 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.os.Bundle
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.VOLUME_PANEL_PERCENTAGE
+import com.drdisagree.iconify.ui.activities.MainActivity
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+
+class VolumePanel : ControlledPreferenceFragmentCompat() {
+
+ override val title: String
+ get() = getString(R.string.activity_title_volume_panel)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_volume_panel
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ VOLUME_PANEL_PERCENTAGE -> {
+ MainActivity.showOrHidePendingActionButton(
+ activityBinding = (requireActivity() as MainActivity).binding,
+ requiresSystemUiRestart = true
+ )
+ }
+ }
+ }
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/WeatherSettings.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/WeatherSettings.kt
new file mode 100644
index 000000000..5e97c2c4e
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/WeatherSettings.kt
@@ -0,0 +1,52 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.WEATHER_OWM_KEY
+import com.drdisagree.iconify.common.Preferences.WEATHER_PROVIDER
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.ui.base.WeatherPreferenceFragment
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+
+class WeatherSettings : WeatherPreferenceFragment() {
+
+ override fun getMainSwitchKey(): String {
+ return ""
+ }
+
+ override val title: String
+ get() = getString(R.string.activity_title_xposed_weather_settings)
+
+ override val backButtonEnabled: Boolean
+ get() = true
+
+ override val layoutResource: Int
+ get() = R.xml.xposed_weather_settings
+
+ override val hasMenu: Boolean
+ get() = true
+
+ private fun showOwnKeyDialog() {
+ MaterialAlertDialogBuilder(requireContext())
+ .setTitle(appContextLocale.getString(R.string.weather_provider_owm_key_title))
+ .setMessage(appContextLocale.getString(R.string.weather_provider_owm_key_message))
+ .setCancelable(false)
+ .setPositiveButton(appContextLocale.getString(R.string.understood), null)
+ .create()
+ .show()
+ }
+
+ override fun updateScreen(key: String?) {
+ super.updateScreen(key)
+
+ when (key) {
+ WEATHER_PROVIDER -> {
+ if (RPrefs.getString(WEATHER_PROVIDER) == "1" && RPrefs.getString(WEATHER_OWM_KEY)
+ .isNullOrEmpty()
+ ) {
+ showOwnKeyDialog()
+ }
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Xposed.kt b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Xposed.kt
new file mode 100644
index 000000000..73fd6b740
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/fragments/xposed/Xposed.kt
@@ -0,0 +1,60 @@
+package com.drdisagree.iconify.ui.fragments.xposed
+
+import android.content.ComponentName
+import android.content.Intent
+import android.os.Bundle
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences
+import com.drdisagree.iconify.common.Preferences.XPOSED_HOOK_CHECK
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+import com.drdisagree.iconify.ui.preferences.HookCheckPreference
+
+class Xposed : ControlledPreferenceFragmentCompat() {
+
+ private var hookCheckPreference: HookCheckPreference? = null
+
+ override val title: String
+ get() = getString(R.string.navbar_xposed)
+
+ override val backButtonEnabled: Boolean
+ get() = !Preferences.isXposedOnlyMode
+
+ override val layoutResource: Int
+ get() = R.xml.xposed
+
+ override val hasMenu: Boolean
+ get() = true
+
+ override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
+ super.onCreatePreferences(savedInstanceState, rootKey)
+
+ findPreference(XPOSED_HOOK_CHECK)?.apply {
+ hookCheckPreference = this
+
+ setOnPreferenceClickListener {
+ try {
+ val intent = Intent(Intent.ACTION_MAIN)
+ intent.setComponent(
+ ComponentName(
+ "org.lsposed.manager",
+ "org.lsposed.manager.ui.activities.MainActivity"
+ )
+ )
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ startActivity(intent)
+ } catch (ignored: Exception) {
+ }
+ true
+ }
+
+ initializeHookCheck()
+ }
+ }
+
+ override fun onResume() {
+ super.onResume()
+
+ hookCheckPreference?.isHooked = false
+ hookCheckPreference?.initializeHookCheck()
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/models/IconPackModel.kt b/app/src/main/java/com/drdisagree/iconify/ui/models/IconPackModel.kt
index 11031a53b..3a058b728 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/models/IconPackModel.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/models/IconPackModel.kt
@@ -1,10 +1,38 @@
package com.drdisagree.iconify.ui.models
-class IconPackModel(
- var name: String,
- var desc: Int,
- var icon1: Int,
- var icon2: Int,
- var icon3: Int,
- var icon4: Int
-)
+import android.graphics.drawable.Drawable
+
+data class IconPackModel(
+ var name: String? = null,
+ var desc: Int = 0,
+ var icon1: Int = 0,
+ var icon2: Int = 0,
+ var icon3: Int = 0,
+ var icon4: Int = 0,
+ var drawableIcon1: Drawable? = null,
+ var drawableIcon2: Drawable? = null,
+ var drawableIcon3: Drawable? = null,
+ var drawableIcon4: Drawable? = null,
+ var isEnabled: Boolean = false
+) {
+ var packageName: String? = null
+
+ constructor(
+ packName: String?,
+ pkgName: String,
+ icon1: Drawable?,
+ icon2: Drawable?,
+ icon3: Drawable?,
+ icon4: Drawable?,
+ isEnabled: Boolean
+ ) : this(
+ name = packName,
+ drawableIcon1 = icon1,
+ drawableIcon2 = icon2,
+ drawableIcon3 = icon3,
+ drawableIcon4 = icon4,
+ isEnabled = isEnabled
+ ) {
+ this.packageName = pkgName
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/models/IconShapeModel.kt b/app/src/main/java/com/drdisagree/iconify/ui/models/IconShapeModel.kt
new file mode 100644
index 000000000..2a19f1aa4
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/models/IconShapeModel.kt
@@ -0,0 +1,7 @@
+package com.drdisagree.iconify.ui.models
+
+class IconShapeModel (
+ var style: Int,
+ var title: Int,
+ var selected: Boolean = false
+)
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/models/InfoModel.kt b/app/src/main/java/com/drdisagree/iconify/ui/models/InfoModel.kt
index c17e7fdd4..c909ae865 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/models/InfoModel.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/models/InfoModel.kt
@@ -8,19 +8,11 @@ import android.view.View
class InfoModel {
var context: Context? = null
-
- @JvmField
var icon = 0
-
- @JvmField
var layout = 0
-
- @JvmField
var title: String? = null
-
- @JvmField
var desc: String? = null
- private var onClickListener: View.OnClickListener? = null
+ var onClickListener: View.OnClickListener? = null
constructor(title: String?) {
this.title = title
@@ -48,44 +40,4 @@ class InfoModel {
this.icon = icon
this.onClickListener = onClickListener
}
-
- fun getIcon(): Int {
- return icon
- }
-
- fun setIcon(icon: Int) {
- this.icon = icon
- }
-
- fun getTitle(): String? {
- return title
- }
-
- fun setTitle(title: String?) {
- this.title = title
- }
-
- fun getDesc(): String? {
- return desc
- }
-
- fun setDesc(desc: String?) {
- this.desc = desc
- }
-
- fun getOnClickListener(): View.OnClickListener? {
- return onClickListener
- }
-
- fun setOnClickListener(onClickListener: View.OnClickListener?) {
- this.onClickListener = onClickListener
- }
-
- fun getLayout(): Int {
- return layout
- }
-
- fun setLayout(layout: Int) {
- this.layout = layout
- }
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/models/MenuModel.kt b/app/src/main/java/com/drdisagree/iconify/ui/models/MenuModel.kt
index fc0d7ff22..996f49fe8 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/models/MenuModel.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/models/MenuModel.kt
@@ -1,7 +1,9 @@
package com.drdisagree.iconify.ui.models
+import androidx.fragment.app.Fragment
+
class MenuModel(
- var id: Int,
+ var fragment: Fragment,
var title: String,
var desc: String,
var icon: Int
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/models/SearchPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/ui/models/SearchPreferenceItem.kt
new file mode 100644
index 000000000..c0abb1dc0
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/models/SearchPreferenceItem.kt
@@ -0,0 +1,12 @@
+package com.drdisagree.iconify.ui.models
+
+import androidx.annotation.StringRes
+import androidx.annotation.XmlRes
+import com.drdisagree.iconify.ui.base.ControlledPreferenceFragmentCompat
+
+class SearchPreferenceItem(
+ @field:XmlRes val xml: Int,
+ @field:StringRes val title: Int,
+ val fragment: ControlledPreferenceFragmentCompat,
+ val shouldAdd: Boolean = true
+)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/models/ToastModel.kt b/app/src/main/java/com/drdisagree/iconify/ui/models/ToastModel.kt
new file mode 100644
index 000000000..45b1669a0
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/models/ToastModel.kt
@@ -0,0 +1,7 @@
+package com.drdisagree.iconify.ui.models
+
+class ToastModel (
+ var style: Int,
+ var title: String,
+ var selected: Boolean = false
+)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/BottomSheetListPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/BottomSheetListPreference.kt
new file mode 100644
index 000000000..bd1d6d77c
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/BottomSheetListPreference.kt
@@ -0,0 +1,199 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.graphics.drawable.Drawable
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.annotation.DrawableRes
+import androidx.recyclerview.widget.GridLayoutManager
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import androidx.preference.ListPreference
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.ui.adapters.ListPreferenceAdapter
+import com.google.android.material.appbar.MaterialToolbar
+import com.google.android.material.bottomsheet.BottomSheetDialog
+
+class BottomSheetListPreference : ListPreference {
+
+ private var mEntryIcons: IntArray? = null
+ private var mEntryDrawables: Array? = null
+ private var mHasImages = false
+ private var mAdapter: ListPreferenceAdapter? = null
+ private var bottomSheetDialog: BottomSheetDialog? = null
+ private var recyclerView: RecyclerView? = null
+
+ constructor(
+ context: Context,
+ attrs: AttributeSet?,
+ defStyleAttr: Int,
+ defStyleRes: Int
+ ) : super(context, attrs, defStyleAttr, defStyleRes) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ initResource()
+ }
+
+ constructor(context: Context) : super(context) {
+ initResource()
+ }
+
+ private fun initResource() {
+ layoutResource = R.layout.custom_preference_list
+ }
+
+ fun setDrawables(@DrawableRes drawables: IntArray) {
+ mHasImages = true
+ mEntryIcons = drawables
+ }
+
+ fun setDrawables(drawables: Array) {
+ mHasImages = true
+ mEntryDrawables = drawables
+ }
+
+ fun setHasImages(hasImages: Boolean) {
+ mHasImages = hasImages
+ }
+
+ fun setAdapter(adapter: ListPreferenceAdapter?) {
+ mAdapter = adapter
+ }
+
+ fun setAdapterType(type: Int) {
+ if (mAdapter != null) mAdapter!!.type = type
+ }
+
+ fun setImages(images: List) {
+ if (mAdapter != null) {
+ mAdapter!!.setImages(images)
+ }
+ }
+
+ fun setDefaultAdapterListener() {
+ mAdapter!!.setListener(object : ListPreferenceAdapter.OnItemClickListener {
+
+ override fun onItemClick(view: View?, position: Int) {
+ if (callChangeListener(entryValues[position].toString())) {
+ setValueIndex(position)
+ }
+ if (bottomSheetDialog != null) bottomSheetDialog!!.dismiss()
+ }
+ })
+ }
+
+ protected override fun onClick() {
+ bottomSheetDialog = BottomSheetDialog(context)
+
+ val view: View = LayoutInflater.from(context)
+ .inflate(R.layout.view_bottom_sheet_dialog_layout, null as ViewGroup?)
+ recyclerView = view.findViewById(R.id.select_dialog_listview)
+ val toolbarPref = view.findViewById(R.id.toolbar_preference)
+ toolbarPref.setTitle(title)
+ toolbarPref.isTitleCentered = true
+ if (mAdapter != null && mAdapter!!.type == ListPreferenceAdapter.TYPE_BATTERY_ICONS) {
+ recyclerView!!.setLayoutManager(GridLayoutManager(context, 3))
+ } else {
+ recyclerView!!.setLayoutManager(LinearLayoutManager(context))
+ }
+ if (mAdapter == null) {
+ mAdapter = ListPreferenceAdapter(
+ entries,
+ entryValues,
+ mEntryIcons,
+ key,
+ mHasImages,
+ object : ListPreferenceAdapter.OnItemClickListener {
+ override fun onItemClick(view: View?, position: Int) {
+ if (callChangeListener(entryValues[position].toString())) {
+ setValueIndex(position)
+ }
+ }
+ }
+ )
+ }
+ recyclerView!!.setAdapter(mAdapter)
+ bottomSheetDialog!!.setContentView(view)
+ bottomSheetDialog!!.show()
+ }
+
+ private fun getValueIndex(): Int {
+ return findIndexOfValue(value)
+ }
+
+ override fun setValueIndex(index: Int) {
+ setValue(entryValues[index].toString())
+ }
+
+ fun createDefaultAdapter() {
+ mAdapter = ListPreferenceAdapter(
+ entries,
+ entryValues,
+ mEntryIcons,
+ key,
+ mHasImages,
+ object : ListPreferenceAdapter.OnItemClickListener {
+ override fun onItemClick(view: View?, position: Int) {
+ if (callChangeListener(entryValues[position].toString())) {
+ setValueIndex(position)
+ }
+ }
+ }
+ )
+ }
+
+ fun createDefaultAdapter(drawables: Array) {
+ mHasImages = true
+ mEntryDrawables = drawables
+ mAdapter = ListPreferenceAdapter(
+ entries,
+ entryValues,
+ drawables,
+ key,
+ mHasImages,
+ object : ListPreferenceAdapter.OnItemClickListener {
+ override fun onItemClick(view: View?, position: Int) {
+ if (callChangeListener(entryValues[position].toString())) {
+ setValueIndex(position)
+ }
+ }
+ }
+ )
+ }
+
+ fun createDefaultAdapter(drawables: Array, listener: OnItemClickListener?) {
+ mHasImages = true
+ mEntryDrawables = drawables
+ mAdapter = ListPreferenceAdapter(
+ entries,
+ entryValues,
+ drawables,
+ key,
+ mHasImages,
+ object : ListPreferenceAdapter.OnItemClickListener {
+ override fun onItemClick(view: View?, position: Int) {
+ if (callChangeListener(entryValues[position].toString())) {
+ setValueIndex(position)
+ }
+ listener?.onItemClick(position)
+ }
+ }
+ )
+ }
+
+ interface OnItemClickListener {
+ fun onItemClick(position: Int)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/ColorPreference.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/ColorPreference.java
new file mode 100644
index 000000000..3c1f47d3c
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/ColorPreference.java
@@ -0,0 +1,225 @@
+package com.drdisagree.iconify.ui.preferences;
+
+import android.content.Context;
+import android.content.ContextWrapper;
+import android.content.res.TypedArray;
+import android.graphics.Color;
+import android.util.AttributeSet;
+
+import androidx.annotation.ColorInt;
+import androidx.annotation.NonNull;
+import androidx.fragment.app.FragmentActivity;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceViewHolder;
+
+import com.jaredrummler.android.colorpicker.R;
+import com.jaredrummler.android.colorpicker.ColorPanelView;
+import com.jaredrummler.android.colorpicker.ColorPickerDialog;
+import com.jaredrummler.android.colorpicker.ColorPickerDialogListener;
+import com.jaredrummler.android.colorpicker.ColorShape;
+
+public class ColorPreference extends Preference implements ColorPickerDialogListener {
+
+ private static final int SIZE_NORMAL = 0;
+ private static final int SIZE_LARGE = 1;
+
+ private OnShowDialogListener onShowDialogListener;
+ private int color = Color.BLACK;
+ private boolean showDialog;
+ private int dialogType;
+ private int colorShape;
+ private boolean allowPresets;
+ private boolean allowCustom;
+ private boolean showAlphaSlider;
+ private boolean showColorShades;
+ private int previewSize;
+ private int[] presets;
+ private int dialogTitle;
+
+ public ColorPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init(attrs);
+ }
+
+ public ColorPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init(attrs);
+ }
+
+ private void init(AttributeSet attrs) {
+ setPersistent(true);
+
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ColorPreference);
+ showDialog = a.getBoolean(R.styleable.ColorPreference_cpv_showDialog, true);
+ dialogType = a.getInt(R.styleable.ColorPreference_cpv_dialogType, ColorPickerDialog.TYPE_PRESETS);
+ colorShape = a.getInt(R.styleable.ColorPreference_cpv_colorShape, ColorShape.CIRCLE);
+ allowPresets = a.getBoolean(R.styleable.ColorPreference_cpv_allowPresets, true);
+ allowCustom = a.getBoolean(R.styleable.ColorPreference_cpv_allowCustom, true);
+ showAlphaSlider = a.getBoolean(R.styleable.ColorPreference_cpv_showAlphaSlider, false);
+ showColorShades = a.getBoolean(R.styleable.ColorPreference_cpv_showColorShades, true);
+ previewSize = a.getInt(R.styleable.ColorPreference_cpv_previewSize, SIZE_NORMAL);
+ final int presetsResId = a.getResourceId(R.styleable.ColorPreference_cpv_colorPresets, 0);
+ dialogTitle = a.getResourceId(R.styleable.ColorPreference_cpv_dialogTitle, R.string.cpv_default_title);
+ if (presetsResId != 0) {
+ presets = getContext().getResources().getIntArray(presetsResId);
+ } else {
+ presets = ColorPickerDialog.MATERIAL_COLORS;
+ }
+ if (colorShape == ColorShape.CIRCLE) {
+ setWidgetLayoutResource(
+ previewSize == SIZE_LARGE ? R.layout.cpv_preference_circle_large : R.layout.cpv_preference_circle);
+ } else {
+ setWidgetLayoutResource(
+ previewSize == SIZE_LARGE ? R.layout.cpv_preference_square_large : R.layout.cpv_preference_square);
+ }
+ a.recycle();
+
+ initResource();
+ }
+
+ private void initResource() {
+ setLayoutResource(com.drdisagree.iconify.R.layout.custom_preference_color);
+ }
+
+ @Override
+ protected void onClick() {
+ super.onClick();
+ if (onShowDialogListener != null) {
+ onShowDialogListener.onShowColorPickerDialog((String) getTitle(), color);
+ } else if (showDialog) {
+ ColorPickerDialog dialog = ColorPickerDialog.newBuilder()
+ .setDialogType(dialogType)
+ .setDialogTitle(dialogTitle)
+ .setColorShape(colorShape)
+ .setPresets(presets)
+ .setAllowPresets(allowPresets)
+ .setAllowCustom(allowCustom)
+ .setShowAlphaSlider(showAlphaSlider)
+ .setShowColorShades(showColorShades)
+ .setColor(color)
+ .create();
+ dialog.setColorPickerDialogListener(this);
+ getActivity().getSupportFragmentManager()
+ .beginTransaction()
+ .add(dialog, getFragmentTag())
+ .commitAllowingStateLoss();
+ }
+ }
+
+ public FragmentActivity getActivity() {
+ Context context = getContext();
+ if (context instanceof FragmentActivity) {
+ return (FragmentActivity) context;
+ } else if (context instanceof ContextWrapper) {
+ Context baseContext = ((ContextWrapper) context).getBaseContext();
+ if (baseContext instanceof FragmentActivity) {
+ return (FragmentActivity) baseContext;
+ }
+ }
+ throw new IllegalStateException("Error getting activity from context");
+ }
+
+ @Override
+ public void onAttached() {
+ super.onAttached();
+ if (showDialog) {
+ ColorPickerDialog fragment =
+ (ColorPickerDialog) getActivity().getSupportFragmentManager().findFragmentByTag(getFragmentTag());
+ if (fragment != null) {
+ // re-bind preference to fragment
+ fragment.setColorPickerDialogListener(this);
+ }
+ }
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull PreferenceViewHolder holder) {
+ super.onBindViewHolder(holder);
+
+ ColorPanelView preview = holder.itemView.findViewById(R.id.cpv_preference_preview_color_panel);
+ if (preview != null) {
+ preview.setColor(color);
+ }
+ }
+
+ @Override
+ protected void onSetInitialValue(Object defaultValue) {
+ super.onSetInitialValue(defaultValue);
+ if (defaultValue instanceof Integer) {
+ color = (Integer) defaultValue;
+ persistInt(color);
+ } else {
+ color = getPersistedInt(0xFF000000);
+ }
+ }
+
+ @Override
+ protected Object onGetDefaultValue(TypedArray a, int index) {
+ return a.getInteger(index, Color.BLACK);
+ }
+
+ @Override
+ public void onColorSelected(int dialogId, @ColorInt int color) {
+ saveValue(color);
+ }
+
+ @Override
+ public void onDialogDismissed(int dialogId) {
+ // no-op
+ }
+
+ /**
+ * Set the new color
+ *
+ * @param color The newly selected color
+ */
+ public void saveValue(@ColorInt int color) {
+ this.color = color;
+ persistInt(this.color);
+ notifyChanged();
+ callChangeListener(color);
+ }
+
+ /**
+ * Get the colors that will be shown in the {@link ColorPickerDialog}.
+ *
+ * @return An array of color ints
+ */
+ public int[] getPresets() {
+ return presets;
+ }
+
+ /**
+ * Set the colors shown in the {@link ColorPickerDialog}.
+ *
+ * @param presets An array of color ints
+ */
+ public void setPresets(@NonNull int[] presets) {
+ this.presets = presets;
+ }
+
+ /**
+ * The listener used for showing the {@link ColorPickerDialog}.
+ * Call {@link #saveValue(int)} after the user chooses a color.
+ * If this is set then it is up to you to show the dialog.
+ *
+ * @param listener The listener to show the dialog
+ */
+ public void setOnShowDialogListener(OnShowDialogListener listener) {
+ onShowDialogListener = listener;
+ }
+
+ /**
+ * The tag used for the {@link ColorPickerDialog}.
+ *
+ * @return The tag
+ */
+ public String getFragmentTag() {
+ return "color_" + getKey();
+ }
+
+ public interface OnShowDialogListener {
+
+ void onShowColorPickerDialog(String title, int currentColor);
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/EditTextPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/EditTextPreference.kt
new file mode 100644
index 000000000..23a2e91b0
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/EditTextPreference.kt
@@ -0,0 +1,38 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import androidx.preference.EditTextPreference
+import com.drdisagree.iconify.R
+
+class EditTextPreference : EditTextPreference {
+
+ constructor(
+ context: Context,
+ attrs: AttributeSet?,
+ defStyleAttr: Int,
+ defStyleRes: Int
+ ) : super(context, attrs, defStyleAttr, defStyleRes) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ initResource()
+ }
+
+ constructor(context: Context) : super(context) {
+ initResource()
+ }
+
+ private fun initResource() {
+ layoutResource = R.layout.custom_preference_edit_text
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/FilePickerPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/FilePickerPreference.kt
new file mode 100644
index 000000000..3681b9ff4
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/FilePickerPreference.kt
@@ -0,0 +1,76 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import android.widget.TextView
+import androidx.core.content.ContextCompat
+import androidx.preference.Preference
+import androidx.preference.PreferenceViewHolder
+import com.drdisagree.iconify.R
+import com.google.android.material.button.MaterialButton
+
+class FilePickerPreference : Preference {
+
+ private var mOnClick: () -> Unit? = {}
+ private var mButtonText = ""
+
+ constructor(
+ context: Context,
+ attrs: AttributeSet?,
+ defStyleAttr: Int,
+ defStyleRes: Int
+ ) : super(context, attrs, defStyleAttr, defStyleRes) {
+ init(attrs)
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ init(attrs)
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ init(attrs)
+ }
+
+ constructor(context: Context) : super(context) {
+ init(null)
+ }
+
+ private fun init(attrs: AttributeSet?) {
+ isSelectable = false
+ layoutResource = R.layout.custom_preference_filepicker
+
+ attrs?.let { it ->
+ val a = context.obtainStyledAttributes(it, R.styleable.FilePickerPreference)
+ val customText: String? = a.getString(R.styleable.FilePickerPreference_buttonText)
+ mButtonText =
+ customText ?: a.getResourceId(R.styleable.FilePickerPreference_buttonText, 0)
+ .takeIf { it != 0 }
+ ?.let { context.getString(it) } ?: context.getString(R.string.btn_pick_image)
+ a.recycle()
+ }
+ }
+
+ override fun onBindViewHolder(holder: PreferenceViewHolder) {
+ super.onBindViewHolder(holder)
+
+ if (isEnabled) {
+ holder.itemView.findViewById(android.R.id.title)?.apply {
+ setTextColor(ContextCompat.getColor(context, R.color.textColorPrimary))
+ }
+ }
+
+ holder.itemView.findViewById(R.id.btn_picker)?.apply {
+ text = mButtonText
+ this.isEnabled = isEnabled
+ setOnClickListener { mOnClick.invoke() }
+ }
+ }
+
+ fun setOnButtonClick(onClick: () -> Unit) {
+ mOnClick = onClick
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/FooterPreference.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/FooterPreference.java
new file mode 100644
index 000000000..0850005fc
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/FooterPreference.java
@@ -0,0 +1,296 @@
+package com.drdisagree.iconify.ui.preferences;
+
+import android.content.Context;
+import android.text.SpannableString;
+import android.text.TextUtils;
+import android.text.style.URLSpan;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.StringRes;
+import androidx.annotation.VisibleForTesting;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceViewHolder;
+
+import com.drdisagree.iconify.R;
+
+/**
+ * A custom preference acting as "footer" of a page. It has a field for icon and text. It is added
+ * to screen as the last preference.
+ */
+public class FooterPreference extends Preference {
+
+ public static final String KEY_FOOTER = "footer_preference";
+ static final int ORDER_FOOTER = Integer.MAX_VALUE - 1;
+ @VisibleForTesting
+ View.OnClickListener mLearnMoreListener;
+ @VisibleForTesting
+ int mIconVisibility = View.VISIBLE;
+ private CharSequence mContentDescription;
+ private CharSequence mLearnMoreText;
+ private FooterLearnMoreSpan mLearnMoreSpan;
+
+ public FooterPreference(Context context, AttributeSet attrs) {
+ super(context, attrs, R.attr.footerPreferenceStyle);
+ init();
+ }
+
+ public FooterPreference(Context context) {
+ this(context, null);
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull PreferenceViewHolder holder) {
+ super.onBindViewHolder(holder);
+ TextView title = holder.itemView.findViewById(android.R.id.title);
+ if (title != null && !TextUtils.isEmpty(mContentDescription)) {
+ title.setContentDescription(mContentDescription);
+ }
+
+ TextView learnMore = holder.itemView.findViewById(R.id.settingslib_learn_more);
+ if (learnMore != null) {
+ if (mLearnMoreListener != null) {
+ learnMore.setVisibility(View.VISIBLE);
+ if (TextUtils.isEmpty(mLearnMoreText)) {
+ mLearnMoreText = learnMore.getText();
+ } else {
+ learnMore.setText(mLearnMoreText);
+ }
+ SpannableString learnMoreText = new SpannableString(mLearnMoreText);
+ if (mLearnMoreSpan != null) {
+ learnMoreText.removeSpan(mLearnMoreSpan);
+ }
+ mLearnMoreSpan = new FooterLearnMoreSpan(mLearnMoreListener);
+ learnMoreText.setSpan(mLearnMoreSpan, 0,
+ learnMoreText.length(), 0);
+ learnMore.setText(learnMoreText);
+ } else {
+ learnMore.setVisibility(View.GONE);
+ }
+ }
+
+ View icon = holder.itemView.findViewById(R.id.icon_frame);
+ if (icon != null) {
+ icon.setVisibility(mIconVisibility);
+ }
+ }
+
+ @Override
+ public void setSummary(CharSequence summary) {
+ setTitle(summary);
+ }
+
+ @Override
+ public void setSummary(int summaryResId) {
+ setTitle(summaryResId);
+ }
+
+ @Override
+ public CharSequence getSummary() {
+ return getTitle();
+ }
+
+ /**
+ * To set content description of the {@link FooterPreference}. This can use for talkback
+ * environment if developer wants to have a customization content.
+ *
+ * @param contentDescription The resource id of the content description.
+ */
+ public void setContentDescription(CharSequence contentDescription) {
+ if (!TextUtils.equals(mContentDescription, contentDescription)) {
+ mContentDescription = contentDescription;
+ notifyChanged();
+ }
+ }
+
+ /**
+ * Return the content description of footer preference.
+ */
+ @VisibleForTesting
+ CharSequence getContentDescription() {
+ return mContentDescription;
+ }
+
+ /**
+ * Sets the learn more text.
+ *
+ * @param learnMoreText The string of the learn more text.
+ */
+ public void setLearnMoreText(CharSequence learnMoreText) {
+ if (!TextUtils.equals(mLearnMoreText, learnMoreText)) {
+ mLearnMoreText = learnMoreText;
+ notifyChanged();
+ }
+ }
+
+ /**
+ * Assign an action for the learn more link.
+ */
+ public void setLearnMoreAction(View.OnClickListener listener) {
+ if (mLearnMoreListener != listener) {
+ mLearnMoreListener = listener;
+ notifyChanged();
+ }
+ }
+
+ /**
+ * Set visibility of footer icon.
+ */
+ public void setIconVisibility(int iconVisibility) {
+ if (mIconVisibility == iconVisibility) {
+ return;
+ }
+ mIconVisibility = iconVisibility;
+ notifyChanged();
+ }
+
+ private void init() {
+ setLayoutResource(R.layout.preference_footer);
+ if (getIcon() == null) {
+ setIcon(R.drawable.ic_info);
+ }
+ setOrder(ORDER_FOOTER);
+ if (TextUtils.isEmpty(getKey())) {
+ setKey(KEY_FOOTER);
+ }
+ setSelectable(false);
+ }
+
+ /**
+ * The builder is convenient to creat a dynamic FooterPreference.
+ */
+ public static class Builder {
+ private Context mContext;
+ private String mKey;
+ private CharSequence mTitle;
+ private CharSequence mContentDescription;
+ private CharSequence mLearnMoreText;
+
+ public Builder(@NonNull Context context) {
+ mContext = context;
+ }
+
+ /**
+ * To set the key value of the {@link FooterPreference}.
+ *
+ * @param key The key value.
+ */
+ public Builder setKey(@NonNull String key) {
+ mKey = key;
+ return this;
+ }
+
+ /**
+ * To set the title of the {@link FooterPreference}.
+ *
+ * @param title The title.
+ */
+ public Builder setTitle(CharSequence title) {
+ mTitle = title;
+ return this;
+ }
+
+ /**
+ * To set the title of the {@link FooterPreference}.
+ *
+ * @param titleResId The resource id of the title.
+ */
+ public Builder setTitle(@StringRes int titleResId) {
+ mTitle = mContext.getText(titleResId);
+ return this;
+ }
+
+ /**
+ * To set content description of the {@link FooterPreference}. This can use for talkback
+ * environment if developer wants to have a customization content.
+ *
+ * @param contentDescription The resource id of the content description.
+ */
+ public Builder setContentDescription(CharSequence contentDescription) {
+ mContentDescription = contentDescription;
+ return this;
+ }
+
+ /**
+ * To set content description of the {@link FooterPreference}. This can use for talkback
+ * environment if developer wants to have a customization content.
+ *
+ * @param contentDescriptionResId The resource id of the content description.
+ */
+ public Builder setContentDescription(@StringRes int contentDescriptionResId) {
+ mContentDescription = mContext.getText(contentDescriptionResId);
+ return this;
+ }
+
+ /**
+ * To set learn more string of the learn more text. This can use for talkback
+ * environment if developer wants to have a customization content.
+ *
+ * @param learnMoreText The resource id of the learn more string.
+ */
+ public Builder setLearnMoreText(CharSequence learnMoreText) {
+ mLearnMoreText = learnMoreText;
+ return this;
+ }
+
+ /**
+ * To set learn more string of the {@link FooterPreference}. This can use for talkback
+ * environment if developer wants to have a customization content.
+ *
+ * @param learnMoreTextResId The resource id of the learn more string.
+ */
+ public Builder setLearnMoreText(@StringRes int learnMoreTextResId) {
+ mLearnMoreText = mContext.getText(learnMoreTextResId);
+ return this;
+ }
+
+
+ /**
+ * To generate the {@link FooterPreference}.
+ */
+ public FooterPreference build() {
+ final FooterPreference footerPreference = new FooterPreference(mContext);
+ footerPreference.setSelectable(false);
+ if (TextUtils.isEmpty(mTitle)) {
+ throw new IllegalArgumentException("Footer title cannot be empty!");
+ }
+ footerPreference.setTitle(mTitle);
+ if (!TextUtils.isEmpty(mKey)) {
+ footerPreference.setKey(mKey);
+ }
+
+ if (!TextUtils.isEmpty(mContentDescription)) {
+ footerPreference.setContentDescription(mContentDescription);
+ }
+
+ if (!TextUtils.isEmpty(mLearnMoreText)) {
+ footerPreference.setLearnMoreText(mLearnMoreText);
+ }
+ return footerPreference;
+ }
+ }
+
+ /**
+ * A {@link URLSpan} that opens a support page when clicked
+ */
+ static class FooterLearnMoreSpan extends URLSpan {
+
+ private final View.OnClickListener mClickListener;
+
+ FooterLearnMoreSpan(View.OnClickListener clickListener) {
+ // sets the url to empty string so we can prevent any other span processing from
+ // clearing things we need in this string.
+ super("");
+ mClickListener = clickListener;
+ }
+
+ @Override
+ public void onClick(View widget) {
+ if (mClickListener != null) {
+ mClickListener.onClick(widget);
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/HomeCardPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/HomeCardPreference.kt
new file mode 100644
index 000000000..e8624d791
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/HomeCardPreference.kt
@@ -0,0 +1,29 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import androidx.preference.Preference
+import androidx.preference.PreferenceViewHolder
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Preferences.SHOW_HOME_CARD
+import com.drdisagree.iconify.config.RPrefs
+import com.google.android.material.button.MaterialButton
+
+class HomeCardPreference(context: Context, attrs: AttributeSet?) : Preference(context, attrs) {
+
+ override fun onBindViewHolder(holder: PreferenceViewHolder) {
+ super.onBindViewHolder(holder)
+
+ holder.itemView.findViewById(R.id.button).setOnClickListener {
+ holder.itemView
+ .animate()
+ .setDuration(400)
+ .translationX(holder.itemView.width * 2f)
+ .alpha(0f)
+ .withEndAction {
+ RPrefs.putBoolean(SHOW_HOME_CARD, false)
+ }
+ .start()
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/HookCheckPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/HookCheckPreference.kt
new file mode 100644
index 000000000..3aaf2dcdf
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/HookCheckPreference.kt
@@ -0,0 +1,175 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.annotation.SuppressLint
+import android.content.BroadcastReceiver
+import android.content.ComponentName
+import android.content.Context
+import android.content.DialogInterface
+import android.content.Intent
+import android.content.IntentFilter
+import android.os.Build
+import android.os.CountDownTimer
+import android.os.Handler
+import android.os.Looper
+import android.util.AttributeSet
+import android.widget.ImageView
+import androidx.preference.Preference
+import androidx.preference.PreferenceViewHolder
+import com.drdisagree.iconify.Iconify.Companion.appContextLocale
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const.ACTION_HOOK_CHECK_REQUEST
+import com.drdisagree.iconify.common.Const.ACTION_HOOK_CHECK_RESULT
+import com.drdisagree.iconify.common.Preferences
+import com.drdisagree.iconify.common.Preferences.XPOSED_HOOK_CHECK
+import com.drdisagree.iconify.config.RPrefs
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+
+class HookCheckPreference(context: Context, attrs: AttributeSet?) : Preference(context, attrs) {
+
+ private val handler = Handler(Looper.getMainLooper())
+ private val delayedHandler = Handler(Looper.getMainLooper())
+ private val intentFilterHookedSystemUI = IntentFilter()
+ private var isHookSuccessful = false
+ var isHooked: Boolean = false
+
+ init {
+ intentFilterHookedSystemUI.addAction(ACTION_HOOK_CHECK_RESULT)
+ }
+
+ override fun onBindViewHolder(holder: PreferenceViewHolder) {
+ super.onBindViewHolder(holder)
+
+ holder.itemView.setOnClickListener {
+ try {
+ context.startActivity(
+ Intent(Intent.ACTION_MAIN).apply {
+ setComponent(
+ ComponentName(
+ "org.lsposed.manager",
+ "org.lsposed.manager.ui.activity.MainActivity"
+ )
+ )
+ addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ }
+ )
+ } catch (ignored: Exception) {
+ }
+ }
+
+ holder.itemView.findViewById(R.id.info_icon).setOnClickListener {
+ MaterialAlertDialogBuilder(context)
+ .setTitle(context.resources.getString(R.string.attention))
+ .setMessage(
+ buildString {
+ append(
+ (if (Preferences.isXposedOnlyMode) {
+ appContextLocale.resources.getString(
+ R.string.xposed_only_desc
+ ) + "\n\n"
+ } else {
+ ""
+ })
+ )
+ append(appContextLocale.resources.getString(R.string.lsposed_warn))
+ }
+ )
+ .setPositiveButton(context.resources.getString(R.string.understood)) { dialog: DialogInterface, _: Int ->
+ dialog.dismiss()
+ }
+ .setCancelable(true)
+ .show()
+ }
+ }
+
+ @SuppressLint("UnspecifiedRegisterReceiverFlag")
+ fun initializeHookCheck() {
+ delayedHandler.postDelayed(delayedHookCheck, 1000)
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ context.registerReceiver(
+ receiverHookedSystemUI,
+ intentFilterHookedSystemUI,
+ Context.RECEIVER_EXPORTED
+ )
+ } else {
+ context.registerReceiver(
+ receiverHookedSystemUI,
+ intentFilterHookedSystemUI
+ )
+ }
+
+ handler.post(checkSystemUIHooked)
+ }
+
+ private val delayedHookCheck: Runnable = Runnable {
+ if (!isHooked) {
+ RPrefs.putBoolean(XPOSED_HOOK_CHECK, false)
+ }
+ }
+
+ private val checkSystemUIHooked: Runnable = object : Runnable {
+ override fun run() {
+ checkXposedHooked()
+// handler.postDelayed(this, 1000) // repeat check every 1 second
+ }
+ }
+
+ private val receiverHookedSystemUI: BroadcastReceiver = object : BroadcastReceiver() {
+ override fun onReceive(context: Context, intent: Intent) {
+ if (intent.action == ACTION_HOOK_CHECK_RESULT) {
+ isHookSuccessful = true
+
+ try {
+ delayedHandler.removeCallbacks(delayedHookCheck)
+ } catch (ignored: Exception) {
+ }
+
+ isHooked = true
+
+ RPrefs.putBoolean(XPOSED_HOOK_CHECK, true)
+ }
+ }
+ }
+
+ private fun checkXposedHooked() {
+ isHookSuccessful = false
+
+ object : CountDownTimer(1600, 800) {
+ override fun onTick(millisUntilFinished: Long) {
+ if (isHookSuccessful) {
+ cancel()
+ }
+ }
+
+ override fun onFinish() {
+ if (!isHookSuccessful) {
+ try {
+ delayedHandler.removeCallbacks(delayedHookCheck)
+ } catch (ignored: Exception) {
+ }
+
+ isHooked = false
+
+ RPrefs.putBoolean(XPOSED_HOOK_CHECK, false)
+ }
+ }
+ }.start()
+
+ Thread {
+ try {
+ context.sendBroadcast(Intent().setAction(ACTION_HOOK_CHECK_REQUEST))
+ } catch (ignored: Exception) {
+ }
+ }.start()
+ }
+
+ override fun onDetached() {
+ super.onDetached()
+ try {
+ handler.removeCallbacks(checkSystemUIHooked)
+ delayedHandler.removeCallbacks(delayedHookCheck)
+ context.unregisterReceiver(receiverHookedSystemUI)
+ } catch (ignored: Exception) {
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/LinkTextView.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/LinkTextView.java
new file mode 100644
index 000000000..ffc6917cc
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/LinkTextView.java
@@ -0,0 +1,35 @@
+package com.drdisagree.iconify.ui.preferences;
+
+import android.content.Context;
+import android.text.Spanned;
+import android.text.method.LinkMovementMethod;
+import android.text.style.ClickableSpan;
+import android.util.AttributeSet;
+
+/**
+ * Copied from setup wizard. This TextView performed two functions. The first is to make it so the
+ * link behaves properly and becomes clickable. The second was that it made the link visible to
+ * accessibility services, but from O forward support for links is provided natively.
+ */
+public class LinkTextView extends androidx.appcompat.widget.AppCompatTextView {
+
+ public LinkTextView(Context context) {
+ this(context, null);
+ }
+
+ public LinkTextView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public void setText(CharSequence text, BufferType type) {
+ super.setText(text, type);
+ if (text instanceof Spanned) {
+ final ClickableSpan[] spans =
+ ((Spanned) text).getSpans(0, text.length(), ClickableSpan.class);
+ if (spans.length > 0) {
+ setMovementMethod(LinkMovementMethod.getInstance());
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/ListPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/ListPreference.kt
new file mode 100644
index 000000000..76edb34ae
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/ListPreference.kt
@@ -0,0 +1,38 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import androidx.preference.ListPreference
+import com.drdisagree.iconify.R
+
+class ListPreference : ListPreference {
+
+ constructor(
+ context: Context,
+ attrs: AttributeSet?,
+ defStyleAttr: Int,
+ defStyleRes: Int
+ ) : super(context, attrs, defStyleAttr, defStyleRes) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ initResource()
+ }
+
+ constructor(context: Context) : super(context) {
+ initResource()
+ }
+
+ private fun initResource() {
+ layoutResource = R.layout.custom_preference_list
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/PreferenceCategory.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/PreferenceCategory.kt
new file mode 100644
index 000000000..2e0499e2e
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/PreferenceCategory.kt
@@ -0,0 +1,38 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import androidx.preference.PreferenceCategory
+import com.drdisagree.iconify.R
+
+class PreferenceCategory : PreferenceCategory {
+
+ constructor(
+ context: Context,
+ attrs: AttributeSet?,
+ defStyleAttr: Int,
+ defStyleRes: Int
+ ) : super(context, attrs, defStyleAttr, defStyleRes) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ initResource()
+ }
+
+ constructor(context: Context) : super(context) {
+ initResource()
+ }
+
+ private fun initResource() {
+ layoutResource = R.layout.custom_preference_category
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/PreferenceMenu.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/PreferenceMenu.kt
new file mode 100644
index 000000000..1809ccaa4
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/PreferenceMenu.kt
@@ -0,0 +1,53 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.View
+import androidx.preference.Preference
+import androidx.preference.PreferenceViewHolder
+import com.drdisagree.iconify.R
+
+class PreferenceMenu : Preference {
+
+ private var showArrow = true
+
+ constructor(
+ context: Context,
+ attrs: AttributeSet?,
+ defStyleAttr: Int,
+ defStyleRes: Int
+ ) : super(context, attrs, defStyleAttr, defStyleRes) {
+ init(attrs)
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ init(attrs)
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ init(attrs)
+ }
+
+ constructor(context: Context) : super(context) {
+ init(null)
+ }
+
+ private fun init(attrs: AttributeSet?) {
+ if (attrs != null) {
+ val a = context.obtainStyledAttributes(attrs, R.styleable.PreferenceMenu)
+ showArrow = a.getBoolean(R.styleable.PreferenceMenu_showArrow, true)
+ a.recycle()
+ }
+ layoutResource = R.layout.custom_preference_menu
+ }
+
+ override fun onBindViewHolder(holder: PreferenceViewHolder) {
+ super.onBindViewHolder(holder)
+
+ holder.findViewById(R.id.end_arrow)?.visibility = if (showArrow) View.VISIBLE else View.GONE
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/RebootReminderPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/RebootReminderPreference.kt
new file mode 100644
index 000000000..f003c8ca1
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/RebootReminderPreference.kt
@@ -0,0 +1,30 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.os.Handler
+import android.os.Looper
+import android.util.AttributeSet
+import androidx.preference.Preference
+import androidx.preference.PreferenceViewHolder
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.utils.SystemUtils.restartDevice
+
+class RebootReminderPreference(context: Context, attrs: AttributeSet?) :
+ Preference(context, attrs) {
+
+ override fun onBindViewHolder(holder: PreferenceViewHolder) {
+ super.onBindViewHolder(holder)
+
+ holder.findViewById(R.id.btn_reboot).setOnClickListener {
+ val rebootingDialog = LoadingDialog(context)
+
+ rebootingDialog.show(context.resources.getString(R.string.rebooting_desc))
+
+ Handler(Looper.getMainLooper()).postDelayed({
+ rebootingDialog.hide()
+ restartDevice()
+ }, 5000)
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/RecyclerPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/RecyclerPreference.kt
new file mode 100644
index 000000000..8ab7708c2
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/RecyclerPreference.kt
@@ -0,0 +1,84 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import android.widget.TextView
+import androidx.core.content.ContextCompat
+import androidx.preference.Preference
+import androidx.preference.PreferenceViewHolder
+import androidx.recyclerview.widget.LinearSnapHelper
+import androidx.recyclerview.widget.RecyclerView
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.ui.utils.CarouselLayoutManager
+
+class RecyclerPreference : Preference {
+
+ private var mRecyclerView: RecyclerView? = null
+ private var mAdapter: RecyclerView.Adapter<*>? = null
+ private var mKey: String? = null
+ private var mDefaultValue = 0
+
+ constructor(
+ context: Context,
+ attrs: AttributeSet?,
+ defStyleAttr: Int,
+ defStyleRes: Int
+ ) : super(context, attrs, defStyleAttr, defStyleRes) {
+ init()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ init()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ init()
+ }
+
+ constructor(context: Context) : super(context) {
+ init()
+ }
+
+ private fun init() {
+ isSelectable = false
+ layoutResource = R.layout.custom_preference_recyclerview
+ }
+
+ override fun onBindViewHolder(holder: PreferenceViewHolder) {
+ super.onBindViewHolder(holder)
+
+ mRecyclerView = (holder.findViewById(R.id.recycler_view) as RecyclerView).apply {
+ layoutManager = CarouselLayoutManager(
+ context, RecyclerView.HORIZONTAL, false
+ ).also {
+ it.setMinifyDistance(0.8f)
+ }
+ adapter = mAdapter
+ setHasFixedSize(true);
+ scrollToPosition(RPrefs.getInt(mKey, mDefaultValue))
+ if (onFlingListener == null) {
+ LinearSnapHelper().attachToRecyclerView(this)
+ }
+ suppressLayout(!isEnabled)
+ }
+
+ if (isEnabled) {
+ val title = holder.itemView.findViewById(android.R.id.title)
+ title.setTextColor(ContextCompat.getColor(context, R.color.textColorPrimary))
+ }
+ }
+
+ fun setPreference(key: String?, defaultValue: Int) {
+ mKey = key
+ mDefaultValue = defaultValue
+ }
+
+ fun setAdapter(adapter: RecyclerView.Adapter<*>?) {
+ mAdapter = adapter
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/SelectorWithWidgetPreference.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/SelectorWithWidgetPreference.java
new file mode 100644
index 000000000..eb0506fef
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/SelectorWithWidgetPreference.java
@@ -0,0 +1,186 @@
+package com.drdisagree.iconify.ui.preferences;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.ImageView;
+
+import androidx.annotation.NonNull;
+import androidx.preference.CheckBoxPreference;
+import androidx.preference.PreferenceViewHolder;
+
+import com.drdisagree.iconify.R;
+
+public class SelectorWithWidgetPreference extends CheckBoxPreference {
+
+ /**
+ * Interface definition for a callback to be invoked when the preference is clicked.
+ */
+ public interface OnClickListener {
+ /**
+ * Called when a preference has been clicked.
+ *
+ * @param emiter The clicked preference
+ */
+ void onRadioButtonClicked(SelectorWithWidgetPreference emiter);
+ }
+
+ private OnClickListener mListener = null;
+ private View mAppendix;
+ private int mAppendixVisibility = -1;
+
+ private View mExtraWidgetContainer;
+ private ImageView mExtraWidget;
+ private boolean mIsCheckBox = false; // whether to display this button as a checkbox
+
+ private View.OnClickListener mExtraWidgetOnClickListener;
+
+ /**
+ * Perform inflation from XML and apply a class-specific base style.
+ *
+ * @param context The {@link Context} this is associated with, through which it can
+ * access the current theme, resources, etc.
+ * @param attrs The attributes of the XML tag that is inflating the preference
+ * @param defStyle An attribute in the current theme that contains a reference to a style
+ * resource that supplies default values for the view. Can be 0 to not
+ * look for defaults.
+ */
+ public SelectorWithWidgetPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init();
+ }
+
+ /**
+ * Perform inflation from XML and apply a class-specific base style.
+ *
+ * @param context The {@link Context} this is associated with, through which it can
+ * access the current theme, resources, etc.
+ * @param attrs The attributes of the XML tag that is inflating the preference
+ */
+ public SelectorWithWidgetPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ /**
+ * Constructor to create a preference, which will display with a checkbox style.
+ *
+ * @param context The {@link Context} this is associated with.
+ * @param isCheckbox Whether this preference should display as a checkbox.
+ */
+ public SelectorWithWidgetPreference(Context context, boolean isCheckbox) {
+ super(context, null);
+ mIsCheckBox = isCheckbox;
+ init();
+ }
+
+ /**
+ * Constructor to create a preference.
+ *
+ * @param context The Context this is associated with.
+ */
+ public SelectorWithWidgetPreference(Context context) {
+ this(context, null);
+ }
+
+ /**
+ * Sets the callback to be invoked when this preference is clicked by the user.
+ *
+ * @param listener The callback to be invoked
+ */
+ public void setOnClickListener(OnClickListener listener) {
+ mListener = listener;
+ }
+
+ /**
+ * Processes a click on the preference.
+ */
+ @Override
+ public void onClick() {
+ if (mListener != null) {
+ mListener.onRadioButtonClicked(this);
+ }
+ }
+
+ /**
+ * Binds the created View to the data for this preference.
+ *
+ * This is a good place to grab references to custom Views in the layout and set
+ * properties on them.
+ *
+ *
Make sure to call through to the superclass's implementation.
+ *
+ * @param holder The ViewHolder that provides references to the views to fill in. These views
+ * will be recycled, so you should not hold a reference to them after this method
+ * returns.
+ */
+ @SuppressLint("WrongConstant")
+ @Override
+ public void onBindViewHolder(@NonNull PreferenceViewHolder holder) {
+ super.onBindViewHolder(holder);
+
+ View summaryContainer = holder.findViewById(R.id.summary_container);
+ if (summaryContainer != null) {
+ summaryContainer.setVisibility(
+ TextUtils.isEmpty(getSummary()) ? View.GONE : View.VISIBLE);
+ mAppendix = holder.findViewById(R.id.appendix);
+ if (mAppendix != null && mAppendixVisibility != -1) {
+ mAppendix.setVisibility(mAppendixVisibility);
+ }
+ }
+
+ mExtraWidget = (ImageView) holder.findViewById(R.id.selector_extra_widget);
+ mExtraWidgetContainer = holder.findViewById(R.id.selector_extra_widget_container);
+
+ setExtraWidgetOnClickListener(mExtraWidgetOnClickListener);
+ }
+
+ /**
+ * Set the visibility state of appendix view.
+ *
+ * @param visibility One of {@link View#VISIBLE}, {@link View#INVISIBLE}, or {@link View#GONE}.
+ */
+ public void setAppendixVisibility(int visibility) {
+ if (mAppendix != null) {
+ mAppendix.setVisibility(visibility);
+ }
+ mAppendixVisibility = visibility;
+ }
+
+ /**
+ * Sets the callback to be invoked when extra widget is clicked by the user.
+ *
+ * @param listener The callback to be invoked
+ */
+ public void setExtraWidgetOnClickListener(View.OnClickListener listener) {
+ mExtraWidgetOnClickListener = listener;
+
+ if (mExtraWidget == null || mExtraWidgetContainer == null) {
+ return;
+ }
+
+ mExtraWidget.setOnClickListener(mExtraWidgetOnClickListener);
+
+ mExtraWidgetContainer.setVisibility((mExtraWidgetOnClickListener != null)
+ ? View.VISIBLE : View.GONE);
+ }
+
+ /**
+ * Returns whether this preference is a checkbox.
+ */
+ public boolean isCheckBox() {
+ return mIsCheckBox;
+ }
+
+ private void init() {
+ if (mIsCheckBox) {
+ setWidgetLayoutResource(R.layout.preference_widget_checkbox);
+ } else {
+ setWidgetLayoutResource(R.layout.preference_widget_radiobutton);
+ }
+ setLayoutResource(R.layout.preference_selector_with_widget);
+ setIconSpaceReserved(false);
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/SliderPreference.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/SliderPreference.java
new file mode 100644
index 000000000..cebbff3e6
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/SliderPreference.java
@@ -0,0 +1,343 @@
+package com.drdisagree.iconify.ui.preferences;
+
+/*
+ * From Siavash79/rangesliderpreference
+ * https://github.com/siavash79/rangesliderpreference
+ */
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.res.TypedArray;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.util.JsonReader;
+import android.util.JsonWriter;
+import android.util.Log;
+import android.view.View;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceViewHolder;
+
+import com.drdisagree.iconify.utils.HapticUtils;
+import com.google.android.material.button.MaterialButton;
+import com.google.android.material.slider.LabelFormatter;
+import com.google.android.material.slider.RangeSlider;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.Objects;
+import java.util.Scanner;
+
+import com.drdisagree.iconify.R;
+
+public class SliderPreference extends Preference {
+
+ private static final String TAG = SliderPreference.class.getSimpleName();
+ private float valueFrom;
+ private float valueTo;
+ private final float tickInterval;
+ private final boolean showResetButton;
+ public final List defaultValue = new ArrayList<>();
+ public RangeSlider slider;
+ private MaterialButton mResetButton;
+ @SuppressWarnings("unused")
+ private TextView sliderValue;
+ int valueCount;
+ private String valueFormat;
+ private final float outputScale;
+ private final boolean isDecimalFormat;
+ private String decimalFormat = "#.#";
+
+ boolean updateConstantly, showValueLabel;
+
+ @SuppressWarnings("unused")
+ public SliderPreference(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ setSelectable(false);
+ }
+
+ public SliderPreference(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ setSelectable(false);
+ setLayoutResource(R.layout.custom_preference_slider);
+
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SliderPreference);
+ updateConstantly = a.getBoolean(R.styleable.SliderPreference_updatesContinuously, false);
+ valueCount = a.getInteger(R.styleable.SliderPreference_valueCount, 1);
+ valueFrom = a.getFloat(R.styleable.SliderPreference_minVal, 0f);
+ valueTo = a.getFloat(R.styleable.SliderPreference_maxVal, 100f);
+ tickInterval = a.getFloat(R.styleable.SliderPreference_tickInterval, 1f);
+ showResetButton = a.getBoolean(R.styleable.SliderPreference_showResetButton, false);
+ showValueLabel = a.getBoolean(R.styleable.SliderPreference_showValueLabel, true);
+ valueFormat = a.getString(R.styleable.SliderPreference_valueFormat);
+ isDecimalFormat = a.getBoolean(R.styleable.SliderPreference_isDecimalFormat, false);
+ if (a.hasValue(R.styleable.SliderPreference_decimalFormat)) {
+ decimalFormat = a.getString(R.styleable.SliderPreference_decimalFormat);
+ } else {
+ decimalFormat = "#.#"; // Default decimal format
+ }
+ outputScale = a.getFloat(R.styleable.SliderPreference_outputScale, 1f);
+ String defaultValStr = a.getString(androidx.preference.R.styleable.Preference_defaultValue);
+
+ if (valueFormat == null) valueFormat = "";
+
+ try {
+ Scanner scanner = new Scanner(defaultValStr);
+ scanner.useDelimiter(",");
+ scanner.useLocale(Locale.ENGLISH);
+
+ while (scanner.hasNext()) {
+ defaultValue.add(scanner.nextFloat());
+ }
+ } catch (Exception ignored) {
+ Log.e(TAG, String.format("SliderPreference: Error parsing default values for key: %s", getKey()));
+ }
+
+ a.recycle();
+ }
+
+ public void savePrefs() {
+ setValues(getSharedPreferences(), getKey(), slider.getValues());
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public static boolean setValues(SharedPreferences sharedPreferences, String key, List values) {
+ try {
+ StringWriter writer = new StringWriter();
+ JsonWriter jsonWriter = new JsonWriter(writer);
+ jsonWriter.beginObject();
+ jsonWriter.name("");
+ jsonWriter.beginArray();
+
+ for (float value : values) {
+ jsonWriter.value(value);
+ }
+ jsonWriter.endArray();
+ jsonWriter.endObject();
+ jsonWriter.close();
+ String jsonString = writer.toString();
+
+ sharedPreferences.edit().putString(key, jsonString).apply();
+
+ return true;
+
+ } catch (Exception ignored) {
+ return false;
+ }
+ }
+
+ public void syncState() {
+ boolean needsCommit = false;
+
+ List values = getValues(getSharedPreferences(), getKey(), valueFrom);
+ BigDecimal step = new BigDecimal(String.valueOf(slider.getStepSize())); //float and double are not accurate when it comes to decimal points
+
+ for (int i = 0; i < values.size(); i++) {
+ BigDecimal round = new BigDecimal(Math.round(values.get(i) / slider.getStepSize()));
+ double v = Math.min(Math.max(step.multiply(round).doubleValue(), slider.getValueFrom()), slider.getValueTo());
+ if (v != values.get(i)) {
+ values.set(i, (float) v);
+ needsCommit = true;
+ }
+ }
+ if (values.size() < valueCount) {
+ needsCommit = true;
+ values = defaultValue;
+ while (values.size() < valueCount) {
+ values.add(valueFrom);
+ }
+ } else if (values.size() > valueCount) {
+ needsCommit = true;
+ while (values.size() > valueCount) {
+ values.remove(values.size() - 1);
+ }
+ }
+
+ try {
+ slider.setValues(values);
+ if (needsCommit) savePrefs();
+ } catch (Throwable t) {
+ values.clear();
+ }
+ }
+
+ RangeSlider.OnChangeListener changeListener = (slider, value, fromUser) -> {
+ if (!getKey().equals(slider.getTag())) return;
+
+ if (updateConstantly && fromUser) {
+ savePrefs();
+ }
+ };
+
+ RangeSlider.OnSliderTouchListener sliderTouchListener = new RangeSlider.OnSliderTouchListener() {
+ @Override
+ public void onStartTrackingTouch(@NonNull RangeSlider slider) {
+ slider.setLabelFormatter(labelFormatter);
+ }
+
+ @Override
+ public void onStopTrackingTouch(@NonNull RangeSlider slider) {
+ if (!getKey().equals(slider.getTag())) return;
+
+ handleResetButton();
+
+ if (!updateConstantly) {
+ savePrefs();
+ }
+ }
+ };
+
+ LabelFormatter labelFormatter = new LabelFormatter() {
+ @NonNull
+ @Override
+ public String getFormattedValue(float value) {
+ String result;
+ if (valueFormat != null && (valueFormat.isBlank() || valueFormat.isEmpty())) {
+ result = !isDecimalFormat
+ ? Integer.toString((int) (slider.getValues().get(0) / outputScale))
+ : new DecimalFormat(decimalFormat).format(slider.getValues().get(0) / outputScale);
+ } else {
+ result = !isDecimalFormat
+ ? Integer.toString((int) (slider.getValues().get(0) / 1f))
+ : new DecimalFormat(decimalFormat).format(slider.getValues().get(0) / outputScale);
+ }
+ result += valueFormat;
+
+ return result;
+ }
+ };
+
+ @Override
+ public void onBindViewHolder(@NonNull PreferenceViewHolder holder) {
+ super.onBindViewHolder(holder);
+
+ if (isEnabled()) {
+ TextView title = holder.itemView.findViewById(android.R.id.title);
+ title.setTextColor(ContextCompat.getColor(getContext(), R.color.textColorPrimary));
+ }
+
+ slider = holder.itemView.findViewById(R.id.slider);
+ slider.setTag(getKey());
+
+ slider.addOnSliderTouchListener(sliderTouchListener);
+ slider.addOnChangeListener(changeListener);
+
+ slider.setLabelFormatter(labelFormatter);
+
+ mResetButton = holder.itemView.findViewById(R.id.reset_button);
+ if (showResetButton) {
+ mResetButton.setVisibility(View.VISIBLE);
+ mResetButton.setOnClickListener(v -> {
+ handleResetButton();
+ HapticUtils.weakVibrate(v);
+
+ slider.setValues(defaultValue);
+ savePrefs();
+ });
+ } else {
+ mResetButton.setVisibility(View.GONE);
+ }
+
+ sliderValue = holder.itemView.findViewById(androidx.preference.R.id.seekbar_value);
+
+ slider.setValueFrom(valueFrom);
+ slider.setValueTo(valueTo);
+ slider.setStepSize(tickInterval);
+
+ syncState();
+
+ handleResetButton();
+ }
+
+ public void setMin(float value) {
+ valueFrom = value;
+ if (slider != null) slider.setValueFrom(value);
+ }
+
+ public void setMax(float value) {
+ valueTo = value;
+ if (slider != null) slider.setValueTo(value);
+ }
+
+ public static List getValues(SharedPreferences prefs, String key, float defaultValue) {
+ List values;
+
+ try {
+ String JSONString = prefs.getString(key, "");
+ values = getValues(JSONString);
+ } catch (Exception ignored) {
+ try {
+ float value = prefs.getFloat(key, defaultValue);
+ values = Collections.singletonList(value);
+ } catch (Exception ignored2) {
+ try {
+ int value = prefs.getInt(key, Math.round(defaultValue));
+ values = Collections.singletonList((float) value);
+ } catch (Exception ignored3) {
+ values = Collections.singletonList(defaultValue);
+ }
+ }
+ }
+ return values;
+ }
+
+ public static List getValues(String JSONString) throws Exception {
+ List values = new ArrayList<>();
+
+ if (JSONString.trim().isEmpty()) return values;
+
+ JsonReader jsonReader = new JsonReader(new StringReader(JSONString));
+
+ jsonReader.beginObject();
+ try {
+ jsonReader.nextName();
+ jsonReader.beginArray();
+ } catch (Exception ignored) {
+ }
+
+ while (jsonReader.hasNext()) {
+ try {
+ jsonReader.nextName();
+ } catch (Exception ignored) {
+ }
+ values.add((float) jsonReader.nextDouble());
+ }
+
+ return values;
+ }
+
+ private void handleResetButton() {
+ if (mResetButton == null) return;
+
+ if (showResetButton) {
+ mResetButton.setVisibility(View.VISIBLE);
+ mResetButton.setEnabled(isEnabled() && !Objects.equals(slider.getValues().get(0), defaultValue.get(0)));
+ } else {
+ mResetButton.setVisibility(View.GONE);
+ }
+ }
+
+ public static float getSingleFloatValue(SharedPreferences prefs, String key, float defaultValue) {
+ float result = defaultValue;
+
+ try {
+ result = getValues(prefs, key, defaultValue).get(0);
+ } catch (Throwable ignored) {
+ }
+
+ return result;
+ }
+
+ public static int getSingleIntValue(SharedPreferences prefs, String key, int defaultValue) {
+ return Math.round(getSingleFloatValue(prefs, key, defaultValue));
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/SwitchPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/SwitchPreference.kt
new file mode 100644
index 000000000..9121bb20e
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/SwitchPreference.kt
@@ -0,0 +1,39 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import androidx.preference.SwitchPreferenceCompat
+import com.drdisagree.iconify.R
+
+class SwitchPreference : SwitchPreferenceCompat {
+
+ constructor(
+ context: Context,
+ attrs: AttributeSet?,
+ defStyleAttr: Int,
+ defStyleRes: Int
+ ) : super(context, attrs, defStyleAttr, defStyleRes) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ initResource()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ initResource()
+ }
+
+ constructor(context: Context) : super(context) {
+ initResource()
+ }
+
+ private fun initResource() {
+ layoutResource = R.layout.custom_preference_switch
+ widgetLayoutResource = R.layout.preference_material_switch
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/TimePickerPreference.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/TimePickerPreference.java
new file mode 100644
index 000000000..877c34f7f
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/TimePickerPreference.java
@@ -0,0 +1,113 @@
+package com.drdisagree.iconify.ui.preferences;
+
+/*
+ * Modified from https://github.com/etidoUP/Material-Time-picker-preference-
+ * Credits: etidoUP
+ */
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.text.format.DateFormat;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceViewHolder;
+
+import com.google.android.material.timepicker.MaterialTimePicker;
+import com.google.android.material.timepicker.TimeFormat;
+
+import java.util.Locale;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import com.drdisagree.iconify.R;
+
+public class TimePickerPreference extends Preference {
+
+ private String timeValue = "00:00";
+
+ public TimePickerPreference(Context context) {
+ super(context);
+ }
+
+ public TimePickerPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init(context, attrs);
+ }
+
+ public TimePickerPreference(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ init(context, attrs);
+ }
+
+ private void init(Context context, AttributeSet attrs) {
+ setLayoutResource(R.layout.custom_preference_time_picker);
+ if (attrs != null) {
+ TypedArray a =
+ context.getTheme().obtainStyledAttributes(attrs, R.styleable.MaterialTimePickerPreference, 0, 0);
+ try {
+ timeValue = a.getString(R.styleable.MaterialTimePickerPreference_presetValue);
+ } catch (Exception e) {
+ timeValue = "00:00";
+ } finally {
+ a.recycle();
+ }
+ }
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull PreferenceViewHolder holder) {
+ super.onBindViewHolder(holder);
+ TextView timeTextView = (TextView) holder.findViewById(R.id.time_stamp);
+ timeTextView.setText(timeValue);
+ }
+
+ @Override
+ protected void onClick() {
+ super.onClick();
+
+ // parse hour and minute from timeValue
+ AtomicInteger hour = new AtomicInteger(Integer.parseInt(timeValue.split(":")[0]));
+ AtomicInteger minute = new AtomicInteger(Integer.parseInt(timeValue.split(":")[1]));
+
+ MaterialTimePicker timePicker =
+ new MaterialTimePicker.Builder().setTimeFormat(DateFormat.is24HourFormat(getContext()) ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H).setHour(hour.get()).setMinute(minute.get()).build();
+
+ timePicker.addOnPositiveButtonClickListener(
+ v -> {
+ hour.set(timePicker.getHour());
+ minute.set(timePicker.getMinute());
+ String selectedTime = String.format(Locale.getDefault(), "%02d:%02d", hour.get(), minute.get());
+
+ timeValue = selectedTime;
+ persistString(selectedTime);
+
+ notifyChanged();
+ });
+
+ timePicker.show(((AppCompatActivity) getContext()).getSupportFragmentManager(), "timePicker");
+ }
+
+ @Override
+ protected Object onGetDefaultValue(TypedArray a, int index) {
+ return a.getString(index);
+ }
+
+ @Override
+ protected void onSetInitialValue(Object defaultValue) {
+ timeValue = getPersistedString((String) defaultValue);
+ persistString(timeValue);
+ }
+
+ public String getTimeValue() {
+ return this.timeValue;
+ }
+
+ public void setTimeValue(String timeValue) {
+ this.timeValue = timeValue;
+ persistString(timeValue);
+ notifyChanged();
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/UpdateCheckerPreference.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/UpdateCheckerPreference.kt
new file mode 100644
index 000000000..8c5b3412d
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/UpdateCheckerPreference.kt
@@ -0,0 +1,146 @@
+package com.drdisagree.iconify.ui.preferences
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.View
+import android.widget.TextView
+import androidx.preference.Preference
+import androidx.preference.PreferenceViewHolder
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const.LATEST_VERSION_URL
+import com.drdisagree.iconify.common.Preferences.AUTO_UPDATE
+import com.drdisagree.iconify.common.Preferences.LAST_UPDATE_CHECK_TIME
+import com.drdisagree.iconify.common.Preferences.NEW_UPDATE_FOUND
+import com.drdisagree.iconify.common.Preferences.NEW_UPDATE_VERSION_CODE
+import com.drdisagree.iconify.common.Preferences.UPDATE_CHECK_TIME
+import com.drdisagree.iconify.common.Preferences.VER_CODE
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getLong
+import com.drdisagree.iconify.config.RPrefs.getString
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.config.RPrefs.putLong
+import com.drdisagree.iconify.config.RPrefs.putString
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.SupervisorJob
+import kotlinx.coroutines.cancel
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.withContext
+import org.json.JSONObject
+import java.io.BufferedReader
+import java.io.InputStreamReader
+import java.net.HttpURLConnection
+import java.net.URL
+
+class UpdateCheckerPreference(context: Context, attrs: AttributeSet?) : Preference(context, attrs) {
+
+ private val scope = CoroutineScope(Dispatchers.Main + SupervisorJob())
+ private var mView: View? = null
+
+ override fun onBindViewHolder(holder: PreferenceViewHolder) {
+ super.onBindViewHolder(holder)
+
+ mView = holder.itemView
+
+ if (newUpdateVersionCode != BuildConfig.VERSION_CODE.toString()) {
+ mView?.findViewById(R.id.update_desc)?.text = context.getString(
+ R.string.update_dialog_desc,
+ newUpdateVersionCode
+ )
+ }
+ }
+
+ fun checkForUpdate() {
+ if (shouldCheckForUpdate()) {
+ putLong(LAST_UPDATE_CHECK_TIME, System.currentTimeMillis())
+
+ scope.launch {
+ val result = fetchLatestVersion()
+
+ if (result != null) {
+ handleUpdateResult(result)
+ }
+ }
+ } else {
+ if (getString(NEW_UPDATE_VERSION_CODE, null) == null || getString(
+ NEW_UPDATE_VERSION_CODE,
+ BuildConfig.VERSION_CODE.toString()
+ )!!.toInt() <= BuildConfig.VERSION_CODE
+ ) {
+ putString(NEW_UPDATE_VERSION_CODE, BuildConfig.VERSION_CODE.toString())
+ putBoolean(NEW_UPDATE_FOUND, false)
+ }
+ }
+ }
+
+ private fun shouldCheckForUpdate(): Boolean {
+ val lastChecked = getLong(LAST_UPDATE_CHECK_TIME, -1)
+
+ return getBoolean(AUTO_UPDATE, true) && (lastChecked == -1L ||
+ (System.currentTimeMillis() - lastChecked >= getLong(UPDATE_CHECK_TIME, 0)))
+ }
+
+ private suspend fun fetchLatestVersion(): String? = withContext(Dispatchers.IO) {
+ var urlConnection: HttpURLConnection? = null
+ var bufferedReader: BufferedReader? = null
+
+ return@withContext try {
+ val url = URL(LATEST_VERSION_URL)
+ urlConnection = url.openConnection() as HttpURLConnection
+ urlConnection.connect()
+
+ val inputStream = urlConnection.inputStream
+ bufferedReader = BufferedReader(InputStreamReader(inputStream))
+
+ val stringBuffer = StringBuilder()
+ var line: String?
+
+ while (bufferedReader.readLine().also { line = it } != null) {
+ stringBuffer.append(line).append("\n")
+ }
+
+ if (stringBuffer.isEmpty()) {
+ null
+ } else {
+ stringBuffer.toString()
+ }
+ } catch (e: Exception) {
+ null
+ } finally {
+ urlConnection?.disconnect()
+ bufferedReader?.close()
+ }
+ }
+
+ private fun handleUpdateResult(result: String) {
+ try {
+ val latestVersion = JSONObject(result)
+
+ if (latestVersion.getString(VER_CODE).toInt() > BuildConfig.VERSION_CODE) {
+ newUpdateVersionCode = latestVersion.getString("versionName")
+
+ mView?.findViewById(R.id.update_desc)?.text = context.getString(
+ R.string.update_dialog_desc,
+ newUpdateVersionCode
+ )
+
+ putString(NEW_UPDATE_VERSION_CODE, newUpdateVersionCode)
+ putBoolean(NEW_UPDATE_FOUND, true)
+ } else {
+ putString(NEW_UPDATE_VERSION_CODE, BuildConfig.VERSION_CODE.toString())
+ putBoolean(NEW_UPDATE_FOUND, false)
+ }
+ } catch (_: Exception) {
+ }
+ }
+
+ override fun onDetached() {
+ scope.cancel()
+ super.onDetached()
+ }
+
+ companion object {
+ private var newUpdateVersionCode = BuildConfig.VERSION_CODE.toString()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/AnimationUtils.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/AnimationUtils.java
new file mode 100644
index 000000000..9442bcdcb
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/AnimationUtils.java
@@ -0,0 +1,89 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.ArgbEvaluator;
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
+import android.view.View;
+import android.view.ViewAnimationUtils;
+
+import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
+
+public class AnimationUtils {
+ public static void registerCircularRevealAnimation(final Context context, final View view, final RevealAnimationSetting revealSettings) {
+ final int startColor = revealSettings.getColorAccent();
+ final int endColor = getBackgroundColor(view);
+
+ view.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
+ @Override
+ public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
+ v.removeOnLayoutChangeListener(this);
+ view.setVisibility(View.VISIBLE);
+ int cx = revealSettings.getCenterX();
+ int cy = revealSettings.getCenterY();
+ int width = revealSettings.getWidth();
+ int height = revealSettings.getHeight();
+ int duration = context.getResources().getInteger(android.R.integer.config_longAnimTime);
+
+ //Simply use the diagonal of the view
+ float finalRadius = (float) Math.sqrt(width * width + height * height);
+ Animator anim = ViewAnimationUtils.createCircularReveal(v, cx, cy, 0, finalRadius).setDuration(duration);
+ anim.setInterpolator(new FastOutSlowInInterpolator());
+ anim.start();
+ startColorAnimation(view, startColor, endColor, duration);
+ }
+ });
+ }
+
+ private static void startColorAnimation(final View view, final int startColor, final int endColor, int duration) {
+ ValueAnimator anim = new ValueAnimator();
+ anim.setIntValues(startColor, endColor);
+ anim.setEvaluator(new ArgbEvaluator());
+ anim.addUpdateListener(valueAnimator -> view.setBackgroundColor((Integer) valueAnimator.getAnimatedValue()));
+ anim.setDuration(duration);
+ anim.start();
+ }
+
+ @SuppressWarnings("unused")
+ public static void startCircularExitAnimation(final Context context, final View view, final RevealAnimationSetting revealSettings, final OnDismissedListener listener) {
+ final int startColor = getBackgroundColor(view);
+ final int endColor = revealSettings.getColorAccent();
+
+ int cx = revealSettings.getCenterX();
+ int cy = revealSettings.getCenterY();
+ int width = revealSettings.getWidth();
+ int height = revealSettings.getHeight();
+ int duration = context.getResources().getInteger(android.R.integer.config_longAnimTime);
+
+ float initRadius = (float) Math.sqrt(width * width + height * height);
+ Animator anim = ViewAnimationUtils.createCircularReveal(view, cx, cy, initRadius, 0);
+ anim.setDuration(duration);
+ anim.setInterpolator(new FastOutSlowInInterpolator());
+ anim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ view.setVisibility(View.INVISIBLE);
+ listener.onDismissed();
+ }
+ });
+ anim.start();
+ startColorAnimation(view, startColor, endColor, duration);
+ }
+
+ private static int getBackgroundColor(View view) {
+ int color = Color.TRANSPARENT;
+ Drawable background = view.getBackground();
+ if (background instanceof ColorDrawable) {
+ color = ((ColorDrawable) background).getColor();
+ }
+ return color;
+ }
+
+ public interface OnDismissedListener {
+ void onDismissed();
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/Breadcrumb.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/Breadcrumb.java
new file mode 100644
index 000000000..4a6e56601
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/Breadcrumb.java
@@ -0,0 +1,25 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.text.TextUtils;
+
+import androidx.annotation.Nullable;
+
+class Breadcrumb {
+ private Breadcrumb() {
+
+ }
+
+ /**
+ * Joins two breadcrumbs
+ *
+ * @param s1 First breadcrumb, might be null
+ * @param s2 Second breadcrumb
+ * @return Both breadcrumbs joined
+ */
+ static String concat(@Nullable String s1, String s2) {
+ if (TextUtils.isEmpty(s1)) {
+ return s2;
+ }
+ return s1 + " > " + s2;
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/HistoryItem.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/HistoryItem.java
new file mode 100644
index 000000000..ac192a6a2
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/HistoryItem.java
@@ -0,0 +1,28 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+class HistoryItem extends ListItem {
+ static final int TYPE = 1;
+ private final String term;
+
+ HistoryItem(String term) {
+ super();
+ this.term = term;
+ }
+
+ @Override
+ public int getType() {
+ return TYPE;
+ }
+
+ String getTerm() {
+ return term;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof HistoryItem) {
+ return ((HistoryItem) obj).term.equals(term);
+ }
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/ListItem.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/ListItem.java
new file mode 100644
index 000000000..7e142bef8
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/ListItem.java
@@ -0,0 +1,5 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+public abstract class ListItem {
+ public abstract int getType();
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/PreferenceItem.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/PreferenceItem.java
new file mode 100644
index 000000000..58b690ba0
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/PreferenceItem.java
@@ -0,0 +1,175 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.annotation.SuppressLint;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.TextUtils;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.XmlRes;
+
+import org.apache.commons.text.similarity.FuzzyScore;
+
+import java.util.ArrayList;
+import java.util.Locale;
+
+public class PreferenceItem extends ListItem implements Parcelable {
+ public static final Creator CREATOR = new Creator<>() {
+ @Override
+ public PreferenceItem createFromParcel(Parcel in) {
+ return new PreferenceItem(in);
+ }
+
+ @Override
+ public PreferenceItem[] newArray(int size) {
+ return new PreferenceItem[size];
+ }
+ };
+ static final int TYPE = 2;
+ @SuppressLint("ConstantLocale")
+ private static final FuzzyScore fuzzyScore = new FuzzyScore(Locale.getDefault());
+ String title;
+ String summary;
+ String key;
+ String entries;
+ String breadcrumbs;
+ String keywords;
+ ArrayList keyBreadcrumbs = new ArrayList<>();
+ int resId;
+ private float lastScore = 0;
+ private String lastKeyword = null;
+
+ PreferenceItem() {
+ }
+
+ private PreferenceItem(Parcel in) {
+ this.title = in.readString();
+ this.summary = in.readString();
+ this.key = in.readString();
+ this.breadcrumbs = in.readString();
+ this.keywords = in.readString();
+ this.resId = in.readInt();
+ }
+
+ boolean hasData() {
+ return title != null || summary != null;
+ }
+
+ boolean matchesFuzzy(String keyword) {
+ return getScore(keyword) > 0.3;
+ }
+
+ boolean matches(String keyword) {
+ Locale locale = Locale.getDefault();
+ return getInfo().toLowerCase(locale).contains(keyword.toLowerCase(locale));
+ }
+
+ float getScore(String keyword) {
+ if (TextUtils.isEmpty(keyword)) {
+ return 0;
+ } else if (TextUtils.equals(lastKeyword, keyword)) {
+ return lastScore;
+ }
+ String info = getInfo();
+
+ float score = fuzzyScore.fuzzyScore(info, "ø" + keyword);
+ float maxScore = (keyword.length() + 1) * 3 - 2; // First item can not get +2 bonus score
+
+ lastScore = score / maxScore;
+ lastKeyword = keyword;
+ return lastScore;
+ }
+
+ private String getInfo() {
+ StringBuilder infoBuilder = new StringBuilder();
+ if (!TextUtils.isEmpty(title)) {
+ infoBuilder.append("ø").append(title);
+ }
+ if (!TextUtils.isEmpty(summary)) {
+ infoBuilder.append("ø").append(summary);
+ }
+ if (!TextUtils.isEmpty(entries)) {
+ infoBuilder.append("ø").append(entries);
+ }
+ if (!TextUtils.isEmpty(breadcrumbs)) {
+ infoBuilder.append("ø").append(breadcrumbs);
+ }
+ if (!TextUtils.isEmpty(keywords)) {
+ infoBuilder.append("ø").append(keywords);
+ }
+ return infoBuilder.toString();
+ }
+
+ @SuppressWarnings("unused")
+ public PreferenceItem withKey(String key) {
+ this.key = key;
+ return this;
+ }
+
+ @SuppressWarnings("unused")
+ public PreferenceItem withSummary(String summary) {
+ this.summary = summary;
+ return this;
+ }
+
+ @SuppressWarnings("unused")
+ public PreferenceItem withTitle(String title) {
+ this.title = title;
+ return this;
+ }
+
+ @SuppressWarnings("unused")
+ public PreferenceItem withEntries(String entries) {
+ this.entries = entries;
+ return this;
+ }
+
+ @SuppressWarnings("unused")
+ public PreferenceItem withKeywords(String keywords) {
+ this.keywords = keywords;
+ return this;
+ }
+
+ @SuppressWarnings("unused")
+ public PreferenceItem withResId(@XmlRes Integer resId) {
+ this.resId = resId;
+ return this;
+ }
+
+ /**
+ * @param breadcrumb The breadcrumb to add
+ * @return For chaining
+ */
+ @SuppressWarnings("unused")
+ public PreferenceItem addBreadcrumb(String breadcrumb) {
+ this.breadcrumbs = Breadcrumb.concat(this.breadcrumbs, breadcrumb);
+ return this;
+ }
+
+ @NonNull
+ @Override
+ public String toString() {
+ return "PreferenceItem: " + title + " " + summary + " " + key;
+ }
+
+ @Override
+ public int getType() {
+ return TYPE;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel parcel, int i) {
+ parcel.writeString(title);
+ parcel.writeString(summary);
+ parcel.writeString(key);
+ parcel.writeString(breadcrumbs);
+ parcel.writeString(keywords);
+ parcel.writeInt(resId);
+ }
+
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/PreferenceParser.kt b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/PreferenceParser.kt
new file mode 100644
index 000000000..96f24c345
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/PreferenceParser.kt
@@ -0,0 +1,227 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch
+
+import android.content.Context
+import android.text.TextUtils
+import com.drdisagree.iconify.config.PrefsHelper.isVisible
+import com.drdisagree.iconify.ui.preferences.preferencesearch.SearchConfiguration.SearchIndexItem
+import org.xmlpull.v1.XmlPullParser
+
+internal class PreferenceParser(private val mContext: Context) {
+
+ private val allEntries = ArrayList()
+
+ fun addResourceFile(item: SearchIndexItem) {
+ allEntries.addAll(parseFile(item))
+ }
+
+ fun addPreferenceItems(preferenceItems: ArrayList) {
+ preferenceItems.removeIf { item: PreferenceItem -> !isVisible(item.key) }
+ allEntries.addAll(preferenceItems)
+ }
+
+ private fun parseFile(item: SearchIndexItem): ArrayList {
+ val results = ArrayList()
+ val xpp: XmlPullParser = mContext.resources.getXml(item.resId)
+ val bannedKeys: MutableList = item.searchConfiguration.bannedKeys
+
+ try {
+ xpp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true)
+ xpp.setFeature(XmlPullParser.FEATURE_REPORT_NAMESPACE_ATTRIBUTES, true)
+ val breadcrumbs = ArrayList()
+ val keyBreadcrumbs = ArrayList()
+ if (!TextUtils.isEmpty(item.breadcrumb)) {
+ breadcrumbs.add(item.breadcrumb)
+ }
+ while (xpp.eventType != XmlPullParser.END_DOCUMENT) {
+ if (xpp.eventType == XmlPullParser.START_TAG) {
+ val result = parseSearchResult(xpp)
+ result.resId = item.resId
+
+ try {
+ if (!isSearchable(result)) {
+ if (!bannedKeys.contains(result.key)) bannedKeys.add(result.key)
+ } else bannedKeys.remove(result.key)
+ } catch (ignored: Exception) {
+ }
+
+ if (!BLACKLIST.contains(xpp.name)
+ && result.hasData()
+ && "true" != getAttribute(xpp, NS_SEARCH, "ignore") && !bannedKeys.contains(
+ result.key
+ )
+ && shouldAddPreferenceItem(results, result)
+ ) {
+ result.breadcrumbs = joinBreadcrumbs(breadcrumbs)
+ result.keyBreadcrumbs = cleanupKeyBreadcrumbs(keyBreadcrumbs)
+ if (!results.contains(result)) {
+ results.add(result)
+ }
+ }
+ if (CONTAINERS.contains(xpp.name)) {
+ breadcrumbs.add(if (result.title == null) "" else result.title)
+ }
+ if (xpp.name == "PreferenceScreen") {
+ keyBreadcrumbs.add(getAttribute(xpp, "key"))
+ }
+ } else if (xpp.eventType == XmlPullParser.END_TAG && CONTAINERS.contains(xpp.name)) {
+ breadcrumbs.removeAt(breadcrumbs.size - 1)
+ if (xpp.name == "PreferenceScreen") {
+ keyBreadcrumbs.removeAt(keyBreadcrumbs.size - 1)
+ }
+ }
+
+ xpp.next()
+ }
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ return results
+ }
+
+ private fun isSearchable(result: PreferenceItem): Boolean {
+ if (TextUtils.isEmpty(result.key)) return false
+ return isVisible(result.key)
+ }
+
+ private fun shouldAddPreferenceItem(
+ results: ArrayList,
+ result: PreferenceItem
+ ): Boolean {
+ var isAlreadyAdded = false
+ for (item in results) {
+ if (item.key == result.key && item.resId == result.resId) {
+ isAlreadyAdded = true
+ break
+ }
+ }
+ return !isAlreadyAdded
+ }
+
+ private fun cleanupKeyBreadcrumbs(keyBreadcrumbs: ArrayList): ArrayList {
+ val result = ArrayList()
+ for (keyBreadcrumb in keyBreadcrumbs) {
+ if (keyBreadcrumb != null) {
+ result.add(keyBreadcrumb)
+ }
+ }
+ return result
+ }
+
+ private fun joinBreadcrumbs(breadcrumbs: ArrayList): String? {
+ var result: String? = ""
+ for (crumb in breadcrumbs) {
+ if (!TextUtils.isEmpty(crumb)) {
+ result = Breadcrumb.concat(result, crumb)
+ }
+ }
+ return result
+ }
+
+ private fun getAttribute(xpp: XmlPullParser, namespace: String?, attribute: String): String? {
+ for (i in 0 until xpp.attributeCount) {
+ if (attribute == xpp.getAttributeName(i) &&
+ (namespace == null || namespace == xpp.getAttributeNamespace(i))
+ ) {
+ return xpp.getAttributeValue(i)
+ }
+ }
+ return null
+ }
+
+ private fun getAttribute(xpp: XmlPullParser, attribute: String): String? {
+ return if (hasAttribute(xpp, NS_SEARCH, attribute)) {
+ getAttribute(xpp, NS_SEARCH, attribute)
+ } else {
+ getAttribute(xpp, NS_ANDROID, attribute)
+ }
+ }
+
+ private fun hasAttribute(xpp: XmlPullParser, namespace: String?, attribute: String): Boolean {
+ return getAttribute(xpp, namespace, attribute) != null
+ }
+
+ private fun parseSearchResult(xpp: XmlPullParser): PreferenceItem {
+ val result = PreferenceItem()
+ result.title = readString(getAttribute(xpp, "title"))
+ result.summary = readString(getAttribute(xpp, "summary"))
+ result.key = readString(getAttribute(xpp, "key"))
+ result.entries = readStringArray(getAttribute(xpp, "entries"))
+ result.keywords = readString(getAttribute(xpp, NS_SEARCH, "keywords"))
+ return result
+ }
+
+ private fun readStringArray(s: String?): String? {
+ if (s == null) {
+ return null
+ }
+ if (s.startsWith("@")) {
+ try {
+ val id = s.substring(1).toInt()
+ val elements = mContext.resources.getStringArray(id)
+ return TextUtils.join(",", elements)
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ }
+ return s
+ }
+
+ private fun readString(s: String?): String? {
+ if (s == null) {
+ return null
+ }
+ if (s.startsWith("@")) {
+ try {
+ val id = s.substring(1).toInt()
+ return mContext.getString(id)
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ }
+ return s
+ }
+
+ fun searchFor(keyword: String?, fuzzy: Boolean): List {
+ if (TextUtils.isEmpty(keyword)) {
+ return ArrayList()
+ }
+ val results = ArrayList()
+
+ for (item in allEntries) {
+ if ((fuzzy && item.matchesFuzzy(keyword))
+ || (!fuzzy && item.matches(keyword))
+ ) {
+ results.add(item)
+ }
+ }
+
+ results.sortWith { i1: PreferenceItem, i2: PreferenceItem ->
+ floatCompare(
+ i2.getScore(keyword),
+ i1.getScore(keyword)
+ )
+ }
+
+ return if (results.size > MAX_RESULTS) {
+ results.subList(0, MAX_RESULTS)
+ } else {
+ results
+ }
+ }
+
+ companion object {
+ private const val MAX_RESULTS = 10
+ private const val NS_ANDROID = "http://schemas.android.com/apk/res/android"
+ private const val NS_SEARCH =
+ "http://schemas.android.com/apk/com.drdisagree.iconify.ui.preferences.preferencesearch"
+ private val BLACKLIST: List = listOf(
+ SearchPreference::class.java.name, "PreferenceCategory"
+ )
+ private val CONTAINERS: List =
+ mutableListOf("PreferenceCategory", "PreferenceScreen")
+
+ private fun floatCompare(x: Float, y: Float): Int {
+ return if ((x < y)) -1 else (if ((x == y)) 0 else 1)
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/RevealAnimationSetting.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/RevealAnimationSetting.java
new file mode 100644
index 000000000..7b2c8fc4c
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/RevealAnimationSetting.java
@@ -0,0 +1,73 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class RevealAnimationSetting implements Parcelable {
+ public static final Creator CREATOR = new Creator<>() {
+ @Override
+ public RevealAnimationSetting createFromParcel(Parcel in) {
+ return new RevealAnimationSetting(in);
+ }
+
+ @Override
+ public RevealAnimationSetting[] newArray(int size) {
+ return new RevealAnimationSetting[size];
+ }
+ };
+ private final int centerX;
+ private final int centerY;
+ private final int width;
+ private final int height;
+ private final int colorAccent;
+
+ public RevealAnimationSetting(int centerX, int centerY, int width, int height, int colorAccent) {
+ this.centerX = centerX;
+ this.centerY = centerY;
+ this.width = width;
+ this.height = height;
+ this.colorAccent = colorAccent;
+ }
+
+ private RevealAnimationSetting(Parcel in) {
+ centerX = in.readInt();
+ centerY = in.readInt();
+ width = in.readInt();
+ height = in.readInt();
+ colorAccent = in.readInt();
+ }
+
+ public int getCenterX() {
+ return centerX;
+ }
+
+ public int getCenterY() {
+ return centerY;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public int getColorAccent() {
+ return colorAccent;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(centerX);
+ dest.writeInt(centerY);
+ dest.writeInt(width);
+ dest.writeInt(height);
+ dest.writeInt(colorAccent);
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchConfiguration.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchConfiguration.java
new file mode 100644
index 000000000..00a0e7b0c
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchConfiguration.java
@@ -0,0 +1,394 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import androidx.annotation.ColorInt;
+import androidx.annotation.IdRes;
+import androidx.annotation.NonNull;
+import androidx.annotation.StringRes;
+import androidx.annotation.XmlRes;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.preference.ListPreference;
+import androidx.preference.Preference;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class SearchConfiguration {
+ private static final String ARGUMENT_INDEX_FILES = "items";
+ private static final String ARGUMENT_INDEX_INDIVIDUAL_PREFERENCES = "individual_prefs";
+ private static final String ARGUMENT_FUZZY_ENABLED = "fuzzy";
+ private static final String ARGUMENT_HISTORY_ENABLED = "history_enabled";
+ private static final String ARGUMENT_SEARCH_BAR_ENABLED = "search_bar_enabled";
+ private static final String ARGUMENT_BREADCRUMBS_ENABLED = "breadcrumbs_enabled";
+ private static final String ARGUMENT_REVEAL_ANIMATION_SETTING = "reveal_anim_setting";
+ private static final String ARGUMENT_TEXT_HINT = "text_hint";
+ private static final String ARGUMENT_TEXT_CLEAR_HISTORY = "text_clear_history";
+ private static final String ARGUMENT_TEXT_NO_RESULTS = "text_no_results";
+ private final ArrayList bannedKeys = new ArrayList<>();
+ private ArrayList filesToIndex = new ArrayList<>();
+ private ArrayList preferencesToIndex = new ArrayList<>();
+ private boolean historyEnabled = true;
+ private boolean breadcrumbsEnabled = false;
+ private boolean fuzzySearchEnabled = true;
+ private boolean searchBarEnabled = true;
+ private AppCompatActivity activity;
+ private int containerResId = android.R.id.content;
+ private RevealAnimationSetting revealAnimationSetting = null;
+ private String textClearHistory;
+ private String textNoResults;
+ private String textHint;
+
+ public SearchConfiguration() {
+
+ }
+
+ /**
+ * Creates a new search configuration
+ *
+ * @param activity The Activity that receives callbacks. Must implement SearchPreferenceResultListener.
+ */
+ @SuppressWarnings("unused")
+ public SearchConfiguration(AppCompatActivity activity) {
+ setActivity(activity);
+ }
+
+ static SearchConfiguration fromBundle(Bundle bundle) {
+ SearchConfiguration config = new SearchConfiguration();
+ config.filesToIndex = bundle.getParcelableArrayList(ARGUMENT_INDEX_FILES);
+ config.preferencesToIndex = bundle.getParcelableArrayList(ARGUMENT_INDEX_INDIVIDUAL_PREFERENCES);
+ config.historyEnabled = bundle.getBoolean(ARGUMENT_HISTORY_ENABLED);
+ config.revealAnimationSetting = bundle.getParcelable(ARGUMENT_REVEAL_ANIMATION_SETTING);
+ config.fuzzySearchEnabled = bundle.getBoolean(ARGUMENT_FUZZY_ENABLED);
+ config.breadcrumbsEnabled = bundle.getBoolean(ARGUMENT_BREADCRUMBS_ENABLED);
+ config.searchBarEnabled = bundle.getBoolean(ARGUMENT_SEARCH_BAR_ENABLED);
+ config.textHint = bundle.getString(ARGUMENT_TEXT_HINT);
+ config.textClearHistory = bundle.getString(ARGUMENT_TEXT_CLEAR_HISTORY);
+ config.textNoResults = bundle.getString(ARGUMENT_TEXT_NO_RESULTS);
+ return config;
+ }
+
+ /**
+ * Shows the fragment
+ *
+ * @return A reference to the fragment
+ */
+ public SearchPreferenceFragment showSearchFragment() {
+ if (activity == null) {
+ throw new IllegalStateException("setActivity() not called");
+ }
+
+ Bundle arguments = this.toBundle();
+ SearchPreferenceFragment fragment = new SearchPreferenceFragment();
+ fragment.setArguments(arguments);
+ activity.getSupportFragmentManager().beginTransaction()
+ .add(containerResId, fragment, SearchPreferenceFragment.TAG)
+ .addToBackStack(SearchPreferenceFragment.TAG)
+ .commit();
+ return fragment;
+ }
+
+ private Bundle toBundle() {
+ Bundle arguments = new Bundle();
+ arguments.putParcelableArrayList(ARGUMENT_INDEX_FILES, filesToIndex);
+ arguments.putParcelableArrayList(ARGUMENT_INDEX_INDIVIDUAL_PREFERENCES, preferencesToIndex);
+ arguments.putBoolean(ARGUMENT_HISTORY_ENABLED, historyEnabled);
+ arguments.putParcelable(ARGUMENT_REVEAL_ANIMATION_SETTING, revealAnimationSetting);
+ arguments.putBoolean(ARGUMENT_FUZZY_ENABLED, fuzzySearchEnabled);
+ arguments.putBoolean(ARGUMENT_BREADCRUMBS_ENABLED, breadcrumbsEnabled);
+ arguments.putBoolean(ARGUMENT_SEARCH_BAR_ENABLED, searchBarEnabled);
+ arguments.putString(ARGUMENT_TEXT_HINT, textHint);
+ arguments.putString(ARGUMENT_TEXT_CLEAR_HISTORY, textClearHistory);
+ arguments.putString(ARGUMENT_TEXT_NO_RESULTS, textNoResults);
+ return arguments;
+ }
+
+ /**
+ * Sets the current activity that also receives callbacks
+ *
+ * @param activity The Activity that receives callbacks. Must implement SearchPreferenceResultListener.
+ */
+ public void setActivity(@NonNull AppCompatActivity activity) {
+ this.activity = activity;
+ if (!(activity instanceof SearchPreferenceResultListener)) {
+ throw new IllegalArgumentException("Activity must implement SearchPreferenceResultListener");
+ }
+ }
+
+ /**
+ * Sets the container to use when loading the fragment
+ *
+ * @param containerResId Resource id of the container
+ */
+ public void setFragmentContainerViewId(@IdRes int containerResId) {
+ this.containerResId = containerResId;
+ }
+
+ /**
+ * Display a reveal animation
+ *
+ * @param centerX Origin of the reveal animation
+ * @param centerY Origin of the reveal animation
+ * @param width Size of the main container
+ * @param height Size of the main container
+ * @param colorAccent Accent color to use
+ */
+ @SuppressWarnings("unused")
+ public void useAnimation(int centerX, int centerY, int width, int height, @ColorInt int colorAccent) {
+ revealAnimationSetting = new RevealAnimationSetting(centerX, centerY, width, height, colorAccent);
+ }
+
+ /**
+ * Adds a new file to the index
+ *
+ * @param resId The preference file to index
+ */
+ public SearchIndexItem index(@XmlRes int resId) {
+ SearchIndexItem item = new SearchIndexItem(resId, this);
+ if (!filesToIndex.contains(item)) {
+ filesToIndex.add(item);
+ }
+ return item;
+ }
+
+ /**
+ * Indexes a single preference
+ *
+ * @return the indexed PreferenceItem to configure it with chaining
+ * @see PreferenceItem for the available methods for configuring it
+ */
+ @SuppressWarnings("unused")
+ public PreferenceItem indexItem() {
+ PreferenceItem preferenceItem = new PreferenceItem();
+ preferencesToIndex.add(preferenceItem);
+ return preferenceItem;
+ }
+
+ /**
+ * Indexes a single android preference
+ *
+ * @param preference to get its key, summary, title and entries
+ * @return the indexed PreferenceItem to configure it with chaining
+ * @see PreferenceItem for the available methods for configuring it
+ */
+ @SuppressWarnings("unused")
+ public PreferenceItem indexItem(@NonNull Preference preference) {
+ PreferenceItem preferenceItem = new PreferenceItem();
+
+ if (preference.getKey() != null) {
+ preferenceItem.key = preference.getKey();
+ }
+ if (preference.getSummary() != null) {
+ preferenceItem.summary = preference.getSummary().toString();
+ }
+ if (preference.getTitle() != null) {
+ preferenceItem.title = preference.getTitle().toString();
+ }
+ if (preference instanceof ListPreference listPreference) {
+ if (listPreference.getEntries() != null) {
+ preferenceItem.entries = Arrays.toString(listPreference.getEntries());
+ }
+ }
+ preferencesToIndex.add(preferenceItem);
+ return preferenceItem;
+ }
+
+ ArrayList getBannedKeys() {
+ return bannedKeys;
+ }
+
+ /**
+ * @param key of the preference to be ignored
+ */
+ @SuppressWarnings("unused")
+ public void ignorePreference(@NonNull String key) {
+ bannedKeys.add(key);
+ }
+
+ ArrayList getFiles() {
+ return filesToIndex;
+ }
+
+ ArrayList getPreferencesToIndex() {
+ return preferencesToIndex;
+ }
+
+ boolean isHistoryEnabled() {
+ return historyEnabled;
+ }
+
+ /**
+ * Show a history of recent search terms if nothing was typed yet. Default is true
+ *
+ * @param historyEnabled True if history should be enabled
+ */
+ public void setHistoryEnabled(boolean historyEnabled) {
+ this.historyEnabled = historyEnabled;
+ }
+
+ boolean isBreadcrumbsEnabled() {
+ return breadcrumbsEnabled;
+ }
+
+ /**
+ * Show breadcrumbs in the list of search results, containing of
+ * the prefix given in addResourceFileToIndex, PreferenceCategory and PreferenceScreen.
+ * Default is false
+ *
+ * @param breadcrumbsEnabled True if breadcrumbs should be shown
+ */
+ public void setBreadcrumbsEnabled(boolean breadcrumbsEnabled) {
+ this.breadcrumbsEnabled = breadcrumbsEnabled;
+ }
+
+ boolean isFuzzySearchEnabled() {
+ return fuzzySearchEnabled;
+ }
+
+ /**
+ * Allow to enable and disable fuzzy searching. Default is true
+ *
+ * @param fuzzySearchEnabled True if search should be fuzzy
+ */
+ public void setFuzzySearchEnabled(boolean fuzzySearchEnabled) {
+ this.fuzzySearchEnabled = fuzzySearchEnabled;
+ }
+
+ boolean isSearchBarEnabled() {
+ return searchBarEnabled;
+ }
+
+ /**
+ * Show the search bar above the list. When setting this to false, you have to use {@see SearchPreferenceFragment#setSearchTerm(String) setSearchTerm} instead
+ * Default is true
+ *
+ * @param searchBarEnabled True if search bar should be shown
+ */
+ public void setSearchBarEnabled(boolean searchBarEnabled) {
+ this.searchBarEnabled = searchBarEnabled;
+ }
+
+ RevealAnimationSetting getRevealAnimationSetting() {
+ return revealAnimationSetting;
+ }
+
+ @SuppressWarnings("unused")
+ public String getTextClearHistory() {
+ return textClearHistory;
+ }
+
+ public void setTextClearHistory(String textClearHistory) {
+ this.textClearHistory = textClearHistory;
+ }
+
+ public String getTextNoResults() {
+ return textNoResults;
+ }
+
+ public void setTextNoResults(String textNoResults) {
+ this.textNoResults = textNoResults;
+ }
+
+ public String getTextHint() {
+ return textHint;
+ }
+
+ public void setTextHint(String textHint) {
+ this.textHint = textHint;
+ }
+
+ /**
+ * Adds a given R.xml resource to the search index
+ */
+ public static class SearchIndexItem implements Parcelable {
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public SearchIndexItem createFromParcel(Parcel in) {
+ return new SearchIndexItem(in);
+ }
+
+ @Override
+ public SearchIndexItem[] newArray(int size) {
+ return new SearchIndexItem[size];
+ }
+ };
+ private final @XmlRes int resId;
+ private final SearchConfiguration searchConfiguration;
+ private String breadcrumb = "";
+
+ /**
+ * Includes the given R.xml resource in the index
+ *
+ * @param resId The resource to index
+ */
+ private SearchIndexItem(@XmlRes int resId, SearchConfiguration searchConfiguration) {
+ this.resId = resId;
+ this.searchConfiguration = searchConfiguration;
+ }
+
+ private SearchIndexItem(Parcel parcel) {
+ this.breadcrumb = parcel.readString();
+ this.resId = parcel.readInt();
+ this.searchConfiguration = null;
+ }
+
+ /**
+ * Adds a breadcrumb
+ *
+ * @param breadcrumb The breadcrumb to add
+ * @return For chaining
+ */
+ @SuppressWarnings("unused")
+ public SearchIndexItem addBreadcrumb(@StringRes int breadcrumb) {
+ assertNotParcel();
+ return addBreadcrumb(searchConfiguration.activity.getString(breadcrumb));
+ }
+
+ /**
+ * Adds a breadcrumb
+ *
+ * @param breadcrumb The breadcrumb to add
+ * @return For chaining
+ */
+ public SearchIndexItem addBreadcrumb(String breadcrumb) {
+ assertNotParcel();
+ this.breadcrumb = Breadcrumb.concat(this.breadcrumb, breadcrumb);
+ return this;
+ }
+
+ /**
+ * Throws an exception if the item does not have a searchConfiguration (thus, is restored from a parcel)
+ */
+ private void assertNotParcel() {
+ if (searchConfiguration == null) {
+ throw new IllegalStateException("SearchIndexItems that are restored from parcel can not be modified.");
+ }
+ }
+
+ @XmlRes
+ int getResId() {
+ return resId;
+ }
+
+ String getBreadcrumb() {
+ return breadcrumb;
+ }
+
+ SearchConfiguration getSearchConfiguration() {
+ return searchConfiguration;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(this.breadcrumb);
+ dest.writeInt(this.resId);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreference.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreference.java
new file mode 100644
index 000000000..990e944f2
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreference.java
@@ -0,0 +1,87 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.text.InputType;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.EditText;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceViewHolder;
+
+import com.drdisagree.iconify.R;
+
+public class SearchPreference extends Preference implements View.OnClickListener {
+ private final SearchConfiguration searchConfiguration = new SearchConfiguration();
+ private String hint = null;
+
+ @SuppressWarnings("unused")
+ public SearchPreference(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ setLayoutResource(R.layout.searchpreference_preference);
+ parseAttrs(attrs);
+ }
+
+ @SuppressWarnings("unused")
+ public SearchPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ setLayoutResource(R.layout.searchpreference_preference);
+ parseAttrs(attrs);
+ }
+
+ @SuppressWarnings("unused")
+ public SearchPreference(Context context) {
+ super(context);
+ setLayoutResource(R.layout.searchpreference_preference);
+ }
+
+ private void parseAttrs(AttributeSet attrs) {
+ TypedArray a = getContext().obtainStyledAttributes(attrs, new int[]{R.attr.textHint});
+ if (a.getText(0) != null) {
+ hint = a.getText(0).toString();
+ searchConfiguration.setTextHint(a.getText(0).toString());
+ }
+ a.recycle();
+ a = getContext().obtainStyledAttributes(attrs, new int[]{R.attr.textClearHistory});
+ if (a.getText(0) != null) {
+ searchConfiguration.setTextClearHistory(a.getText(0).toString());
+ }
+ a.recycle();
+ a = getContext().obtainStyledAttributes(attrs, new int[]{R.attr.textNoResults});
+ if (a.getText(0) != null) {
+ searchConfiguration.setTextNoResults(a.getText(0).toString());
+ }
+ a.recycle();
+ }
+
+ @Override
+ public void onBindViewHolder(PreferenceViewHolder holder) {
+ EditText searchText = (EditText) holder.findViewById(R.id.search);
+ searchText.setFocusable(false);
+ searchText.setInputType(InputType.TYPE_NULL);
+ searchText.setOnClickListener(this);
+
+ if (hint != null) {
+ searchText.setHint(hint);
+ }
+
+ holder.findViewById(R.id.search_card).setOnClickListener(this);
+ holder.itemView.setOnClickListener(this);
+ holder.itemView.setBackgroundColor(0x0);
+ }
+
+ @Override
+ public void onClick(View view) {
+ getSearchConfiguration().showSearchFragment();
+ }
+
+ /**
+ * Returns the search configuration object for this preference
+ *
+ * @return The search configuration
+ */
+ public SearchConfiguration getSearchConfiguration() {
+ return searchConfiguration;
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceActionView.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceActionView.java
new file mode 100644
index 000000000..fc22e9fc5
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceActionView.java
@@ -0,0 +1,93 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.content.Context;
+import android.util.AttributeSet;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.SearchView;
+import androidx.fragment.app.FragmentManager;
+
+public class SearchPreferenceActionView extends SearchView {
+ protected SearchPreferenceFragment searchFragment;
+ protected SearchConfiguration searchConfiguration = new SearchConfiguration();
+ protected AppCompatActivity activity;
+
+ public SearchPreferenceActionView(Context context) {
+ super(context);
+ initView();
+ }
+
+ public SearchPreferenceActionView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ initView();
+ }
+
+ public SearchPreferenceActionView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ initView();
+ }
+
+ private void initView() {
+ searchConfiguration.setSearchBarEnabled(false);
+ setOnQueryTextListener(new OnQueryTextListener() {
+ @Override
+ public boolean onQueryTextSubmit(String query) {
+ return false;
+ }
+
+ @Override
+ public boolean onQueryTextChange(String newText) {
+ if (searchFragment != null) {
+ searchFragment.setSearchTerm(newText);
+ }
+ return true;
+ }
+ });
+ setOnQueryTextFocusChangeListener((v, hasFocus) -> {
+ if (hasFocus && (searchFragment == null || !searchFragment.isVisible())) {
+ searchFragment = searchConfiguration.showSearchFragment();
+ searchFragment.setHistoryClickListener(entry -> setQuery(entry, false));
+ }
+ });
+ }
+
+ @SuppressWarnings("unused")
+ public SearchConfiguration getSearchConfiguration() {
+ return searchConfiguration;
+ }
+
+ /**
+ * Hides the search fragment
+ *
+ * @return true if it was hidden, so the calling activity should not go back itself.
+ */
+ @SuppressWarnings("unused")
+ public boolean cancelSearch() {
+ setQuery("", false);
+
+ boolean didSomething = false;
+ if (!isIconified()) {
+ setIconified(true);
+ didSomething = true;
+ }
+ if (searchFragment != null && searchFragment.isVisible()) {
+ removeFragment();
+ didSomething = true;
+ }
+ return didSomething;
+ }
+
+ protected void removeFragment() {
+ if (searchFragment.isVisible()) {
+ FragmentManager fm = activity.getSupportFragmentManager();
+ fm.beginTransaction().remove(searchFragment).commit();
+ fm.popBackStack(SearchPreferenceFragment.TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public void setActivity(AppCompatActivity activity) {
+ searchConfiguration.setActivity(activity);
+ this.activity = activity;
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceAdapter.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceAdapter.java
new file mode 100644
index 000000000..380849a1d
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceAdapter.java
@@ -0,0 +1,139 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+
+import android.annotation.SuppressLint;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.drdisagree.iconify.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class SearchPreferenceAdapter extends RecyclerView.Adapter {
+ private List dataset;
+ private SearchConfiguration searchConfiguration;
+ private SearchClickListener onItemClickListener;
+
+
+ SearchPreferenceAdapter() {
+ dataset = new ArrayList<>();
+ }
+
+ @NonNull
+ @Override
+ public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ if (viewType == PreferenceItem.TYPE) {
+ return new PreferenceViewHolder(
+ LayoutInflater.from(parent.getContext()).inflate(
+ R.layout.searchpreference_list_item_result, parent, false));
+ } else {
+ return new HistoryViewHolder(
+ LayoutInflater.from(parent.getContext()).inflate(
+ R.layout.searchpreference_list_item_history, parent, false));
+ }
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull final ViewHolder h, final int position) {
+ final ListItem listItem = dataset.get(position);
+ if (getItemViewType(position) == HistoryItem.TYPE) {
+ HistoryViewHolder holder = (HistoryViewHolder) h;
+ HistoryItem item = (HistoryItem) listItem;
+ holder.term.setText(item.getTerm());
+ } else if (getItemViewType(position) == PreferenceItem.TYPE) {
+ PreferenceViewHolder holder = (PreferenceViewHolder) h;
+ PreferenceItem item = (PreferenceItem) listItem;
+ holder.title.setText(item.title);
+
+ if (TextUtils.isEmpty(item.summary) || item.summary.contains("%s")) {
+ holder.summary.setVisibility(View.GONE);
+ } else {
+ holder.summary.setVisibility(View.VISIBLE);
+ holder.summary.setText(item.summary);
+ holder.summary.setAlpha(0.8f);
+ }
+
+ if (searchConfiguration.isBreadcrumbsEnabled()) {
+ holder.breadcrumbs.setText(item.breadcrumbs);
+ holder.breadcrumbs.setAlpha(0.6f);
+ holder.summary.setAlpha(0.8f);
+ } else {
+ holder.breadcrumbs.setVisibility(View.GONE);
+ holder.summary.setAlpha(0.6f);
+ }
+
+ }
+
+ h.root.setOnClickListener(v -> {
+ if (onItemClickListener != null) {
+ onItemClickListener.onItemClicked(listItem, h.getBindingAdapterPosition());
+ }
+ });
+ }
+
+ @SuppressLint("NotifyDataSetChanged")
+ void setContent(List items) {
+ dataset = new ArrayList<>(items);
+ this.notifyDataSetChanged();
+ }
+
+ @Override
+ public int getItemCount() {
+ return dataset.size();
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ return dataset.get(position).getType();
+ }
+
+ void setSearchConfiguration(SearchConfiguration searchConfiguration) {
+ this.searchConfiguration = searchConfiguration;
+ }
+
+ void setOnItemClickListener(SearchClickListener onItemClickListener) {
+ this.onItemClickListener = onItemClickListener;
+ }
+
+ interface SearchClickListener {
+ void onItemClicked(ListItem item, int position);
+ }
+
+ static class ViewHolder extends RecyclerView.ViewHolder {
+ View root;
+
+ ViewHolder(View v) {
+ super(v);
+ root = v;
+ }
+ }
+
+ static class HistoryViewHolder extends ViewHolder {
+ TextView term;
+
+ HistoryViewHolder(View v) {
+ super(v);
+ term = v.findViewById(R.id.term);
+ }
+ }
+
+ static class PreferenceViewHolder extends ViewHolder {
+ TextView title;
+ TextView summary;
+ TextView breadcrumbs;
+
+ PreferenceViewHolder(View v) {
+ super(v);
+ title = v.findViewById(R.id.title);
+ summary = v.findViewById(R.id.summary);
+ breadcrumbs = v.findViewById(R.id.breadcrumbs);
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceFragment.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceFragment.java
new file mode 100644
index 000000000..8d1696cd6
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceFragment.java
@@ -0,0 +1,355 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.PopupMenu;
+import androidx.core.view.MenuHost;
+import androidx.core.view.MenuProvider;
+import androidx.fragment.app.Fragment;
+import androidx.lifecycle.Lifecycle;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.drdisagree.iconify.R;
+import com.google.android.material.appbar.MaterialToolbar;
+import com.google.android.material.card.MaterialCardView;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+
+public class SearchPreferenceFragment extends Fragment implements SearchPreferenceAdapter.SearchClickListener {
+ /**
+ * Default tag used on the library's Fragment transactions with {@link SearchPreferenceFragment}
+ */
+ public static final String TAG = SearchPreferenceFragment.class.getSimpleName();
+
+ private static final String SHARED_PREFS_FILE = "preferenceSearch";
+ private static final int MAX_HISTORY = 5;
+ private PreferenceParser searcher;
+ private List results;
+ private List history;
+ private SharedPreferences prefs;
+ private SearchViewHolder viewHolder;
+ private SearchConfiguration searchConfiguration;
+ private SearchPreferenceAdapter adapter;
+ private HistoryClickListener historyClickListener;
+ private CharSequence searchTermPreset = null;
+ private final TextWatcher textWatcher = new TextWatcher() {
+ @Override
+ public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+ }
+
+ @Override
+ public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+ }
+
+ @Override
+ public void afterTextChanged(Editable editable) {
+ updateSearchResults(editable.toString());
+ viewHolder.clearButton.setVisibility(editable.toString().isEmpty() ? View.GONE : View.VISIBLE);
+ }
+ };
+
+ private void initSearch() {
+ searcher = new PreferenceParser(requireContext());
+
+ assert getArguments() != null;
+ searchConfiguration = SearchConfiguration.fromBundle(getArguments());
+ ArrayList files = searchConfiguration.getFiles();
+ for (SearchConfiguration.SearchIndexItem file : files) {
+ searcher.addResourceFile(file);
+ }
+ searcher.addPreferenceItems(searchConfiguration.getPreferencesToIndex());
+ loadHistory();
+ }
+
+ @Override
+ public void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ prefs = requireContext().getSharedPreferences(SHARED_PREFS_FILE, Context.MODE_PRIVATE);
+
+ initSearch();
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ inflater.getContext().setTheme(R.style.PrefsThemeToolbar);
+ View rootView = inflater.inflate(R.layout.searchpreference_fragment, container, false);
+ viewHolder = new SearchViewHolder(rootView);
+
+ viewHolder.clearButton.setOnClickListener(view -> viewHolder.searchView.setText(""));
+ if (searchConfiguration.isHistoryEnabled()) {
+ viewHolder.moreButton.setVisibility(View.VISIBLE);
+ }
+ if (searchConfiguration.getTextHint() != null) {
+ viewHolder.searchView.setHint(searchConfiguration.getTextHint());
+ }
+ if (searchConfiguration.getTextNoResults() != null) {
+ viewHolder.noResults.setText(searchConfiguration.getTextNoResults());
+ }
+ viewHolder.moreButton.setOnClickListener(v -> {
+ PopupMenu popup = new PopupMenu(requireContext(), viewHolder.moreButton);
+ popup.getMenuInflater().inflate(R.menu.search_more, popup.getMenu());
+ popup.setOnMenuItemClickListener(item -> {
+ if (item.getItemId() == R.id.clear_history) {
+ clearHistory();
+ }
+ return true;
+ });
+ popup.show();
+ });
+
+ viewHolder.recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
+ adapter = new SearchPreferenceAdapter();
+ adapter.setSearchConfiguration(searchConfiguration);
+ adapter.setOnItemClickListener(this);
+ viewHolder.recyclerView.setAdapter(adapter);
+
+ viewHolder.searchView.addTextChangedListener(textWatcher);
+
+ if (!searchConfiguration.isSearchBarEnabled()) {
+ viewHolder.searchContainer.setVisibility(View.GONE);
+ }
+
+ if (searchTermPreset != null) {
+ viewHolder.searchView.setText(searchTermPreset);
+ }
+
+ RevealAnimationSetting anim = searchConfiguration.getRevealAnimationSetting();
+ if (anim != null) {
+ AnimationUtils.registerCircularRevealAnimation(requireContext(), rootView, anim);
+ }
+
+ return rootView;
+ }
+
+ @Override
+ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+
+ MenuHost menuHost = requireActivity();
+ menuHost.addMenuProvider(new MenuProvider() {
+ @Override
+ public void onCreateMenu(@NonNull Menu menu, @NonNull MenuInflater menuInflater) {
+ menu.clear();
+ menuInflater.inflate(R.menu.search_menu, menu);
+ }
+
+ @Override
+ public boolean onMenuItemSelected(@NonNull MenuItem menuItem) {
+ return false;
+ }
+ }, getViewLifecycleOwner(), Lifecycle.State.RESUMED);
+ }
+
+ private void loadHistory() {
+ history = new ArrayList<>();
+ if (!searchConfiguration.isHistoryEnabled()) {
+ return;
+ }
+
+ int size = prefs.getInt("history_size", 0);
+ for (int i = 0; i < size; i++) {
+ String title = prefs.getString("history_" + i, null);
+ history.add(new HistoryItem(title));
+ }
+ }
+
+ private void saveHistory() {
+ SharedPreferences.Editor editor = prefs.edit();
+ editor.putInt("history_size", history.size());
+ for (int i = 0; i < history.size(); i++) {
+ editor.putString("history_" + i, history.get(i).getTerm());
+ }
+ editor.apply();
+ }
+
+ private void clearHistory() {
+ viewHolder.searchView.setText("");
+ history.clear();
+ saveHistory();
+ updateSearchResults("");
+ }
+
+ private void addHistoryEntry(String entry) {
+ HistoryItem newItem = new HistoryItem(entry);
+ if (!history.contains(newItem)) {
+ if (history.size() >= MAX_HISTORY) {
+ history.remove(history.size() - 1);
+ }
+ history.add(0, newItem);
+ saveHistory();
+ updateSearchResults(viewHolder.searchView.getText().toString());
+ }
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+
+ initSearch();
+
+ updateSearchResults(viewHolder.searchView.getText().toString());
+
+ if (searchConfiguration.isSearchBarEnabled()) {
+ showKeyboard();
+ }
+
+ if (getContext() != null) {
+ if (viewHolder.toolbar != null) {
+ ((AppCompatActivity) getContext()).setSupportActionBar(viewHolder.toolbar);
+ viewHolder.toolbar.setTitle(R.string.search_title);
+ }
+
+ if (getContext() instanceof AppCompatActivity) {
+ Objects.requireNonNull(((AppCompatActivity) getContext())
+ .getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
+ }
+ }
+ }
+
+ private void showKeyboard() {
+ viewHolder.searchView.post(() -> {
+ viewHolder.searchView.requestFocus();
+ InputMethodManager imm = (InputMethodManager) requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (imm != null) {
+ imm.showSoftInput(viewHolder.searchView, InputMethodManager.SHOW_IMPLICIT);
+ }
+ });
+ }
+
+ private void hideKeyboard() {
+ View view = requireActivity().getCurrentFocus();
+ InputMethodManager imm = (InputMethodManager) requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (view != null && imm != null) {
+ imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
+ }
+ }
+
+ public void setSearchTerm(CharSequence term) {
+ if (viewHolder != null) {
+ viewHolder.searchView.setText(term);
+ } else {
+ searchTermPreset = term;
+ }
+ }
+
+ private void updateSearchResults(String keyword) {
+ if (TextUtils.isEmpty(keyword)) {
+ showHistory();
+ return;
+ }
+
+ results = searcher.searchFor(keyword, searchConfiguration.isFuzzySearchEnabled());
+
+ Set seen = new HashSet<>();
+ List distinctResults = new ArrayList<>();
+
+ for (PreferenceItem result : results) {
+ String key = result.title + result.summary + result.breadcrumbs;
+ if (seen.add(key)) {
+ distinctResults.add(result);
+ }
+ }
+
+ adapter.setContent(new ArrayList<>(distinctResults));
+
+ setEmptyViewShown(distinctResults.isEmpty());
+ }
+
+ private void setEmptyViewShown(boolean shown) {
+ if (shown) {
+ viewHolder.noResults.setVisibility(View.VISIBLE);
+ viewHolder.recyclerView.setVisibility(View.GONE);
+ } else {
+ viewHolder.noResults.setVisibility(View.GONE);
+ viewHolder.recyclerView.setVisibility(View.VISIBLE);
+ }
+ }
+
+ private void showHistory() {
+ viewHolder.noResults.setVisibility(View.GONE);
+ viewHolder.recyclerView.setVisibility(View.VISIBLE);
+
+ adapter.setContent(new ArrayList<>(history));
+ setEmptyViewShown(history.isEmpty());
+ }
+
+ @Override
+ public void onItemClicked(ListItem item, int position) {
+ if (item.getType() == HistoryItem.TYPE) {
+ CharSequence text = ((HistoryItem) item).getTerm();
+ viewHolder.searchView.setText(text);
+ viewHolder.searchView.setSelection(text.length());
+ if (historyClickListener != null) {
+ historyClickListener.onHistoryEntryClicked(text.toString());
+ }
+ } else {
+ hideKeyboard();
+
+ try {
+ final SearchPreferenceResultListener callback = (SearchPreferenceResultListener) getActivity();
+ PreferenceItem r = results.get(position);
+ addHistoryEntry(r.title);
+ String screen = null;
+ if (!r.keyBreadcrumbs.isEmpty()) {
+ screen = r.keyBreadcrumbs.get(r.keyBreadcrumbs.size() - 1);
+ }
+ SearchPreferenceResult result = new SearchPreferenceResult(r.key, r.resId, screen);
+ assert callback != null;
+ callback.onSearchResultClicked(result);
+ } catch (ClassCastException e) {
+ throw new ClassCastException(requireActivity() + " must implement SearchPreferenceResultListener");
+ }
+ }
+ }
+
+ public void setHistoryClickListener(HistoryClickListener historyClickListener) {
+ this.historyClickListener = historyClickListener;
+ }
+
+ public interface HistoryClickListener {
+ void onHistoryEntryClicked(String entry);
+ }
+
+ private static class SearchViewHolder {
+ private final ImageView clearButton;
+ private final ImageView moreButton;
+ private final EditText searchView;
+ private final RecyclerView recyclerView;
+ private final TextView noResults;
+ private final MaterialCardView searchContainer;
+ private final MaterialToolbar toolbar;
+
+ SearchViewHolder(View root) {
+ searchView = root.findViewById(R.id.search);
+ clearButton = root.findViewById(R.id.clear);
+ recyclerView = root.findViewById(R.id.list);
+ moreButton = root.findViewById(R.id.more);
+ noResults = root.findViewById(R.id.no_results);
+ searchContainer = root.findViewById(R.id.search_card);
+ toolbar = root.findViewById(R.id.toolbar);
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceResult.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceResult.java
new file mode 100644
index 000000000..4e2b69970
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceResult.java
@@ -0,0 +1,170 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.RippleDrawable;
+import android.os.Handler;
+import android.os.Looper;
+import android.util.Log;
+import android.view.View;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.view.ViewCompat;
+import androidx.fragment.app.FragmentManager;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceGroup;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.drdisagree.iconify.R;
+import com.google.android.material.appbar.AppBarLayout;
+
+import java.util.Objects;
+
+public class SearchPreferenceResult {
+ private final String key;
+ private final int file;
+ private final String screen;
+
+ SearchPreferenceResult(String key, int file, String screen) {
+ this.key = key;
+ this.file = file;
+ this.screen = screen;
+ }
+
+ public static void highlight(final PreferenceFragmentCompat prefsFragment, final String key) {
+ new Handler(Looper.getMainLooper()).post(() -> doHighlight(prefsFragment, key));
+ }
+
+ private static void doHighlight(final PreferenceFragmentCompat prefsFragment, final String key) {
+ final Preference prefResult = prefsFragment.findPreference(key);
+
+ if (prefResult == null) {
+ Log.w("doHighlight", "Preference with key " + key + " not found on given screen " + prefsFragment.getClass().getSimpleName() + ".");
+ return;
+ }
+
+ final RecyclerView recyclerView = prefsFragment.getListView();
+ final RecyclerView.Adapter> adapter = recyclerView.getAdapter();
+
+ if (adapter instanceof PreferenceGroup.PreferencePositionCallback callback) {
+ final int position = callback.getPreferenceAdapterPosition(prefResult);
+
+ if (prefsFragment.getView() != null && prefsFragment.getView().findViewById(R.id.collapsing_toolbar) != null) {
+ AppBarLayout appBarLayout = (AppBarLayout) prefsFragment.getView().findViewById(R.id.collapsing_toolbar).getParent();
+ appBarLayout.setExpanded(false);
+ }
+
+ if (position != RecyclerView.NO_POSITION) {
+ recyclerView.post(() -> recyclerView.scrollToPosition(position));
+
+ recyclerView.postDelayed(() -> {
+ RecyclerView.ViewHolder holder = recyclerView.findViewHolderForAdapterPosition(position);
+ if (holder != null) {
+ Drawable background = holder.itemView.getBackground();
+ if (background instanceof RippleDrawable) {
+ forceRippleAnimation((RippleDrawable) background);
+ return;
+ }
+ }
+ highlightFallback(prefsFragment, prefResult);
+ }, 200);
+ return;
+ }
+ }
+
+ highlightFallback(prefsFragment, prefResult);
+ }
+
+ /**
+ * Alternative (old) highlight method if ripple does not work
+ */
+ private static void highlightFallback(PreferenceFragmentCompat prefsFragment, final Preference prefResult) {
+ prefsFragment.scrollToPreference(prefResult);
+
+ new Handler(Looper.getMainLooper()).postDelayed(() -> {
+ try {
+ final RecyclerView recyclerView = prefsFragment.getListView();
+ final RecyclerView.Adapter> adapter = recyclerView.getAdapter();
+
+ if (adapter instanceof PreferenceGroup.PreferencePositionCallback callback) {
+ final int position = callback.getPreferenceAdapterPosition(prefResult);
+
+ if (prefsFragment.getView() != null && prefsFragment.getView().findViewById(R.id.collapsing_toolbar) != null) {
+ AppBarLayout appBarLayout = (AppBarLayout) prefsFragment.getView().findViewById(R.id.collapsing_toolbar).getParent();
+ appBarLayout.setExpanded(false);
+ }
+
+ if (position != RecyclerView.NO_POSITION) {
+ recyclerView.post(() -> recyclerView.scrollToPosition(position));
+
+ recyclerView.postDelayed(() -> {
+ RecyclerView.ViewHolder holder = recyclerView.findViewHolderForAdapterPosition(position);
+ if (holder != null) {
+ Drawable background = holder.itemView.getBackground();
+ if (background instanceof RippleDrawable) {
+ forceRippleAnimation((RippleDrawable) background);
+ }
+ }
+ }, 200);
+ }
+ }
+ } catch (Exception e) {
+ Log.e("highlightFallback", "Failed to highlight preference", e);
+ }
+ }, 400);
+ }
+
+ protected static void forceRippleAnimation(RippleDrawable background) {
+ final RippleDrawable rippleDrawable = background;
+ rippleDrawable.setState(new int[]{android.R.attr.state_pressed, android.R.attr.state_enabled});
+ new Handler(Looper.getMainLooper()).postDelayed(() -> rippleDrawable.setState(new int[]{}), 300);
+ }
+
+ /**
+ * Returns the key of the preference pressed
+ *
+ * @return The key
+ */
+ public String getKey() {
+ return key;
+ }
+
+ /**
+ * Returns the file in which the result was found
+ *
+ * @return The file in which the result was found
+ */
+ public int getResourceFile() {
+ return file;
+ }
+
+ /**
+ * Returns the screen in which the result was found
+ *
+ * @return The screen in which the result was found
+ */
+ public String getScreen() {
+ return screen;
+ }
+
+ /**
+ * Highlight the preference that was found
+ *
+ * @param prefsFragment Fragment that contains the preference
+ */
+ @SuppressWarnings("unused")
+ public void highlight(final PreferenceFragmentCompat prefsFragment) {
+ new Handler(Looper.getMainLooper()).post(() -> doHighlight(prefsFragment, getKey()));
+ }
+
+ /**
+ * Closes the search results page
+ *
+ * @param activity The current activity
+ */
+ @SuppressWarnings("unused")
+ public void closeSearchPage(AppCompatActivity activity) {
+ FragmentManager fm = activity.getSupportFragmentManager();
+ fm.beginTransaction().remove(Objects.requireNonNull(fm.findFragmentByTag(SearchPreferenceFragment.TAG))).commit();
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceResultListener.java b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceResultListener.java
new file mode 100644
index 000000000..368360d44
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/preferences/preferencesearch/SearchPreferenceResultListener.java
@@ -0,0 +1,7 @@
+package com.drdisagree.iconify.ui.preferences.preferencesearch;
+
+import androidx.annotation.NonNull;
+
+public interface SearchPreferenceResultListener {
+ void onSearchResultClicked(@NonNull SearchPreferenceResult result);
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/utils/Animatoo.kt b/app/src/main/java/com/drdisagree/iconify/ui/utils/Animatoo.kt
index 85224841b..10b949038 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/utils/Animatoo.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/utils/Animatoo.kt
@@ -7,7 +7,6 @@ import com.drdisagree.iconify.R
@Suppress("deprecation")
object Animatoo {
- @JvmStatic
fun animateZoom(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_zoom_enter,
@@ -15,7 +14,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateFade(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_fade_enter,
@@ -23,7 +21,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateWindmill(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_windmill_enter,
@@ -31,7 +28,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateSpin(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_spin_enter,
@@ -39,7 +35,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateDiagonal(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_diagonal_right_enter,
@@ -47,7 +42,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateSplit(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_split_enter,
@@ -55,7 +49,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateShrink(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_shrink_enter,
@@ -63,7 +56,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateCard(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_card_enter,
@@ -71,7 +63,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateInAndOut(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_in_out_enter,
@@ -79,7 +70,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateSwipeLeft(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_swipe_left_enter,
@@ -87,7 +77,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateSwipeRight(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_swipe_right_enter,
@@ -95,7 +84,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateSlideLeft(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_slide_left_enter,
@@ -103,7 +91,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateSlideRight(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_slide_in_left,
@@ -111,7 +98,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateSlideDown(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_slide_down_enter,
@@ -119,7 +105,6 @@ object Animatoo {
)
}
- @JvmStatic
fun animateSlideUp(context: Context) {
(context as Activity).overridePendingTransition(
R.anim.animate_slide_up_enter,
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/utils/FragmentHelper.kt b/app/src/main/java/com/drdisagree/iconify/ui/utils/FragmentHelper.kt
new file mode 100644
index 000000000..7d1449184
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/utils/FragmentHelper.kt
@@ -0,0 +1,124 @@
+package com.drdisagree.iconify.ui.utils
+
+import androidx.fragment.app.Fragment
+import com.drdisagree.iconify.ui.fragments.home.BrightnessBar
+import com.drdisagree.iconify.ui.fragments.home.BrightnessBarPixel
+import com.drdisagree.iconify.ui.fragments.home.CellularIcons
+import com.drdisagree.iconify.ui.fragments.home.Home
+import com.drdisagree.iconify.ui.fragments.home.IconPack
+import com.drdisagree.iconify.ui.fragments.home.IconShape
+import com.drdisagree.iconify.ui.fragments.home.MediaIcons
+import com.drdisagree.iconify.ui.fragments.home.Notification
+import com.drdisagree.iconify.ui.fragments.home.NotificationPixel
+import com.drdisagree.iconify.ui.fragments.home.ProgressBar
+import com.drdisagree.iconify.ui.fragments.home.QsPanelTile
+import com.drdisagree.iconify.ui.fragments.home.QsPanelTilePixel
+import com.drdisagree.iconify.ui.fragments.home.SettingsIcons
+import com.drdisagree.iconify.ui.fragments.home.Switch
+import com.drdisagree.iconify.ui.fragments.home.ToastFrame
+import com.drdisagree.iconify.ui.fragments.home.WiFiIcons
+import com.drdisagree.iconify.ui.fragments.settings.AppUpdates
+import com.drdisagree.iconify.ui.fragments.settings.Changelog
+import com.drdisagree.iconify.ui.fragments.settings.Credits
+import com.drdisagree.iconify.ui.fragments.settings.Experimental
+import com.drdisagree.iconify.ui.fragments.settings.Settings
+import com.drdisagree.iconify.ui.fragments.tweaks.BasicColors
+import com.drdisagree.iconify.ui.fragments.tweaks.ColorEngine
+import com.drdisagree.iconify.ui.fragments.tweaks.ColoredBattery
+import com.drdisagree.iconify.ui.fragments.tweaks.MediaPlayer
+import com.drdisagree.iconify.ui.fragments.tweaks.Miscellaneous
+import com.drdisagree.iconify.ui.fragments.tweaks.MonetEngine
+import com.drdisagree.iconify.ui.fragments.tweaks.NavigationBar
+import com.drdisagree.iconify.ui.fragments.tweaks.QsIconLabel
+import com.drdisagree.iconify.ui.fragments.tweaks.QsPanelMargin
+import com.drdisagree.iconify.ui.fragments.tweaks.QsRowColumn
+import com.drdisagree.iconify.ui.fragments.tweaks.QsTileSize
+import com.drdisagree.iconify.ui.fragments.tweaks.Statusbar
+import com.drdisagree.iconify.ui.fragments.tweaks.Tweaks
+import com.drdisagree.iconify.ui.fragments.tweaks.UiRoundness
+import com.drdisagree.iconify.ui.fragments.tweaks.VolumePanel
+import com.drdisagree.iconify.ui.fragments.xposed.BackgroundChip
+import com.drdisagree.iconify.ui.fragments.xposed.BatteryStyle
+import com.drdisagree.iconify.ui.fragments.xposed.DepthWallpaper
+import com.drdisagree.iconify.ui.fragments.xposed.HeaderClock
+import com.drdisagree.iconify.ui.fragments.xposed.HeaderImage
+import com.drdisagree.iconify.ui.fragments.xposed.LockscreenClock
+import com.drdisagree.iconify.ui.fragments.xposed.LockscreenWeather
+import com.drdisagree.iconify.ui.fragments.xposed.LockscreenWidget
+import com.drdisagree.iconify.ui.fragments.xposed.Others
+import com.drdisagree.iconify.ui.fragments.xposed.QuickSettings
+import com.drdisagree.iconify.ui.fragments.xposed.Themes
+import com.drdisagree.iconify.ui.fragments.xposed.TransparencyBlur
+import com.drdisagree.iconify.ui.fragments.xposed.Xposed
+
+object FragmentHelper {
+
+ fun isInGroup(fragment: Fragment, group: Int): Boolean {
+ return when (group) {
+ 0 -> {
+ fragment is Home ||
+ fragment is IconPack ||
+ fragment is ColoredBattery ||
+ fragment is MediaIcons ||
+ fragment is SettingsIcons ||
+ fragment is CellularIcons ||
+ fragment is WiFiIcons ||
+ fragment is BrightnessBar ||
+ fragment is BrightnessBarPixel ||
+ fragment is QsPanelTile ||
+ fragment is QsPanelTilePixel ||
+ fragment is Notification ||
+ fragment is NotificationPixel ||
+ fragment is ProgressBar ||
+ fragment is Switch ||
+ fragment is ToastFrame ||
+ fragment is IconShape
+ }
+
+ 1 -> {
+ fragment is Tweaks ||
+ fragment is ColorEngine ||
+ fragment is BasicColors ||
+ fragment is MonetEngine ||
+ fragment is UiRoundness ||
+ fragment is QsRowColumn ||
+ fragment is QsIconLabel ||
+ fragment is QsTileSize ||
+ fragment is QsPanelMargin ||
+ fragment is Statusbar ||
+ fragment is NavigationBar ||
+ fragment is MediaPlayer ||
+ fragment is VolumePanel ||
+ fragment is Miscellaneous
+ }
+
+ 2 -> {
+ fragment is Xposed ||
+ fragment is TransparencyBlur ||
+ fragment is QuickSettings ||
+ fragment is Themes ||
+ fragment is BatteryStyle ||
+ fragment is com.drdisagree.iconify.ui.fragments.xposed.Statusbar ||
+ fragment is com.drdisagree.iconify.ui.fragments.xposed.VolumePanel ||
+ fragment is HeaderImage ||
+ fragment is HeaderClock ||
+ fragment is LockscreenClock ||
+ fragment is LockscreenWeather ||
+ fragment is LockscreenWidget ||
+ fragment is DepthWallpaper ||
+ fragment is BackgroundChip ||
+ fragment is Others
+ }
+
+ 3 -> {
+ fragment is Settings ||
+ fragment is AppUpdates ||
+ fragment is Changelog ||
+ fragment is Credits ||
+ fragment is Experimental
+ }
+
+ else -> false
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/utils/SnapOnScrollListener.java b/app/src/main/java/com/drdisagree/iconify/ui/utils/SnapOnScrollListener.java
new file mode 100644
index 000000000..d6b1ed4bb
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/utils/SnapOnScrollListener.java
@@ -0,0 +1,72 @@
+package com.drdisagree.iconify.ui.utils;
+
+import android.view.View;
+
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.recyclerview.widget.SnapHelper;
+
+public class SnapOnScrollListener extends RecyclerView.OnScrollListener {
+ private final SnapHelper snapHelper;
+ private Behavior behavior = Behavior.NOTIFY_ON_SCROLL;
+ private OnSnapPositionChangeListener onSnapPositionChangeListener;
+
+ private int snapPosition = RecyclerView.NO_POSITION;
+
+ public SnapOnScrollListener(SnapHelper snapHelper) {
+ this.snapHelper = snapHelper;
+ }
+
+ public SnapOnScrollListener(SnapHelper snapHelper, Behavior behavior, OnSnapPositionChangeListener onSnapPositionChangeListener) {
+ this.snapHelper = snapHelper;
+ this.behavior = behavior;
+ this.onSnapPositionChangeListener = onSnapPositionChangeListener;
+ }
+
+ @Override
+ public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
+ if (behavior == Behavior.NOTIFY_ON_SCROLL) {
+ maybeNotifySnapPositionChange(recyclerView);
+ }
+ }
+
+ @Override
+ public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
+ if (behavior == Behavior.NOTIFY_ON_SCROLL_STATE_IDLE
+ && newState == RecyclerView.SCROLL_STATE_IDLE) {
+ maybeNotifySnapPositionChange(recyclerView);
+ }
+ }
+
+ private void maybeNotifySnapPositionChange(RecyclerView recyclerView) {
+ int snapPosition = getSnapPosition(recyclerView);
+ boolean snapPositionChanged = this.snapPosition != snapPosition;
+ if (snapPositionChanged) {
+ if (onSnapPositionChangeListener != null) {
+ onSnapPositionChangeListener.onSnapPositionChange(snapPosition);
+ }
+ this.snapPosition = snapPosition;
+ }
+ }
+
+ public int getSnapPosition(RecyclerView recyclerView) {
+ RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
+ if (layoutManager == null) {
+ return RecyclerView.NO_POSITION;
+ }
+ View snapView = snapHelper.findSnapView(layoutManager);
+ if (snapView == null) {
+ return RecyclerView.NO_POSITION;
+ }
+ return layoutManager.getPosition(snapView);
+ }
+
+
+ public enum Behavior {
+ NOTIFY_ON_SCROLL,
+ NOTIFY_ON_SCROLL_STATE_IDLE
+ }
+
+ public interface OnSnapPositionChangeListener {
+ void onSnapPositionChange(int position);
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/utils/ThemeHelper.kt b/app/src/main/java/com/drdisagree/iconify/ui/utils/ThemeHelper.kt
index daaca2fe4..e739d6cc7 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/utils/ThemeHelper.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/utils/ThemeHelper.kt
@@ -2,14 +2,14 @@ package com.drdisagree.iconify.ui.utils
import androidx.appcompat.app.AppCompatDelegate
import com.drdisagree.iconify.common.Preferences.APP_THEME
-import com.drdisagree.iconify.config.Prefs.getInt
+import com.drdisagree.iconify.config.RPrefs
object ThemeHelper {
- @JvmStatic
val theme: Int
get() {
- val theme = getInt(APP_THEME, 2)
+ val theme = RPrefs.getString(APP_THEME, "2")!!.toInt()
+
return when (theme) {
0 -> AppCompatDelegate.MODE_NIGHT_NO
1 -> AppCompatDelegate.MODE_NIGHT_YES
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/utils/ViewBindingHelpers.kt b/app/src/main/java/com/drdisagree/iconify/ui/utils/ViewBindingHelpers.kt
index 12af40a2a..684dcd342 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/utils/ViewBindingHelpers.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/utils/ViewBindingHelpers.kt
@@ -13,25 +13,21 @@ import com.bumptech.glide.request.transition.Transition
object ViewBindingHelpers {
- @JvmStatic
fun setImageUrl(imageView: ImageView, url: String) {
Glide.with(imageView.context).load(url.replace("http://", "https://"))
.apply(RequestOptions.centerCropTransform())
.transition(DrawableTransitionOptions.withCrossFade()).into(imageView)
}
- @JvmStatic
fun setDrawable(imageView: ImageView, drawable: Drawable?) {
Glide.with(imageView.context).load(drawable).into(imageView)
}
- @JvmStatic
fun setDrawableWithAnimation(imageView: ImageView, drawable: Drawable?) {
Glide.with(imageView.context).load(drawable)
.transition(DrawableTransitionOptions.withCrossFade()).into(imageView)
}
- @JvmStatic
fun setDrawable(viewGroup: ViewGroup, drawable: Drawable?) {
Glide.with(viewGroup.context).load(drawable).into(object : CustomTarget() {
override fun onResourceReady(
@@ -45,7 +41,6 @@ object ViewBindingHelpers {
})
}
- @JvmStatic
fun setDrawableWithAnimation(viewGroup: ViewGroup, drawable: Drawable?) {
Glide.with(viewGroup.context).load(drawable)
.transition(DrawableTransitionOptions.withCrossFade())
@@ -61,13 +56,11 @@ object ViewBindingHelpers {
})
}
- @JvmStatic
fun setBitmap(imageView: ImageView, bitmap: Bitmap?) {
val drawable: Drawable = BitmapDrawable(imageView.context.resources, bitmap)
setDrawable(imageView, drawable)
}
- @JvmStatic
fun setBitmapWithAnimation(imageView: ImageView, bitmap: Bitmap?) {
val drawable: Drawable = BitmapDrawable(imageView.context.resources, bitmap)
setDrawableWithAnimation(imageView, drawable)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/utils/ViewHelper.kt b/app/src/main/java/com/drdisagree/iconify/ui/utils/ViewHelper.kt
index 61679cda7..04197e037 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/utils/ViewHelper.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/utils/ViewHelper.kt
@@ -8,6 +8,8 @@ import android.os.BatteryManager
import android.os.Handler
import android.os.Looper
import android.util.TypedValue
+import android.view.ViewGroup
+import android.widget.TextView
import androidx.annotation.DrawableRes
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
@@ -59,7 +61,6 @@ import com.drdisagree.iconify.xposed.modules.batterystyles.RLandscapeBatteryStyl
object ViewHelper {
- @JvmStatic
fun disableNestedScrolling(viewPager: ViewPager2) {
var recyclerView: RecyclerView? = null
@@ -75,22 +76,38 @@ object ViewHelper {
}
}
- @JvmStatic
- fun setHeader(context: Context, toolbar: Toolbar, title: Int) {
+ fun setHeader(context: Context, toolbar: Toolbar, title: Any) {
(context as AppCompatActivity).setSupportActionBar(toolbar)
context.supportActionBar?.setDisplayHomeAsUpEnabled(true)
context.supportActionBar?.setDisplayShowHomeEnabled(true)
- toolbar.setTitle(title)
+ if (title is Int) {
+ toolbar.setTitle(title)
+ } else if (title is String) {
+ toolbar.setTitle(title)
+ }
}
- @JvmStatic
fun setHeader(
context: Context,
fragmentManager: FragmentManager,
toolbar: Toolbar,
title: Int
) {
- toolbar.setTitle(context.resources.getString(title))
+ setHeader(
+ context,
+ fragmentManager,
+ toolbar,
+ context.resources.getString(title)
+ )
+ }
+
+ fun setHeader(
+ context: Context,
+ fragmentManager: FragmentManager,
+ toolbar: Toolbar,
+ title: String
+ ) {
+ toolbar.setTitle(title)
(context as AppCompatActivity).setSupportActionBar(toolbar)
context.supportActionBar?.setDisplayHomeAsUpEnabled(true)
context.supportActionBar?.setDisplayShowHomeEnabled(true)
@@ -106,7 +123,6 @@ object ViewHelper {
return dp2px(dp.toInt())
}
- @JvmStatic
fun dp2px(dp: Int): Int {
return TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP,
@@ -115,7 +131,6 @@ object ViewHelper {
).toInt()
}
- @JvmStatic
fun getBatteryDrawables(context: Context): Array {
val batteryColor = appContext.getColor(R.color.textColorPrimary)
@@ -183,10 +198,10 @@ object ViewHelper {
batteryDrawables[2] = getRotateDrawable(batteryIcon, -90f)
}
}
+
return batteryDrawables
}
- @JvmStatic
fun getChargingIcons(context: Context): Array {
val chargingIcons = arrayOf(
getDrawable(context, R.drawable.ic_charging_bold)!!, // Bold
@@ -257,4 +272,27 @@ object ViewHelper {
private fun getDrawable(context: Context, @DrawableRes batteryRes: Int): Drawable? {
return ResourcesCompat.getDrawable(context.resources, batteryRes, context.theme)
}
+
+ fun setTextRecursively(viewGroup: ViewGroup, text: String?) {
+ for (i in 0 until viewGroup.childCount) {
+ val child = viewGroup.getChildAt(i)
+ if (child is ViewGroup) {
+ setTextRecursively(child, text)
+ } else if (child is TextView) {
+ child.text = text
+ }
+ }
+ }
+
+ fun applyTextSizeRecursively(viewGroup: ViewGroup, textSize: Int) {
+ for (i in 0 until viewGroup.childCount) {
+ val child = viewGroup.getChildAt(i)
+ if (child is ViewGroup) {
+ applyTextSizeRecursively(child, textSize)
+ } else if (child is TextView) {
+ child.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize.toFloat())
+ }
+ }
+ }
+
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/views/OnboardingView.kt b/app/src/main/java/com/drdisagree/iconify/ui/views/OnboardingView.kt
index 6f8cd4995..3a2679afb 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/views/OnboardingView.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/views/OnboardingView.kt
@@ -30,13 +30,12 @@ import com.drdisagree.iconify.common.Preferences.UPDATE_DETECTED
import com.drdisagree.iconify.common.Preferences.VER_CODE
import com.drdisagree.iconify.common.Preferences.XPOSED_ONLY_MODE
import com.drdisagree.iconify.common.Resources
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.clearPref
-import com.drdisagree.iconify.config.Prefs.getBoolean
-import com.drdisagree.iconify.config.Prefs.getInt
-import com.drdisagree.iconify.config.Prefs.putBoolean
-import com.drdisagree.iconify.config.Prefs.putInt
import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.clearPref
+import com.drdisagree.iconify.config.RPrefs.getBoolean
+import com.drdisagree.iconify.config.RPrefs.getInt
+import com.drdisagree.iconify.config.RPrefs.putBoolean
+import com.drdisagree.iconify.config.RPrefs.putInt
import com.drdisagree.iconify.databinding.ViewOnboardingPageBinding
import com.drdisagree.iconify.ui.activities.MainActivity
import com.drdisagree.iconify.ui.adapters.OnboardingAdapter
@@ -45,20 +44,20 @@ import com.drdisagree.iconify.ui.dialogs.ErrorDialog
import com.drdisagree.iconify.ui.dialogs.InstallationDialog
import com.drdisagree.iconify.ui.entity.OnboardingPage
import com.drdisagree.iconify.ui.utils.Animatoo.animateSlideLeft
-import com.drdisagree.iconify.utils.FileUtil.copyAssets
-import com.drdisagree.iconify.utils.ModuleUtil.createModule
-import com.drdisagree.iconify.utils.ModuleUtil.flashModule
-import com.drdisagree.iconify.utils.ModuleUtil.handleModule
-import com.drdisagree.iconify.utils.ModuleUtil.moduleExists
-import com.drdisagree.iconify.utils.RootUtil.deviceProperlyRooted
-import com.drdisagree.iconify.utils.RootUtil.isDeviceRooted
-import com.drdisagree.iconify.utils.SystemUtil.hasStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.requestStoragePermission
-import com.drdisagree.iconify.utils.SystemUtil.restartDevice
-import com.drdisagree.iconify.utils.SystemUtil.savedVersionCode
+import com.drdisagree.iconify.utils.FileUtils.copyAssets
+import com.drdisagree.iconify.utils.ModuleUtils.createModule
+import com.drdisagree.iconify.utils.ModuleUtils.flashModule
+import com.drdisagree.iconify.utils.ModuleUtils.handleModule
+import com.drdisagree.iconify.utils.ModuleUtils.moduleExists
+import com.drdisagree.iconify.utils.RootUtils.deviceProperlyRooted
+import com.drdisagree.iconify.utils.RootUtils.isDeviceRooted
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.restartDevice
+import com.drdisagree.iconify.utils.SystemUtils.savedVersionCode
import com.drdisagree.iconify.utils.helper.BackupRestore.restoreFiles
import com.drdisagree.iconify.utils.helper.Logger.writeLog
-import com.drdisagree.iconify.utils.overlay.OverlayUtil.overlayExists
+import com.drdisagree.iconify.utils.overlay.OverlayUtils.overlayExists
import com.drdisagree.iconify.utils.overlay.compiler.OnboardingCompiler.apkSigner
import com.drdisagree.iconify.utils.overlay.compiler.OnboardingCompiler.createManifest
import com.drdisagree.iconify.utils.overlay.compiler.OnboardingCompiler.runAapt
@@ -213,7 +212,6 @@ class OnboardingView : FrameLayout {
if (getInt(VER_CODE) != BuildConfig.VERSION_CODE || !moduleExists || !overlayExists) {
if (!moduleExists || !overlayExists) {
- Prefs.clearAllPrefs()
RPrefs.clearAllPrefs()
}
@@ -271,12 +269,11 @@ class OnboardingView : FrameLayout {
}, (if (clickedButton) 10 else 1000).toLong())
} else {
if (!moduleExists()) {
- Prefs.clearAllPrefs()
RPrefs.clearAllPrefs()
handleInstallation()
} else {
- putBoolean(XPOSED_ONLY_MODE, true)
+ putBoolean(XPOSED_ONLY_MODE, !overlayExists())
val intent = Intent(context, MainActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/BottomSheetWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/BottomSheetWidget.kt
index f159be955..348285d4d 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/widgets/BottomSheetWidget.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/BottomSheetWidget.kt
@@ -17,7 +17,8 @@ import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.drdisagree.iconify.R
import com.drdisagree.iconify.ui.adapters.IconsAdapter
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.ui.adapters.IconsAdapter.Companion.ICONS_ADAPTER
+import com.drdisagree.iconify.utils.SystemUtils
import com.google.android.material.appbar.MaterialToolbar
import com.google.android.material.bottomsheet.BottomSheetDialog
import kotlinx.parcelize.Parcelize
@@ -37,7 +38,8 @@ class BottomSheetWidget : RelativeLayout, IconsAdapter.OnItemClickListener {
private lateinit var mEntryValues: Array
private var mDrawables: Array? = null
private var mValue: String = selectedIndex.toString()
- private var mAdapter: IconsAdapter? = null
+ private var mAdapter: RecyclerView.Adapter? = null
+ private var mLayoutManager: RecyclerView.LayoutManager? = null
private var onItemClickListener: OnItemClickListener? = null
constructor(context: Context) : super(context) {
@@ -103,6 +105,11 @@ class BottomSheetWidget : RelativeLayout, IconsAdapter.OnItemClickListener {
}
private fun buildEntries() {
+ if (arrayResId == 0) {
+ mEntries = emptyArray()
+ mEntryValues = emptyArray()
+ return
+ }
mEntries = resources.getTextArray(arrayResId)
val mValues: MutableList = ArrayList()
@@ -121,6 +128,10 @@ class BottomSheetWidget : RelativeLayout, IconsAdapter.OnItemClickListener {
titleTextView.text = title
}
+ fun setSummary(summary: String) {
+ summaryTextView.text = summary
+ }
+
private fun setSelectedText(summaryResId: Int) {
setSelectedText(context.getString(summaryResId))
}
@@ -144,12 +155,16 @@ class BottomSheetWidget : RelativeLayout, IconsAdapter.OnItemClickListener {
fun setDrawable(drawable: Array) {
mDrawables = drawable
- mAdapter?.setDrawables(drawable)
+ if (mAdapter is IconsAdapter) (mAdapter as IconsAdapter).setDrawables(drawable)
}
fun setCurrentValue(currentValue: String) {
mValue = currentValue
- mAdapter?.setCurrentValue(currentValue)
+ if (mAdapter is IconsAdapter) (mAdapter as IconsAdapter).setCurrentValue(currentValue)
+ }
+
+ fun setLayoutManager(layoutManager: RecyclerView.LayoutManager) {
+ mLayoutManager = layoutManager
}
fun setIconVisibility(visibility: Int) {
@@ -161,6 +176,7 @@ class BottomSheetWidget : RelativeLayout, IconsAdapter.OnItemClickListener {
}
fun setSelectedIndex(selectedIndex: Int) {
+ if (arrayResId == 0) return
var idx = selectedIndex
val list = listOf(*resources.getStringArray(arrayResId))
@@ -185,15 +201,22 @@ class BottomSheetWidget : RelativeLayout, IconsAdapter.OnItemClickListener {
toolbar.title = titleTextView.text
toolbar.isTitleCentered = true
- recyclerView.layoutManager = GridLayoutManager(context, 3)
+ recyclerView.layoutManager = mLayoutManager ?: GridLayoutManager(context, 3)
- mAdapter = IconsAdapter(mEntries, mEntryValues, mValue, this)
- mAdapter!!.setDrawables(mDrawables)
+ if (mAdapter == null) {
+ mAdapter = IconsAdapter(mEntries, mEntryValues, mValue, ICONS_ADAPTER, this)
+ (mAdapter!! as IconsAdapter).setDrawables(mDrawables)
+ }
recyclerView.adapter = mAdapter
mBottomSheetDialog.setContentView(view)
}
+ fun setAdapter(adapter: RecyclerView.Adapter) {
+ mAdapter = adapter
+ initBottomSheetDialog()
+ }
+
override fun setEnabled(enabled: Boolean) {
super.setEnabled(enabled)
@@ -207,7 +230,7 @@ class BottomSheetWidget : RelativeLayout, IconsAdapter.OnItemClickListener {
iconImageView.imageTintList = ColorStateList.valueOf(color)
} else {
- if (SystemUtil.isDarkMode) {
+ if (SystemUtils.isDarkMode) {
iconImageView.imageTintList = ColorStateList.valueOf(Color.DKGRAY)
} else {
iconImageView.imageTintList = ColorStateList.valueOf(Color.LTGRAY)
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/ColorPickerSmallWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/ColorPickerSmallWidget.kt
index a5a66046e..3c431e647 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/widgets/ColorPickerSmallWidget.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/ColorPickerSmallWidget.kt
@@ -16,7 +16,7 @@ import com.drdisagree.iconify.R
import com.drdisagree.iconify.ui.activities.MainActivity
import com.drdisagree.iconify.ui.events.ColorDismissedEvent
import com.drdisagree.iconify.ui.events.ColorSelectedEvent
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.utils.SystemUtils
import kotlinx.parcelize.Parcelize
import kotlinx.parcelize.RawValue
import org.greenrobot.eventbus.EventBus
@@ -108,7 +108,7 @@ class ColorPickerSmallWidget : RelativeLayout {
selectedColor = colorCode
if (!isEnabled) {
- colorCode = if (SystemUtil.isDarkMode) {
+ colorCode = if (SystemUtils.isDarkMode) {
Color.DKGRAY
} else {
Color.LTGRAY
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/ColorPickerWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/ColorPickerWidget.kt
index 9fa58cef6..fceed6153 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/widgets/ColorPickerWidget.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/ColorPickerWidget.kt
@@ -15,7 +15,7 @@ import com.drdisagree.iconify.R
import com.drdisagree.iconify.ui.activities.MainActivity
import com.drdisagree.iconify.ui.events.ColorDismissedEvent
import com.drdisagree.iconify.ui.events.ColorSelectedEvent
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.utils.SystemUtils
import kotlinx.parcelize.Parcelize
import kotlinx.parcelize.RawValue
import org.greenrobot.eventbus.EventBus
@@ -53,18 +53,18 @@ class ColorPickerWidget : RelativeLayout {
private fun init(context: Context, attrs: AttributeSet?) {
inflate(context, R.layout.view_widget_colorpicker, this)
-
+
initializeId()
-
+
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.ColorPickerWidget)
-
+
setTitle(typedArray.getString(R.styleable.ColorPickerWidget_titleText))
setSummary(typedArray.getString(R.styleable.ColorPickerWidget_summaryText))
val colorResId = typedArray.getResourceId(R.styleable.ColorPickerWidget_previewColor, -1)
selectedColor = typedArray.getColor(R.styleable.ColorPickerWidget_previewColor, Color.WHITE)
-
+
typedArray.recycle()
-
+
if (colorResId != -1) {
previewColor = ContextCompat.getColor(getContext(), colorResId)
}
@@ -80,10 +80,20 @@ class ColorPickerWidget : RelativeLayout {
fun setSummary(summaryResId: Int) {
summaryTextView.setText(summaryResId)
+ if (summaryResId == 0) {
+ summaryTextView.visibility = View.GONE
+ } else {
+ summaryTextView.visibility = View.VISIBLE
+ }
}
fun setSummary(summary: String?) {
summaryTextView.text = summary
+ if (summary.isNullOrEmpty()) {
+ summaryTextView.visibility = View.GONE
+ } else {
+ summaryTextView.visibility = View.VISIBLE
+ }
}
fun setColorPickerListener(
@@ -117,7 +127,7 @@ class ColorPickerWidget : RelativeLayout {
selectedColor = colorCode
if (!isEnabled) {
- colorCode = if (SystemUtil.isDarkMode) {
+ colorCode = if (SystemUtils.isDarkMode) {
Color.DKGRAY
} else {
Color.LTGRAY
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/EditTextWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/EditTextWidget.kt
new file mode 100644
index 000000000..71027d235
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/EditTextWidget.kt
@@ -0,0 +1,181 @@
+package com.drdisagree.iconify.ui.widgets
+
+import android.content.Context
+import android.content.res.ColorStateList
+import android.graphics.Color
+import android.graphics.drawable.Drawable
+import android.text.TextUtils
+import android.util.AttributeSet
+import android.util.TypedValue
+import android.view.View
+import android.widget.ImageView
+import android.widget.RelativeLayout
+import android.widget.TextView
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.ui.dialogs.EditTextDialog
+import com.drdisagree.iconify.utils.SystemUtils
+
+class EditTextWidget : RelativeLayout {
+
+ private lateinit var container: RelativeLayout
+ private lateinit var titleTextView: TextView
+ private lateinit var summaryTextView: TextView
+ private lateinit var iconImageView: ImageView
+ private lateinit var dialogTitle: String
+ private lateinit var dialogSubtitle: String
+ private lateinit var dialogHint: String
+ private lateinit var dialogText: String
+ private lateinit var mEditTextDialog: EditTextDialog
+
+ constructor(context: Context) : super(context) {
+ init(context, null)
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ init(context, attrs)
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
+ context,
+ attrs,
+ defStyleAttr
+ ) {
+ init(context, attrs)
+ }
+
+ private fun init(context: Context, attrs: AttributeSet?) {
+ inflate(context, R.layout.view_widget_bottomsheet, this)
+
+ initializeId()
+
+ val typedArray = context.obtainStyledAttributes(attrs, R.styleable.EditTextWidget)
+ dialogTitle = typedArray.getString(R.styleable.EditTextWidget_dialogTitleText).toString()
+ if (TextUtils.isEmpty(dialogTitle) || dialogTitle == "null") dialogTitle = typedArray.getString(R.styleable.EditTextWidget_titleText).toString();
+ dialogSubtitle = typedArray.getString(R.styleable.EditTextWidget_dialogSubtitleText).toString()
+ if (dialogSubtitle.isEmpty() || dialogSubtitle == "null") dialogSubtitle = typedArray.getString(R.styleable.EditTextWidget_summaryText).toString();
+ if (dialogSubtitle == "null") dialogSubtitle = "" // catch null summary
+ dialogHint = typedArray.getString(R.styleable.EditTextWidget_dialogHintText).toString()
+ dialogText = typedArray.getString(R.styleable.EditTextWidget_dialogText).toString()
+
+ setTitle(typedArray.getString(R.styleable.EditTextWidget_titleText))
+ setSummary(typedArray.getString(R.styleable.EditTextWidget_summaryText))
+
+ val icon = typedArray.getResourceId(R.styleable.BottomSheetWidget_icon, 0)
+ var iconSpaceReserved =
+ typedArray.getBoolean(R.styleable.BottomSheetWidget_iconSpaceReserved, false)
+
+ typedArray.recycle()
+
+ if (icon != 0) {
+ iconSpaceReserved = true
+ iconImageView.setImageResource(icon)
+ }
+
+ if (!iconSpaceReserved) {
+ iconImageView.visibility = View.GONE
+ }
+
+ container.setOnClickListener { mEditTextDialog.show(dialogTitle, dialogSubtitle, dialogHint, dialogText) }
+ }
+
+ fun setTitle(titleResId: Int) {
+ titleTextView.setText(titleResId)
+ }
+
+ fun setTitle(title: String?) {
+ titleTextView.text = title
+ }
+
+ fun setSummary(summary: String?) {
+ summaryTextView.text = summary
+ }
+
+ /**
+ * Set the text for the EditText in the dialog
+ * @param text The text to be displayed in the EditText
+ */
+ fun setEditTextValue(text: String) {
+ dialogText = text
+ }
+
+ /**
+ * Set the hint for the EditText in the dialog
+ * @param hint The hint to be displayed in the EditText
+ */
+ fun setEditTextHint(hint: String) {
+ dialogHint = hint
+ }
+
+ fun setIcon(icon: Int) {
+ iconImageView.setImageResource(icon)
+ iconImageView.visibility = View.VISIBLE
+ }
+
+ fun setIcon(drawable: Drawable?) {
+ iconImageView.setImageDrawable(drawable)
+ iconImageView.visibility = View.VISIBLE
+ }
+
+ fun setIconVisibility(visibility: Int) {
+ iconImageView.visibility = visibility
+ }
+
+ override fun setEnabled(enabled: Boolean) {
+ super.setEnabled(enabled)
+
+ if (enabled) {
+ val typedValue = TypedValue()
+ val a = context.obtainStyledAttributes(
+ typedValue.data, intArrayOf(com.google.android.material.R.attr.colorPrimary)
+ )
+ val color = a.getColor(0, 0)
+ a.recycle()
+
+ iconImageView.imageTintList = ColorStateList.valueOf(color)
+ } else {
+ if (SystemUtils.isDarkMode) {
+ iconImageView.imageTintList = ColorStateList.valueOf(Color.DKGRAY)
+ } else {
+ iconImageView.imageTintList = ColorStateList.valueOf(Color.LTGRAY)
+ }
+ }
+
+ container.isEnabled = enabled
+ titleTextView.isEnabled = enabled
+ summaryTextView.isEnabled = enabled
+ iconImageView.isEnabled = enabled
+ }
+
+ // to avoid listener bug, we need to re-generate unique id for each view
+ private fun initializeId() {
+ container = findViewById(R.id.container)
+ titleTextView = findViewById(R.id.title)
+ summaryTextView = findViewById(R.id.summary)
+ iconImageView = findViewById(R.id.icon)
+ container.setId(generateViewId())
+ titleTextView.setId(generateViewId())
+ summaryTextView.setId(generateViewId())
+ iconImageView.setId(generateViewId())
+
+ mEditTextDialog = EditTextDialog(context, container.id)
+
+ val layoutParams = findViewById(R.id.text_container).layoutParams as LayoutParams
+ layoutParams.addRule(END_OF, iconImageView.id)
+ findViewById(R.id.text_container).setLayoutParams(layoutParams)
+ }
+
+ override fun onDetachedFromWindow() {
+ mEditTextDialog.dismiss()
+ super.onDetachedFromWindow()
+ }
+
+ /**
+ * Set the listener for the EditTextDialog
+ * @param listener The listener to be set
+ * @see EditTextDialog.EditTextDialogListener
+ */
+ fun setOnEditTextListener(listener: EditTextDialog.EditTextDialogListener?) {
+ mEditTextDialog.setDialogListener(listener)
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/FilePickerWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/FilePickerWidget.kt
index 3cda45d65..683711c5b 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/widgets/FilePickerWidget.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/FilePickerWidget.kt
@@ -8,8 +8,8 @@ import android.widget.RelativeLayout
import android.widget.TextView
import androidx.activity.result.ActivityResultLauncher
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.utils.FileUtil
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.utils.FileUtils
+import com.drdisagree.iconify.utils.SystemUtils
import com.google.android.material.button.MaterialButton
class FilePickerWidget : RelativeLayout {
@@ -102,11 +102,11 @@ class FilePickerWidget : RelativeLayout {
activityResultLauncher = launcher
buttonPicker.setOnClickListener {
- if (!SystemUtil.hasStoragePermission()) {
- SystemUtil.requestStoragePermission(context)
+ if (!SystemUtils.hasStoragePermission()) {
+ SystemUtils.requestStoragePermission(context)
} else {
if (::activityResultLauncher.isInitialized) {
- FileUtil.launchFilePicker(activityResultLauncher, fileType)
+ FileUtils.launchFilePicker(activityResultLauncher, fileType)
}
}
}
@@ -151,10 +151,10 @@ class FilePickerWidget : RelativeLayout {
if (::activityResultLauncher.isInitialized) {
buttonPicker.setOnClickListener {
- if (!SystemUtil.hasStoragePermission()) {
- SystemUtil.requestStoragePermission(context)
+ if (!SystemUtils.hasStoragePermission()) {
+ SystemUtils.requestStoragePermission(context)
} else {
- FileUtil.launchFilePicker(activityResultLauncher, fileType)
+ FileUtils.launchFilePicker(activityResultLauncher, fileType)
}
}
}
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/MenuWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/MenuWidget.kt
index 30042b0e0..6cfba1a02 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/widgets/MenuWidget.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/MenuWidget.kt
@@ -11,7 +11,7 @@ import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.utils.SystemUtils
class MenuWidget : RelativeLayout {
@@ -127,7 +127,7 @@ class MenuWidget : RelativeLayout {
)
)
} else {
- if (SystemUtil.isDarkMode) {
+ if (SystemUtils.isDarkMode) {
iconImageView.setImageTintList(ColorStateList.valueOf(Color.DKGRAY))
endArrowImageView.setImageTintList(ColorStateList.valueOf(Color.DKGRAY))
} else {
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/RadioDialogWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/RadioDialogWidget.kt
index 3d8fa94f7..09c1d6a1e 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/widgets/RadioDialogWidget.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/RadioDialogWidget.kt
@@ -13,7 +13,7 @@ import android.widget.RelativeLayout
import android.widget.TextView
import com.drdisagree.iconify.R
import com.drdisagree.iconify.ui.dialogs.RadioDialog
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.utils.SystemUtils
import kotlinx.parcelize.Parcelize
import kotlinx.parcelize.RawValue
@@ -56,7 +56,14 @@ class RadioDialogWidget : RelativeLayout, RadioDialog.RadioDialogListener {
showSelectedPrefix =
typedArray.getBoolean(R.styleable.RadioDialogWidget_showSelectedPrefix, true)
titleResId = typedArray.getResourceId(R.styleable.RadioDialogWidget_titleText, 0)
- setTitle(titleResId)
+ if (titleResId != 0) {
+ setTitle(titleResId)
+ } else {
+ val title = typedArray.getString(R.styleable.RadioDialogWidget_titleText)
+ if (title != null) {
+ setTitle(title)
+ }
+ }
arrayResId = typedArray.getResourceId(R.styleable.RadioDialogWidget_entries, 0)
if (arrayResId != 0) {
try {
@@ -168,7 +175,7 @@ class RadioDialogWidget : RelativeLayout, RadioDialog.RadioDialogListener {
iconImageView.setImageTintList(ColorStateList.valueOf(color))
} else {
- if (SystemUtil.isDarkMode) {
+ if (SystemUtils.isDarkMode) {
iconImageView.setImageTintList(ColorStateList.valueOf(Color.DKGRAY))
} else {
iconImageView.setImageTintList(ColorStateList.valueOf(Color.LTGRAY))
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/SliderWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/SliderWidget.kt
index caf3801cf..12e5e787c 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/widgets/SliderWidget.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/SliderWidget.kt
@@ -4,11 +4,12 @@ import android.content.Context
import android.os.Parcelable
import android.util.AttributeSet
import android.view.View
-import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.RelativeLayout
import android.widget.TextView
import com.drdisagree.iconify.R
+import com.drdisagree.iconify.utils.HapticUtils.weakVibrate
+import com.google.android.material.button.MaterialButton
import com.google.android.material.slider.Slider
import kotlinx.parcelize.Parcelize
import kotlinx.parcelize.RawValue
@@ -21,7 +22,7 @@ class SliderWidget : RelativeLayout {
private lateinit var titleTextView: TextView
private lateinit var summaryTextView: TextView
private lateinit var materialSlider: Slider
- private lateinit var resetIcon: ImageView
+ private lateinit var resetButton: MaterialButton
private var valueFormat: String? = ""
private var defaultValue = 0
private var outputScale = 1f
@@ -78,7 +79,7 @@ class SliderWidget : RelativeLayout {
}
setSelectedText()
- handleResetVisibility()
+ handleResetButton()
setOnSliderTouchListener(null)
setResetClickListener(null)
}
@@ -117,7 +118,7 @@ class SliderWidget : RelativeLayout {
set(value) {
materialSlider.value = value.toFloat()
setSelectedText()
- handleResetVisibility()
+ handleResetButton()
}
fun setSliderValueFrom(value: Int) {
@@ -153,7 +154,7 @@ class SliderWidget : RelativeLayout {
override fun onStopTrackingTouch(slider: Slider) {
setSelectedText()
- handleResetVisibility()
+ handleResetButton()
notifyOnSliderTouchStopped(slider)
}
})
@@ -175,21 +176,20 @@ class SliderWidget : RelativeLayout {
fun setResetClickListener(listener: OnLongClickListener?) {
resetClickListener = listener
- resetIcon.setOnLongClickListener { v: View ->
+ resetButton.setOnClickListener { v: View ->
if (defaultValue == Int.MAX_VALUE) {
- return@setOnLongClickListener false
+ return@setOnClickListener
}
sliderValue = defaultValue
- handleResetVisibility()
+ handleResetButton()
notifyOnResetClicked(v)
- true
}
}
fun resetSlider() {
- resetIcon.performLongClick()
+ resetButton.performLongClick()
}
private fun notifyOnSliderTouchStarted(slider: Slider) {
@@ -201,24 +201,26 @@ class SliderWidget : RelativeLayout {
}
private fun notifyOnResetClicked(v: View) {
+ v.weakVibrate()
resetClickListener?.onLongClick(v)
}
- private fun handleResetVisibility() {
- if (defaultValue != Int.MAX_VALUE && materialSlider.value != defaultValue.toFloat()) {
- resetIcon.setVisibility(VISIBLE)
+ private fun handleResetButton() {
+ if (defaultValue != Int.MAX_VALUE) {
+ resetButton.visibility = VISIBLE
+ resetButton.isEnabled = isEnabled && materialSlider.value != defaultValue.toFloat()
} else {
- resetIcon.setVisibility(GONE)
+ resetButton.visibility = GONE
}
}
override fun setEnabled(enabled: Boolean) {
super.setEnabled(enabled)
- container.setEnabled(enabled)
- titleTextView.setEnabled(enabled)
- summaryTextView.setEnabled(enabled)
- resetIcon.setEnabled(enabled)
+ container.isEnabled = enabled
+ titleTextView.isEnabled = enabled
+ summaryTextView.isEnabled = enabled
+ resetButton.isEnabled = enabled
materialSlider.isEnabled = enabled
}
@@ -228,12 +230,12 @@ class SliderWidget : RelativeLayout {
titleTextView = findViewById(R.id.title)
summaryTextView = findViewById(R.id.summary)
materialSlider = findViewById(R.id.slider_widget)
- resetIcon = findViewById(R.id.reset)
- container.setId(generateViewId())
- titleTextView.setId(generateViewId())
- summaryTextView.setId(generateViewId())
- materialSlider.setId(generateViewId())
- resetIcon.setId(generateViewId())
+ resetButton = findViewById(R.id.reset_button)
+ container.id = generateViewId()
+ titleTextView.id = generateViewId()
+ summaryTextView.id = generateViewId()
+ materialSlider.id = generateViewId()
+ resetButton.id = generateViewId()
}
override fun onSaveInstanceState(): Parcelable {
@@ -249,7 +251,7 @@ class SliderWidget : RelativeLayout {
super.onRestoreInstanceState(state.superState)
materialSlider.value = state.sliderValue
setSelectedText()
- handleResetVisibility()
+ handleResetButton()
}
@Parcelize
diff --git a/app/src/main/java/com/drdisagree/iconify/ui/widgets/SwitchWidget.kt b/app/src/main/java/com/drdisagree/iconify/ui/widgets/SwitchWidget.kt
index 1a707bc07..1f28d1cc9 100644
--- a/app/src/main/java/com/drdisagree/iconify/ui/widgets/SwitchWidget.kt
+++ b/app/src/main/java/com/drdisagree/iconify/ui/widgets/SwitchWidget.kt
@@ -12,7 +12,7 @@ import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import com.drdisagree.iconify.R
-import com.drdisagree.iconify.utils.SystemUtil
+import com.drdisagree.iconify.utils.SystemUtils
import com.google.android.material.materialswitch.MaterialSwitch
class SwitchWidget : RelativeLayout {
@@ -83,10 +83,20 @@ class SwitchWidget : RelativeLayout {
fun setSummary(summaryResId: Int) {
summaryTextView.setText(summaryResId)
+ if (summaryResId == 0) {
+ summaryTextView.visibility = GONE
+ } else {
+ summaryTextView.visibility = VISIBLE
+ }
}
fun setSummary(summary: String?) {
summaryTextView.text = summary
+ if (summary.isNullOrEmpty()) {
+ summaryTextView.visibility = GONE
+ } else {
+ summaryTextView.visibility = VISIBLE
+ }
}
fun setIcon(icon: Int) {
@@ -130,7 +140,7 @@ class SwitchWidget : RelativeLayout {
iconImageView.setImageTintList(ColorStateList.valueOf(color))
} else {
- if (SystemUtil.isDarkMode) {
+ if (SystemUtils.isDarkMode) {
iconImageView.setImageTintList(ColorStateList.valueOf(Color.DKGRAY))
} else {
iconImageView.setImageTintList(ColorStateList.valueOf(Color.LTGRAY))
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/AppUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/AppUtil.kt
deleted file mode 100644
index 28616f82e..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/AppUtil.kt
+++ /dev/null
@@ -1,127 +0,0 @@
-package com.drdisagree.iconify.utils
-
-import android.annotation.SuppressLint
-import android.app.Activity
-import android.content.Intent
-import android.content.pm.ApplicationInfo
-import android.content.pm.PackageManager
-import android.graphics.drawable.Drawable
-import android.os.Handler
-import android.os.Looper
-import android.widget.Toast
-import androidx.core.content.ContextCompat
-import com.drdisagree.iconify.Iconify
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.R
-import com.topjohnwu.superuser.Shell
-
-object AppUtil {
-
- fun isAppInstalled(packageName: String?): Boolean {
- val pm = appContext.packageManager
-
- try {
- pm.getPackageInfo(packageName!!, PackageManager.GET_ACTIVITIES)
- return pm.getApplicationInfo(packageName, 0).enabled
- } catch (ignored: PackageManager.NameNotFoundException) {
- }
-
- return false
- }
-
- @JvmStatic
- fun isAppInstalledRoot(packageName: String): Boolean {
- return Shell.cmd("res=$(pm path $packageName); if [ ! -z \"\$res\" ]; then echo \"installed\"; else echo \"not found\"; fi")
- .exec().out[0].contains("installed")
- }
-
- fun getAppUid(packageName: String?): Int {
- val pm = appContext.packageManager
-
- try {
- pm.getPackageInfo(packageName!!, PackageManager.GET_ACTIVITIES)
- return pm.getApplicationInfo(packageName, 0).uid
- } catch (ignored: PackageManager.NameNotFoundException) {
- }
-
- return 0
- }
-
- @JvmStatic
- @SuppressLint("UseCompatLoadingForDrawables")
- fun getAppIcon(packageName: String?): Drawable? {
- var appIcon = ContextCompat.getDrawable(appContext, R.drawable.ic_android)
-
- try {
- appIcon = appContext.packageManager.getApplicationIcon(packageName!!)
- } catch (ignored: PackageManager.NameNotFoundException) {
- }
-
- return appIcon
- }
-
- @JvmStatic
- fun getAppName(packageName: String?): String {
- val pm = appContext.applicationContext.packageManager
- var ai: ApplicationInfo? = null
-
- try {
- ai = pm.getApplicationInfo(packageName!!, 0)
- } catch (ignored: PackageManager.NameNotFoundException) {
- }
-
- return (if (ai == null) "Unavailable" else pm.getApplicationLabel(ai)) as String
- }
-
- @JvmStatic
- fun launchApp(activity: Activity, packageName: String?) {
- val launchIntent = appContext.packageManager.getLaunchIntentForPackage(
- packageName!!
- )
-
- if (launchIntent != null) {
- activity.startActivity(launchIntent)
- } else {
- Toast.makeText(
- appContext,
- appContext.resources.getString(R.string.app_not_found),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
-
- @JvmStatic
- fun getSplitLocations(packageName: String?): Array {
- try {
- var splitLocations = appContext.packageManager.getApplicationInfo(
- packageName!!, 0
- ).splitSourceDirs
-
- if (splitLocations == null) {
- splitLocations = arrayOf(
- appContext.packageManager.getApplicationInfo(
- packageName, 0
- ).sourceDir
- )
- }
- return splitLocations
- } catch (ignored: PackageManager.NameNotFoundException) {
- }
-
- return arrayOfNulls(0)
- }
-
- @JvmStatic
- val isLsposedInstalled: Boolean
- get() = RootUtil.fileExists("/data/adb/lspd/manager.apk") || RootUtil.fileExists("/data/adb/modules/*lsposed*/manager.apk")
-
- @JvmStatic
- fun restartApplication(activity: Activity) {
- Handler(Looper.getMainLooper()).postDelayed({
- val intent = activity.intent
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
- activity.finish()
- activity.startActivity(intent)
- }, 600)
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/AppUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/AppUtils.kt
new file mode 100644
index 000000000..d0ead23ce
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/AppUtils.kt
@@ -0,0 +1,119 @@
+package com.drdisagree.iconify.utils
+
+import android.annotation.SuppressLint
+import android.app.Activity
+import android.content.Intent
+import android.content.pm.ApplicationInfo
+import android.content.pm.PackageManager
+import android.graphics.drawable.Drawable
+import android.os.Handler
+import android.os.Looper
+import android.widget.Toast
+import androidx.core.content.ContextCompat
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.R
+import com.topjohnwu.superuser.Shell
+
+object AppUtils {
+
+ fun isAppInstalled(packageName: String?): Boolean {
+ val pm = appContext.packageManager
+
+ try {
+ pm.getPackageInfo(packageName!!, PackageManager.GET_ACTIVITIES)
+ return pm.getApplicationInfo(packageName, 0).enabled
+ } catch (ignored: PackageManager.NameNotFoundException) {
+ }
+
+ return false
+ }
+
+ fun isAppInstalledRoot(packageName: String): Boolean {
+ return Shell.cmd("res=$(pm path $packageName); if [ ! -z \"\$res\" ]; then echo \"installed\"; else echo \"not found\"; fi")
+ .exec().out[0].contains("installed")
+ }
+
+ fun getAppUid(packageName: String?): Int {
+ val pm = appContext.packageManager
+
+ try {
+ pm.getPackageInfo(packageName!!, PackageManager.GET_ACTIVITIES)
+ return pm.getApplicationInfo(packageName, 0).uid
+ } catch (ignored: PackageManager.NameNotFoundException) {
+ }
+
+ return 0
+ }
+
+ @SuppressLint("UseCompatLoadingForDrawables")
+ fun getAppIcon(packageName: String?): Drawable? {
+ var appIcon = ContextCompat.getDrawable(appContext, R.drawable.ic_android)
+
+ try {
+ appIcon = appContext.packageManager.getApplicationIcon(packageName!!)
+ } catch (ignored: PackageManager.NameNotFoundException) {
+ }
+
+ return appIcon
+ }
+
+ fun getAppName(packageName: String?): String {
+ val pm = appContext.applicationContext.packageManager
+ var ai: ApplicationInfo? = null
+
+ try {
+ ai = pm.getApplicationInfo(packageName!!, 0)
+ } catch (ignored: PackageManager.NameNotFoundException) {
+ }
+
+ return (if (ai == null) "Unavailable" else pm.getApplicationLabel(ai)) as String
+ }
+
+ fun launchApp(activity: Activity, packageName: String?) {
+ val launchIntent = appContext.packageManager.getLaunchIntentForPackage(
+ packageName!!
+ )
+
+ if (launchIntent != null) {
+ activity.startActivity(launchIntent)
+ } else {
+ Toast.makeText(
+ appContext,
+ appContext.resources.getString(R.string.app_not_found),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+
+ fun getSplitLocations(packageName: String?): Array {
+ try {
+ var splitLocations = appContext.packageManager.getApplicationInfo(
+ packageName!!, 0
+ ).splitSourceDirs
+
+ if (splitLocations == null) {
+ splitLocations = arrayOf(
+ appContext.packageManager.getApplicationInfo(
+ packageName, 0
+ ).sourceDir
+ )
+ }
+ return splitLocations
+ } catch (ignored: PackageManager.NameNotFoundException) {
+ }
+
+ return arrayOfNulls(0)
+ }
+
+ val isLsposedInstalled: Boolean
+ get() = RootUtils.fileExists("/data/adb/lspd/manager.apk") || RootUtils.fileExists("/data/adb/modules/*lsposed*/manager.apk")
+
+ fun restartApplication(activity: Activity) {
+ Handler(Looper.getMainLooper()).postDelayed({
+ val intent = activity.intent
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
+ activity.finish()
+ activity.startActivity(intent)
+ }, 600)
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/CacheUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/CacheUtil.kt
deleted file mode 100644
index 3b2fa5502..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/CacheUtil.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.drdisagree.iconify.utils
-
-import android.content.Context
-import java.io.File
-
-object CacheUtil {
-
- @JvmStatic
- fun clearCache(context: Context) {
- try {
- var dir = context.cacheDir
- deleteDir(dir)
-
- dir = context.externalCacheDir
- deleteDir(dir)
-
- dir = context.filesDir
- deleteDir(dir)
- } catch (e: Exception) {
- e.printStackTrace()
- }
- }
-
- private fun deleteDir(dir: File?): Boolean {
- return if (dir != null && dir.isDirectory()) {
- val children = dir.list() ?: return false
-
- for (child in children) {
- val success = deleteDir(File(dir, child))
-
- if (!success) {
- return false
- }
- }
-
- dir.delete()
- } else if (dir != null && dir.isFile()) {
- dir.delete()
- } else {
- false
- }
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/CacheUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/CacheUtils.kt
new file mode 100644
index 000000000..484f457d6
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/CacheUtils.kt
@@ -0,0 +1,42 @@
+package com.drdisagree.iconify.utils
+
+import android.content.Context
+import java.io.File
+
+object CacheUtils {
+
+ fun clearCache(context: Context) {
+ try {
+ var dir = context.cacheDir
+ deleteDir(dir)
+
+ dir = context.externalCacheDir
+ deleteDir(dir)
+
+ dir = context.filesDir
+ deleteDir(dir)
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ }
+
+ private fun deleteDir(dir: File?): Boolean {
+ return if (dir != null && dir.isDirectory()) {
+ val children = dir.list() ?: return false
+
+ for (child in children) {
+ val success = deleteDir(File(dir, child))
+
+ if (!success) {
+ return false
+ }
+ }
+
+ dir.delete()
+ } else if (dir != null && dir.isFile()) {
+ dir.delete()
+ } else {
+ false
+ }
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/FileUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/FileUtil.kt
deleted file mode 100644
index 14f602ecf..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/FileUtil.kt
+++ /dev/null
@@ -1,163 +0,0 @@
-package com.drdisagree.iconify.utils
-
-import android.annotation.SuppressLint
-import android.content.Context
-import android.content.Intent
-import android.net.Uri
-import android.provider.OpenableColumns
-import androidx.activity.result.ActivityResultLauncher
-import com.drdisagree.iconify.Iconify
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.common.Resources
-import com.topjohnwu.superuser.Shell
-import java.io.File
-import java.io.FileOutputStream
-import java.io.IOException
-import java.io.InputStream
-import java.io.OutputStream
-import java.nio.file.Files
-import java.nio.file.Paths
-import kotlin.math.min
-
-object FileUtil {
-
- val DATA_DIR = appContext.filesDir.toString()
-
- @JvmStatic
- @Throws(IOException::class)
- fun copyAssets(assetFolder: String) {
- cleanDir(assetFolder)
- createDir(assetFolder)
- copyFileOrDirectory(appContext, assetFolder, "$DATA_DIR/$assetFolder")
- }
-
- fun cleanDir(dirName: String) {
- Shell.cmd("rm -rf $DATA_DIR/$dirName").exec()
- }
-
- private fun createDir(dirName: String) {
- val newFolder = File("$DATA_DIR/$dirName/")
- newFolder.mkdirs()
- }
-
- @Throws(IOException::class)
- private fun copyFileOrDirectory(context: Context, dirName: String, outPath: String) {
- val srcFiles = context.assets.list(dirName) ?: return
-
- for (srcFileName in srcFiles) {
- val outFileName = outPath + File.separator + srcFileName
- var inFileName = dirName + File.separator + srcFileName
-
- if (dirName == "") {
- inFileName = srcFileName
- }
-
- try {
- val inputStream = context.assets.open(inFileName)
- copyAndClose(inputStream, Files.newOutputStream(Paths.get(outFileName)))
- } catch (e: IOException) {
- File(outFileName).mkdir()
- copyFileOrDirectory(context, inFileName, outFileName)
- }
- }
- }
-
- private fun closeQuietly(autoCloseable: AutoCloseable?) {
- try {
- autoCloseable?.close()
- } catch (ignored: Exception) {
- }
- }
-
- @Throws(IOException::class)
- fun copyAndClose(input: InputStream, output: OutputStream) {
- copy(input, output)
- closeQuietly(input)
- closeQuietly(output)
- }
-
- @Throws(IOException::class)
- fun copy(input: InputStream, output: OutputStream) {
- val buffer = ByteArray(1024)
- var n: Int
-
- while (-1 != input.read(buffer).also { n = it }) {
- output.write(buffer, 0, n)
- }
- }
-
- @JvmStatic
- fun getRealPath(obj: Any?): String? {
- return when (obj) {
- is Intent -> {
- getRealPathFromURI(obj.data)
- }
-
- is Uri -> {
- getRealPathFromURI(obj as Uri?)
- }
-
- else -> {
- throw IllegalArgumentException("Object must be an Intent or Uri")
- }
- }
- }
-
- @SuppressLint("Recycle")
- private fun getRealPathFromURI(uri: Uri?): String? {
- val file: File
- try {
- val returnCursor =
- appContext.contentResolver.query(
- uri!!, null, null, null, null
- ) ?: return null
- val nameIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)
- returnCursor.moveToFirst()
-
- val name = returnCursor.getString(nameIndex)
- file = File(appContext.filesDir, name)
-
- val inputStream =
- appContext.contentResolver.openInputStream(
- uri
- )
- val outputStream = FileOutputStream(file)
- var read: Int
- val maxBufferSize = 1024 * 1024
-
- if (inputStream == null) return null
-
- val bytesAvailable = inputStream.available()
- val bufferSize = min(bytesAvailable.toDouble(), maxBufferSize.toDouble()).toInt()
- val buffers = ByteArray(bufferSize)
-
- while (inputStream.read(buffers).also { read = it } != -1) {
- outputStream.write(buffers, 0, read)
- }
-
- inputStream.close()
- outputStream.close()
- } catch (e: Exception) {
- e.printStackTrace()
- return null
- }
-
- return file.path
- }
-
- @JvmStatic
- fun moveToIconifyHiddenDir(source: String, destination: String): Boolean {
- return Shell.cmd(
- "mkdir -p " + Resources.XPOSED_RESOURCE_TEMP_DIR,
- "rm -f \"$destination\"",
- "mv -f \"$source\" \"$destination\""
- ).exec().isSuccess
- }
-
- fun launchFilePicker(launcher: ActivityResultLauncher, type: String?) {
- val chooseFile = Intent(Intent.ACTION_GET_CONTENT)
- chooseFile.addCategory(Intent.CATEGORY_OPENABLE)
- chooseFile.setType(type)
- launcher.launch(chooseFile)
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/FileUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/FileUtils.kt
new file mode 100644
index 000000000..c6e13fb42
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/FileUtils.kt
@@ -0,0 +1,195 @@
+package com.drdisagree.iconify.utils
+
+import android.annotation.SuppressLint
+import android.content.Context
+import android.content.Intent
+import android.net.Uri
+import android.provider.OpenableColumns
+import androidx.activity.result.ActivityResultLauncher
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.common.Resources
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.topjohnwu.superuser.Shell
+import java.io.File
+import java.io.FileOutputStream
+import java.io.IOException
+import java.io.InputStream
+import java.io.OutputStream
+import java.nio.file.Files
+import java.nio.file.Paths
+import kotlin.math.min
+
+object FileUtils {
+
+ val DATA_DIR = appContext.filesDir.toString()
+
+ @Throws(IOException::class)
+ fun copyAssets(assetFolder: String) {
+ cleanDir(assetFolder)
+ createDir(assetFolder)
+ copyFileOrDirectory(appContext, assetFolder, "$DATA_DIR/$assetFolder")
+ }
+
+ fun cleanDir(dirName: String) {
+ Shell.cmd("rm -rf $DATA_DIR/$dirName").exec()
+ }
+
+ private fun createDir(dirName: String) {
+ val newFolder = File("$DATA_DIR/$dirName/")
+ newFolder.mkdirs()
+ }
+
+ @Throws(IOException::class)
+ private fun copyFileOrDirectory(context: Context, dirName: String, outPath: String) {
+ val srcFiles = context.assets.list(dirName) ?: return
+
+ for (srcFileName in srcFiles) {
+ val outFileName = outPath + File.separator + srcFileName
+ var inFileName = dirName + File.separator + srcFileName
+
+ if (dirName == "") {
+ inFileName = srcFileName
+ }
+
+ try {
+ val inputStream = context.assets.open(inFileName)
+ copyAndClose(inputStream, Files.newOutputStream(Paths.get(outFileName)))
+ } catch (e: IOException) {
+ File(outFileName).mkdir()
+ copyFileOrDirectory(context, inFileName, outFileName)
+ }
+ }
+ }
+
+ private fun closeQuietly(autoCloseable: AutoCloseable?) {
+ try {
+ autoCloseable?.close()
+ } catch (ignored: Exception) {
+ }
+ }
+
+ @Throws(IOException::class)
+ fun copyAndClose(input: InputStream, output: OutputStream) {
+ copy(input, output)
+ closeQuietly(input)
+ closeQuietly(output)
+ }
+
+ @Throws(IOException::class)
+ fun copy(input: InputStream, output: OutputStream) {
+ val buffer = ByteArray(1024)
+ var n: Int
+
+ while (-1 != input.read(buffer).also { n = it }) {
+ output.write(buffer, 0, n)
+ }
+ }
+
+ fun getRealPath(obj: Any?): String? {
+ return when (obj) {
+ is Intent -> {
+ getRealPathFromURI(obj.data)
+ }
+
+ is Uri -> {
+ getRealPathFromURI(obj as Uri?)
+ }
+
+ else -> {
+ throw IllegalArgumentException("Object must be an Intent or Uri")
+ }
+ }
+ }
+
+ @SuppressLint("Recycle")
+ private fun getRealPathFromURI(uri: Uri?): String? {
+ val file: File
+ try {
+ val returnCursor =
+ appContext.contentResolver.query(
+ uri!!, null, null, null, null
+ ) ?: return null
+ val nameIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)
+ returnCursor.moveToFirst()
+
+ val name = returnCursor.getString(nameIndex)
+ file = File(appContext.filesDir, name)
+
+ val inputStream =
+ appContext.contentResolver.openInputStream(
+ uri
+ )
+ val outputStream = FileOutputStream(file)
+ var read: Int
+ val maxBufferSize = 1024 * 1024
+
+ if (inputStream == null) return null
+
+ val bytesAvailable = inputStream.available()
+ val bufferSize = min(bytesAvailable.toDouble(), maxBufferSize.toDouble()).toInt()
+ val buffers = ByteArray(bufferSize)
+
+ while (inputStream.read(buffers).also { read = it } != -1) {
+ outputStream.write(buffers, 0, read)
+ }
+
+ inputStream.close()
+ outputStream.close()
+ } catch (e: Exception) {
+ e.printStackTrace()
+ return null
+ }
+
+ return file.path
+ }
+
+ fun moveToIconifyHiddenDir(source: String, destination: String): Boolean {
+ return Shell.cmd(
+ "mkdir -p " + Resources.XPOSED_RESOURCE_TEMP_DIR,
+ "rm -f \"$destination\"",
+ "mv -f \"$source\" \"$destination\""
+ ).exec().isSuccess
+ }
+
+ fun launchFilePicker(
+ context: Context,
+ type: String?,
+ launcher: ActivityResultLauncher
+ ) {
+ if (!hasStoragePermission()) {
+ requestStoragePermission(context)
+ } else {
+ var fileType = "*/*"
+
+ if (type.isNullOrEmpty() || type == "all") {
+ fileType = "*/*"
+ } else if (type == "image") {
+ fileType = "image/*"
+ } else if (type == "font") {
+ fileType = "font/*"
+ } else if (type == "video") {
+ fileType = "video/*"
+ } else if (type == "audio") {
+ fileType = "audio/*"
+ } else if (type == "pdf") {
+ fileType = "application/pdf"
+ } else if (type == "text") {
+ fileType = "text/*"
+ } else if (type == "zip") {
+ fileType = "application/zip"
+ } else if (type == "apk") {
+ fileType = "application/vnd.android.package-archive"
+ }
+
+ launchFilePicker(launcher, fileType)
+ }
+ }
+
+ fun launchFilePicker(launcher: ActivityResultLauncher, type: String?) {
+ val chooseFile = Intent(Intent.ACTION_GET_CONTENT)
+ chooseFile.addCategory(Intent.CATEGORY_OPENABLE)
+ chooseFile.setType(type)
+ launcher.launch(chooseFile)
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/HapticUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/HapticUtils.kt
new file mode 100644
index 000000000..cee0c886d
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/HapticUtils.kt
@@ -0,0 +1,33 @@
+package com.drdisagree.iconify.utils
+
+import android.view.HapticFeedbackConstants
+import android.view.View
+import com.drdisagree.iconify.common.Preferences.VIBRATE_UI
+import com.drdisagree.iconify.config.RPrefs
+
+object HapticUtils {
+
+ enum class VibrationType {
+ Weak,
+ Strong
+ }
+
+ private fun View.vibrate(type: VibrationType) {
+ if (RPrefs.getBoolean(VIBRATE_UI, true)) {
+ when (type) {
+ VibrationType.Weak -> performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK)
+ VibrationType.Strong -> performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
+ }
+ }
+ }
+
+ @JvmStatic
+ fun View.weakVibrate() {
+ vibrate(VibrationType.Weak)
+ }
+
+ @JvmStatic
+ fun View.strongVibrate() {
+ vibrate(VibrationType.Strong)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/MiscUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/MiscUtils.kt
new file mode 100644
index 000000000..03c23a61c
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/MiscUtils.kt
@@ -0,0 +1,41 @@
+package com.drdisagree.iconify.utils
+
+import android.content.Context
+import com.drdisagree.iconify.R
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+
+object MiscUtils {
+
+ @JvmStatic
+ fun showAlertDialog(
+ context: Context,
+ restartSystemUI: Boolean = false,
+ restartDevice: Boolean = false,
+ switchTheme: Boolean = false,
+ rotateDevice: Boolean = false
+ ) {
+ val title = when {
+ restartSystemUI -> R.string.systemui_restart_required_title
+ restartDevice -> R.string.device_restart_required_title
+ switchTheme -> R.string.switch_theme_required_title
+ rotateDevice -> R.string.device_rotation_required_title
+ else -> R.string.systemui_restart_required_title
+ }
+ val message = when {
+ restartSystemUI -> R.string.systemui_restart_required_desc
+ restartDevice -> R.string.device_restart_required_desc
+ switchTheme -> R.string.switch_theme_required_desc
+ rotateDevice -> R.string.device_rotation_required_desc
+ else -> R.string.systemui_restart_required_desc
+ }
+
+ MaterialAlertDialogBuilder(context)
+ .setTitle(context.getString(title))
+ .setMessage(context.getString(message))
+ .setPositiveButton(android.R.string.ok) { dialog, _ ->
+ dialog.dismiss()
+ }
+ .setCancelable(true)
+ .show()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/ModuleUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/ModuleUtil.kt
deleted file mode 100644
index 2fcede46a..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/ModuleUtil.kt
+++ /dev/null
@@ -1,236 +0,0 @@
-package com.drdisagree.iconify.utils
-
-import android.content.Context
-import android.util.Log
-import com.drdisagree.iconify.BuildConfig
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const
-import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
-import com.drdisagree.iconify.common.Dynamic.skippedInstallation
-import com.drdisagree.iconify.common.Preferences.COLOR_ACCENT_PRIMARY
-import com.drdisagree.iconify.common.Preferences.COLOR_ACCENT_SECONDARY
-import com.drdisagree.iconify.common.Preferences.RESTART_SYSUI_AFTER_BOOT
-import com.drdisagree.iconify.common.References.ICONIFY_COLOR_ACCENT_PRIMARY
-import com.drdisagree.iconify.common.References.ICONIFY_COLOR_ACCENT_SECONDARY
-import com.drdisagree.iconify.common.Resources
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.utils.helper.BackupRestore.backupFiles
-import com.drdisagree.iconify.utils.helper.BinaryInstaller.symLinkBinaries
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil
-import com.drdisagree.iconify.utils.overlay.OverlayUtil
-import com.topjohnwu.superuser.Shell
-import net.lingala.zip4j.ZipFile
-import net.lingala.zip4j.model.ZipParameters
-import net.lingala.zip4j.model.enums.CompressionLevel
-import net.lingala.zip4j.model.enums.CompressionMethod
-import java.io.File
-
-object ModuleUtil {
-
- private val TAG = ModuleUtil::class.java.getSimpleName()
-
- @JvmStatic
- fun handleModule() {
- if (moduleExists()) {
- // Clean temporary directory
- Shell.cmd("rm -rf " + Resources.TEMP_DIR).exec()
-
- // Backup necessary files
- backupFiles()
- }
-
- installModule()
- }
-
- private fun installModule() {
- Log.d(TAG, "Magisk module does not exist, creating...")
-
- // Clean temporary directory
- Shell.cmd("mkdir -p " + Resources.TEMP_DIR).exec()
- Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR).exec()
-
- Shell.cmd(
- "printf 'id=Iconify\n" +
- "name=Iconify\n" +
- "version=${BuildConfig.VERSION_NAME}\n" +
- "versionCode=${BuildConfig.VERSION_CODE}\n" +
- "author=@DrDisagree\n" +
- "description=Systemless module for Iconify. ${appContext.resources.getString(R.string.app_moto)}.\n" +
- "' > ${Resources.TEMP_MODULE_DIR}/module.prop\n".trimIndent()
- ).exec()
-
- Shell.cmd(
- "printf 'MODDIR=${"$"}{0%%/*}\n\n" +
- "' > ${Resources.TEMP_MODULE_DIR}/post-fs-data.sh\n".trimIndent()
- ).exec()
-
- if (!skippedInstallation) {
- Shell.cmd(
- "printf 'MODDIR=${"$"}{0%%/*}\n\n" +
- "while [ \"$(getprop sys.boot_completed | tr -d \"\\r\")\" != \"1\" ]\n" +
- "do\n" +
- " sleep 1\n" +
- "done\n" +
- "sleep 5\n\n" +
- "sh ${"$"}MODDIR/post-exec.sh\n\n" +
- "until [ -d /storage/emulated/0/Android ]; do\n" +
- " sleep 1\n" +
- "done\n" +
- "sleep 3\n\n" +
- "${
- if (Prefs.getBoolean(
- RESTART_SYSUI_AFTER_BOOT,
- false
- )
- ) "killall $SYSTEMUI_PACKAGE\n" else ""
- }sleep 6\n\n" +
- "handle_overlay() {\n" +
- " local overlay_name=\"\$1\"\n\n" +
- " local overlay=\$(cmd overlay list | grep -E \"^.x..${"$"}{overlay_name}.overlay\" | sed -E \"s/^.x..//\")\n" +
- " local disableMonet=\$(cmd overlay list | grep -E \"^.x..IconifyComponentDM.overlay\" | sed -E \"s/^.x..//\")\n\n" +
- " if ([ ! -z \"${"$"}{overlay}\" ] && [ -z \"${"$"}{disableMonet}\" ])\n" +
- " then\n" +
- " cmd overlay disable --user current \"${"$"}{overlay_name}.overlay\"\n" +
- " cmd overlay enable --user current \"${"$"}{overlay_name}.overlay\"\n" +
- " cmd overlay set-priority \"${"$"}{overlay_name}.overlay\" highest\n" +
- " fi\n" +
- "}\n\n" +
- "handle_overlay \"IconifyComponentQSPBD\"\n" +
- "handle_overlay \"IconifyComponentQSPBA\"\n\n" +
- "' > ${Resources.TEMP_MODULE_DIR}/service.sh".trimIndent()
- ).exec()
- } else {
- Shell.cmd(
- "printf 'MODDIR=${"$"}{0%%/*}\n\n" +
- "while [ \"$(getprop sys.boot_completed | tr -d \"\\r\")\" != \"1\" ]\n" +
- "do\n" +
- " sleep 1\n" +
- "done\n" +
- "sleep 5\n\n" +
- "sh ${"$"}MODDIR/post-exec.sh\n" +
- "' > ${Resources.TEMP_MODULE_DIR}/service.sh".trimIndent()
- ).exec()
- }
-
- Shell.cmd("touch " + Resources.TEMP_MODULE_DIR + "/system.prop").exec()
- Shell.cmd("touch " + Resources.TEMP_MODULE_DIR + "/auto_mount").exec()
- Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/system").exec()
- Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/system/product").exec()
- Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/system/product/overlay").exec()
-
- createMETAINF()
- writePostExec()
- symLinkBinaries()
-
- Log.i(TAG, "Magisk module successfully created.")
- }
-
- private fun createMETAINF() {
- Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/META-INF").exec()
- Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/META-INF/com").exec()
- Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/META-INF/com/google").exec()
- Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/META-INF/com/google/android").exec()
- Shell.cmd(
- "printf '" + Const.MAGISK_UPDATE_BINARY + "' > " + Resources.TEMP_MODULE_DIR + "/META-INF/com/google/android/update-binary"
- ).exec()
- Shell.cmd(
- "printf '#MAGISK' > " + Resources.TEMP_MODULE_DIR + "/META-INF/com/google/android/updater-script"
- ).exec()
- }
-
- private fun writePostExec() {
- val postExec = StringBuilder()
- var primaryColorEnabled = false
- var secondaryColorEnabled = false
- val prefs = appContext.getSharedPreferences(BuildConfig.APPLICATION_ID, Context.MODE_PRIVATE)
- val map = prefs.all
-
- for ((key, value) in map) {
- if (value is Boolean && value && key.startsWith("fabricated")) {
- val name = key.replace("fabricated", "")
- val commands = FabricatedUtil.buildCommands(
- Prefs.getString("FOCMDtarget$name")!!,
- Prefs.getString("FOCMDname$name")!!,
- Prefs.getString("FOCMDtype$name")!!,
- Prefs.getString("FOCMDresourceName$name")!!,
- Prefs.getString("FOCMDval$name")!!
- )
-
- postExec.append(commands[0]).append('\n').append(commands[1]).append('\n')
-
- if (name.contains(COLOR_ACCENT_PRIMARY)) {
- primaryColorEnabled = true
- } else if (name.contains(COLOR_ACCENT_SECONDARY)) {
- secondaryColorEnabled = true
- }
- }
- }
-
- if (!primaryColorEnabled && shouldUseDefaultColors() && !skippedInstallation) {
- postExec.append("cmd overlay fabricate --target android --name IconifyComponentcolorAccentPrimary android:color/holo_blue_light 0x1c $ICONIFY_COLOR_ACCENT_PRIMARY\n")
- postExec.append("cmd overlay enable --user current com.android.shell:IconifyComponentcolorAccentPrimary\n")
- postExec.append("cmd overlay fabricate --target android --name IconifyComponentcolorAccentPrimaryLight android:color/holo_green_light 0x1c $ICONIFY_COLOR_ACCENT_PRIMARY\n")
- postExec.append("cmd overlay enable --user current com.android.shell:IconifyComponentcolorAccentPrimaryLight\n")
- }
-
- if (!secondaryColorEnabled && shouldUseDefaultColors() && !skippedInstallation) {
- postExec.append("cmd overlay fabricate --target android --name IconifyComponentcolorAccentSecondary android:color/holo_blue_dark 0x1c $ICONIFY_COLOR_ACCENT_SECONDARY\n")
- postExec.append("cmd overlay enable --user current com.android.shell:IconifyComponentcolorAccentSecondary\n")
- postExec.append("cmd overlay fabricate --target android --name IconifyComponentcolorAccentSecondaryLight android:color/holo_green_dark 0x1c $ICONIFY_COLOR_ACCENT_SECONDARY\n")
- postExec.append("cmd overlay enable --user current com.android.shell:IconifyComponentcolorAccentSecondaryLight\n")
- }
-
- Shell.cmd("printf '" + postExec + "' > " + Resources.TEMP_MODULE_DIR + "/post-exec.sh")
- .exec()
- }
-
- private fun shouldUseDefaultColors(): Boolean {
- return OverlayUtil.isOverlayDisabled("IconifyComponentAMAC.overlay") && OverlayUtil.isOverlayDisabled(
- "IconifyComponentAMGC.overlay"
- ) && OverlayUtil.isOverlayDisabled("IconifyComponentME.overlay")
- }
-
- @JvmStatic
- fun moduleExists(): Boolean {
- return RootUtil.folderExists(Resources.OVERLAY_DIR)
- }
-
- @JvmStatic
- @Throws(Exception::class)
- fun createModule(sourceFolder: String, destinationFilePath: String): String {
- val input = File(sourceFolder)
- val output = File(destinationFilePath)
- val parameters = ZipParameters()
- parameters.isIncludeRootFolder = false
- parameters.isOverrideExistingFilesInZip = true
- parameters.compressionMethod = CompressionMethod.DEFLATE
- parameters.compressionLevel = CompressionLevel.NORMAL
- ZipFile(output).use { zipFile ->
- zipFile.addFolder(input, parameters)
- return zipFile.file.absolutePath
- }
- }
-
- @JvmStatic
- @Throws(Exception::class)
- fun flashModule(modulePath: String): Boolean {
- var result: Shell.Result? = null
- if (RootUtil.isMagiskInstalled) {
- result = Shell.cmd("magisk --install-module $modulePath").exec()
- } else if (RootUtil.isKSUInstalled) {
- result = Shell.cmd("/data/adb/ksud module install $modulePath").exec()
- } else if (RootUtil.isApatchInstalled) {
- result = Shell.cmd("apd module install $modulePath").exec()
- }
- if (result == null) {
- throw Exception("No supported root found")
- } else if (result.isSuccess) {
- Log.i(TAG, "Successfully flashed module")
- } else {
- Log.e(TAG, "Failed to flash module")
- throw Exception(java.lang.String.join("\n", result.out))
- }
- return !result.isSuccess
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/ModuleUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/ModuleUtils.kt
new file mode 100644
index 000000000..0ce0cd49f
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/ModuleUtils.kt
@@ -0,0 +1,232 @@
+package com.drdisagree.iconify.utils
+
+import android.content.Context
+import android.util.Log
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const
+import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
+import com.drdisagree.iconify.common.Dynamic.skippedInstallation
+import com.drdisagree.iconify.common.Preferences.COLOR_ACCENT_PRIMARY
+import com.drdisagree.iconify.common.Preferences.COLOR_ACCENT_SECONDARY
+import com.drdisagree.iconify.common.Preferences.RESTART_SYSUI_AFTER_BOOT
+import com.drdisagree.iconify.common.References.ICONIFY_COLOR_ACCENT_PRIMARY
+import com.drdisagree.iconify.common.References.ICONIFY_COLOR_ACCENT_SECONDARY
+import com.drdisagree.iconify.common.Resources
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.utils.helper.BackupRestore.backupFiles
+import com.drdisagree.iconify.utils.helper.BinaryInstaller.symLinkBinaries
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils
+import com.drdisagree.iconify.utils.overlay.OverlayUtils
+import com.topjohnwu.superuser.Shell
+import net.lingala.zip4j.ZipFile
+import net.lingala.zip4j.model.ZipParameters
+import net.lingala.zip4j.model.enums.CompressionLevel
+import net.lingala.zip4j.model.enums.CompressionMethod
+import java.io.File
+
+object ModuleUtils {
+
+ private val TAG = ModuleUtils::class.java.getSimpleName()
+
+ fun handleModule() {
+ if (moduleExists()) {
+ // Clean temporary directory
+ Shell.cmd("rm -rf " + Resources.TEMP_DIR).exec()
+
+ // Backup necessary files
+ backupFiles()
+ }
+
+ installModule()
+ }
+
+ private fun installModule() {
+ Log.d(TAG, "Magisk module does not exist, creating...")
+
+ // Clean temporary directory
+ Shell.cmd("mkdir -p " + Resources.TEMP_DIR).exec()
+ Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR).exec()
+
+ Shell.cmd(
+ "printf 'id=Iconify\n" +
+ "name=Iconify\n" +
+ "version=${BuildConfig.VERSION_NAME}\n" +
+ "versionCode=${BuildConfig.VERSION_CODE}\n" +
+ "author=@DrDisagree\n" +
+ "description=Systemless module for Iconify. ${appContext.resources.getString(R.string.app_moto)}.\n" +
+ "' > ${Resources.TEMP_MODULE_DIR}/module.prop\n".trimIndent()
+ ).exec()
+
+ Shell.cmd(
+ "printf 'MODDIR=${"$"}{0%%/*}\n\n" +
+ "' > ${Resources.TEMP_MODULE_DIR}/post-fs-data.sh\n".trimIndent()
+ ).exec()
+
+ if (!skippedInstallation) {
+ Shell.cmd(
+ "printf 'MODDIR=${"$"}{0%%/*}\n\n" +
+ "while [ \"$(getprop sys.boot_completed | tr -d \"\\r\")\" != \"1\" ]\n" +
+ "do\n" +
+ " sleep 1\n" +
+ "done\n" +
+ "sleep 5\n\n" +
+ "sh ${"$"}MODDIR/post-exec.sh\n\n" +
+ "until [ -d /storage/emulated/0/Android ]; do\n" +
+ " sleep 1\n" +
+ "done\n" +
+ "sleep 3\n\n" +
+ "${
+ if (RPrefs.getBoolean(
+ RESTART_SYSUI_AFTER_BOOT,
+ false
+ )
+ ) "killall $SYSTEMUI_PACKAGE\n" else ""
+ }sleep 6\n\n" +
+ "handle_overlay() {\n" +
+ " local overlay_name=\"\$1\"\n\n" +
+ " local overlay=\$(cmd overlay list | grep -E \"^.x..${"$"}{overlay_name}.overlay\" | sed -E \"s/^.x..//\")\n" +
+ " local disableMonet=\$(cmd overlay list | grep -E \"^.x..IconifyComponentDM.overlay\" | sed -E \"s/^.x..//\")\n\n" +
+ " if ([ ! -z \"${"$"}{overlay}\" ] && [ -z \"${"$"}{disableMonet}\" ])\n" +
+ " then\n" +
+ " cmd overlay disable --user current \"${"$"}{overlay_name}.overlay\"\n" +
+ " cmd overlay enable --user current \"${"$"}{overlay_name}.overlay\"\n" +
+ " cmd overlay set-priority \"${"$"}{overlay_name}.overlay\" highest\n" +
+ " fi\n" +
+ "}\n\n" +
+ "handle_overlay \"IconifyComponentQSPBD\"\n" +
+ "handle_overlay \"IconifyComponentQSPBA\"\n\n" +
+ "' > ${Resources.TEMP_MODULE_DIR}/service.sh".trimIndent()
+ ).exec()
+ } else {
+ Shell.cmd(
+ "printf 'MODDIR=${"$"}{0%%/*}\n\n" +
+ "while [ \"$(getprop sys.boot_completed | tr -d \"\\r\")\" != \"1\" ]\n" +
+ "do\n" +
+ " sleep 1\n" +
+ "done\n" +
+ "sleep 5\n\n" +
+ "sh ${"$"}MODDIR/post-exec.sh\n" +
+ "' > ${Resources.TEMP_MODULE_DIR}/service.sh".trimIndent()
+ ).exec()
+ }
+
+ Shell.cmd("touch " + Resources.TEMP_MODULE_DIR + "/system.prop").exec()
+ Shell.cmd("touch " + Resources.TEMP_MODULE_DIR + "/auto_mount").exec()
+ Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/system").exec()
+ Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/system/product").exec()
+ Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/system/product/overlay").exec()
+
+ createMETAINF()
+ writePostExec()
+ symLinkBinaries()
+
+ Log.i(TAG, "Magisk module successfully created.")
+ }
+
+ private fun createMETAINF() {
+ Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/META-INF").exec()
+ Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/META-INF/com").exec()
+ Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/META-INF/com/google").exec()
+ Shell.cmd("mkdir -p " + Resources.TEMP_MODULE_DIR + "/META-INF/com/google/android").exec()
+ Shell.cmd(
+ "printf '" + Const.MAGISK_UPDATE_BINARY + "' > " + Resources.TEMP_MODULE_DIR + "/META-INF/com/google/android/update-binary"
+ ).exec()
+ Shell.cmd(
+ "printf '#MAGISK' > " + Resources.TEMP_MODULE_DIR + "/META-INF/com/google/android/updater-script"
+ ).exec()
+ }
+
+ private fun writePostExec() {
+ val postExec = StringBuilder()
+ var primaryColorEnabled = false
+ var secondaryColorEnabled = false
+ val prefs = appContext.getSharedPreferences(BuildConfig.APPLICATION_ID, Context.MODE_PRIVATE)
+ val map = prefs.all
+
+ for ((key, value) in map) {
+ if (value is Boolean && value && key.startsWith("fabricated")) {
+ val name = key.replace("fabricated", "")
+ val commands = FabricatedUtils.buildCommands(
+ RPrefs.getString("FOCMDtarget$name")!!,
+ RPrefs.getString("FOCMDname$name")!!,
+ RPrefs.getString("FOCMDtype$name")!!,
+ RPrefs.getString("FOCMDresourceName$name")!!,
+ RPrefs.getString("FOCMDval$name")!!
+ )
+
+ postExec.append(commands[0]).append('\n').append(commands[1]).append('\n')
+
+ if (name.contains(COLOR_ACCENT_PRIMARY)) {
+ primaryColorEnabled = true
+ } else if (name.contains(COLOR_ACCENT_SECONDARY)) {
+ secondaryColorEnabled = true
+ }
+ }
+ }
+
+ if (!primaryColorEnabled && shouldUseDefaultColors() && !skippedInstallation) {
+ postExec.append("cmd overlay fabricate --target android --name IconifyComponentcolorAccentPrimary android:color/holo_blue_light 0x1c $ICONIFY_COLOR_ACCENT_PRIMARY\n")
+ postExec.append("cmd overlay enable --user current com.android.shell:IconifyComponentcolorAccentPrimary\n")
+ postExec.append("cmd overlay fabricate --target android --name IconifyComponentcolorAccentPrimaryLight android:color/holo_green_light 0x1c $ICONIFY_COLOR_ACCENT_PRIMARY\n")
+ postExec.append("cmd overlay enable --user current com.android.shell:IconifyComponentcolorAccentPrimaryLight\n")
+ }
+
+ if (!secondaryColorEnabled && shouldUseDefaultColors() && !skippedInstallation) {
+ postExec.append("cmd overlay fabricate --target android --name IconifyComponentcolorAccentSecondary android:color/holo_blue_dark 0x1c $ICONIFY_COLOR_ACCENT_SECONDARY\n")
+ postExec.append("cmd overlay enable --user current com.android.shell:IconifyComponentcolorAccentSecondary\n")
+ postExec.append("cmd overlay fabricate --target android --name IconifyComponentcolorAccentSecondaryLight android:color/holo_green_dark 0x1c $ICONIFY_COLOR_ACCENT_SECONDARY\n")
+ postExec.append("cmd overlay enable --user current com.android.shell:IconifyComponentcolorAccentSecondaryLight\n")
+ }
+
+ Shell.cmd("printf '" + postExec + "' > " + Resources.TEMP_MODULE_DIR + "/post-exec.sh")
+ .exec()
+ }
+
+ private fun shouldUseDefaultColors(): Boolean {
+ return OverlayUtils.isOverlayDisabled("IconifyComponentAMAC.overlay") && OverlayUtils.isOverlayDisabled(
+ "IconifyComponentAMGC.overlay"
+ ) && OverlayUtils.isOverlayDisabled("IconifyComponentME.overlay")
+ }
+
+ fun moduleExists(): Boolean {
+ return RootUtils.folderExists(Resources.OVERLAY_DIR)
+ }
+
+ @Throws(Exception::class)
+ fun createModule(sourceFolder: String, destinationFilePath: String): String {
+ val input = File(sourceFolder)
+ val output = File(destinationFilePath)
+ val parameters = ZipParameters()
+ parameters.isIncludeRootFolder = false
+ parameters.isOverrideExistingFilesInZip = true
+ parameters.compressionMethod = CompressionMethod.DEFLATE
+ parameters.compressionLevel = CompressionLevel.NORMAL
+ ZipFile(output).use { zipFile ->
+ zipFile.addFolder(input, parameters)
+ return zipFile.file.absolutePath
+ }
+ }
+
+ @Throws(Exception::class)
+ fun flashModule(modulePath: String): Boolean {
+ var result: Shell.Result? = null
+ if (RootUtils.isMagiskInstalled) {
+ result = Shell.cmd("magisk --install-module $modulePath").exec()
+ } else if (RootUtils.isKSUInstalled) {
+ result = Shell.cmd("/data/adb/ksud module install $modulePath").exec()
+ } else if (RootUtils.isApatchInstalled) {
+ result = Shell.cmd("apd module install $modulePath").exec()
+ }
+ if (result == null) {
+ throw Exception("No supported root found")
+ } else if (result.isSuccess) {
+ Log.i(TAG, "Successfully flashed module")
+ } else {
+ Log.e(TAG, "Failed to flash module")
+ throw Exception(java.lang.String.join("\n", result.out))
+ }
+ return !result.isSuccess
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/NetworkUtils.java b/app/src/main/java/com/drdisagree/iconify/utils/NetworkUtils.java
new file mode 100644
index 000000000..680e0db11
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/NetworkUtils.java
@@ -0,0 +1,159 @@
+package com.drdisagree.iconify.utils;
+
+/*
+ * 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 .
+ *
+ */
+
+import android.util.Log;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import javax.net.ssl.HttpsURLConnection;
+
+public class NetworkUtils {
+ private static final boolean DEBUG = false;
+ private static final String TAG = "NetworkUtils";
+
+ private static final int HTTP_READ_TIMEOUT = 60000;
+ private static final int HTTP_CONNECTION_TIMEOUT = 60000;
+
+ private static final ExecutorService executor = Executors.newSingleThreadExecutor();
+
+ public static void downloadUrlMemoryAsString(String url, DownloadCallback callback) {
+ executor.submit(() -> {
+ String result = downloadUrlMemoryAsString(url);
+ if (callback != null) {
+ callback.onDownloadComplete(result);
+ }
+ });
+ }
+
+ public static HttpsURLConnection setupHttpsRequest(String urlStr) {
+ URL url;
+ HttpsURLConnection urlConnection = null;
+ try {
+ url = new URL(urlStr);
+ urlConnection = (HttpsURLConnection) url.openConnection();
+ urlConnection.setConnectTimeout(HTTP_CONNECTION_TIMEOUT);
+ urlConnection.setReadTimeout(HTTP_READ_TIMEOUT);
+ urlConnection.setRequestMethod("GET");
+ urlConnection.setDoInput(true);
+ urlConnection.connect();
+ int code = urlConnection.getResponseCode();
+ if (code != HttpsURLConnection.HTTP_OK) {
+ Log.d(TAG, "response:" + code);
+ return null;
+ }
+ return urlConnection;
+ } catch (Exception e) {
+ Log.e(TAG, "Failed to connect to server", e);
+ return null;
+ }
+ }
+
+ public static boolean downloadUrlFile(String url, File f) {
+ if (DEBUG) Log.d(TAG, "download:" + url);
+
+ HttpsURLConnection urlConnection = null;
+
+ if (f.exists())
+ f.delete();
+
+ try {
+ urlConnection = setupHttpsRequest(url);
+ if (urlConnection == null) {
+ return false;
+ }
+ long len = urlConnection.getContentLength();
+ if ((len > 0) && (len < 4L * 1024L * 1024L * 1024L)) {
+ byte[] buffer = new byte[262144];
+
+ InputStream is = urlConnection.getInputStream();
+ FileOutputStream os = new FileOutputStream(f, false);
+ try {
+ int r;
+ while ((r = is.read(buffer)) > 0) {
+ os.write(buffer, 0, r);
+ }
+ } finally {
+ os.close();
+ }
+
+ return true;
+ }
+ return false;
+ } catch (Exception e) {
+ // Download failed for any number of reasons, timeouts, connection
+ // drops, etc. Just log it in debugging mode.
+ Log.e(TAG, "", e);
+ return false;
+ } finally {
+ if (urlConnection != null) {
+ urlConnection.disconnect();
+ }
+ }
+ }
+
+
+ public static String downloadUrlMemoryAsString(String url) {
+ if (DEBUG) Log.d(TAG, "download: " + url);
+
+ HttpsURLConnection urlConnection = null;
+ try {
+ urlConnection = setupHttpsRequest(url);
+ if (urlConnection == null) {
+ return null;
+ }
+
+ InputStream is = urlConnection.getInputStream();
+ ByteArrayOutputStream byteArray = new ByteArrayOutputStream();
+ int byteInt;
+
+ while ((byteInt = is.read()) >= 0) {
+ byteArray.write(byteInt);
+ }
+
+ byte[] bytes = byteArray.toByteArray();
+ if (bytes == null) {
+ return null;
+ }
+
+ return new String(bytes, StandardCharsets.UTF_8);
+ } catch (Exception e) {
+ // Download failed for any number of reasons, timeouts, connection
+ // drops, etc. Just log it in debugging mode.
+ Log.e(TAG, "", e);
+ return null;
+ } finally {
+ if (urlConnection != null) {
+ urlConnection.disconnect();
+ }
+ }
+ }
+
+ public interface DownloadCallback {
+ void onDownloadComplete(String result);
+ }
+
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/OmniJawsClient.kt b/app/src/main/java/com/drdisagree/iconify/utils/OmniJawsClient.kt
new file mode 100644
index 000000000..b4a013802
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/OmniJawsClient.kt
@@ -0,0 +1,416 @@
+package com.drdisagree.iconify.utils
+
+import android.annotation.SuppressLint
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import android.content.IntentFilter
+import android.content.res.Resources
+import android.graphics.Color
+import android.graphics.drawable.ColorDrawable
+import android.graphics.drawable.Drawable
+import android.net.Uri
+import android.os.Build
+import android.text.TextUtils
+import android.text.format.DateFormat
+import android.util.Log
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.utils.weather.WeatherConfig
+import java.text.DecimalFormat
+import java.text.SimpleDateFormat
+import java.util.Date
+import java.util.Locale
+
+/*
+ * Copyright (C) 2021 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 .
+ *
+ */
+
+class OmniJawsClient(private val mContext: Context) {
+
+ class WeatherInfo(private val mContext: Context) {
+ var city: String? = null
+ var windSpeed: String? = null
+ var windDirection: String? = null
+ var conditionCode: Int = 0
+ var temp: String? = null
+ var humidity: String? = null
+ var condition: String? = null
+ var timeStamp: Long = 0
+ var forecasts: List? = null
+ var tempUnits: String? = null
+ var windUnits: String? = null
+ var provider: String? = null
+ var pinWheel: String? = null
+ var iconPack: String? = null
+
+ override fun toString(): String {
+ return city + ":" + Date(timeStamp) + ": " + windSpeed + ":" + windDirection + ":" + conditionCode + ":" + temp + ":" + humidity + ":" + condition + ":" + tempUnits + ":" + windUnits + ": " + forecasts + ": " + iconPack
+ }
+
+ val lastUpdateTime: String
+ get() {
+ val hourFormat = if (DateFormat.is24HourFormat(mContext)) "HH" else "hh"
+ val sdf = SimpleDateFormat("$hourFormat:mm:ss", Locale.getDefault())
+ return sdf.format(Date(timeStamp))
+ }
+ }
+
+ class DayForecast {
+ var low: String? = null
+ var high: String? = null
+ var conditionCode: Int = 0
+ var condition: String? = null
+ var date: String? = null
+
+ override fun toString(): String {
+ return "[$low:$high:$conditionCode:$condition:$date]"
+ }
+ }
+
+ interface OmniJawsObserver {
+ fun weatherUpdated()
+ fun weatherError(errorReason: Int)
+ fun updateSettings() {}
+ }
+
+ private inner class WeatherUpdateReceiver : BroadcastReceiver() {
+ override fun onReceive(context: Context, intent: Intent) {
+ val action = intent.action
+ for (observer in mObserver) {
+ if (action == WEATHER_UPDATE) {
+ observer.weatherUpdated()
+ }
+ if (action == WEATHER_ERROR) {
+ val errorReason = intent.getIntExtra(EXTRA_ERROR, 0)
+ observer.weatherError(errorReason)
+ }
+ }
+ }
+ }
+
+ var weatherInfo: WeatherInfo? = null
+ private var mRes: Resources? = null
+ private var mPackageName: String? = null
+ private var mIconPrefix: String? = null
+ private var mSettingIconPackage: String? = null
+ private var mMetric = false
+ private val mObserver: MutableList = ArrayList()
+ private var mReceiver: WeatherUpdateReceiver? = null
+
+ fun queryWeather() {
+ try {
+ weatherInfo = null
+
+ var cursor = mContext.contentResolver.query(
+ WEATHER_URI, WEATHER_PROJECTION,
+ null, null, null
+ )
+
+ cursor?.use {
+ val count = it.count
+
+ if (count > 0) {
+ weatherInfo = WeatherInfo(mContext)
+ val forecastList: MutableList = ArrayList()
+ var i = 0
+
+ while (i < count) {
+ it.moveToPosition(i)
+
+ if (i == 0) {
+ weatherInfo?.apply {
+ city = it.getString(0)
+ windSpeed = getFormattedValue(it.getFloat(1))
+ weatherInfo!!.windDirection = it.getInt(2).toString() + "\u00b0"
+ weatherInfo!!.conditionCode = it.getInt(3)
+ weatherInfo!!.temp = getFormattedValue(it.getFloat(4))
+ weatherInfo!!.humidity = it.getString(5)
+ weatherInfo!!.condition = it.getString(6)
+ weatherInfo!!.timeStamp = it.getString(11).toLong()
+ weatherInfo!!.pinWheel = it.getString(13)
+ }
+ } else {
+ val day = DayForecast()
+ day.low = getFormattedValue(it.getFloat(7))
+ day.high = getFormattedValue(it.getFloat(8))
+ day.condition = it.getString(9)
+ day.conditionCode = it.getInt(10)
+ day.date = it.getString(12)
+ forecastList.add(day)
+ }
+ i++
+ }
+ weatherInfo!!.forecasts = forecastList
+ }
+ }
+
+ cursor = mContext.contentResolver.query(
+ SETTINGS_URI, SETTINGS_PROJECTION,
+ null, null, null
+ )
+
+ cursor?.use {
+ val count = it.count
+
+ if (count == 1) {
+ it.moveToPosition(0)
+ mMetric = it.getInt(1) == 0
+
+ weatherInfo?.apply {
+ tempUnits = temperatureUnit
+ windUnits = windUnit
+ provider = it.getString(2)
+ iconPack = it.getString(4)
+ }
+ }
+ }
+
+ updateSettings()
+ } catch (e: Exception) {
+ Log.e(TAG, "queryWeather", e)
+ }
+ }
+
+ private fun loadDefaultIconsPackage() {
+ mPackageName = ICON_PACKAGE_DEFAULT
+ mIconPrefix = ICON_PREFIX_DEFAULT
+ mSettingIconPackage = "$mPackageName.$mIconPrefix"
+
+ if (DEBUG) Log.d(
+ TAG,
+ "Load default icon pack $mSettingIconPackage $mPackageName $mIconPrefix"
+ )
+
+ try {
+ val packageManager = mContext.packageManager
+ mRes = packageManager.getResourcesForApplication(mPackageName!!)
+ } catch (e: Exception) {
+ Log.d(TAG, "loadDefaultIconsPackage", e)
+ mRes = null
+ }
+
+ if (mRes == null) {
+ Log.w(TAG, "No default package found")
+ }
+ }
+
+ @Suppress("deprecation")
+ private val defaultConditionImage: Drawable
+ @SuppressLint("DiscouragedApi", "UseCompatLoadingForDrawables")
+ get() {
+ val packageName = ICON_PACKAGE_DEFAULT
+ val iconPrefix = ICON_PREFIX_DEFAULT
+
+ try {
+ val packageManager = mContext.packageManager
+ val res = packageManager.getResourcesForApplication(packageName)
+ val resId = res.getIdentifier(iconPrefix + "_na", "drawable", packageName)
+ val d = mRes!!.getDrawable(resId)
+
+ if (d != null) {
+ return d
+ }
+ } catch (e: Exception) {
+ Log.e(TAG, "defaultConditionImage", e)
+ }
+
+ // absolute absolute fallback
+ Log.w(TAG, "No default package found")
+
+ return ColorDrawable(Color.RED)
+ }
+
+ private fun loadCustomIconPackage() {
+ if (DEBUG) Log.d(
+ TAG,
+ "Load custom icon pack $mSettingIconPackage"
+ )
+
+ val idx = mSettingIconPackage!!.lastIndexOf(".")
+ mPackageName = mSettingIconPackage!!.substring(0, idx)
+ mIconPrefix = mSettingIconPackage!!.substring(idx + 1)
+
+ if (DEBUG) Log.d(
+ TAG,
+ "Load custom icon pack $mPackageName $mIconPrefix"
+ )
+
+ try {
+ val packageManager = mContext.packageManager
+ mRes = packageManager.getResourcesForApplication(mPackageName!!)
+ } catch (e: Exception) {
+ Log.w(TAG, "Icon pack loading failed - loading default")
+ loadDefaultIconsPackage()
+ }
+ }
+
+ @Suppress("deprecation")
+ @SuppressLint("DiscouragedApi", "UseCompatLoadingForDrawables")
+ fun getWeatherConditionImage(conditionCode: Int): Drawable {
+ try {
+ var resId = mRes!!.getIdentifier(
+ mIconPrefix + "_" + conditionCode,
+ "drawable",
+ mPackageName
+ )
+ var d = mRes!!.getDrawable(resId)
+ if (d != null) {
+ return d
+ }
+
+ Log.w(
+ TAG,
+ "Failed to get condition image for $conditionCode use default"
+ )
+
+ resId = mRes!!.getIdentifier(mIconPrefix + "_na", "drawable", mPackageName)
+ d = mRes!!.getDrawable(resId)
+
+ if (d != null) {
+ return d
+ }
+ } catch (e: Exception) {
+ Log.e(TAG, "getWeatherConditionImage", e)
+ }
+ Log.w(
+ TAG,
+ "Failed to get condition image for $conditionCode"
+ )
+ return defaultConditionImage
+ }
+
+ val isOmniJawsEnabled: Boolean
+ get() = WeatherConfig.isEnabled(mContext)
+
+ private val temperatureUnit: String
+ get() = "\u00b0" + (if (mMetric) "C" else "F")
+
+ private val windUnit: String
+ get() = if (mMetric) "km/h" else "mph"
+
+ private fun updateSettings() {
+ val iconPack = if (weatherInfo != null) weatherInfo!!.iconPack else null
+ if (TextUtils.isEmpty(iconPack)) {
+ Log.d(TAG, "updateSettings No icon pack set, using default")
+ loadDefaultIconsPackage()
+ } else if (iconPack != mSettingIconPackage) {
+ Log.d(
+ TAG,
+ "updateSettings New icon pack set, loading $iconPack"
+ )
+ mSettingIconPackage = iconPack
+ loadCustomIconPackage()
+ }
+ }
+
+ @SuppressLint("UnspecifiedRegisterReceiverFlag")
+ fun addObserver(observer: OmniJawsObserver) {
+ if (mObserver.isEmpty()) {
+ if (mReceiver != null) {
+ try {
+ mContext.unregisterReceiver(mReceiver)
+ } catch (ignored: Exception) {
+ }
+ }
+ mReceiver = WeatherUpdateReceiver()
+ val filter = IntentFilter()
+ filter.addAction(WEATHER_UPDATE)
+ filter.addAction(WEATHER_ERROR)
+ if (DEBUG) Log.d(TAG, "registerReceiver")
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ mContext.registerReceiver(mReceiver, filter, Context.RECEIVER_EXPORTED)
+ } else {
+ mContext.registerReceiver(mReceiver, filter)
+ }
+ }
+ mObserver.add(observer)
+ }
+
+ fun removeObserver(observer: OmniJawsObserver) {
+ mObserver.remove(observer)
+ if (mObserver.isEmpty() && mReceiver != null) {
+ try {
+ if (DEBUG) Log.d(TAG, "unregisterReceiver")
+ mContext.unregisterReceiver(mReceiver)
+ } catch (ignored: Exception) {
+ }
+ mReceiver = null
+ }
+ }
+
+ companion object {
+ private const val TAG = "OmniJawsClient"
+ private val DEBUG = BuildConfig.DEBUG
+ private const val SERVICE_PACKAGE: String = BuildConfig.APPLICATION_ID
+ val WEATHER_URI
+ : Uri = Uri.parse("content://com.drdisagree.iconify.weatherprovider/weather")
+ val SETTINGS_URI
+ : Uri = Uri.parse("content://com.drdisagree.iconify.weatherprovider/settings")
+ val CONTROL_URI
+ : Uri = Uri.parse("content://com.drdisagree.iconify.weatherprovider/control")
+
+ private const val ICON_PACKAGE_DEFAULT = BuildConfig.APPLICATION_ID
+ private const val ICON_PREFIX_DEFAULT = "google"
+ private const val ICON_PREFIX_OUTLINE = "outline"
+ private const val EXTRA_ERROR = "error"
+ const val EXTRA_ERROR_NETWORK: Int = 0 // No Network
+ const val EXTRA_ERROR_LOCATION: Int = 1 // No Location Found
+ const val EXTRA_ERROR_DISABLED: Int = 2 // Disabled
+ const val EXTRA_ERROR_NO_PERMISSIONS: Int = 3 // No Permissions
+
+ val WEATHER_PROJECTION: Array = arrayOf(
+ "city",
+ "wind_speed",
+ "wind_direction",
+ "condition_code",
+ "temperature",
+ "humidity",
+ "condition",
+ "forecast_low",
+ "forecast_high",
+ "forecast_condition",
+ "forecast_condition_code",
+ "time_stamp",
+ "forecast_date",
+ "pin_wheel"
+ )
+
+ val SETTINGS_PROJECTION: Array = arrayOf(
+ "enabled",
+ "units",
+ "provider",
+ "setup",
+ "icon_pack"
+ )
+
+ private const val WEATHER_UPDATE = "$SERVICE_PACKAGE.WEATHER_UPDATE"
+ private const val WEATHER_ERROR = "$SERVICE_PACKAGE.WEATHER_ERROR"
+
+ private val sNoDigitsFormat = DecimalFormat("0")
+
+ private fun getFormattedValue(value: Float): String {
+ if (java.lang.Float.isNaN(value)) {
+ return "-"
+ }
+ var formatted = sNoDigitsFormat.format(value.toDouble())
+ if (formatted == "-0") {
+ formatted = "0"
+ }
+ return formatted
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/RootUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/RootUtil.kt
deleted file mode 100644
index 3cd197ea5..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/RootUtil.kt
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.drdisagree.iconify.utils
-
-import com.topjohnwu.superuser.Shell
-
-object RootUtil {
-
- @JvmStatic
- val isDeviceRooted: Boolean
- get() = java.lang.Boolean.TRUE == Shell.isAppGrantedRoot()
-
- @JvmStatic
- val isMagiskInstalled: Boolean
- get() = Shell.cmd("magisk -v").exec().isSuccess
-
- @JvmStatic
- val isKSUInstalled: Boolean
- get() = Shell.cmd("/data/adb/ksud -h").exec().isSuccess
-
- @JvmStatic
- val isApatchInstalled: Boolean
- get() = Shell.cmd("apd --help").exec().isSuccess
-
- fun moduleExists(moduleId: String): Boolean {
- return folderExists("/data/adb/modules/$moduleId")
- }
-
- @JvmStatic
- fun setPermissions(permission: Int, filename: String) {
- Shell.cmd("chmod $permission $filename").exec()
- }
-
- fun setPermissionsRecursively(permission: Int, folderName: String) {
- Shell.cmd("chmod -R $permission $folderName").exec()
- val perm = permission.toString()
-
- if (!Shell.cmd("stat -c '%a' $folderName").exec().out.contains(perm) || !Shell.cmd(
- "fl=$(find '$folderName' -type f -mindepth 1 -print -quit); stat -c '%a' \$fl"
- ).exec().out.contains(perm)
- ) Shell.cmd("for file in $folderName*; do chmod $permission \"\$file\"; done").exec()
- }
-
- fun fileExists(dir: String): Boolean {
- val lines = Shell.cmd("test -f $dir && echo '1'").exec().out
-
- for (line in lines) {
- if (line.contains("1")) return true
- }
-
- return false
- }
-
- @JvmStatic
- fun folderExists(dir: String): Boolean {
- val lines = Shell.cmd("test -d $dir && echo '1'").exec().out
-
- for (line in lines) {
- if (line.contains("1")) return true
- }
-
- return false
- }
-
- @JvmStatic
- fun deviceProperlyRooted(): Boolean {
- return isDeviceRooted && (isMagiskInstalled || isKSUInstalled || isApatchInstalled)
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/RootUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/RootUtils.kt
new file mode 100644
index 000000000..1f21c20d1
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/RootUtils.kt
@@ -0,0 +1,60 @@
+package com.drdisagree.iconify.utils
+
+import com.topjohnwu.superuser.Shell
+
+object RootUtils {
+
+ val isDeviceRooted: Boolean
+ get() = java.lang.Boolean.TRUE == Shell.isAppGrantedRoot()
+
+ val isMagiskInstalled: Boolean
+ get() = Shell.cmd("magisk -v").exec().isSuccess
+
+ val isKSUInstalled: Boolean
+ get() = Shell.cmd("/data/adb/ksud -h").exec().isSuccess
+
+ val isApatchInstalled: Boolean
+ get() = Shell.cmd("apd --help").exec().isSuccess
+
+ fun moduleExists(moduleId: String): Boolean {
+ return folderExists("/data/adb/modules/$moduleId")
+ }
+
+ fun setPermissions(permission: Int, filename: String) {
+ Shell.cmd("chmod $permission $filename").exec()
+ }
+
+ fun setPermissionsRecursively(permission: Int, folderName: String) {
+ Shell.cmd("chmod -R $permission $folderName").exec()
+ val perm = permission.toString()
+
+ if (!Shell.cmd("stat -c '%a' $folderName").exec().out.contains(perm) || !Shell.cmd(
+ "fl=$(find '$folderName' -type f -mindepth 1 -print -quit); stat -c '%a' \$fl"
+ ).exec().out.contains(perm)
+ ) Shell.cmd("for file in $folderName*; do chmod $permission \"\$file\"; done").exec()
+ }
+
+ fun fileExists(dir: String): Boolean {
+ val lines = Shell.cmd("test -f $dir && echo '1'").exec().out
+
+ for (line in lines) {
+ if (line.contains("1")) return true
+ }
+
+ return false
+ }
+
+ fun folderExists(dir: String): Boolean {
+ val lines = Shell.cmd("test -d $dir && echo '1'").exec().out
+
+ for (line in lines) {
+ if (line.contains("1")) return true
+ }
+
+ return false
+ }
+
+ fun deviceProperlyRooted(): Boolean {
+ return isDeviceRooted && (isMagiskInstalled || isKSUInstalled || isApatchInstalled)
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/SystemUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/SystemUtil.kt
deleted file mode 100644
index d52d0268e..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/SystemUtil.kt
+++ /dev/null
@@ -1,279 +0,0 @@
-package com.drdisagree.iconify.utils
-
-import android.Manifest
-import android.app.Activity
-import android.content.Context
-import android.content.Intent
-import android.content.res.Configuration
-import android.net.Uri
-import android.os.Environment
-import android.provider.Settings
-import android.view.WindowInsets
-import android.widget.Toast
-import androidx.core.app.ActivityCompat
-import com.drdisagree.iconify.BuildConfig
-import com.drdisagree.iconify.Iconify.Companion.appContext
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
-import com.drdisagree.iconify.common.Preferences.BOOT_ID
-import com.drdisagree.iconify.common.Preferences.FORCE_RELOAD_OVERLAY_STATE
-import com.drdisagree.iconify.common.Preferences.FORCE_RELOAD_PACKAGE_NAME
-import com.drdisagree.iconify.common.Preferences.RESTART_SYSUI_BEHAVIOR_EXT
-import com.drdisagree.iconify.common.Preferences.VER_CODE
-import com.drdisagree.iconify.common.References.DEVICE_BOOT_ID_CMD
-import com.drdisagree.iconify.common.Resources
-import com.drdisagree.iconify.config.Prefs
-import com.drdisagree.iconify.config.Prefs.putString
-import com.drdisagree.iconify.config.RPrefs
-import com.drdisagree.iconify.xposed.utils.BootLoopProtector.LOAD_TIME_KEY_KEY
-import com.drdisagree.iconify.xposed.utils.BootLoopProtector.PACKAGE_STRIKE_KEY_KEY
-import com.topjohnwu.superuser.Shell
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.delay
-import kotlinx.coroutines.launch
-import java.util.Calendar
-
-object SystemUtil {
-
- private var darkSwitching = false
- private const val BLUR_CMD_0 =
- "resetprop ro.surface_flinger.supports_background_blur 1 && killall surfaceflinger"
- private const val BLUR_CMD_1 = "ro.sf.blurs_are_expensive=1"
- private const val BLUR_CMD_2 = "ro.surface_flinger.supports_background_blur=1"
- private const val BLUR_CMD_3 = "persist.sys.sf.disable_blurs=0"
- private const val BLUR_CMD_4 = "persist.sysui.disableBlur=false"
- private const val BLUR_CMD_5 = "ro.config.avoid_gfx_accel=false"
-
- @JvmStatic
- val isDarkMode: Boolean
- get() = appContext.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_YES == Configuration.UI_MODE_NIGHT_YES
-
- @JvmStatic
- fun restartSystemUI() {
- val loadTimeKey = String.format("%s%s", LOAD_TIME_KEY_KEY, SYSTEMUI_PACKAGE)
- val strikeKey = String.format("%s%s", PACKAGE_STRIKE_KEY_KEY, SYSTEMUI_PACKAGE)
- val currentTime = Calendar.getInstance().time.time
-
- RPrefs.putLong(loadTimeKey, currentTime)
- RPrefs.putInt(strikeKey, 0)
- Shell.cmd("killall $SYSTEMUI_PACKAGE").submit()
- }
-
- private fun forceReloadUI() {
- val state = RPrefs.getBoolean(FORCE_RELOAD_OVERLAY_STATE, false)
- val pkgName: String = FORCE_RELOAD_PACKAGE_NAME
-
- Shell.cmd(
- "cmd overlay " + (if (state) "disable" else "enable") + " --user current " + pkgName + "; cmd overlay " + (if (state) "enable" else "disable") + " --user current " + pkgName
- ).submit()
- }
-
- @JvmStatic
- fun handleSystemUIRestart() {
- val selectedBehavior = RPrefs.getInt(RESTART_SYSUI_BEHAVIOR_EXT, 0)
-
- when (selectedBehavior) {
- 0 -> {
- restartSystemUI()
- }
-
- 1 -> {
- forceReloadUI()
- }
-
- else -> {
- Toast.makeText(
- appContext,
- appContext.resources.getString(R.string.settings_systemui_restart_required),
- Toast.LENGTH_SHORT
- ).show()
- }
- }
- }
-
- @JvmStatic
- fun restartDevice() {
- Shell.cmd("am start -a android.intent.action.REBOOT").exec()
- }
-
- @JvmStatic
- fun disableBlur(force: Boolean) {
- Shell.cmd(
- if (!force) "mv " + Resources.MODULE_DIR +
- "/system.prop " +
- Resources.MODULE_DIR +
- "/system.txt; " +
- "grep -vE \"" +
- BLUR_CMD_1 + "|" +
- BLUR_CMD_2 + "|" +
- BLUR_CMD_3 + "|" +
- BLUR_CMD_4 + "|" +
- BLUR_CMD_5 + "\" " +
- Resources.MODULE_DIR +
- "/system.txt > " +
- Resources.MODULE_DIR +
- "/system.txt.tmp; " +
- "rm -rf " +
- Resources.MODULE_DIR +
- "/system.prop; " +
- "mv " + Resources.MODULE_DIR +
- "/system.txt.tmp " +
- Resources.MODULE_DIR +
- "/system.prop; " +
- "rm -rf " + Resources.MODULE_DIR +
- "/system.txt; " +
- "rm -rf " + Resources.MODULE_DIR +
- "/system.txt.tmp" else ":", // do nothing
- "grep -v \"ro.surface_flinger.supports_background_blur\" " +
- Resources.MODULE_DIR + "/service.sh > " +
- Resources.MODULE_DIR + "/service.sh.tmp && mv " +
- Resources.MODULE_DIR + "/service.sh.tmp " +
- Resources.MODULE_DIR + "/service.sh"
- ).submit()
- }
-
- @JvmStatic
- fun enableBlur(force: Boolean) {
- disableBlur(false)
- Shell.cmd(
- "echo \"$BLUR_CMD_1\n$BLUR_CMD_2\n$BLUR_CMD_3\n$BLUR_CMD_4\n$BLUR_CMD_5\"" +
- " >> ${Resources.MODULE_DIR}/system.prop",
- if (force) "sed '/*}/a " +
- BLUR_CMD_0 + "' " +
- Resources.MODULE_DIR +
- "/service.sh > " +
- Resources.MODULE_DIR +
- "/service.sh.tmp && mv " +
- Resources.MODULE_DIR +
- "/service.sh.tmp " +
- Resources.MODULE_DIR +
- "/service.sh" else ":" // do nothing
- ).submit()
- }
-
- @JvmStatic
- fun mountRW() {
- Shell.cmd("mount -o remount,rw /").exec()
-
- if (RootUtil.moduleExists("magisk_overlayfs")) {
- Shell.cmd("-mm -c magic_remount_rw").exec()
- } else if (RootUtil.moduleExists("overlayfs")) {
- Shell.cmd("/data/overlayfs/tmp/overlayrw -rw /system/product/overlay").exec()
- }
- }
-
- @JvmStatic
- fun mountRO() {
- Shell.cmd("mount -o remount,ro /").exec()
-
- if (RootUtil.moduleExists("magisk_overlayfs")) {
- Shell.cmd("-mm -c magic_remount_ro").exec()
- } else if (RootUtil.moduleExists("overlayfs")) {
- Shell.cmd("/data/overlayfs/tmp/overlayrw -ro /system/product/overlay").exec()
- }
- }
-
- /*
- * From AOSPMods
- * https://github.com/siavash79/AOSPMods/blob/canary/app/src/main/java/sh/siava/AOSPMods/utils/SystemUtils.java
- */
- @JvmStatic
- fun doubleToggleDarkMode() {
- val isDark = isDarkMode
-
- CoroutineScope(Dispatchers.Default).launch {
- try {
- while (darkSwitching) {
- delay(100)
- }
-
- darkSwitching = true
-
- Shell.cmd("cmd uimode night ${if (isDark) "no" else "yes"}").exec()
- delay(1000)
- Shell.cmd("cmd uimode night ${if (isDark) "yes" else "no"}").exec()
- delay(500)
-
- darkSwitching = false
- } catch (ignored: Exception) {
- }
- }
- }
-
- @JvmStatic
- fun isBlurEnabled(force: Boolean): Boolean {
- return Shell.cmd(
- "if grep -q \"ro.surface_flinger.supports_background_blur\" " +
- Resources.MODULE_DIR +
- (if (force) "/service.sh;" else "/system.prop;") +
- " then echo yes; else echo no; fi"
- ).exec().out[0] == "yes"
- }
-
- @JvmStatic
- val saveBootId: Unit // Save unique id of each boot
- get() {
- putString(BOOT_ID, Shell.cmd(DEVICE_BOOT_ID_CMD).exec().out.toString())
- }
-
- @JvmStatic
- fun saveVersionCode() {
- Prefs.putInt(VER_CODE, BuildConfig.VERSION_CODE)
- }
-
- @JvmStatic
- val savedVersionCode: Int
- get() = Prefs.getInt(VER_CODE, -1)
-
- @JvmStatic
- fun hasStoragePermission(): Boolean {
- return Environment.isExternalStorageManager() || Environment.isExternalStorageLegacy()
- }
-
- @JvmStatic
- fun requestStoragePermission(context: Context) {
- val intent = Intent()
- intent.setAction(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION)
- intent.setData(Uri.fromParts("package", BuildConfig.APPLICATION_ID, null))
-
- (context as Activity).startActivityForResult(intent, 0)
- ActivityCompat.requestPermissions(
- context, arrayOf(
- Manifest.permission.READ_EXTERNAL_STORAGE,
- Manifest.permission.WRITE_EXTERNAL_STORAGE,
- Manifest.permission.MANAGE_EXTERNAL_STORAGE
- ), 0
- )
- }
-
- @JvmStatic
- fun enableRestartSystemuiAfterBoot() {
- disableRestartSystemuiAfterBoot()
-
- Shell.cmd(
- "sed '/^sleep.6/i killall " + SYSTEMUI_PACKAGE + "' " + Resources.MODULE_DIR + "/service.sh > " + Resources.MODULE_DIR + "/service.sh.tmp && mv " + Resources.MODULE_DIR + "/service.sh.tmp " + Resources.MODULE_DIR + "/service.sh"
- ).submit()
- }
-
- @JvmStatic
- fun disableRestartSystemuiAfterBoot() {
- Shell.cmd(
- "grep -v \"killall " + SYSTEMUI_PACKAGE + "\" " + Resources.MODULE_DIR + "/service.sh > " + Resources.MODULE_DIR + "/service.sh.tmp && mv " + Resources.MODULE_DIR + "/service.sh.tmp " + Resources.MODULE_DIR + "/service.sh"
- ).submit()
- }
-
- fun getScreenWidth(activity: Activity): Int {
- val windowMetrics = activity.windowManager.currentWindowMetrics
- val insets = windowMetrics.getWindowInsets()
- .getInsetsIgnoringVisibility(WindowInsets.Type.systemBars())
- return windowMetrics.bounds.width() - (insets.left + insets.right)
- }
-
- fun getScreenHeight(activity: Activity): Int {
- val windowMetrics = activity.windowManager.currentWindowMetrics
- val insets = windowMetrics.getWindowInsets()
- .getInsetsIgnoringVisibility(WindowInsets.Type.systemBars())
- return windowMetrics.bounds.height() - (insets.top + insets.bottom)
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/SystemUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/SystemUtils.kt
new file mode 100644
index 000000000..b76c99b91
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/SystemUtils.kt
@@ -0,0 +1,286 @@
+package com.drdisagree.iconify.utils
+
+import android.Manifest
+import android.app.Activity
+import android.content.Context
+import android.content.Intent
+import android.content.res.Configuration
+import android.net.Uri
+import android.os.Build
+import android.os.Environment
+import android.provider.Settings
+import android.util.Log
+import android.view.WindowInsets
+import android.widget.Toast
+import androidx.core.app.ActivityCompat
+import com.drdisagree.iconify.BuildConfig
+import com.drdisagree.iconify.Iconify.Companion.appContext
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
+import com.drdisagree.iconify.common.Preferences.BOOT_ID
+import com.drdisagree.iconify.common.Preferences.FORCE_RELOAD_OVERLAY_STATE
+import com.drdisagree.iconify.common.Preferences.FORCE_RELOAD_PACKAGE_NAME
+import com.drdisagree.iconify.common.Preferences.RESTART_SYSUI_BEHAVIOR_EXT
+import com.drdisagree.iconify.common.Preferences.VER_CODE
+import com.drdisagree.iconify.common.References.DEVICE_BOOT_ID_CMD
+import com.drdisagree.iconify.common.Resources
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.config.RPrefs.getString
+import com.drdisagree.iconify.config.RPrefs.putString
+import com.drdisagree.iconify.xposed.utils.BootLoopProtector.LOAD_TIME_KEY_KEY
+import com.drdisagree.iconify.xposed.utils.BootLoopProtector.PACKAGE_STRIKE_KEY_KEY
+import com.topjohnwu.superuser.Shell
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.launch
+import java.text.SimpleDateFormat
+import java.util.Calendar
+import java.util.Locale
+
+object SystemUtils {
+
+ private var darkSwitching = false
+ private const val BLUR_CMD_0 =
+ "resetprop ro.surface_flinger.supports_background_blur 1 && killall surfaceflinger"
+ private const val BLUR_CMD_1 = "ro.sf.blurs_are_expensive=1"
+ private const val BLUR_CMD_2 = "ro.surface_flinger.supports_background_blur=1"
+ private const val BLUR_CMD_3 = "persist.sys.sf.disable_blurs=0"
+ private const val BLUR_CMD_4 = "persist.sysui.disableBlur=false"
+ private const val BLUR_CMD_5 = "ro.config.avoid_gfx_accel=false"
+
+ val isDarkMode: Boolean
+ get() = appContext.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_YES == Configuration.UI_MODE_NIGHT_YES
+
+ fun restartSystemUI() {
+ val loadTimeKey = String.format("%s%s", LOAD_TIME_KEY_KEY, SYSTEMUI_PACKAGE)
+ val strikeKey = String.format("%s%s", PACKAGE_STRIKE_KEY_KEY, SYSTEMUI_PACKAGE)
+ val currentTime = Calendar.getInstance().time.time
+
+ RPrefs.putLong(loadTimeKey, currentTime)
+ RPrefs.putInt(strikeKey, 0)
+ Shell.cmd("killall $SYSTEMUI_PACKAGE").submit()
+ }
+
+ private fun forceReloadUI() {
+ val state = RPrefs.getBoolean(FORCE_RELOAD_OVERLAY_STATE, false)
+ val pkgName: String = FORCE_RELOAD_PACKAGE_NAME
+
+ Shell.cmd(
+ "cmd overlay " + (if (state) "disable" else "enable") + " --user current " + pkgName + "; cmd overlay " + (if (state) "enable" else "disable") + " --user current " + pkgName
+ ).submit()
+ }
+
+ fun handleSystemUIRestart() {
+ val selectedBehavior = getString(RESTART_SYSUI_BEHAVIOR_EXT, "0")!!.toInt()
+
+ when (selectedBehavior) {
+ 0 -> {
+ restartSystemUI()
+ }
+
+ 1 -> {
+ forceReloadUI()
+ }
+
+ else -> {
+ Toast.makeText(
+ appContext,
+ appContext.resources.getString(R.string.settings_systemui_restart_required),
+ Toast.LENGTH_SHORT
+ ).show()
+ }
+ }
+ }
+
+ fun restartDevice() {
+ Shell.cmd("am start -a android.intent.action.REBOOT").exec()
+ }
+
+ fun disableBlur(force: Boolean) {
+ Shell.cmd(
+ if (!force) "mv " + Resources.MODULE_DIR +
+ "/system.prop " +
+ Resources.MODULE_DIR +
+ "/system.txt; " +
+ "grep -vE \"" +
+ BLUR_CMD_1 + "|" +
+ BLUR_CMD_2 + "|" +
+ BLUR_CMD_3 + "|" +
+ BLUR_CMD_4 + "|" +
+ BLUR_CMD_5 + "\" " +
+ Resources.MODULE_DIR +
+ "/system.txt > " +
+ Resources.MODULE_DIR +
+ "/system.txt.tmp; " +
+ "rm -rf " +
+ Resources.MODULE_DIR +
+ "/system.prop; " +
+ "mv " + Resources.MODULE_DIR +
+ "/system.txt.tmp " +
+ Resources.MODULE_DIR +
+ "/system.prop; " +
+ "rm -rf " + Resources.MODULE_DIR +
+ "/system.txt; " +
+ "rm -rf " + Resources.MODULE_DIR +
+ "/system.txt.tmp" else ":", // do nothing
+ "grep -v \"ro.surface_flinger.supports_background_blur\" " +
+ Resources.MODULE_DIR + "/service.sh > " +
+ Resources.MODULE_DIR + "/service.sh.tmp && mv " +
+ Resources.MODULE_DIR + "/service.sh.tmp " +
+ Resources.MODULE_DIR + "/service.sh"
+ ).submit()
+ }
+
+ fun enableBlur(force: Boolean) {
+ disableBlur(false)
+ Shell.cmd(
+ "echo \"$BLUR_CMD_1\n$BLUR_CMD_2\n$BLUR_CMD_3\n$BLUR_CMD_4\n$BLUR_CMD_5\"" +
+ " >> ${Resources.MODULE_DIR}/system.prop",
+ if (force) "sed '/*}/a " +
+ BLUR_CMD_0 + "' " +
+ Resources.MODULE_DIR +
+ "/service.sh > " +
+ Resources.MODULE_DIR +
+ "/service.sh.tmp && mv " +
+ Resources.MODULE_DIR +
+ "/service.sh.tmp " +
+ Resources.MODULE_DIR +
+ "/service.sh" else ":" // do nothing
+ ).submit()
+ }
+
+ fun mountRW() {
+ Shell.cmd("mount -o remount,rw /").exec()
+
+ if (RootUtils.moduleExists("magisk_overlayfs")) {
+ Shell.cmd("-mm -c magic_remount_rw").exec()
+ } else if (RootUtils.moduleExists("overlayfs")) {
+ Shell.cmd("/data/overlayfs/tmp/overlayrw -rw /system/product/overlay").exec()
+ }
+ }
+
+ fun mountRO() {
+ Shell.cmd("mount -o remount,ro /").exec()
+
+ if (RootUtils.moduleExists("magisk_overlayfs")) {
+ Shell.cmd("-mm -c magic_remount_ro").exec()
+ } else if (RootUtils.moduleExists("overlayfs")) {
+ Shell.cmd("/data/overlayfs/tmp/overlayrw -ro /system/product/overlay").exec()
+ }
+ }
+
+ /*
+ * From AOSPMods
+ * https://github.com/siavash79/AOSPMods/blob/canary/app/src/main/java/sh/siava/AOSPMods/utils/SystemUtils.java
+ */
+ fun doubleToggleDarkMode() {
+ val isDark = isDarkMode
+
+ CoroutineScope(Dispatchers.Default).launch {
+ try {
+ while (darkSwitching) {
+ delay(100)
+ }
+
+ darkSwitching = true
+
+ Shell.cmd("cmd uimode night ${if (isDark) "no" else "yes"}").exec()
+ delay(1000)
+ Shell.cmd("cmd uimode night ${if (isDark) "yes" else "no"}").exec()
+ delay(500)
+
+ darkSwitching = false
+ } catch (ignored: Exception) {
+ }
+ }
+ }
+
+ fun isBlurEnabled(force: Boolean): Boolean {
+ return Shell.cmd(
+ "if grep -q \"ro.surface_flinger.supports_background_blur\" " +
+ Resources.MODULE_DIR +
+ (if (force) "/service.sh;" else "/system.prop;") +
+ " then echo yes; else echo no; fi"
+ ).exec().out[0] == "yes"
+ }
+
+ val saveBootId: Unit // Save unique id of each boot
+ get() {
+ val bootId = Shell.cmd(DEVICE_BOOT_ID_CMD).exec().out.toString()
+ if (getString(BOOT_ID) != bootId) {
+ putString(BOOT_ID, bootId)
+ }
+ }
+
+ fun saveVersionCode() {
+ RPrefs.putInt(VER_CODE, BuildConfig.VERSION_CODE)
+ }
+
+ val savedVersionCode: Int
+ get() = RPrefs.getInt(VER_CODE, -1)
+
+ fun hasStoragePermission(): Boolean {
+ return Environment.isExternalStorageManager() || Environment.isExternalStorageLegacy()
+ }
+
+ fun requestStoragePermission(context: Context) {
+ val intent = Intent()
+ intent.setAction(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION)
+ intent.setData(Uri.fromParts("package", BuildConfig.APPLICATION_ID, null))
+
+ (context as Activity).startActivityForResult(intent, 0)
+ ActivityCompat.requestPermissions(
+ context, arrayOf(
+ Manifest.permission.READ_EXTERNAL_STORAGE,
+ Manifest.permission.WRITE_EXTERNAL_STORAGE,
+ Manifest.permission.MANAGE_EXTERNAL_STORAGE
+ ), 0
+ )
+ }
+
+ fun enableRestartSystemuiAfterBoot() {
+ disableRestartSystemuiAfterBoot()
+
+ Shell.cmd(
+ "sed '/^sleep.6/i killall " + SYSTEMUI_PACKAGE + "' " + Resources.MODULE_DIR + "/service.sh > " + Resources.MODULE_DIR + "/service.sh.tmp && mv " + Resources.MODULE_DIR + "/service.sh.tmp " + Resources.MODULE_DIR + "/service.sh"
+ ).submit()
+ }
+
+ fun disableRestartSystemuiAfterBoot() {
+ Shell.cmd(
+ "grep -v \"killall " + SYSTEMUI_PACKAGE + "\" " + Resources.MODULE_DIR + "/service.sh > " + Resources.MODULE_DIR + "/service.sh.tmp && mv " + Resources.MODULE_DIR + "/service.sh.tmp " + Resources.MODULE_DIR + "/service.sh"
+ ).submit()
+ }
+
+ fun isSecurityPatchBeforeJune2024(): Boolean {
+ val securityPatch = Build.VERSION.SECURITY_PATCH
+ val dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.US)
+
+ return try {
+ val securityPatchDate = dateFormat.parse(securityPatch)
+
+ val june2024 = Calendar.getInstance()
+ june2024.set(2024, Calendar.JUNE, 1)
+
+ (securityPatchDate != null && (securityPatchDate < june2024.time))
+ } catch (e: Exception) {
+ Log.e("SECURITY_PATCH_CHECK", "Error parsing security patch date", e)
+ false
+ }
+ }
+
+ fun getScreenWidth(activity: Activity): Int {
+ val windowMetrics = activity.windowManager.currentWindowMetrics
+ val insets = windowMetrics.windowInsets
+ .getInsetsIgnoringVisibility(WindowInsets.Type.systemBars())
+ return windowMetrics.bounds.width() - (insets.left + insets.right)
+ }
+
+ fun getScreenHeight(activity: Activity): Int {
+ val windowMetrics = activity.windowManager.currentWindowMetrics
+ val insets = windowMetrics.windowInsets
+ .getInsetsIgnoringVisibility(WindowInsets.Type.systemBars())
+ return windowMetrics.bounds.height() - (insets.top + insets.bottom)
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/TextUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/TextUtil.kt
deleted file mode 100644
index a5ca7aeaf..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/TextUtil.kt
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.drdisagree.iconify.utils
-
-import android.view.View
-import android.view.ViewGroup
-import android.widget.TextView
-
-object TextUtil {
- fun convertTextViewsToTitleCase(view: View?) {
- if (view == null) return
-
- if (view is ViewGroup) {
- val childCount: Int = view.childCount
-
- for (i in 0 until childCount) {
- val child: View = view.getChildAt(i)
-
- if (child is ViewGroup) {
- convertTextViewsToTitleCase(child)
- } else if (child is TextView) {
- val originalText: String = child.getText().toString()
- val convertedText = convertToTitleCase(originalText)
- child.text = convertedText
- }
- }
- } else if (view is TextView) {
- val originalText: String = view.getText().toString()
- val convertedText = convertToTitleCase(originalText)
- view.text = convertedText
- }
- }
-
- private fun convertToTitleCase(input: String?): String? {
- if (input.isNullOrEmpty()) return input
-
- val result = StringBuilder()
- var capitalizeNext = true
-
- for (c in input.toCharArray()) {
- var char = c
-
- if (Character.isWhitespace(char)) {
- capitalizeNext = true
- } else if (Character.isLetter(char)) {
- if (capitalizeNext) {
- char = char.uppercaseChar()
- capitalizeNext = false
- }
- }
-
- result.append(char)
- }
- return result.toString()
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/TextUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/TextUtils.kt
new file mode 100644
index 000000000..a2c7ba78e
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/TextUtils.kt
@@ -0,0 +1,54 @@
+package com.drdisagree.iconify.utils
+
+import android.view.View
+import android.view.ViewGroup
+import android.widget.TextView
+
+object TextUtils {
+ fun convertTextViewsToTitleCase(view: View?) {
+ if (view == null) return
+
+ if (view is ViewGroup) {
+ val childCount: Int = view.childCount
+
+ for (i in 0 until childCount) {
+ val child: View = view.getChildAt(i)
+
+ if (child is ViewGroup) {
+ convertTextViewsToTitleCase(child)
+ } else if (child is TextView) {
+ val originalText: String = child.getText().toString()
+ val convertedText = convertToTitleCase(originalText)
+ child.text = convertedText
+ }
+ }
+ } else if (view is TextView) {
+ val originalText: String = view.getText().toString()
+ val convertedText = convertToTitleCase(originalText)
+ view.text = convertedText
+ }
+ }
+
+ private fun convertToTitleCase(input: String?): String? {
+ if (input.isNullOrEmpty()) return input
+
+ val result = StringBuilder()
+ var capitalizeNext = true
+
+ for (c in input.toCharArray()) {
+ var char = c
+
+ if (Character.isWhitespace(char)) {
+ capitalizeNext = true
+ } else if (Character.isLetter(char)) {
+ if (capitalizeNext) {
+ char = char.uppercaseChar()
+ capitalizeNext = false
+ }
+ }
+
+ result.append(char)
+ }
+ return result.toString()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/WallpaperUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/WallpaperUtil.kt
deleted file mode 100644
index 339eca311..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/WallpaperUtil.kt
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.drdisagree.iconify.utils
-
-import android.app.WallpaperManager
-import android.content.Context
-import android.graphics.Bitmap
-import android.graphics.BitmapFactory
-import android.graphics.drawable.BitmapDrawable
-import java.io.ByteArrayOutputStream
-
-object WallpaperUtil {
-
- fun getCompressedWallpaper(context: Context?, quality: Int, which: Int): Bitmap? {
- return try {
- val wallpaperManager = WallpaperManager.getInstance(context)
- val wallpaperFile = wallpaperManager.getWallpaperFile(which)
-
- if (wallpaperFile == null) {
- val wallpaperDrawable = wallpaperManager.drawable
-
- if (wallpaperDrawable is BitmapDrawable) {
- val bitmap = wallpaperDrawable.bitmap
- compressBitmap(bitmap, quality)
- } else {
- Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
- }
- } else {
- val bitmap = BitmapFactory.decodeFileDescriptor(wallpaperFile.fileDescriptor)
- wallpaperFile.close()
- compressBitmap(bitmap, quality)
- }
- } catch (e: Exception) {
-// return Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
- null
- }
- }
-
- private fun compressBitmap(bitmap: Bitmap, quality: Int): Bitmap {
- val stream = ByteArrayOutputStream()
- bitmap.compress(Bitmap.CompressFormat.JPEG, quality, stream)
- val byteArray = stream.toByteArray()
-
- return BitmapFactory.decodeByteArray(byteArray, 0, byteArray.size)
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/WallpaperUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/WallpaperUtils.kt
new file mode 100644
index 000000000..c035df888
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/WallpaperUtils.kt
@@ -0,0 +1,44 @@
+package com.drdisagree.iconify.utils
+
+import android.app.WallpaperManager
+import android.content.Context
+import android.graphics.Bitmap
+import android.graphics.BitmapFactory
+import android.graphics.drawable.BitmapDrawable
+import java.io.ByteArrayOutputStream
+
+object WallpaperUtils {
+
+ fun getCompressedWallpaper(context: Context?, quality: Int, which: Int): Bitmap? {
+ return try {
+ val wallpaperManager = WallpaperManager.getInstance(context)
+ val wallpaperFile = wallpaperManager.getWallpaperFile(which)
+
+ if (wallpaperFile == null) {
+ val wallpaperDrawable = wallpaperManager.drawable
+
+ if (wallpaperDrawable is BitmapDrawable) {
+ val bitmap = wallpaperDrawable.bitmap
+ compressBitmap(bitmap, quality)
+ } else {
+ Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
+ }
+ } else {
+ val bitmap = BitmapFactory.decodeFileDescriptor(wallpaperFile.fileDescriptor)
+ wallpaperFile.close()
+ compressBitmap(bitmap, quality)
+ }
+ } catch (e: Exception) {
+// return Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
+ null
+ }
+ }
+
+ private fun compressBitmap(bitmap: Bitmap, quality: Int): Bitmap {
+ val stream = ByteArrayOutputStream()
+ bitmap.compress(Bitmap.CompressFormat.JPEG, quality, stream)
+ val byteArray = stream.toByteArray()
+
+ return BitmapFactory.decodeByteArray(byteArray, 0, byteArray.size)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/color/ColorSchemeUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/color/ColorSchemeUtil.kt
deleted file mode 100644
index 776799202..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/color/ColorSchemeUtil.kt
+++ /dev/null
@@ -1,201 +0,0 @@
-package com.drdisagree.iconify.utils.color
-
-import android.content.Context
-import com.drdisagree.iconify.R
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.color.monet.hct.Hct
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeContent
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeExpressive
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeFidelity
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeFruitSalad
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeMonochrome
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeNeutral
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeRainbow
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeTonalSpot
-import com.drdisagree.iconify.utils.color.monet.scheme.SchemeVibrant
-
-object ColorSchemeUtil {
-
- private val tones = intArrayOf(100, 99, 95, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0)
-
- @JvmStatic
- fun generateColorPalette(context: Context, style: String?, color: Int): List> {
- val palette: MutableList> = ArrayList()
- val systemAccent1: MutableList = ArrayList()
- val systemAccent2: MutableList = ArrayList()
- val systemAccent3: MutableList = ArrayList()
- val systemNeutral1: MutableList = ArrayList()
- val systemNeutral2: MutableList = ArrayList()
-
- when (style) {
- context.resources.getString(R.string.monet_neutral) -> {
- val schemeNeutral = SchemeNeutral(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeNeutral.primaryPalette.tone(tone))
- systemAccent2.add(schemeNeutral.secondaryPalette.tone(tone))
- systemAccent3.add(schemeNeutral.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeNeutral.neutralPalette.tone(tone))
- systemNeutral2.add(schemeNeutral.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
-
- context.resources.getString(R.string.monet_monochrome) -> {
- val schemeMonochrome =
- SchemeMonochrome(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeMonochrome.primaryPalette.tone(tone))
- systemAccent2.add(schemeMonochrome.secondaryPalette.tone(tone))
- systemAccent3.add(schemeMonochrome.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeMonochrome.neutralPalette.tone(tone))
- systemNeutral2.add(schemeMonochrome.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
-
- context.resources.getString(R.string.monet_tonalspot) -> {
- val schemeTonalSpot =
- SchemeTonalSpot(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeTonalSpot.primaryPalette.tone(tone))
- systemAccent2.add(schemeTonalSpot.secondaryPalette.tone(tone))
- systemAccent3.add(schemeTonalSpot.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeTonalSpot.neutralPalette.tone(tone))
- systemNeutral2.add(schemeTonalSpot.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
-
- context.resources.getString(R.string.monet_vibrant) -> {
- val schemeVibrant = SchemeVibrant(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeVibrant.primaryPalette.tone(tone))
- systemAccent2.add(schemeVibrant.secondaryPalette.tone(tone))
- systemAccent3.add(schemeVibrant.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeVibrant.neutralPalette.tone(tone))
- systemNeutral2.add(schemeVibrant.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
-
- context.resources.getString(R.string.monet_rainbow) -> {
- val schemeRainbow = SchemeRainbow(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeRainbow.primaryPalette.tone(tone))
- systemAccent2.add(schemeRainbow.secondaryPalette.tone(tone))
- systemAccent3.add(schemeRainbow.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeRainbow.neutralPalette.tone(tone))
- systemNeutral2.add(schemeRainbow.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
-
- context.resources.getString(R.string.monet_expressive) -> {
- val schemeExpressive =
- SchemeExpressive(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeExpressive.primaryPalette.tone(tone))
- systemAccent2.add(schemeExpressive.secondaryPalette.tone(tone))
- systemAccent3.add(schemeExpressive.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeExpressive.neutralPalette.tone(tone))
- systemNeutral2.add(schemeExpressive.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
-
- context.resources.getString(R.string.monet_fidelity) -> {
- val schemeFidelity =
- SchemeFidelity(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeFidelity.primaryPalette.tone(tone))
- systemAccent2.add(schemeFidelity.secondaryPalette.tone(tone))
- systemAccent3.add(schemeFidelity.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeFidelity.neutralPalette.tone(tone))
- systemNeutral2.add(schemeFidelity.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
-
- context.resources.getString(R.string.monet_content) -> {
- val schemeContent = SchemeContent(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeContent.primaryPalette.tone(tone))
- systemAccent2.add(schemeContent.secondaryPalette.tone(tone))
- systemAccent3.add(schemeContent.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeContent.neutralPalette.tone(tone))
- systemNeutral2.add(schemeContent.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
-
- context.resources.getString(R.string.monet_fruitsalad) -> {
- val schemeFruitSalad =
- SchemeFruitSalad(Hct.fromInt(color), SystemUtil.isDarkMode, 5.0)
-
- for (tone in tones) {
- systemAccent1.add(schemeFruitSalad.primaryPalette.tone(tone))
- systemAccent2.add(schemeFruitSalad.secondaryPalette.tone(tone))
- systemAccent3.add(schemeFruitSalad.tertiaryPalette.tone(tone))
- systemNeutral1.add(schemeFruitSalad.neutralPalette.tone(tone))
- systemNeutral2.add(schemeFruitSalad.neutralVariantPalette.tone(tone))
- }
-
- palette.add(systemAccent1)
- palette.add(systemAccent2)
- palette.add(systemAccent3)
- palette.add(systemNeutral1)
- palette.add(systemNeutral2)
- }
- }
-
- return palette
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/color/ColorSchemeUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/color/ColorSchemeUtils.kt
new file mode 100644
index 000000000..c156d716e
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/color/ColorSchemeUtils.kt
@@ -0,0 +1,200 @@
+package com.drdisagree.iconify.utils.color
+
+import android.content.Context
+import com.drdisagree.iconify.R
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.color.monet.hct.Hct
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeContent
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeExpressive
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeFidelity
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeFruitSalad
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeMonochrome
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeNeutral
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeRainbow
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeTonalSpot
+import com.drdisagree.iconify.utils.color.monet.scheme.SchemeVibrant
+
+object ColorSchemeUtils {
+
+ private val tones = intArrayOf(100, 99, 95, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0)
+
+ fun generateColorPalette(context: Context, style: String?, color: Int): List> {
+ val palette: MutableList> = ArrayList()
+ val systemAccent1: MutableList = ArrayList()
+ val systemAccent2: MutableList = ArrayList()
+ val systemAccent3: MutableList = ArrayList()
+ val systemNeutral1: MutableList = ArrayList()
+ val systemNeutral2: MutableList = ArrayList()
+
+ when (style) {
+ context.resources.getString(R.string.monet_neutral) -> {
+ val schemeNeutral = SchemeNeutral(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeNeutral.primaryPalette.tone(tone))
+ systemAccent2.add(schemeNeutral.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeNeutral.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeNeutral.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeNeutral.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+
+ context.resources.getString(R.string.monet_monochrome) -> {
+ val schemeMonochrome =
+ SchemeMonochrome(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeMonochrome.primaryPalette.tone(tone))
+ systemAccent2.add(schemeMonochrome.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeMonochrome.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeMonochrome.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeMonochrome.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+
+ context.resources.getString(R.string.monet_tonalspot) -> {
+ val schemeTonalSpot =
+ SchemeTonalSpot(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeTonalSpot.primaryPalette.tone(tone))
+ systemAccent2.add(schemeTonalSpot.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeTonalSpot.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeTonalSpot.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeTonalSpot.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+
+ context.resources.getString(R.string.monet_vibrant) -> {
+ val schemeVibrant = SchemeVibrant(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeVibrant.primaryPalette.tone(tone))
+ systemAccent2.add(schemeVibrant.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeVibrant.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeVibrant.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeVibrant.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+
+ context.resources.getString(R.string.monet_rainbow) -> {
+ val schemeRainbow = SchemeRainbow(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeRainbow.primaryPalette.tone(tone))
+ systemAccent2.add(schemeRainbow.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeRainbow.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeRainbow.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeRainbow.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+
+ context.resources.getString(R.string.monet_expressive) -> {
+ val schemeExpressive =
+ SchemeExpressive(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeExpressive.primaryPalette.tone(tone))
+ systemAccent2.add(schemeExpressive.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeExpressive.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeExpressive.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeExpressive.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+
+ context.resources.getString(R.string.monet_fidelity) -> {
+ val schemeFidelity =
+ SchemeFidelity(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeFidelity.primaryPalette.tone(tone))
+ systemAccent2.add(schemeFidelity.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeFidelity.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeFidelity.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeFidelity.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+
+ context.resources.getString(R.string.monet_content) -> {
+ val schemeContent = SchemeContent(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeContent.primaryPalette.tone(tone))
+ systemAccent2.add(schemeContent.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeContent.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeContent.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeContent.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+
+ context.resources.getString(R.string.monet_fruitsalad) -> {
+ val schemeFruitSalad =
+ SchemeFruitSalad(Hct.fromInt(color), SystemUtils.isDarkMode, 5.0)
+
+ for (tone in tones) {
+ systemAccent1.add(schemeFruitSalad.primaryPalette.tone(tone))
+ systemAccent2.add(schemeFruitSalad.secondaryPalette.tone(tone))
+ systemAccent3.add(schemeFruitSalad.tertiaryPalette.tone(tone))
+ systemNeutral1.add(schemeFruitSalad.neutralPalette.tone(tone))
+ systemNeutral2.add(schemeFruitSalad.neutralVariantPalette.tone(tone))
+ }
+
+ palette.add(systemAccent1)
+ palette.add(systemAccent2)
+ palette.add(systemAccent3)
+ palette.add(systemNeutral1)
+ palette.add(systemNeutral2)
+ }
+ }
+
+ return palette
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtil.kt b/app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtil.kt
deleted file mode 100644
index eeab0a506..000000000
--- a/app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtil.kt
+++ /dev/null
@@ -1,441 +0,0 @@
-package com.drdisagree.iconify.utils.color
-
-import android.content.Context
-import android.graphics.Color
-import android.util.TypedValue
-import androidx.annotation.AttrRes
-import androidx.annotation.ColorInt
-
-object ColorUtil {
-
- fun hsl(hue: Float, saturation: Float, lightness: Float): Int {
- return HSLColor.hslToColor(hue, saturation, lightness)
- }
-
- fun getHue(color: Int): Float {
- val r = Color.red(color)
- val g = Color.green(color)
- val b = Color.blue(color)
-
- val hsv = FloatArray(3)
- Color.RGBToHSV(r, g, b, hsv)
-
- return hsv[0]
- }
-
- fun setHue(color: Int, hue: Float): Int {
- val r = Color.red(color)
- val g = Color.green(color)
- val b = Color.blue(color)
-
- val hsv = FloatArray(3)
- Color.RGBToHSV(r, g, b, hsv)
- hsv[0] = hue
-
- return Color.HSVToColor(hsv)
- }
-
- fun getSaturation(color: Int): Float {
- val r = Color.red(color)
- val g = Color.green(color)
- val b = Color.blue(color)
-
- val hsv = FloatArray(3)
- Color.RGBToHSV(r, g, b, hsv)
-
- return hsv[1]
- }
-
- @JvmStatic
- fun setSaturation(color: Int, saturation: Float): Int {
- val r = Color.red(color)
- val g = Color.green(color)
- val b = Color.blue(color)
-
- val hsv = FloatArray(3)
- Color.RGBToHSV(r, g, b, hsv)
- hsv[1] += saturation
-
- return Color.HSVToColor(hsv)
- }
-
- fun getLightness(color: Int): Float {
- val r = Color.red(color)
- val g = Color.green(color)
- val b = Color.blue(color)
-
- val hsv = FloatArray(3)
- Color.RGBToHSV(r, g, b, hsv)
-
- return hsv[2]
- }
-
- @JvmStatic
- fun setLightness(color: Int, lightness: Float): Int {
- val r = Color.red(color)
- val g = Color.green(color)
- val b = Color.blue(color)
-
- val hsv = FloatArray(3)
- Color.RGBToHSV(r, g, b, hsv)
- hsv[2] += lightness
-
- return Color.HSVToColor(hsv)
- }
-
- @JvmStatic
- fun colorToHex(color: Int): String {
- val alpha = Color.alpha(color)
- val blue = Color.blue(color)
- val green = Color.green(color)
- val red = Color.red(color)
-
- return String.format("#%02X%02X%02X%02X", alpha, red, green, blue)
- }
-
- @JvmStatic
- fun colorToSpecialHex(color: Int): String {
- val blue = Color.blue(color)
- val green = Color.green(color)
- val red = Color.red(color)
-
- return String.format("0xff%02X%02X%02X", red, green, blue)
- }
-
- val systemTintList: FloatArray
- get() = floatArrayOf(
- 1.0f,
- 0.99f,
- 0.95f,
- 0.9f,
- 0.8f,
- 0.7f,
- 0.6f,
- 0.5f,
- 0.4f,
- 0.3f,
- 0.2f,
- 0.1f,
- 0.0f
- )
-
- @JvmStatic
- val colorNames: Array>
- get() {
- val accentTypes = arrayOf(
- "system_accent1",
- "system_accent2",
- "system_accent3",
- "system_neutral1",
- "system_neutral2"
- )
- val values = arrayOf(
- "0",
- "10",
- "50",
- "100",
- "200",
- "300",
- "400",
- "500",
- "600",
- "700",
- "800",
- "900",
- "1000"
- )
-
- val colorNames = Array(accentTypes.size) { arrayOfNulls(values.size) }
- for (i in accentTypes.indices) {
- for (j in values.indices) {
- colorNames[i][j] = accentTypes[i] + "_" + values[j]
- }
- }
-
- return colorNames
- }
-
- @JvmStatic
- fun getSystemColors(context: Context): Array {
- return arrayOf(
- intArrayOf(
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary100,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary99,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary95,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary90,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary80,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary70,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary60,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary50,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary40,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary30,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary20,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary10,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_primary0,
- context.theme
- )
- ), intArrayOf(
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary100,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary99,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary95,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary90,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary80,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary70,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary60,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary50,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary40,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary30,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary20,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary10,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_secondary0,
- context.theme
- )
- ), intArrayOf(
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary100,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary99,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary95,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary90,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary80,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary70,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary60,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary50,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary40,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary30,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary20,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary10,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_tertiary0,
- context.theme
- )
- ), intArrayOf(
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral100,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral99,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral95,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral90,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral80,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral70,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral60,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral50,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral40,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral30,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral20,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral10,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral0,
- context.theme
- )
- ), intArrayOf(
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant100,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant99,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant95,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant90,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant80,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant70,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant60,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant50,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant40,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant30,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant20,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant10,
- context.theme
- ),
- context.resources.getColor(
- com.google.android.material.R.color.material_dynamic_neutral_variant0,
- context.theme
- )
- )
- )
- }
-
- fun getColorResCompat(context: Context, @AttrRes id: Int): Int {
- val typedValue = TypedValue()
- val theme = context.theme
- theme.resolveAttribute(id, typedValue, false)
-
- val arr = context.obtainStyledAttributes(typedValue.data, intArrayOf(id))
- @ColorInt val color = arr.getColor(0, -1)
- arr.recycle()
-
- return color
- }
-}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtils.kt b/app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtils.kt
new file mode 100644
index 000000000..fb8ef9fa6
--- /dev/null
+++ b/app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtils.kt
@@ -0,0 +1,435 @@
+package com.drdisagree.iconify.utils.color
+
+import android.content.Context
+import android.graphics.Color
+import android.util.TypedValue
+import androidx.annotation.AttrRes
+import androidx.annotation.ColorInt
+
+object ColorUtils {
+
+ fun hsl(hue: Float, saturation: Float, lightness: Float): Int {
+ return HSLColor.hslToColor(hue, saturation, lightness)
+ }
+
+ fun getHue(color: Int): Float {
+ val r = Color.red(color)
+ val g = Color.green(color)
+ val b = Color.blue(color)
+
+ val hsv = FloatArray(3)
+ Color.RGBToHSV(r, g, b, hsv)
+
+ return hsv[0]
+ }
+
+ fun setHue(color: Int, hue: Float): Int {
+ val r = Color.red(color)
+ val g = Color.green(color)
+ val b = Color.blue(color)
+
+ val hsv = FloatArray(3)
+ Color.RGBToHSV(r, g, b, hsv)
+ hsv[0] = hue
+
+ return Color.HSVToColor(hsv)
+ }
+
+ fun getSaturation(color: Int): Float {
+ val r = Color.red(color)
+ val g = Color.green(color)
+ val b = Color.blue(color)
+
+ val hsv = FloatArray(3)
+ Color.RGBToHSV(r, g, b, hsv)
+
+ return hsv[1]
+ }
+
+ fun setSaturation(color: Int, saturation: Float): Int {
+ val r = Color.red(color)
+ val g = Color.green(color)
+ val b = Color.blue(color)
+
+ val hsv = FloatArray(3)
+ Color.RGBToHSV(r, g, b, hsv)
+ hsv[1] += saturation
+
+ return Color.HSVToColor(hsv)
+ }
+
+ fun getLightness(color: Int): Float {
+ val r = Color.red(color)
+ val g = Color.green(color)
+ val b = Color.blue(color)
+
+ val hsv = FloatArray(3)
+ Color.RGBToHSV(r, g, b, hsv)
+
+ return hsv[2]
+ }
+
+ fun setLightness(color: Int, lightness: Float): Int {
+ val r = Color.red(color)
+ val g = Color.green(color)
+ val b = Color.blue(color)
+
+ val hsv = FloatArray(3)
+ Color.RGBToHSV(r, g, b, hsv)
+ hsv[2] += lightness
+
+ return Color.HSVToColor(hsv)
+ }
+
+ fun colorToHex(color: Int): String {
+ val alpha = Color.alpha(color)
+ val blue = Color.blue(color)
+ val green = Color.green(color)
+ val red = Color.red(color)
+
+ return String.format("#%02X%02X%02X%02X", alpha, red, green, blue)
+ }
+
+ fun colorToSpecialHex(color: Int): String {
+ val blue = Color.blue(color)
+ val green = Color.green(color)
+ val red = Color.red(color)
+
+ return String.format("0xff%02X%02X%02X", red, green, blue)
+ }
+
+ val systemTintList: FloatArray
+ get() = floatArrayOf(
+ 1.0f,
+ 0.99f,
+ 0.95f,
+ 0.9f,
+ 0.8f,
+ 0.7f,
+ 0.6f,
+ 0.5f,
+ 0.4f,
+ 0.3f,
+ 0.2f,
+ 0.1f,
+ 0.0f
+ )
+
+ val colorNames: Array>
+ get() {
+ val accentTypes = arrayOf(
+ "system_accent1",
+ "system_accent2",
+ "system_accent3",
+ "system_neutral1",
+ "system_neutral2"
+ )
+ val values = arrayOf(
+ "0",
+ "10",
+ "50",
+ "100",
+ "200",
+ "300",
+ "400",
+ "500",
+ "600",
+ "700",
+ "800",
+ "900",
+ "1000"
+ )
+
+ val colorNames = Array(accentTypes.size) { arrayOfNulls(values.size) }
+ for (i in accentTypes.indices) {
+ for (j in values.indices) {
+ colorNames[i][j] = accentTypes[i] + "_" + values[j]
+ }
+ }
+
+ return colorNames
+ }
+
+ fun getSystemColors(context: Context): Array {
+ return arrayOf(
+ intArrayOf(
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary100,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary99,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary95,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary90,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary80,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary70,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary60,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary50,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary40,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary30,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary20,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary10,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_primary0,
+ context.theme
+ )
+ ), intArrayOf(
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary100,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary99,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary95,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary90,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary80,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary70,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary60,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary50,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary40,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary30,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary20,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary10,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_secondary0,
+ context.theme
+ )
+ ), intArrayOf(
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary100,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary99,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary95,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary90,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary80,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary70,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary60,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary50,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary40,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary30,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary20,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary10,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_tertiary0,
+ context.theme
+ )
+ ), intArrayOf(
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral100,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral99,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral95,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral90,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral80,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral70,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral60,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral50,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral40,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral30,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral20,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral10,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral0,
+ context.theme
+ )
+ ), intArrayOf(
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant100,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant99,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant95,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant90,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant80,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant70,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant60,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant50,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant40,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant30,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant20,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant10,
+ context.theme
+ ),
+ context.resources.getColor(
+ com.google.android.material.R.color.material_dynamic_neutral_variant0,
+ context.theme
+ )
+ )
+ )
+ }
+
+ fun getColorResCompat(context: Context, @AttrRes id: Int): Int {
+ val typedValue = TypedValue()
+ val theme = context.theme
+ theme.resolveAttribute(id, typedValue, false)
+
+ val arr = context.obtainStyledAttributes(typedValue.data, intArrayOf(id))
+ @ColorInt val color = arr.getColor(0, -1)
+ arr.recycle()
+
+ return color
+ }
+}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/extension/TaskExecutor.kt b/app/src/main/java/com/drdisagree/iconify/utils/extension/TaskExecutor.kt
index a9a28b080..a13acc309 100644
--- a/app/src/main/java/com/drdisagree/iconify/utils/extension/TaskExecutor.kt
+++ b/app/src/main/java/com/drdisagree/iconify/utils/extension/TaskExecutor.kt
@@ -10,8 +10,8 @@ import kotlin.concurrent.Volatile
abstract class TaskExecutor {
- private val mHandler: Handler
- private val mExecutor: Executor
+ private val mHandler: Handler = Handler(Looper.getMainLooper())
+ private val mExecutor: Executor = Executors.newSingleThreadExecutor()
private val mCancelled: AtomicBoolean
private val preExecuteLatch: CountDownLatch
private val isCancelled: Boolean
@@ -22,8 +22,6 @@ abstract class TaskExecutor {
private set
init {
- mExecutor = Executors.newSingleThreadExecutor()
- mHandler = Handler(Looper.getMainLooper())
status = Status.PENDING
mCancelled = AtomicBoolean(false)
preExecuteLatch = CountDownLatch(1)
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/helper/BackupRestore.kt b/app/src/main/java/com/drdisagree/iconify/utils/helper/BackupRestore.kt
index 222f65079..cb6709253 100644
--- a/app/src/main/java/com/drdisagree/iconify/utils/helper/BackupRestore.kt
+++ b/app/src/main/java/com/drdisagree/iconify/utils/helper/BackupRestore.kt
@@ -1,12 +1,11 @@
package com.drdisagree.iconify.utils.helper
import com.drdisagree.iconify.common.Resources
-import com.drdisagree.iconify.utils.RootUtil
+import com.drdisagree.iconify.utils.RootUtils
import com.topjohnwu.superuser.Shell
object BackupRestore {
- @JvmStatic
fun backupFiles() {
// Create backup directory
Shell.cmd("rm -rf " + Resources.BACKUP_DIR, "mkdir -p " + Resources.BACKUP_DIR).exec()
@@ -26,7 +25,6 @@ object BackupRestore {
backupFile(Resources.OVERLAY_DIR + "/IconifyComponentDynamic2.apk")
}
- @JvmStatic
fun restoreFiles() {
restoreFile("system.prop", Resources.TEMP_MODULE_DIR)
restoreFile("IconifyComponentME.apk", Resources.TEMP_MODULE_OVERLAY_DIR)
@@ -49,11 +47,11 @@ object BackupRestore {
}
private fun backupExists(fileName: String): Boolean {
- return RootUtil.fileExists(Resources.BACKUP_DIR + "/" + fileName)
+ return RootUtils.fileExists(Resources.BACKUP_DIR + "/" + fileName)
}
private fun backupFile(source: String) {
- if (RootUtil.fileExists(source)) Shell.cmd("cp -rf " + source + " " + Resources.BACKUP_DIR + "/")
+ if (RootUtils.fileExists(source)) Shell.cmd("cp -rf " + source + " " + Resources.BACKUP_DIR + "/")
.exec()
}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/helper/BinaryInstaller.kt b/app/src/main/java/com/drdisagree/iconify/utils/helper/BinaryInstaller.kt
index d039305da..c3bedd754 100644
--- a/app/src/main/java/com/drdisagree/iconify/utils/helper/BinaryInstaller.kt
+++ b/app/src/main/java/com/drdisagree/iconify/utils/helper/BinaryInstaller.kt
@@ -10,14 +10,13 @@ import com.drdisagree.iconify.common.Dynamic.ZIPALIGN
import com.drdisagree.iconify.common.Dynamic.ZIPALIGNLIB
import com.drdisagree.iconify.common.Resources
import com.drdisagree.iconify.common.Resources.BIN_DIR
-import com.drdisagree.iconify.utils.FileUtil
+import com.drdisagree.iconify.utils.FileUtils
import com.topjohnwu.superuser.Shell
object BinaryInstaller {
private val TAG = BinaryInstaller::class.java.getSimpleName()
- @JvmStatic
fun symLinkBinaries() {
Shell.cmd("mkdir -p $BIN_DIR").exec()
@@ -37,12 +36,12 @@ object BinaryInstaller {
Log.d(TAG, "Extracting tools...")
try {
- FileUtil.copyAssets("Tools")
+ FileUtils.copyAssets("Tools")
Shell.cmd("for fl in " + Resources.DATA_DIR + "/Tools/*; do cp -f \"\$fl\" \"" + NATIVE_LIBRARY_DIR + "\"; chmod 755 \"" + NATIVE_LIBRARY_DIR + "/$(basename \$fl)\"; ln -sf \"" + NATIVE_LIBRARY_DIR + "/$(basename \$fl)\" \"" + BIN_DIR + "/$(basename \$fl)\"; done")
.exec()
- FileUtil.cleanDir("Tools")
+ FileUtils.cleanDir("Tools")
} catch (e: Exception) {
Log.e(TAG, "Failed to extract tools.\n$e")
}
diff --git a/app/src/main/java/com/drdisagree/iconify/utils/helper/ImportExport.kt b/app/src/main/java/com/drdisagree/iconify/utils/helper/ImportExport.kt
index 4a2b19fd3..0570be862 100644
--- a/app/src/main/java/com/drdisagree/iconify/utils/helper/ImportExport.kt
+++ b/app/src/main/java/com/drdisagree/iconify/utils/helper/ImportExport.kt
@@ -1,7 +1,18 @@
package com.drdisagree.iconify.utils.helper
+import android.app.Activity
+import android.content.ContentResolver
+import android.content.Context
+import android.content.Intent
import android.content.SharedPreferences
+import android.os.Handler
+import android.os.Looper
import android.util.Log
+import android.widget.Toast
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.ActivityResultLauncher
+import androidx.fragment.app.Fragment
+import com.drdisagree.iconify.R
import com.drdisagree.iconify.common.Const.FRAMEWORK_PACKAGE
import com.drdisagree.iconify.common.Preferences.COLOR_ACCENT_PRIMARY
import com.drdisagree.iconify.common.Preferences.COLOR_ACCENT_PRIMARY_LIGHT
@@ -24,15 +35,20 @@ import com.drdisagree.iconify.common.References.ICONIFY_COLOR_ACCENT_PRIMARY
import com.drdisagree.iconify.common.References.ICONIFY_COLOR_ACCENT_SECONDARY
import com.drdisagree.iconify.common.Resources
import com.drdisagree.iconify.common.Resources.MODULE_DIR
-import com.drdisagree.iconify.utils.SystemUtil
-import com.drdisagree.iconify.utils.color.ColorUtil.colorNames
-import com.drdisagree.iconify.utils.overlay.FabricatedUtil
+import com.drdisagree.iconify.config.RPrefs
+import com.drdisagree.iconify.ui.dialogs.LoadingDialog
+import com.drdisagree.iconify.utils.SystemUtils
+import com.drdisagree.iconify.utils.SystemUtils.hasStoragePermission
+import com.drdisagree.iconify.utils.SystemUtils.requestStoragePermission
+import com.drdisagree.iconify.utils.color.ColorUtils.colorNames
+import com.drdisagree.iconify.utils.overlay.FabricatedUtils
import com.drdisagree.iconify.utils.overlay.compiler.DynamicCompiler
import com.drdisagree.iconify.utils.overlay.compiler.OnDemandCompiler
import com.drdisagree.iconify.utils.overlay.compiler.SwitchCompiler
import com.drdisagree.iconify.utils.overlay.manager.MonetEngineManager
import com.drdisagree.iconify.utils.overlay.manager.RoundnessManager
import com.drdisagree.iconify.utils.overlay.manager.SettingsIconResourceManager
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.topjohnwu.superuser.Shell
import java.io.IOException
import java.io.InputStream
@@ -40,10 +56,142 @@ import java.io.ObjectInputStream
import java.io.ObjectOutputStream
import java.io.OutputStream
import java.util.Objects
+import java.util.concurrent.Executors
object ImportExport {
- @JvmStatic
+ fun importSettings(
+ fragment: Fragment,
+ activityIntent: ActivityResultLauncher