diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5b192eb58..04d56a60e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,4 +1,3 @@ -import com.android.build.api.dsl.ApplicationExtension import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -6,21 +5,29 @@ import java.io.FileInputStream import java.util.Properties plugins { - alias(libs.plugins.agp.app) - alias(libs.plugins.kotlin.ksp) - alias(libs.plugins.kotlin.parcelize) + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.compose) + alias(libs.plugins.hilt) + alias(libs.plugins.ksp) + alias(libs.plugins.kotlin.serialization) + alias(libs.plugins.parcelize) } -configure { +android { namespace = "com.drdisagree.iconify" - compileSdk = 36 + + compileSdk { + version = release(36) { + minorApiLevel = 1 + } + } defaultConfig { applicationId = "com.drdisagree.iconify" minSdk = 36 targetSdk = 36 - versionCode = 24 - versionName = "7.2.0" + versionCode = 25 + versionName = "8.0.0" multiDexEnabled = true buildConfigField("int", "MIN_SDK_VERSION", "$minSdk") } @@ -45,50 +52,26 @@ configure { buildTypes { debug { - isMinifyEnabled = false - isShrinkResources = false - isCrunchPngs = false - proguardFiles("proguard-android-optimize.txt", "proguard.pro", "proguard-rules.pro") + isMinifyEnabled = true + isShrinkResources = true applicationIdSuffix = ".debug" - resValue("string", "derived_app_name", "Iconify (Debug)") signingConfig = releaseSigning + resValue("string", "derived_app_name", "Iconify (Debug)") + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", "proguard-debug.pro" + ) } release { isMinifyEnabled = true isShrinkResources = true - isCrunchPngs = false - proguardFiles("proguard-android-optimize.txt", "proguard.pro", "proguard-rules.pro") - resValue("string", "derived_app_name", "Iconify") signingConfig = releaseSigning - } - } - - flavorDimensions += "distribution" - - productFlavors { - create("standard") { - isDefault = true - dimension = "distribution" resValue("string", "derived_app_name", "Iconify") - } - - create("foss") { - dimension = "distribution" - applicationIdSuffix = ".foss" - resValue("string", "derived_app_name", "Iconify (FOSS)") - } - } - - sourceSets { - getByName("standard") { - java.directories.clear() - java.directories.add("src/standard/java") - } - - getByName("foss") { - java.directories.clear() - java.directories.add("src/foss/java") + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro", "proguard-release.pro" + ) } } @@ -108,41 +91,45 @@ configure { includeInBundle = false } - buildFeatures { - viewBinding = true - buildConfig = true - resValues = true - aidl = true - } - compileOptions { isCoreLibraryDesugaringEnabled = true sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } + buildFeatures { + compose = true + buildConfig = true + resValues = true + aidl = true + } + packaging { - jniLibs.excludes += setOf( - "/META-INF/*", - "/META-INF/versions/**", - "/org/bouncycastle/**", - "/kotlin/**", - "/kotlinx/**" - ) - - resources.excludes += setOf( - "/META-INF/*", - "/META-INF/versions/**", - "/org/bouncycastle/**", - "/kotlin/**", - "/kotlinx/**", - "rebel.xml", - "/*.txt", - "/*.bin", - "/*.json" - ) - - jniLibs.useLegacyPackaging = true + resources { + excludes += setOf( + "/META-INF/*", + "/META-INF/versions/**", + "/org/bouncycastle/**", + "/kotlin/**", + "/kotlinx/**", + "rebel.xml", + "/*.txt", + "/*.bin", + "/*.json" + ) + } + + jniLibs { + excludes += setOf( + "/META-INF/*", + "/META-INF/versions/**", + "/org/bouncycastle/**", + "/kotlin/**", + "/kotlinx/**" + ) + + useLegacyPackaging = true + } } lint { @@ -201,19 +188,53 @@ gradle.taskGraph.whenReady { gradle.startParameter.warningMode = WarningMode.Summary } -val fossImplementation by configurations -val standardImplementation by configurations - dependencies { - // Kotlin implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.compose) + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.graphics) + implementation(libs.androidx.compose.ui.tooling.preview) + implementation(libs.material) + implementation(libs.androidx.compose.material3) + implementation(libs.androidx.navigation.compose) + implementation(libs.androidx.navigation.runtime.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.compose.material3.window.size.class1) + implementation(libs.androidx.asynclayoutinflater) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.compose.ui.test.junit4) + debugImplementation(libs.androidx.compose.ui.tooling) + debugImplementation(libs.androidx.compose.ui.test.manifest) // Core Library Desugaring coreLibraryDesugaring(libs.desugar.jdk.libs) - // Data Binding - implementation(libs.library) - implementation(libs.androidx.palette.ktx) + // Material icons + implementation(libs.androidx.compose.material.icons.extended) + + // Datastore + implementation(libs.androidx.datastore.preferences) + implementation(libs.androidx.datastore) + + // Splashscreen + implementation(libs.androidx.core.splashscreen) + + // ViewModel + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.androidx.lifecycle.viewmodel.ktx) + + // Navigation Animation + implementation(libs.accompanist.navigation.animation) + + // Hilt + implementation(libs.hilt.android) + implementation(libs.hilt.navigation.compose) + ksp(libs.hilt.android.compiler) // Xposed API // F-Droid disallow `api.xposed.info` since it's not a "Trusted Maven Repository". @@ -228,96 +249,58 @@ dependencies { // Optional: Provides remote file system support implementation(libs.su.nio) - // Coroutines - implementation(libs.kotlinx.coroutines.android) - - // Color Picker - implementation(libs.jaredrummler.colorpicker) - - // Splash Screen - implementation(libs.androidx.core.splashscreen) - - // Material Components - implementation(libs.material) - - // APK Signer - implementation(libs.bcpkix.jdk18on) - // Zip Util implementation(libs.zip4j) - // Preference - implementation(libs.androidx.preference.ktx) - // Remote Preference implementation(libs.remotepreferences) - // Flexbox - implementation(libs.flexbox) + // Google Subject Segmentation - MLKit + implementation(libs.com.google.android.gms.play.services.mlkit.subject.segmentation) + implementation(libs.play.services.base) - // Glide - implementation(libs.glide) - ksp(libs.glide.compiler) + // APK Signer + implementation(libs.bcpkix.jdk18on) - // RecyclerView - implementation(libs.androidx.recyclerview) - implementation(libs.androidx.recyclerview.selection) + // Liquid Glass + implementation(libs.backdrop) - // ViewPager2 - implementation(libs.androidx.viewpager2) + // Haze Blur + implementation(libs.haze.jetpack.compose) - // Circle Indicator - implementation(libs.circleindicator) + // Serialization + implementation(libs.kotlinx.serialization.json) - // Lottie Animation - implementation(libs.lottie) + // Lottie animation + implementation(libs.lottie.compose) - // HTML Parser - implementation(libs.jsoup) + // Clip shape + implementation(libs.androidx.graphics.shapes) - // Collapsing Toolbar with subtitle - implementation(libs.collapsingtoolbarlayout.subtitle) + // Drawable painter + implementation(libs.accompanist.drawablepainter) - // Navigation Component - implementation(libs.androidx.navigation.fragment.ktx) - implementation(libs.androidx.navigation.ui.ktx) + // Material3 Color Scheme + implementation(libs.material.kolor) + + // Work Manager + implementation(libs.androidx.work.runtime.ktx) // Concurrency - implementation(libs.androidx.work.runtime) implementation(libs.androidx.concurrent.futures) - implementation(libs.guava) - - // Event Bus - implementation(libs.eventbus) - // Dots Indicator - implementation(libs.dotsindicator) + // OkHttp + implementation(libs.okhttp) // Fading Edge Layout implementation(libs.fadingedgelayout) - // Google Subject Segmentation - MLKit - standardImplementation(libs.com.google.android.gms.play.services.mlkit.subject.segmentation) - standardImplementation(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) - - // OkHttp - implementation(libs.okhttp) + // Color Picker + implementation(libs.colorpicker.compose) - // Room Database - implementation(libs.room.runtime) - implementation(libs.room.ktx) - ksp(libs.room.compiler) + // Coil + implementation(libs.coil.compose) + implementation(libs.coil.network.okhttp) } tasks.register("printVersionName") { diff --git a/app/proguard-android-optimize.txt b/app/proguard-android-optimize.txt deleted file mode 100644 index 015c7e75e..000000000 --- a/app/proguard-android-optimize.txt +++ /dev/null @@ -1,10 +0,0 @@ --keepattributes Exceptions,LineNumberTable,Signature,SourceFile - --keepclasseswithmembernames,allowoptimization,allowobfuscation class * { - native ; -} - --keepclassmembers,allowoptimization,allowobfuscation enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} \ No newline at end of file diff --git a/app/proguard-debug.pro b/app/proguard-debug.pro new file mode 100644 index 000000000..3c54489c8 --- /dev/null +++ b/app/proguard-debug.pro @@ -0,0 +1,9 @@ +-keep,allowoptimization class android.util.Log { + public static int v(...); + public static int d(...); + public static int i(...); + public static int w(...); + public static int e(...); + public static int wtf(...); + public static java.lang.String getStackTraceString(java.lang.Throwable); +} \ No newline at end of file diff --git a/app/proguard-release.pro b/app/proguard-release.pro new file mode 100644 index 000000000..6de8e723f --- /dev/null +++ b/app/proguard-release.pro @@ -0,0 +1,9 @@ +-keep,allowoptimization class android.util.Log { + public static int i(...); + public static int w(...); + public static int e(...); + public static int wtf(...); + public static java.lang.String getStackTraceString(java.lang.Throwable); +} + +-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 474870070..8432b8382 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,79 +1,92 @@ -# Uncomment this to preserve the line number information for -# debugging stack traces. --keepattributes SourceFile,LineNumberTable +-keep,allowoptimization,allowobfuscation class javax.annotation.Nullable +-dontwarn androidx.window.extensions.area.ExtensionWindowAreaPresentation +-dontwarn androidx.window.extensions.core.util.function.Consumer +-dontwarn androidx.window.extensions.core.util.function.Function +-dontwarn androidx.window.extensions.core.util.function.Predicate -# If you keep the line number information, uncomment this to -# hide the original source file name. --renamesourcefileattribute SourceFile +-keepattributes Exceptions,LineNumberTable,Signature,SourceFile + +-keepclasseswithmembernames,allowoptimization,allowobfuscation class * { + native ; +} + +-keepclassmembers,allowoptimization,allowobfuscation enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} # Kotlin -assumenosideeffects class kotlin.jvm.internal.Intrinsics { - public static void check*(...); - public static void throw*(...); + public static void check*(...); + public static void throw*(...); } -assumenosideeffects class java.util.Objects { public static ** requireNonNull(...); } -# Strip debug log --assumenosideeffects class android.util.Log { - public static int v(...); - 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.xposed.utils.XPrefs --keep class com.drdisagree.iconify.xposed.** { - (android.content.Context); -} +# Xposed framework stubs +-keep class de.robv.android.xposed.** { *; } -# Weather --keepnames class com.drdisagree.iconify.utils.weather.** --keep class com.drdisagree.iconify.utils.weather.** { *; } +# Xposed entry points (called directly by the framework) +-keep class com.drdisagree.iconify.xposed.InitHook { + public (); +} +-keep class * implements de.robv.android.xposed.IXposedHookLoadPackage +-keep class * implements de.robv.android.xposed.IXposedHookInitPackageResources -# EventBus --keepattributes *Annotation* --keepclassmembers,allowoptimization,allowobfuscation class * { - @org.greenrobot.eventbus.Subscribe ; +# Optimize method bodies, preserve Xposed lifecycle signatures +-keepclassmembers,allowoptimization,allowobfuscation class com.drdisagree.iconify.xposed.** { + public (); + public (android.content.Context); + public void initZygote(de.robv.android.xposed.IXposedHookZygoteInit$StartupParam); + public void handleLoadPackage(de.robv.android.xposed.callbacks.XC_LoadPackage$LoadPackageParam); + public void handleInitPackageResources(de.robv.android.xposed.callbacks.XC_InitPackageResources$InitPackageResourcesParam); } --keep,allowoptimization,allowobfuscation enum org.greenrobot.eventbus.ThreadMode { *; } -# If using AsyncExecutord, keep required constructor of default event used. -# Adjust the class name if a custom failure event type is used. --keepclassmembers,allowoptimization,allowobfuscation class org.greenrobot.eventbus.util.ThrowableFailureEvent { - (java.lang.Throwable); +# Hook callbacks +-keepclassmembers,allowoptimization,allowobfuscation class * extends de.robv.android.xposed.XC_MethodHook { + protected void beforeHookedMethod(de.robv.android.xposed.XC_MethodHook$MethodHookParam); + protected void afterHookedMethod(de.robv.android.xposed.XC_MethodHook$MethodHookParam); +} +-keepclassmembers,allowoptimization,allowobfuscation class * extends de.robv.android.xposed.XC_MethodReplacement { + protected java.lang.Object replaceHookedMethod(de.robv.android.xposed.XC_MethodHook$MethodHookParam); } -# Accessed via reflection, avoid renaming or removal --keep,allowoptimization,allowobfuscation class org.greenrobot.eventbus.android.AndroidComponentsImpl +# XPrefs: name and public API must be stable for cross-process access +-keepnames class com.drdisagree.iconify.xposed.utils.XPrefs +-keepclassmembers,allowoptimization,allowobfuscation class com.drdisagree.iconify.xposed.utils.XPrefs { + public *; +} -# Keep the ConstraintLayout Motion class --keep,allowoptimization,allowobfuscation class androidx.constraintlayout.motion.widget.** { *; } +# Xposed logs +-keep class de.robv.android.xposed.XposedBridge { + public static void log(java.lang.String); + public static void log(java.lang.Throwable); +} -# Keep Recycler View Stuff --keep,allowoptimization,allowobfuscation class androidx.recyclerview.widget.** { *; } +# MLKit +-keep class com.google.mlkit.common.internal.** { *; } +-keep class com.google.mlkit.vision.common.internal.** { *; } +-keep class com.google.mlkit.vision.segmentation.subject.** { *; } +-keep class com.google.mlkit.vision.segmentation.subject.internal.** { *; } -# Keep Parcelable Creators --keepnames class * implements android.os.Parcelable { - public static final ** CREATOR; -} +# Weather +-keepnames class com.drdisagree.iconify.utils.weather.** +-keep class com.drdisagree.iconify.utils.weather.** { *; } # Obfuscation -repackageclasses -allowaccessmodification # Root Service --keep class com.drdisagree.iconify.services.RootProviderProxy { *; } --keep class com.drdisagree.iconify.IRootProviderProxy { *; } +-keep class com.drdisagree.iconify.services.providers.RootProviderProxy { *; } +-keep class com.drdisagree.iconify.services.providers.IRootProviderProxy { *; } -# AIDL Classes --keep interface **.I* { *; } --keep class **.I*$Stub { *; } --keep class **.I*$Stub$Proxy { *; } +# AIDL Classes (scoped to your package to avoid matching SDK interfaces) +-keep interface com.drdisagree.iconify.**.I* { *; } +-keep class com.drdisagree.iconify.**.I*$Stub { *; } +-keep class com.drdisagree.iconify.**.I*$Stub$Proxy { *; } \ No newline at end of file diff --git a/app/proguard.pro b/app/proguard.pro deleted file mode 100644 index 038f1da9a..000000000 --- a/app/proguard.pro +++ /dev/null @@ -1,7 +0,0 @@ --keep,allowoptimization,allowobfuscation class com.jaredrummler.android.colorpicker.** --keep,allowoptimization,allowobfuscation class javax.annotation.Nullable --dontwarn sun.security.internal.spec.** --dontwarn sun.security.provider.** --dontwarn com.jaredrummler.android.colorpicker.** --dontwarn javax.annotation.Nullable --dontwarn javax.lang.model.element.Modifier \ No newline at end of file diff --git a/app/schemas/com.drdisagree.iconify.data.database.DynamicResourceDatabase/2.json b/app/schemas/com.drdisagree.iconify.data.database.DynamicResourceDatabase/2.json deleted file mode 100644 index b2e144ad2..000000000 --- a/app/schemas/com.drdisagree.iconify.data.database.DynamicResourceDatabase/2.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 2, - "identityHash": "80c48473ccac76bb75ecb6f1e1628446", - "entities": [ - { - "tableName": "dynamic_resource_table", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`packageName` TEXT NOT NULL, `startEndTag` TEXT NOT NULL, `resourceName` TEXT NOT NULL, `resourceValue` TEXT NOT NULL, `isPortrait` INTEGER NOT NULL, `isLandscape` INTEGER NOT NULL, `isNightMode` INTEGER NOT NULL, PRIMARY KEY(`packageName`, `resourceName`, `startEndTag`, `isPortrait`, `isLandscape`, `isNightMode`))", - "fields": [ - { - "fieldPath": "packageName", - "columnName": "packageName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "startEndTag", - "columnName": "startEndTag", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "resourceName", - "columnName": "resourceName", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "resourceValue", - "columnName": "resourceValue", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "isPortrait", - "columnName": "isPortrait", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isLandscape", - "columnName": "isLandscape", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNightMode", - "columnName": "isNightMode", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "packageName", - "resourceName", - "startEndTag", - "isPortrait", - "isLandscape", - "isNightMode" - ] - }, - "indices": [ - { - "name": "index_dynamic_resource_table_packageName", - "unique": false, - "columnNames": [ - "packageName" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_dynamic_resource_table_packageName` ON `${TABLE_NAME}` (`packageName`)" - } - ], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '80c48473ccac76bb75ecb6f1e1628446')" - ] - } -} \ No newline at end of file diff --git a/app/src/foss/AndroidManifest.xml b/app/src/foss/AndroidManifest.xml deleted file mode 100644 index 461430078..000000000 --- a/app/src/foss/AndroidManifest.xml +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/foss/java/com/drdisagree/iconify/SplashActivity.kt b/app/src/foss/java/com/drdisagree/iconify/SplashActivity.kt deleted file mode 100644 index 91618d4f0..000000000 --- a/app/src/foss/java/com/drdisagree/iconify/SplashActivity.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.drdisagree.iconify - -import android.annotation.SuppressLint - -@SuppressLint("CustomSplashScreen") -class SplashActivity : BaseSplashActivity() { - - override fun initializeMLKit() {} -} diff --git a/app/src/foss/java/com/drdisagree/iconify/services/RootProviderProxy.kt b/app/src/foss/java/com/drdisagree/iconify/services/RootProviderProxy.kt deleted file mode 100644 index 64556f8be..000000000 --- a/app/src/foss/java/com/drdisagree/iconify/services/RootProviderProxy.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.drdisagree.iconify.services - -import android.content.Context -import android.graphics.Bitmap -import com.drdisagree.iconify.IExtractSubjectCallback - -class RootProviderProxy : BaseRootProviderProxy() { - - override fun createProxy(): BaseRootProviderProxyIPC { - return RootProviderProxyIPC(this) - } - - inner class RootProviderProxyIPC(context: Context) : BaseRootProviderProxyIPC(context) { - - override fun extractWallpaperSubject( - input: Bitmap, - callback: IExtractSubjectCallback, - resultPath: String - ) { - // do nothing - } - } -} \ No newline at end of file diff --git a/app/src/foss/java/com/drdisagree/iconify/ui/fragments/xposed/DepthWallpaper.kt b/app/src/foss/java/com/drdisagree/iconify/ui/fragments/xposed/DepthWallpaper.kt deleted file mode 100644 index 3a50453e2..000000000 --- a/app/src/foss/java/com/drdisagree/iconify/ui/fragments/xposed/DepthWallpaper.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.drdisagree.iconify.ui.fragments.xposed - -import com.drdisagree.iconify.R -import com.drdisagree.iconify.ui.preferences.PreferenceMenu - -class DepthWallpaper : BaseDepthWallpaper() { - - override fun PreferenceMenu.setMLKitStatus() { - setSummary( - getString( - R.string.depth_wallpaper_model_not_available - ) - ) - } -} diff --git a/app/src/foss/java/com/drdisagree/iconify/xposed/modules/lockscreen/depthwallpaper/DepthWallpaperA14.kt b/app/src/foss/java/com/drdisagree/iconify/xposed/modules/lockscreen/depthwallpaper/DepthWallpaperA14.kt deleted file mode 100644 index 764468c4c..000000000 --- a/app/src/foss/java/com/drdisagree/iconify/xposed/modules/lockscreen/depthwallpaper/DepthWallpaperA14.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.drdisagree.iconify.xposed.modules.lockscreen.depthwallpaper - -import android.content.Context -import android.graphics.Bitmap - -class DepthWallpaperA14(context: Context) : BaseDepthWallpaperA14(context) { - - override fun handleSubjectExtraction(scaledWallpaper: Bitmap?) { - if (mAiMode != 0) { - sendPluginIntent() - } - } -} \ No newline at end of file diff --git a/app/src/foss/java/com/drdisagree/iconify/xposed/modules/lockscreen/depthwallpaper/DepthWallpaperA15.kt b/app/src/foss/java/com/drdisagree/iconify/xposed/modules/lockscreen/depthwallpaper/DepthWallpaperA15.kt deleted file mode 100644 index 063d81c15..000000000 --- a/app/src/foss/java/com/drdisagree/iconify/xposed/modules/lockscreen/depthwallpaper/DepthWallpaperA15.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.drdisagree.iconify.xposed.modules.lockscreen.depthwallpaper - -import android.content.Context -import android.graphics.Bitmap - -class DepthWallpaperA15(context: Context) : BaseDepthWallpaperA15(context) { - - override fun handleSubjectExtraction(scaledWallpaper: Bitmap?) { - if (mAiMode != 0) { - sendPluginIntent() - } - } -} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b51068680..a7b9f176b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,73 +1,47 @@ - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - + android:name="android.permission.ACCESS_BACKGROUND_LOCATION" + tools:ignore="BackgroundLocationPolicy" /> + - + - - - - - - - - - - + android:theme="@style/Theme.Iconify.SplashScreen"> + android:windowSoftInputMode="adjustResize"> @@ -75,115 +49,47 @@ - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + + - - + + android:value="true" /> + android:value="@string/app_motto" /> + android:value="82" /> + android:resource="@array/module_scope" /> + + + tools:ignore="ExportedContentProvider" /> + + + tools:ignore="ExportedContentProvider" /> - + - \ 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/services/providers/IExtractSubjectCallback.aidl similarity index 70% rename from app/src/main/aidl/com/drdisagree/iconify/IExtractSubjectCallback.aidl rename to app/src/main/aidl/com/drdisagree/iconify/services/providers/IExtractSubjectCallback.aidl index d66b84c6e..2012b05e3 100644 --- a/app/src/main/aidl/com/drdisagree/iconify/IExtractSubjectCallback.aidl +++ b/app/src/main/aidl/com/drdisagree/iconify/services/providers/IExtractSubjectCallback.aidl @@ -1,4 +1,4 @@ -package com.drdisagree.iconify; +package com.drdisagree.iconify.services.providers; interface IExtractSubjectCallback { void onStart(String message); diff --git a/app/src/main/aidl/com/drdisagree/iconify/IRootProviderProxy.aidl b/app/src/main/aidl/com/drdisagree/iconify/services/providers/IRootProviderProxy.aidl similarity index 66% rename from app/src/main/aidl/com/drdisagree/iconify/IRootProviderProxy.aidl rename to app/src/main/aidl/com/drdisagree/iconify/services/providers/IRootProviderProxy.aidl index e874a37be..bb76028be 100644 --- a/app/src/main/aidl/com/drdisagree/iconify/IRootProviderProxy.aidl +++ b/app/src/main/aidl/com/drdisagree/iconify/services/providers/IRootProviderProxy.aidl @@ -1,6 +1,6 @@ -package com.drdisagree.iconify; +package com.drdisagree.iconify.services.providers; -import com.drdisagree.iconify.IExtractSubjectCallback; +import com.drdisagree.iconify.services.providers.IExtractSubjectCallback; interface IRootProviderProxy { String[] runCommand(String command); diff --git a/app/src/main/assets/CompileOnDemand/android/SIS1/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS1/res/values/config.xml index 6bd4267e2..15045bde4 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS1/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS1/res/values/config.xml @@ -1,5 +1,5 @@ - MM55,0 C25,0 0,25 0,50 0,78 28,100 55,100 85,100 100,85 100,58 100,30 86,0 55,0 Z + M50.00,0.00C77.61,-0.00,100.00,22.39,100.00,50.00C100.00,77.61,77.61,100.00,50.00,100.00C22.39,100.00,0.00,77.61,0.00,50.00C0.00,22.39,22.39,0.00,50.00,0.00z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS10/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS10/res/values/config.xml index cd5e1c982..aa0099e1a 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS10/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS10/res/values/config.xml @@ -1,5 +1,5 @@ - M50,0A50,30 0,0,1 100,30V70A50,30 0,0,1 0,70V30A50,30 0,0,1 50,0z + M4,50 C2,45 0,39 0,33 C0,15 15,0 33,0 C39,0 45,2 50,4 C55,2 61,0 67,0 C85,0 100,15 100,33 C100,39 98,45 96,50 C98,55 100,61 100,66 C100,85 85,100 66,100 C61,100 55,98 50,96 C45,98 39,100 33,100 C15,100 0,85 0,66 C0,61 2,55 3,50 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS11/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS11/res/values/config.xml index 13054d4f6..cd5e1c982 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS11/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS11/res/values/config.xml @@ -1,5 +1,5 @@ - M50,0 C60.6,0 69.9,5.3 75.6,13.5 78.5,17.8 82.3,21.5 86.6,24.5 94.7,30.1 100,39.4 100,50 100,60.6 94.7,69.9 86.5,75.6 82.2,78.5 78.5,82.3 75.5,86.6 69.9,94.7 60.6,100 50,100 39.4,100 30.1,94.7 24.4,86.5 21.5,82.2 17.7,78.5 13.4,75.5 5.3,69.9 0,60.6 0,50 0,39.4 5.3,30.1 13.5,24.4 17.8,21.5 21.5,17.7 24.5,13.4 30.1,5.3 39.4,0 50,0 Z + M50,0A50,30 0,0,1 100,30V70A50,30 0,0,1 0,70V30A50,30 0,0,1 50,0z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS12/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS12/res/values/config.xml index 15489c109..13054d4f6 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS12/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS12/res/values/config.xml @@ -1,5 +1,5 @@ - M50,20 C45,0 30,0 25,0 20,0 0,5 0,34 0,72 40,97 50,100 60,97 100,72 100,34 100,5 80,0 75,0 70,0 55,0 50,20 Z + M50,0 C60.6,0 69.9,5.3 75.6,13.5 78.5,17.8 82.3,21.5 86.6,24.5 94.7,30.1 100,39.4 100,50 100,60.6 94.7,69.9 86.5,75.6 82.2,78.5 78.5,82.3 75.5,86.6 69.9,94.7 60.6,100 50,100 39.4,100 30.1,94.7 24.4,86.5 21.5,82.2 17.7,78.5 13.4,75.5 5.3,69.9 0,60.6 0,50 0,39.4 5.3,30.1 13.5,24.4 17.8,21.5 21.5,17.7 24.5,13.4 30.1,5.3 39.4,0 50,0 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS13/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS13/res/values/config.xml index 4ea5201ba..15489c109 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS13/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS13/res/values/config.xml @@ -1,5 +1,5 @@ - M-0.06,0.07h67.37C85.36,0.07,100,14.71,100,32.76v67.37H32.63c-18.06,0-32.69-14.64-32.69-32.69L-0.06,0.07z + M50,20 C45,0 30,0 25,0 20,0 0,5 0,34 0,72 40,97 50,100 60,97 100,72 100,34 100,5 80,0 75,0 70,0 55,0 50,20 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS14/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS14/res/values/config.xml index f56be7fef..4ea5201ba 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS14/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS14/res/values/config.xml @@ -1,5 +1,5 @@ - M100,50 C100,77 77,100 50,100 L10,100 C4,100 0,96 0,90 L0,50 C0,22 22,0 50,0 L90,0 C96,0 100,4 100,10 L100,50 Z + M-0.06,0.07h67.37C85.36,0.07,100,14.71,100,32.76v67.37H32.63c-18.06,0-32.69-14.64-32.69-32.69L-0.06,0.07z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS15/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS15/res/values/config.xml index 273729283..f56be7fef 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS15/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS15/res/values/config.xml @@ -1,5 +1,5 @@ - M20,0 80,0 100,20 100,80 80,100 20,100 0,80 0,20 20,0 Z + M100,50 C100,77 77,100 50,100 L10,100 C4,100 0,96 0,90 L0,50 C0,22 22,0 50,0 L90,0 C96,0 100,4 100,10 L100,50 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS16/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS16/res/values/config.xml index a373fae50..273729283 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS16/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS16/res/values/config.xml @@ -1,5 +1,5 @@ - M12.97,0 C8.41,0 4.14,2.55 2.21,6.68 -1.03,13.61 -0.71,21.78 3.16,28.46 4.89,31.46 4.89,35.2 3.16,38.2 -1.05,45.48 -1.05,54.52 3.16,61.8 4.89,64.8 4.89,68.54 3.16,71.54 -0.71,78.22 -1.03,86.39 2.21,93.32 4.14,97.45 8.41,100 12.97,100 21.38,100 78.62,100 87.03,100 91.59,100 95.85,97.45 97.79,93.32 101.02,86.39 100.71,78.22 96.84,71.54 95.1,68.54 95.1,64.8 96.84,61.8 101.05,54.52 101.05,45.48 96.84,38.2 95.1,35.2 95.1,31.46 96.84,28.46 100.71,21.78 101.02,13.61 97.79,6.68 95.85,2.55 91.59,0 87.03,0 78.62,0 21.38,0 12.97,0 Z + M20,0 80,0 100,20 100,80 80,100 20,100 0,80 0,20 20,0 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS17/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS17/res/values/config.xml index 4f5ede32c..a373fae50 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS17/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS17/res/values/config.xml @@ -1,5 +1,5 @@ - M 4.432 31.65 C 4.656 31.126 4.736 30.551 4.663 29.985 C 4.026 26.269 1.314 11.591 0.116 4.701 C -0.235 2.992 0.443 0.912 1.895 0.145 C 2.336 -0.072 2.839 -0.014 3.293 0.112 C 4.378 0.473 5.381 1.08 6.357 1.718 C 10.502 4.416 14.621 7.167 18.732 9.933 C 19.823 10.666 21.252 10.658 22.334 9.911 C 30.185 4.6 39.651 1.503 49.833 1.503 C 60.18 1.503 69.786 4.701 77.716 10.161 C 78.797 10.922 80.235 10.937 81.331 10.199 C 86.109 6.997 90.875 3.776 95.646 0.564 C 96.99 -0.438 99.098 0.259 99.76 1.907 C 100.193 3.164 99.88 4.529 99.634 5.789 C 98.325 13.019 95.754 27.409 95.207 30.68 C 95.169 31.181 95.249 31.684 95.441 32.148 C 97.788 37.889 99.082 44.17 99.082 50.752 C 99.082 77.932 77.014 100 49.833 100 C 22.653 100 0.585 77.932 0.585 50.752 C 0.585 43.98 1.955 37.526 4.432 31.65 Z + M12.97,0 C8.41,0 4.14,2.55 2.21,6.68 -1.03,13.61 -0.71,21.78 3.16,28.46 4.89,31.46 4.89,35.2 3.16,38.2 -1.05,45.48 -1.05,54.52 3.16,61.8 4.89,64.8 4.89,68.54 3.16,71.54 -0.71,78.22 -1.03,86.39 2.21,93.32 4.14,97.45 8.41,100 12.97,100 21.38,100 78.62,100 87.03,100 91.59,100 95.85,97.45 97.79,93.32 101.02,86.39 100.71,78.22 96.84,71.54 95.1,68.54 95.1,64.8 96.84,61.8 101.05,54.52 101.05,45.48 96.84,38.2 95.1,35.2 95.1,31.46 96.84,28.46 100.71,21.78 101.02,13.61 97.79,6.68 95.85,2.55 91.59,0 87.03,0 78.62,0 21.38,0 12.97,0 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS18/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS18/res/values/config.xml index 15045bde4..4f5ede32c 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS18/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS18/res/values/config.xml @@ -1,5 +1,5 @@ - M50.00,0.00C77.61,-0.00,100.00,22.39,100.00,50.00C100.00,77.61,77.61,100.00,50.00,100.00C22.39,100.00,0.00,77.61,0.00,50.00C0.00,22.39,22.39,0.00,50.00,0.00z + M 4.432 31.65 C 4.656 31.126 4.736 30.551 4.663 29.985 C 4.026 26.269 1.314 11.591 0.116 4.701 C -0.235 2.992 0.443 0.912 1.895 0.145 C 2.336 -0.072 2.839 -0.014 3.293 0.112 C 4.378 0.473 5.381 1.08 6.357 1.718 C 10.502 4.416 14.621 7.167 18.732 9.933 C 19.823 10.666 21.252 10.658 22.334 9.911 C 30.185 4.6 39.651 1.503 49.833 1.503 C 60.18 1.503 69.786 4.701 77.716 10.161 C 78.797 10.922 80.235 10.937 81.331 10.199 C 86.109 6.997 90.875 3.776 95.646 0.564 C 96.99 -0.438 99.098 0.259 99.76 1.907 C 100.193 3.164 99.88 4.529 99.634 5.789 C 98.325 13.019 95.754 27.409 95.207 30.68 C 95.169 31.181 95.249 31.684 95.441 32.148 C 97.788 37.889 99.082 44.17 99.082 50.752 C 99.082 77.932 77.014 100 49.833 100 C 22.653 100 0.585 77.932 0.585 50.752 C 0.585 43.98 1.955 37.526 4.432 31.65 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS2/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS2/res/values/config.xml index 89c0b52b5..6bd4267e2 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS2/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS2/res/values/config.xml @@ -1,5 +1,5 @@ - M4.8 33V67c0 5.8 3 11 8 13.7l29.4 17c4.9 2.7 11 2.7 15.9 0l29.4 -17c4.9 -2.7 8 -8 8 -13.7V33c0 -5.8 -3 -11 -8 -13.7l-29.4 -17c-4.9 -2.7 -11 -2.7 -15.9 0l-29.7 17C7.8 22.2 4.8 27.5 4.8 33z + MM55,0 C25,0 0,25 0,50 0,78 28,100 55,100 85,100 100,85 100,58 100,30 86,0 55,0 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS3/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS3/res/values/config.xml index fde1c3f41..89c0b52b5 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS3/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS3/res/values/config.xml @@ -1,5 +1,5 @@ - M46.16,0.43C45.23,0.49,41.86,0.75,40.93,0.84C40.44,0.88,39.61,0.98,39.07,1.06C38.54,1.14,37.83,1.25,37.5,1.3C36.88,1.39,36.21,1.51,35.42,1.65C34.76,1.77,33.25,2.12,32.91,2.22C32.75,2.27,32.55,2.32,32.47,2.32C32.38,2.32,32.24,2.35,32.15,2.4C32.06,2.45,31.67,2.55,31.27,2.64C30.88,2.73,30.53,2.84,30.5,2.88C30.48,2.93,30.35,2.96,30.23,2.96C30.1,2.96,29.93,3,29.84,3.04C29.75,3.09,29.43,3.2,29.12,3.29C28.82,3.38,28.18,3.59,27.71,3.76C27.23,3.93,26.8,4.07,26.75,4.07C26.69,4.07,26.52,4.13,26.36,4.2C25.52,4.57,24.84,4.82,24.7,4.82C24.62,4.82,24.52,4.86,24.49,4.91C24.46,4.96,24.35,5,24.25,5C24.15,5,24.04,5.06,24.02,5.14C23.98,5.21,23.86,5.28,23.74,5.28C23.62,5.28,23.52,5.32,23.52,5.37C23.52,5.42,23.43,5.46,23.33,5.46C23.23,5.46,23.12,5.53,23.09,5.6C23.06,5.68,22.97,5.74,22.88,5.75C22.8,5.75,22.61,5.83,22.45,5.93C22.3,6.02,22.03,6.18,21.85,6.27C21.67,6.35,21.51,6.45,21.48,6.48C21.46,6.5,21.27,6.61,21.07,6.71C20.86,6.81,20.45,7.04,20.14,7.22C19.83,7.4,19.43,7.62,19.23,7.72C19.04,7.82,18.89,7.93,18.89,7.98C18.89,8.02,18.84,8.05,18.78,8.05C18.63,8.05,17.5,8.8,17.5,8.9C17.5,8.95,17.45,8.98,17.4,8.98C17.34,8.98,17.16,9.1,16.99,9.23C16.82,9.38,16.43,9.7,16.1,9.95C15.77,10.21,15.43,10.49,15.32,10.59C15.22,10.68,14.9,10.95,14.61,11.17C14.31,11.4,14.07,11.62,14.07,11.66C14.07,11.7,13.97,11.79,13.84,11.85C13.71,11.92,13.61,12,13.61,12.04C13.61,12.08,13.14,12.58,12.57,13.16C11.99,13.74,11.41,14.36,11.28,14.54C11.14,14.71,10.92,14.99,10.77,15.14C10.63,15.3,10.41,15.58,10.28,15.77C10.15,15.96,10.02,16.11,9.98,16.11C9.94,16.11,9.91,16.17,9.91,16.25C9.91,16.33,9.88,16.39,9.84,16.39C9.79,16.39,9.69,16.5,9.61,16.64C9.52,16.79,9.36,17,9.24,17.13C9.12,17.26,8.9,17.56,8.75,17.8C8.6,18.04,8.45,18.24,8.41,18.24C8.38,18.24,8.33,18.34,8.3,18.47C8.26,18.6,8.2,18.7,8.15,18.7C8.1,18.7,8.05,18.74,8.05,18.79C8.05,18.84,7.94,19.06,7.79,19.28C7.64,19.5,7.37,19.97,7.18,20.32C6.98,20.68,6.73,21.12,6.62,21.3C6.51,21.47,6.34,21.8,6.25,22.02C6.15,22.23,6.04,22.41,6,22.41C5.96,22.41,5.93,22.48,5.93,22.56C5.93,22.64,5.83,22.84,5.71,23C5.6,23.16,5.46,23.39,5.4,23.52C5.34,23.64,5.19,23.98,5.06,24.26C4.93,24.54,4.76,24.98,4.67,25.23C4.58,25.48,4.47,25.73,4.43,25.78C4.39,25.83,4.35,25.96,4.35,26.07C4.35,26.17,4.32,26.3,4.27,26.35C4.23,26.39,4.12,26.68,4.02,26.99C3.93,27.3,3.83,27.59,3.79,27.64C3.76,27.69,3.66,27.96,3.57,28.24C3.47,28.52,3.34,28.91,3.27,29.1C3.2,29.29,3.15,29.53,3.15,29.63C3.15,29.73,3.11,29.82,3.05,29.82C3,29.82,2.96,29.94,2.96,30.09C2.96,30.24,2.92,30.38,2.88,30.41C2.83,30.44,2.76,30.65,2.73,30.88C2.69,31.11,2.63,31.32,2.58,31.35C2.54,31.38,2.5,31.54,2.5,31.7C2.5,31.86,2.46,32.04,2.43,32.09C2.38,32.14,2.3,32.41,2.23,32.68C2.17,32.96,2.08,33.36,2.04,33.57C1.87,34.28,1.68,35.14,1.58,35.67C1.35,36.88,1.29,37.23,1.16,38.24C1.07,38.83,0.97,39.52,0.93,39.77C0.88,40.02,0.82,40.54,0.79,40.93C0.77,41.31,0.68,42.45,0.59,43.47C0.35,46.14,0.35,53.59,0.59,56.3C0.68,57.34,0.79,58.59,0.83,59.07C0.88,59.56,0.98,60.39,1.06,60.93C1.14,61.46,1.25,62.17,1.3,62.5C1.43,63.48,1.67,64.74,1.89,65.7C1.97,66.05,2.08,66.53,2.13,66.76C2.18,66.99,2.26,67.32,2.31,67.5C2.36,67.68,2.48,68.18,2.59,68.61C2.7,69.04,2.83,69.44,2.88,69.48C2.93,69.54,2.96,69.66,2.96,69.75C2.96,69.95,3.29,70.98,3.76,72.29C3.93,72.77,4.07,73.2,4.07,73.25C4.07,73.31,4.13,73.48,4.2,73.64C4.28,73.8,4.41,74.14,4.5,74.4C4.59,74.65,4.7,74.9,4.74,74.95C4.78,75,4.82,75.13,4.82,75.25C4.82,75.36,4.86,75.48,4.91,75.51C4.96,75.54,5,75.65,5,75.75C5,75.85,5.06,75.96,5.14,75.98C5.21,76.02,5.28,76.14,5.28,76.26C5.28,76.38,5.32,76.48,5.37,76.48C5.42,76.48,5.46,76.57,5.46,76.67C5.46,76.77,5.53,76.88,5.6,76.91C5.68,76.94,5.74,77.03,5.75,77.12C5.75,77.2,5.83,77.39,5.93,77.55C6.02,77.7,6.2,78.01,6.32,78.24C6.65,78.88,7.13,79.73,7.38,80.11C7.5,80.3,7.59,80.49,7.59,80.52C7.59,80.65,8.81,82.5,8.9,82.5C8.94,82.5,8.98,82.55,8.98,82.62C8.98,82.69,9.1,82.88,9.23,83.04C9.38,83.2,9.7,83.59,9.95,83.91C10.21,84.23,10.43,84.51,10.46,84.54C10.49,84.56,10.7,84.81,10.92,85.09C11.69,86.05,13.74,88.11,14.67,88.84C14.86,89,15.11,89.2,15.22,89.3C15.34,89.41,15.58,89.59,15.77,89.72C15.96,89.85,16.11,89.98,16.11,90.02C16.11,90.06,16.17,90.09,16.25,90.09C16.33,90.09,16.39,90.13,16.39,90.18C16.39,90.23,16.5,90.33,16.64,90.41C16.79,90.48,17,90.64,17.14,90.77C17.27,90.89,17.56,91.11,17.78,91.25C18.01,91.39,18.25,91.57,18.32,91.63C18.38,91.7,18.5,91.76,18.56,91.76C18.63,91.76,18.7,91.79,18.72,91.84C18.77,91.95,21.25,93.39,22.73,94.16C22.93,94.27,23.23,94.44,23.38,94.54C23.53,94.63,23.73,94.71,23.82,94.71C23.91,94.72,23.98,94.76,23.98,94.81C23.98,94.86,24.07,94.92,24.19,94.95C24.3,94.98,24.48,95.05,24.58,95.09C24.68,95.14,24.98,95.24,25.23,95.33C25.48,95.42,25.73,95.53,25.78,95.57C25.83,95.61,25.94,95.65,26.03,95.65C26.12,95.65,26.31,95.71,26.45,95.78C26.71,95.91,27.16,96.07,28.2,96.41C28.5,96.51,28.89,96.65,29.05,96.72C29.22,96.79,29.44,96.85,29.54,96.85C29.63,96.85,29.74,96.89,29.77,96.95C29.8,97,29.93,97.04,30.05,97.04C30.18,97.04,30.35,97.07,30.44,97.12C30.71,97.27,31.55,97.5,31.79,97.5C31.92,97.5,32.05,97.54,32.08,97.58C32.11,97.63,32.24,97.68,32.38,97.71C32.52,97.73,33.22,97.88,33.93,98.04C34.65,98.2,35.45,98.38,35.72,98.43C36.69,98.61,37.18,98.7,37.55,98.75C37.75,98.78,38.33,98.87,38.84,98.95C40.09,99.13,40.54,99.18,44.49,99.5C46.86,99.69,53.84,99.64,56.48,99.41C59.71,99.12,60.04,99.09,61.02,98.94C61.55,98.86,62.26,98.75,62.59,98.7C63.23,98.6,63.91,98.49,64.68,98.35C65.14,98.26,67,97.83,67.59,97.67C67.77,97.62,68.06,97.55,68.24,97.5C69.02,97.33,69.45,97.2,69.5,97.12C69.53,97.07,69.64,97.04,69.75,97.04C69.94,97.04,70.27,96.95,70.93,96.71C71.43,96.54,72.4,96.21,72.92,96.05C73.17,95.98,73.5,95.86,73.66,95.79C73.81,95.72,74.14,95.59,74.4,95.5C74.65,95.41,74.9,95.3,74.95,95.26C75,95.22,75.15,95.18,75.3,95.18C75.44,95.18,75.55,95.14,75.55,95.09C75.55,95.04,75.63,95,75.73,95C75.82,95,75.95,94.94,76.02,94.86C76.08,94.79,76.21,94.72,76.31,94.72C76.4,94.72,76.48,94.68,76.48,94.63C76.48,94.58,76.57,94.54,76.67,94.54C76.77,94.54,76.88,94.47,76.91,94.4C76.94,94.32,77.02,94.26,77.08,94.26C77.2,94.26,77.79,93.99,77.87,93.89C77.89,93.87,78.06,93.77,78.24,93.68C78.42,93.6,78.86,93.36,79.21,93.16C79.57,92.96,80.07,92.68,80.32,92.54C81.04,92.16,83.15,90.73,83.15,90.64C83.15,90.59,83.21,90.55,83.28,90.55C83.35,90.55,83.43,90.52,83.44,90.48C83.46,90.44,83.66,90.27,83.89,90.09C84.11,89.91,84.35,89.73,84.41,89.68C84.46,89.62,84.67,89.46,84.86,89.3C85.94,88.45,88.68,85.68,89.05,85.07C89.14,84.93,89.23,84.82,89.27,84.82C89.3,84.82,89.46,84.61,89.64,84.35C89.81,84.1,89.98,83.89,90.02,83.89C90.06,83.89,90.09,83.85,90.09,83.8C90.09,83.7,90.18,83.59,90.61,83.11C90.73,82.97,90.83,82.82,90.83,82.77C90.83,82.73,90.87,82.68,90.91,82.68C90.95,82.68,91.07,82.54,91.16,82.36C91.26,82.18,91.37,82.04,91.41,82.04C91.45,82.04,91.48,81.98,91.48,81.91C91.48,81.83,91.52,81.76,91.56,81.74C91.63,81.71,92.51,80.27,93.15,79.12C93.77,78,93.98,77.63,94.16,77.27C94.27,77.07,94.44,76.77,94.54,76.62C94.63,76.47,94.71,76.27,94.71,76.18C94.72,76.09,94.76,76.02,94.81,76.02C94.86,76.02,94.92,75.93,94.95,75.81C94.98,75.7,95.05,75.52,95.09,75.42C95.13,75.32,95.23,75.04,95.32,74.82C95.41,74.59,95.52,74.32,95.56,74.21C95.6,74.11,95.7,73.88,95.78,73.69C95.86,73.5,95.93,73.27,95.93,73.17C95.93,73.07,95.95,72.96,95.99,72.93C96.06,72.86,96.24,72.39,96.45,71.71C96.53,71.46,96.65,71.11,96.72,70.95C96.79,70.78,96.85,70.56,96.85,70.46C96.85,70.37,96.89,70.26,96.95,70.23C97,70.2,97.04,70.06,97.04,69.92C97.04,69.78,97.08,69.63,97.12,69.58C97.22,69.48,97.4,68.82,97.47,68.31C97.5,68.12,97.56,67.96,97.6,67.96C97.65,67.96,97.68,67.87,97.68,67.76C97.68,67.65,97.73,67.43,97.78,67.27C97.88,66.94,98.23,65.42,98.35,64.77C98.56,63.59,98.64,63.12,98.93,61.25C99.12,60.05,99.16,59.65,99.5,55.51C99.69,53.18,99.63,46.08,99.41,43.52C99.32,42.58,99.21,41.39,99.17,40.88C99.12,40.37,99.02,39.52,98.93,38.98C98.85,38.45,98.75,37.76,98.7,37.45C98.62,36.94,98.54,36.44,98.38,35.51C98.35,35.3,98.21,34.7,98.09,34.17C97.96,33.63,97.82,33.01,97.77,32.78C97.71,32.55,97.63,32.28,97.59,32.18C97.55,32.07,97.45,31.67,97.36,31.27C97.27,30.88,97.16,30.53,97.12,30.5C97.07,30.48,97.04,30.35,97.04,30.23C97.04,30.1,97,29.93,96.96,29.84C96.91,29.75,96.8,29.43,96.71,29.12C96.62,28.82,96.47,28.34,96.37,28.05C96.27,27.78,96.13,27.34,96.05,27.08C95.97,26.83,95.86,26.5,95.79,26.34C95.72,26.19,95.59,25.86,95.5,25.6C95.41,25.35,95.3,25.1,95.26,25.05C95.22,25,95.18,24.87,95.18,24.75C95.18,24.64,95.14,24.52,95.09,24.49C95.04,24.46,95,24.36,95,24.27C95,24.17,94.94,24.05,94.86,23.98C94.79,23.92,94.72,23.79,94.72,23.69C94.72,23.6,94.68,23.52,94.63,23.52C94.58,23.52,94.54,23.43,94.54,23.33C94.54,23.23,94.47,23.12,94.4,23.09C94.32,23.06,94.26,22.97,94.25,22.88C94.25,22.8,94.17,22.61,94.07,22.45C93.98,22.3,93.8,21.99,93.68,21.76C93.56,21.53,93.34,21.13,93.2,20.88C93.06,20.62,92.79,20.14,92.61,19.82C92.11,18.91,91.2,17.5,91.1,17.5C91.05,17.5,91.02,17.45,91.02,17.38C91.02,17.31,90.9,17.12,90.77,16.96C90.62,16.8,90.3,16.41,90.05,16.09C89.79,15.77,89.56,15.49,89.53,15.46C89.5,15.44,89.28,15.17,89.03,14.86C88.24,13.88,86.24,11.87,85.46,11.28C85.29,11.14,85.01,10.92,84.86,10.77C84.7,10.63,84.42,10.41,84.23,10.28C84.04,10.15,83.89,10.02,83.89,9.98C83.89,9.94,83.83,9.91,83.75,9.91C83.67,9.91,83.61,9.88,83.61,9.84C83.61,9.79,83.5,9.69,83.36,9.61C83.21,9.52,82.96,9.32,82.79,9.17C82.61,9.01,82.31,8.79,82.11,8.68C81.92,8.57,81.76,8.45,81.76,8.42C81.76,8.38,81.66,8.33,81.53,8.3C81.4,8.26,81.3,8.2,81.3,8.15C81.3,8.1,81.26,8.05,81.21,8.05C81.16,8.05,80.94,7.94,80.72,7.79C80.5,7.64,80.03,7.37,79.68,7.18C79.32,6.98,78.88,6.73,78.7,6.62C78.53,6.52,78.23,6.35,78.05,6.26C77.88,6.17,77.52,5.98,77.27,5.84C77.02,5.69,76.7,5.52,76.57,5.46C76.45,5.41,76.09,5.24,75.79,5.09C75.48,4.95,75.02,4.76,74.77,4.67C74.52,4.58,74.27,4.47,74.22,4.43C74.17,4.39,74.04,4.35,73.92,4.35C73.81,4.35,73.69,4.32,73.66,4.27C73.64,4.22,73.5,4.16,73.36,4.12C73.21,4.09,72.73,3.93,72.27,3.76C71.81,3.59,71.18,3.37,70.88,3.28C70.57,3.19,70.29,3.08,70.23,3.04C70.19,3,70.01,2.96,69.84,2.96C69.68,2.96,69.54,2.93,69.54,2.89C69.54,2.81,68.93,2.62,68.38,2.54C68.23,2.51,68.02,2.45,67.92,2.41C67.73,2.33,67.45,2.26,66.25,1.99C65.89,1.91,65.43,1.81,65.23,1.76C64.46,1.59,63.92,1.49,62.68,1.3C62.36,1.25,61.67,1.14,61.16,1.07C60.15,0.91,59.33,0.82,56.57,0.6C54.86,0.46,47.56,0.34,46.16,0.43 + M4.8 33V67c0 5.8 3 11 8 13.7l29.4 17c4.9 2.7 11 2.7 15.9 0l29.4 -17c4.9 -2.7 8 -8 8 -13.7V33c0 -5.8 -3 -11 -8 -13.7l-29.4 -17c-4.9 -2.7 -11 -2.7 -15.9 0l-29.7 17C7.8 22.2 4.8 27.5 4.8 33z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS4/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS4/res/values/config.xml index 6d271e834..fde1c3f41 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS4/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS4/res/values/config.xml @@ -1,5 +1,5 @@ - M8.66,1.41C8.83,2.82,8.55,3.27,7.5,3.29C4.13,3.34,3.79,6.6,7.07,7.48C7.66,7.64,7.88,7.79,7.7,7.89C7.49,8.03,7.49,8.08,7.72,8.19C7.88,8.26,7.44,8.26,6.76,8.19C4.41,7.96,3.63,7.33,3.78,5.79C3.85,5.07,3.82,5.01,3.59,5.33C2.61,6.67,5.84,9.68,7.29,8.77C7.78,8.46,9.4,8.45,10.46,8.75C12.59,9.34,15.4,6.65,14.25,5.13C13.88,4.63,12.66,3.74,12.38,3.75C12.26,3.75,12.39,3.89,12.68,4.05C13.39,4.46,13.18,4.44,11.97,3.98C11.36,3.75,11.07,3.54,11.25,3.47C11.41,3.41,11.21,3.4,10.81,3.46C10.26,3.54,10.16,3.52,10.39,3.35C10.65,3.17,10.6,3.12,10.14,3.12C9.6,3.12,9.58,3.08,9.52,1.82C9.46,0.66,9.41,0.51,9,0.45C8.57,0.39,8.55,0.45,8.66,1.41M87.95,0.62C86.81,1.34,88.07,3.68,89.86,4.18C90.35,4.31,90.63,4.46,90.49,4.52C90.34,4.57,90.29,4.71,90.36,4.83C90.46,4.98,90.22,5.02,89.63,4.94L88.76,4.82L89.44,5.6C89.82,6.03,90.2,6.33,90.3,6.28C90.4,6.23,90.37,6.12,90.23,6.03C89.96,5.86,89.91,5.88,93.66,5.11C97.47,4.32,98.4,2.91,96.27,1.14C96,0.91,95.85,0.86,95.94,1.02C96.05,1.21,96.02,1.27,95.82,1.2C95.66,1.14,95.55,0.99,95.58,0.86C95.61,0.73,95.48,0.7,95.29,0.77C95.1,0.84,95,0.82,95.06,0.71C95.25,0.39,92.54,0.35,92.15,0.66C91.9,0.86,91.86,0.87,91.97,0.68C92.16,0.36,88.44,0.3,87.95,0.62M10.2,1.71C10.19,2.46,10.27,2.7,10.5,2.7C10.89,2.7,10.89,1.94,10.5,1.25C10.21,0.74,10.2,0.75,10.2,1.71M95.47,1.28C95.66,1.38,95.9,1.44,95.99,1.41C96.08,1.38,96.15,1.41,96.15,1.48C96.15,1.54,96.29,1.77,96.46,1.99C96.73,2.32,96.69,2.31,96.15,1.94C95.81,1.7,95.13,1.39,94.64,1.26C94.16,1.13,93.76,0.98,93.76,0.93C93.76,0.8,95.05,1.06,95.47,1.28M7.9,1.73C7.9,2.2,7.98,2.47,8.11,2.39C8.37,2.23,8.37,1.65,8.11,1.25C7.96,1.02,7.91,1.14,7.9,1.73M86.29,2.07C85.94,2.71,86.04,3.27,86.61,3.89L87.14,4.47L86.79,3.9C86.57,3.54,86.47,3.03,86.52,2.5C86.61,1.55,86.59,1.5,86.29,2.07M86.9,2.6C86.9,3.12,87.28,3.71,87.77,3.97L88.22,4.21L87.77,3.64C87.52,3.32,87.32,2.94,87.32,2.79C87.32,2.64,87.22,2.46,87.11,2.39C87,2.32,86.9,2.41,86.9,2.6M97.71,3.04C97.7,3.37,97.57,3.82,97.4,4.04C97.13,4.39,97.15,4.46,97.64,4.71C98.36,5.09,98.57,4.9,98.51,3.93C98.45,2.88,97.72,2.07,97.71,3.04M9.67,3.74C9.46,3.97,9.24,4.12,9.19,4.06C9.05,3.92,9.57,3.33,9.83,3.33C9.95,3.33,9.88,3.52,9.67,3.74M12.98,4.69C13.29,4.82,13.34,4.79,13.2,4.56C13.1,4.38,13.11,4.33,13.22,4.43C13.32,4.53,13.41,4.67,13.41,4.75C13.41,4.82,13.5,5.03,13.61,5.2C13.77,5.46,13.75,5.46,13.48,5.25C13.3,5.11,12.79,4.85,12.35,4.68C11.87,4.49,11.75,4.39,12.06,4.44C12.34,4.48,12.76,4.59,12.98,4.69M96.46,5.22L95.74,5.35L96.57,5.4C97.36,5.45,97.34,5.46,96.22,5.63C93.2,6.07,91.29,6.66,90.84,7.29C90.3,8.05,90,8.06,89.56,7.33C89.38,7.02,88.84,6.39,88.38,5.95L87.54,5.13L86.69,5.99C85.39,7.29,85.55,7.78,87.32,7.86C88.06,7.89,88.75,8,88.84,8.09C89.21,8.46,90.95,8.07,91.59,7.46C92.37,6.73,92.65,6.72,94.34,7.39C95.07,7.69,96.09,7.97,96.59,8.02L97.5,8.1L97.5,7.11C97.5,6.56,97.62,5.98,97.77,5.82C97.97,5.59,97.94,5.59,97.62,5.83C97.27,6.1,97.23,6.1,97.34,5.8C97.54,5.27,97.25,5.07,96.46,5.22M94.18,5.41C94.18,5.52,94.44,5.61,94.75,5.61C95.2,5.61,95.25,5.56,95.01,5.41C94.61,5.14,94.18,5.14,94.18,5.41M92.52,5.73L91.58,6.02L92.62,5.9C93.19,5.84,93.75,5.7,93.86,5.6C94.13,5.34,93.66,5.38,92.52,5.73M4.16,5.93C4.16,6.44,4.54,7.03,5.03,7.3L5.48,7.54L5.03,6.96C4.78,6.65,4.57,6.27,4.57,6.12C4.57,5.97,4.48,5.79,4.37,5.72C4.25,5.65,4.16,5.74,4.16,5.93M14.97,6.34C14.97,6.66,14.72,7.25,14.42,7.64C13.7,8.59,13.61,9.86,14.24,10.15C14.64,10.33,14.68,10.3,14.6,9.77C14.54,9.38,14.64,9.11,14.91,8.91C15.84,8.26,16.06,6.75,15.34,6.09C14.99,5.78,14.97,5.79,14.97,6.34M97.8,6.74C97.73,7.02,97.77,7.42,97.89,7.62C98.08,7.93,98.12,7.84,98.12,7.12C98.13,6.14,98,5.98,97.8,6.74M98.39,7.57C98.42,8.16,98.55,8.63,98.7,8.68C99.08,8.8,99.04,7.45,98.65,6.95C98.36,6.58,98.34,6.62,98.39,7.57M92.23,8.29C91.91,8.64,91.91,8.73,92.21,9.45C92.39,9.88,92.5,10.32,92.46,10.45C92.43,10.57,92.28,10.28,92.13,9.8C91.88,8.95,91.62,8.74,91.37,9.15C91.3,9.26,90.9,9.36,90.48,9.36C90.05,9.37,89.53,9.51,89.3,9.68C88.75,10.09,88.63,10.06,88.48,9.46C88.37,9.01,88.23,8.94,87.46,8.94C85.72,8.94,85.82,8.21,86.02,19.23C86.61,51.16,86.18,83.04,85.12,85.73C84.92,86.24,85.57,85.92,86.84,84.9L87.71,84.2L88.96,84.98L90.21,85.76L90.22,86.85C90.23,88.03,90.93,88.44,91.48,87.58C91.67,87.27,91.68,87.29,91.57,87.71L91.43,88.21L92.96,88.09C93.8,88.02,94.93,87.81,95.48,87.62C96.51,87.26,96.53,87.23,96.76,85.56C96.83,85.04,97.05,84.59,97.38,84.32L97.89,83.89L97.67,79.12C97.5,75.6,97.51,74.02,97.68,73.07C97.95,71.63,97.99,70.75,97.79,70.96C97.71,71.04,97.58,71.45,97.5,71.88C97.39,72.4,97.34,71.82,97.32,70.11C97.3,68.54,97.38,67.57,97.5,67.57C97.62,67.57,97.7,67.12,97.69,66.58C97.67,65.74,97.64,65.69,97.53,66.21C97.16,67.91,97.05,65.28,96.96,52.95C96.85,38.77,97.03,31.29,97.45,32.22C97.68,32.73,97.69,32.71,97.7,31.96C97.71,31.54,97.62,31.18,97.5,31.18C97.38,31.18,97.31,30.43,97.32,29.26C97.34,28.2,97.39,27.57,97.45,27.86C97.5,28.14,97.62,28.47,97.73,28.57C98,28.86,97.97,28.07,97.68,27.24C97.45,26.57,97.71,19.21,98.08,15.9C98.21,14.75,98.23,14.71,98.35,15.38L98.49,16.11L98.52,15.33C98.53,14.9,98.45,14.55,98.34,14.55C98.1,14.55,98.06,13.05,98.28,12.27L98.43,11.75L98.58,12.37C98.7,12.88,98.71,12.84,98.64,12.16C98.38,9.5,98.27,9.4,94.9,8.42C92.74,7.8,92.68,7.79,92.23,8.29M87.37,8.46C87.57,8.51,87.9,8.51,88.1,8.46C88.3,8.41,88.13,8.36,87.73,8.36C87.33,8.36,87.17,8.41,87.37,8.46M4.55,8.86C4.22,9.26,4.84,9.46,5.64,9.23L6.27,9.04L5.52,8.82C4.94,8.63,4.73,8.64,4.55,8.86M12.31,8.8L11.63,9.05L12.3,9.3C13.03,9.58,13.72,9.24,13.42,8.75C13.25,8.48,13.19,8.48,12.31,8.8M10.14,9.26C10.74,9.43,11.51,9.7,11.84,9.87C12.57,10.25,12.68,10.26,12.68,9.97C12.68,9.85,12.59,9.8,12.47,9.88C12.36,9.95,12.27,9.92,12.27,9.81C12.27,9.6,10.08,8.93,9.45,8.95C9.23,8.96,9.54,9.1,10.14,9.26M6.27,9.95C6.87,10.43,7.07,10.5,7.07,10.21C7.07,10.11,6.91,9.97,6.7,9.9C6.5,9.83,6.2,9.71,6.03,9.64C5.86,9.57,5.96,9.71,6.27,9.95M7.39,10.49L6.8,11.32L6.49,10.86C6.07,10.22,5.23,10.23,5.33,10.86C5.42,11.4,3.9,13.22,3.54,13C3.42,12.93,3.32,12.52,3.32,12.1C3.32,11.11,2.93,9.67,2.72,9.9C2.63,10,2.63,11.07,2.72,12.27C3.5,22.89,4.05,62.76,3.53,70.79C3.13,76.88,2.5,82.93,1.96,85.68C1.67,87.18,1.46,88.42,1.5,88.43C1.53,88.45,1.87,88.63,2.24,88.84L2.93,89.22L3.65,88.58C4.45,87.88,4.94,87.77,5.12,88.26C5.29,88.68,6.7,89.4,7.35,89.4C7.95,89.4,8.11,89.07,8.11,87.75C8.11,85.65,9.32,83.21,10.12,83.7C10.61,84,11.13,85.41,11.61,87.76L11.98,89.64L13.76,87.53L13.96,84.57C14.18,81.53,14.09,74.45,13.7,61.02C13.32,48.18,13.69,13.58,14.23,11.89C14.48,11.11,11.23,9.73,9.03,9.68C8.04,9.66,7.95,9.7,7.39,10.49M12.89,10.13C12.89,10.22,13.08,10.41,13.3,10.55C13.54,10.7,13.72,10.72,13.72,10.61C13.72,10.5,13.54,10.31,13.3,10.19C13.08,10.07,12.89,10.04,12.89,10.13M99.31,11.02C99.14,11.85,98.37,25.48,98.08,32.64C97.61,44.32,97.8,62.22,98.57,79.49L98.8,84.65L98.19,85.21C97.71,85.66,97.54,86.02,97.44,86.88C97.37,87.49,97.18,88.1,97.02,88.23C96.46,88.67,96.45,89.47,96.99,89.87L97.48,90.23L97.41,89.61C97.36,89.2,97.44,88.92,97.65,88.8C97.85,88.7,98.05,88.13,98.16,87.4C98.27,86.64,98.48,86.09,98.69,85.96C99.4,85.53,99.85,84.98,99.61,84.84C99.05,84.5,98.44,65.79,98.44,49.38C98.44,36.11,98.5,34.13,99.3,21.93C99.48,19.07,99.64,16.05,99.63,15.23C99.63,14.39,99.71,13.66,99.82,13.6C100.1,13.43,100.04,11.98,99.71,11.2C99.42,10.52,99.41,10.51,99.31,11.02M79.2,11.55C79.04,11.74,78.55,11.85,77.83,11.85L76.71,11.85L76.08,13.2C75.32,14.8,75.21,14.82,73.52,13.75C71.48,12.48,68.4,12.19,68.4,13.28C68.4,13.94,67.38,13.96,65.65,13.32C63.97,12.71,63.85,12.69,63.14,12.99C62.72,13.16,61.83,13.3,61.15,13.3L59.91,13.3L58.95,14.97C57.8,16.97,57.8,16.97,56.82,15.28C56.31,14.39,55.98,14,55.84,14.14C55.49,14.49,55.01,14.38,52.68,13.41L50.41,12.48L48.48,13.12C46.58,13.75,46.55,13.77,46.67,14.34C46.82,15,45.84,16.82,45.34,16.83C45.18,16.84,44.66,16.42,44.2,15.9L43.35,14.97L39.88,14.83L36.42,14.7L36.2,15.51C36.07,15.96,35.84,16.78,35.69,17.35C35.29,18.81,35.13,18.73,34.16,16.63C33.14,14.41,33.18,14.43,29.6,14.09L27.02,13.85L26.25,14.58C24.56,16.15,24.22,16.12,24.58,14.42C24.83,13.26,24.82,13.26,23.69,13.6C23.18,13.75,22.45,13.83,22.07,13.77C21.54,13.69,21.26,13.79,20.83,14.19C19.99,14.97,19.47,15.18,18.32,15.18C17.21,15.18,15.28,14.48,15.48,14.15C15.55,14.04,15.42,13.85,15.2,13.73C14.71,13.47,14.54,13.46,14.59,13.67C14.61,13.75,14.57,15.84,14.49,18.3C14.2,27.89,14.11,51.86,14.35,57.8C14.48,61.05,14.66,68.25,14.73,73.8L14.86,83.87L15.77,84.13C16.61,84.38,16.85,84.35,18.82,83.75L20.95,83.09L21.59,83.56C22.05,83.88,22.25,83.94,22.26,83.75C22.27,83.59,22.31,83.24,22.35,82.95C22.39,82.67,22.48,81.89,22.56,81.24C22.67,80.26,22.76,80.04,23.08,80.04C23.54,80.04,23.6,80.23,23.93,82.54C24.07,83.51,24.21,84.34,24.25,84.38C24.28,84.42,24.78,84.16,25.36,83.81C26.68,82.99,26.85,83,27.58,83.88C28.71,85.25,29.47,85.04,30.16,83.16C30.93,81.02,31.47,80.96,31.56,83L31.62,84.41L32.35,84.41C33.12,84.41,33.97,84.03,35.71,82.89C36.64,82.28,37.04,82.16,38.51,82.04C40.03,81.91,40.3,81.82,40.86,81.28C41.59,80.57,42,80.5,42,81.07C42,81.79,42.57,82.12,43.83,82.12C44.87,82.12,45.12,82.21,45.93,82.86C46.78,83.53,46.96,83.59,48.02,83.53L49.17,83.47L49.36,81.65C49.59,79.42,49.8,79.37,50.73,81.31C51.61,83.11,51.48,83.03,52.86,82.55C55.01,81.81,57.38,81.77,58.41,82.45L59.28,83.03L60.41,82.47C61.71,81.83,62.12,81.79,62.7,82.22C63.34,82.71,63.68,82.62,63.53,82.01C63.24,80.86,64.38,78.48,65.21,78.48C65.93,78.48,68.82,81.37,68.82,82.09C68.82,82.73,69.78,82.95,72.61,82.95L73.6,82.95L73.6,81.31C73.6,80,73.66,79.64,73.93,79.54C74.43,79.35,74.52,79.48,75.05,81.17C75.62,83,75.57,82.98,77.9,82.21C80.28,81.43,82.66,81.3,83.79,81.89C84.27,82.14,84.7,82.32,84.73,82.28C85.6,81.41,85.56,14.76,84.7,14.76C84.54,14.76,84.41,14.67,84.41,14.56C84.41,14.45,84.55,14.41,84.72,14.48C84.98,14.58,85.03,14.35,85.03,13.13C85.03,11.33,84.64,11.16,82.68,12.11L81.47,12.7L80.46,11.98C79.6,11.36,79.41,11.29,79.2,11.55M15.1,12.59C15.03,12.77,15.11,12.96,15.29,13.03C15.7,13.18,15.89,13,15.73,12.59C15.57,12.18,15.26,12.18,15.1,12.59M77.29,13.45C77.09,13.5,76.76,13.5,76.56,13.45C76.36,13.4,76.52,13.36,76.92,13.36C77.32,13.36,77.49,13.4,77.29,13.45M79.32,13.73C79.41,13.87,79.25,13.9,78.86,13.8C78.07,13.61,77.99,13.51,78.64,13.51C78.94,13.51,79.25,13.61,79.32,13.73M98.13,18.16C98.13,18.57,98.22,18.92,98.33,18.92C98.45,18.92,98.48,18.63,98.41,18.24C98.23,17.3,98.13,17.27,98.13,18.16M97.92,21.17C97.92,21.65,98.02,22.04,98.14,22.04C98.28,22.04,98.3,21.75,98.21,21.26C98.02,20.18,97.92,20.15,97.92,21.17M85.52,21.93C85.52,22.73,85.55,23.04,85.6,22.61C85.64,22.17,85.64,21.52,85.6,21.15C85.55,20.78,85.52,21.13,85.52,21.93M97.74,24.26C97.72,24.74,97.81,25.19,97.92,25.26C98.16,25.41,98.16,24.93,97.92,24.01C97.77,23.42,97.76,23.44,97.74,24.26M85.73,37.01C85.73,38.55,85.77,39.18,85.81,38.41C85.85,37.64,85.85,36.38,85.81,35.6C85.77,34.83,85.73,35.46,85.73,37.01M97.36,36.49C97.36,37.06,97.4,37.27,97.45,36.95C97.5,36.64,97.49,36.17,97.45,35.91C97.39,35.66,97.36,35.91,97.36,36.49M13.8,40.23C13.8,41.83,13.84,42.46,13.88,41.62C13.91,40.79,13.91,39.48,13.88,38.71C13.84,37.95,13.8,38.63,13.8,40.23M97.12,48.01C97.1,51.48,97.14,54.28,97.2,54.21C97.4,54.02,97.5,45.09,97.32,43.35C97.19,42.12,97.14,43.34,97.12,48.01M13.78,55.3C13.78,55.82,13.82,56.03,13.87,55.77C13.92,55.51,13.92,55.09,13.87,54.83C13.82,54.58,13.78,54.79,13.78,55.3M97.36,60.81C97.36,61.5,97.4,61.75,97.45,61.38C97.5,61,97.49,60.45,97.45,60.13C97.4,59.82,97.36,60.12,97.36,60.81M13.99,61.12C13.99,61.75,14.03,62.01,14.08,61.7C14.12,61.38,14.12,60.87,14.08,60.55C14.03,60.24,13.99,60.49,13.99,61.12M85.74,63.62C85.74,65.62,85.77,66.44,85.81,65.44C85.85,64.44,85.85,62.8,85.81,61.8C85.77,60.8,85.74,61.62,85.74,63.62M14.2,68.09C14.2,68.66,14.24,68.87,14.29,68.55C14.34,68.23,14.33,67.77,14.29,67.51C14.23,67.26,14.2,67.52,14.2,68.09M85.5,75.68C85.5,76.07,85.54,76.24,85.59,76.04C85.64,75.84,85.64,75.51,85.59,75.31C85.54,75.11,85.5,75.28,85.5,75.68M97.87,75.59C97.79,75.68,97.72,76.22,97.73,76.8L97.76,77.86L97.95,76.92C98.15,75.91,98.12,75.34,97.87,75.59M64.78,80.48C64.5,80.95,64.44,81.34,64.54,81.95C64.64,82.6,64.58,82.89,64.23,83.32C63.82,83.84,63.82,83.89,64.17,84.14C64.77,84.59,65.13,84.02,65.12,82.64C65.12,81.7,65.21,81.36,65.62,80.88C66.12,80.29,66.12,80.27,65.72,80.05C65.18,79.76,65.21,79.74,64.78,80.48M97.92,80.8C97.92,81.96,98.02,81.93,98.21,80.72C98.29,80.17,98.26,79.83,98.13,79.83C98.02,79.83,97.92,80.27,97.92,80.8M74.01,80.66C74.01,81.07,74.12,81.29,74.31,81.29C74.56,81.29,74.57,81.17,74.4,80.66C74.28,80.32,74.14,80.04,74.1,80.04C74.05,80.04,74.01,80.32,74.01,80.66M23.03,81.51C22.98,81.86,23.02,82.19,23.11,82.25C23.21,82.3,23.29,82.02,23.29,81.61C23.29,80.71,23.16,80.65,23.03,81.51M30.9,82.5C30.8,82.77,30.79,83.04,30.86,83.11C31.07,83.32,31.22,83,31.14,82.5L31.07,82.02L30.9,82.5M41.02,82.77C40.91,82.88,39.99,83.06,38.97,83.17C37.81,83.3,36.89,83.53,36.49,83.79C35.25,84.57,33.77,85.31,33.18,85.43C32.2,85.64,32.26,86.07,33.25,86.07C34.31,86.07,35.17,85.72,36.74,84.65C37.85,83.9,38.12,83.82,39.76,83.68C41.65,83.52,42.27,83.22,41.6,82.8C41.36,82.65,41.14,82.64,41.02,82.77M80.04,82.85C78.3,83.2,76.26,83.97,76.41,84.21C76.61,84.54,77.46,84.43,79.1,83.88C79.96,83.59,81.35,83.29,82.18,83.2L83.68,83.03L82.85,82.79C81.86,82.49,81.79,82.5,80.04,82.85M50.11,83.63L50.11,84.62L48.6,84.62C47.19,84.62,47.13,84.63,47.56,84.94C49.21,86.09,51.31,84.84,50.44,83.22L50.12,82.64L50.11,83.63M55.2,83.27C53.34,83.57,52.18,83.93,52.18,84.23C52.18,84.64,52.86,84.64,54.11,84.23C54.82,83.99,55.96,83.74,56.65,83.66C57.78,83.55,57.85,83.51,57.49,83.24C57.27,83.08,57.04,82.96,56.98,82.97C56.91,82.98,56.11,83.12,55.2,83.27M43.24,83.35C43.24,83.6,43.78,83.79,44.53,83.79C45.07,83.79,45.12,83.74,44.91,83.47C44.63,83.14,43.24,83.04,43.24,83.35M60.66,83.64C59.59,84.14,59.48,84.3,60.03,84.58C60.29,84.71,60.75,84.6,61.61,84.19C62.71,83.66,62.78,83.59,62.4,83.39C61.87,83.1,61.84,83.11,60.66,83.64M74.55,83.93C74.47,84.02,73.34,84.05,72.03,84.02C69.1,83.94,68.83,84.29,71.67,84.48C74.88,84.69,75.05,84.68,75.05,84.2C75.05,83.78,74.83,83.66,74.55,83.93M9.54,84.46C9.31,84.89,9.32,84.9,9.65,84.63C9.96,84.37,10.04,84.37,10.2,84.63C10.42,84.97,10.45,84.8,10.27,84.32C10.09,83.86,9.83,83.91,9.54,84.46M18.5,85.04C16.61,85.59,16.55,85.62,17.13,85.85C17.46,85.98,17.88,86.04,18.06,85.98C21.15,85.09,21.42,84.98,21.19,84.7C20.89,84.34,20.89,84.34,18.5,85.04M25.75,84.94C25.16,85.32,25.01,85.53,25.09,85.86C25.2,86.26,26.12,85.94,27.18,85.14C27.73,84.72,26.38,84.54,25.75,84.94M23.1,85.16C23.09,85.54,23.22,85.93,23.43,86.1C23.73,86.34,23.75,86.34,23.6,86.09C23.51,85.93,23.36,85.51,23.27,85.15L23.12,84.51L23.1,85.16M76.66,84.76C76.93,84.81,77.3,84.81,77.5,84.76C77.7,84.71,77.48,84.66,77.03,84.67C76.57,84.67,76.41,84.71,76.66,84.76M9.49,85.84C9.3,86.33,9.15,87.28,9.15,88.02C9.15,89.8,8.57,90.5,7.23,90.34L6.34,90.22L7.06,90.5L7.78,90.78L6.78,91.04C5.38,91.39,4.57,92.23,4.57,93.33C4.57,93.8,4.55,94.24,4.52,94.31C4.43,94.53,6.46,95.23,7.25,95.26C8.19,95.29,8.31,95.46,8.31,96.85C8.32,97.79,8.25,97.98,7.89,98.07C7.42,98.2,7.44,98.51,7.94,98.82C8.73,99.33,9.54,97.81,9.26,96.32C9.15,95.73,9.2,95.6,9.61,95.44C10.04,95.26,10.04,95.24,9.66,95.23C9.43,95.22,9.12,95.01,8.96,94.75C8.68,94.3,8.69,94.3,9.07,94.62C9.28,94.8,9.83,95.02,10.29,95.1C10.92,95.2,11.05,95.18,10.81,95C10.57,94.83,10.64,94.8,11.12,94.9C12.57,95.18,14.64,93.1,14.13,91.88C13.74,90.93,12.66,90.2,12.17,90.56C11.48,91.06,11.02,90.93,11.02,90.23C11.02,89.73,10.91,89.59,10.45,89.49C9.51,89.28,9.41,89.18,10.24,89.28C10.67,89.33,11.02,89.31,11.02,89.23C11.02,88.88,10.16,85.58,10.01,85.3C9.88,85.06,9.75,85.2,9.49,85.84M10.39,85.16C10.39,85.54,10.9,86.9,11.04,86.9C11.13,86.9,11.06,86.48,10.88,85.96C10.6,85.13,10.39,84.8,10.39,85.16M14.68,86.71C14.57,88.09,14.45,88.49,14.03,88.94C13.42,89.59,13.37,90.18,13.88,90.56C14.35,90.92,14.57,90.93,14.43,90.57C14.37,90.42,14.56,89.84,14.86,89.29C15.24,88.57,15.39,87.98,15.39,87.13C15.39,86.49,15.48,85.83,15.59,85.66C15.71,85.46,15.7,85.3,15.53,85.2C14.96,84.83,14.82,85.08,14.68,86.71M14.14,85.98C14.14,86.27,14.22,86.46,14.32,86.39C14.43,86.33,14.46,86.09,14.41,85.86C14.25,85.29,14.14,85.34,14.14,85.98M30.35,85.66C30.35,85.77,30.02,85.86,29.61,85.86C28.7,85.86,28.84,86.18,29.85,86.37C30.31,86.46,30.7,86.42,30.89,86.27C31.32,85.91,31.25,85.45,30.77,85.45C30.54,85.45,30.35,85.54,30.35,85.66M87.3,85.98C86.98,86.38,87.21,86.57,88.36,86.9C89.67,87.27,89.83,86.88,88.67,86.12C87.81,85.57,87.66,85.55,87.3,85.98M32.7,86.43C33.01,86.48,33.48,86.47,33.73,86.43C33.99,86.38,33.73,86.34,33.16,86.34C32.59,86.34,32.38,86.38,32.7,86.43M85.71,87.16C85.71,87.3,85.63,87.6,85.54,87.81C85.41,88.14,85.44,88.17,85.78,87.99C86,87.88,86.3,87.75,86.46,87.7C86.7,87.63,86.68,87.54,86.39,87.26C85.98,86.84,85.73,86.8,85.71,87.16M8.56,88.01C8.54,88.56,8.42,89.21,8.29,89.46C8.08,89.88,8.09,89.89,8.41,89.59C8.67,89.34,8.74,88.98,8.68,88.13L8.6,87.01L8.56,88.01M87.51,88.33C86.75,88.95,87.2,89.29,88.33,88.94C89.14,88.69,89.53,88.15,88.89,88.15C88.73,88.15,88.47,88.1,88.3,88.04C88.14,87.97,87.79,88.11,87.51,88.33M92.2,88.56C90.77,88.66,90.67,88.7,91.48,88.78C92.73,88.91,94.39,88.78,94.39,88.55C94.39,88.44,94.27,88.38,94.12,88.39C93.98,88.42,93.12,88.49,92.2,88.56M94.7,88.89C93.46,89.23,91.27,89.27,90.18,88.97C88.2,88.42,85.52,90.86,86.34,92.44C86.65,93.02,86.65,93.02,86.54,92.04C86.36,90.46,87.5,89.58,89.65,89.63C90.59,89.65,90.66,89.68,90.12,89.81C89.53,89.96,89.53,89.97,90.02,90.02C90.46,90.06,90.43,90.09,89.79,90.27C88.45,90.62,87.74,91.42,87.66,92.66L87.58,93.75L88.54,94.09C89.07,94.27,89.7,94.5,89.94,94.6C90.22,94.71,90.48,94.68,90.63,94.53C91.02,94.14,91.48,94.93,91.48,95.98C91.48,96.61,91.35,97.01,91.05,97.31C90.7,97.65,90.67,97.8,90.86,98.04C91.56,98.88,92.31,97.75,92.31,95.85L92.31,94.59L93.09,94.57C93.52,94.56,93.69,94.5,93.47,94.45C93.19,94.37,93.36,94.24,94.09,93.98C94.66,93.78,95.29,93.54,95.51,93.45C95.81,93.32,95.87,93.34,95.75,93.54C95.45,94.02,96.4,93.39,96.87,92.8C97.73,91.7,96.87,89.92,95.11,89.18C94.79,89.04,94.85,89.01,95.4,89.04C95.81,89.07,96.15,88.98,96.2,88.82C96.31,88.51,96.04,88.52,94.7,88.89M5.41,89.28C5.41,89.54,6.7,90.02,7.32,90C7.98,89.97,7.98,89.96,7.17,89.83C6.71,89.75,6.13,89.57,5.88,89.43C5.62,89.29,5.41,89.22,5.41,89.28M4.26,89.61C4.12,89.84,4.26,89.88,4.89,89.82C5.17,89.79,5,90.01,4.33,90.54C3.15,91.46,2.79,92.31,3.22,93.11C3.51,93.65,3.52,93.64,3.53,92.61C3.54,91.34,4.04,90.75,5.3,90.49L6.12,90.32L5.37,89.86C4.53,89.34,4.44,89.32,4.26,89.61M87.32,90.85C87.09,91.08,86.9,91.52,86.9,91.82C86.9,92.47,86.9,92.47,87.49,91.32C87.98,90.34,87.94,90.23,87.32,90.85M4.55,91.33C4.09,91.69,3.7,92.48,3.86,92.75C3.94,92.87,4.16,92.6,4.37,92.14C4.57,91.69,4.87,91.27,5.02,91.2C5.18,91.14,5.21,91.09,5.09,91.08C4.98,91.08,4.74,91.19,4.55,91.33M97.71,91.87C97.71,93.3,96.42,94.34,93.82,95.01C92.96,95.23,92.93,95.27,92.93,96.04C92.93,97.03,92.63,97.88,92.06,98.48C91.64,98.93,91.64,98.97,91.98,99.49C92.62,100.46,93.55,99.11,93.55,97.21C93.55,96.12,93.59,96.05,94.12,95.94C97.71,95.22,99.68,93.19,98.13,91.79C97.73,91.42,97.71,91.43,97.71,91.87M14.69,92.61C14.62,92.8,14.55,93.14,14.55,93.34C14.55,94.19,11.73,95.84,10.29,95.84C9.81,95.84,9.77,95.91,9.77,96.89C9.77,97.94,9.14,99.59,8.73,99.59C8.62,99.59,8.52,99.68,8.52,99.79C8.52,100.08,10.13,100.05,10.31,99.76C10.39,99.62,10.48,98.9,10.49,98.15L10.52,96.79L11.66,96.56C14.58,95.96,16.32,94.08,15.21,92.71C14.87,92.29,14.82,92.28,14.69,92.61M96.15,92.72C95.77,93.15,95.97,93.3,96.43,92.93C96.61,92.78,96.62,92.79,96.46,92.98C96.34,93.12,96.03,93.25,95.78,93.27C95.53,93.28,94.9,93.35,94.39,93.43L93.45,93.56L94.42,93.29C94.96,93.13,95.61,92.85,95.88,92.67C96.53,92.21,96.6,92.23,96.15,92.72M13.1,93.45C12.79,93.82,13.11,93.88,13.47,93.51C13.61,93.38,13.72,93.33,13.72,93.41C13.72,93.61,11.84,94.8,11.55,94.79C11.43,94.79,11.69,94.59,12.13,94.36C12.57,94.13,12.88,93.89,12.82,93.84C12.77,93.78,12.52,93.84,12.27,93.97C12.03,94.1,11.62,94.16,11.37,94.12C10.95,94.04,10.96,94.02,11.43,94C11.72,93.98,12.23,93.79,12.58,93.57C13.35,93.07,13.43,93.06,13.1,93.45M88.75,95.07C89.05,95.46,89.81,95.56,89.81,95.22C89.81,95.11,89.68,95.01,89.52,95.01C89.36,95.01,89.05,94.95,88.84,94.87C88.51,94.74,88.5,94.77,88.75,95.07M90.66,95.95C90.67,96.67,90.7,96.72,90.89,96.33C91.04,96.02,91.04,95.77,90.88,95.5C90.7,95.18,90.66,95.25,90.66,95.95M5.82,95.83C6.64,96.29,6.86,96.34,6.86,96.06C6.86,95.88,6.49,95.73,5.51,95.51C5.28,95.45,5.42,95.6,5.82,95.83M7.61,96.37C7.53,96.66,7.57,97.06,7.68,97.25C7.84,97.53,7.89,97.41,7.89,96.73C7.9,95.72,7.8,95.6,7.61,96.37 + M46.16,0.43C45.23,0.49,41.86,0.75,40.93,0.84C40.44,0.88,39.61,0.98,39.07,1.06C38.54,1.14,37.83,1.25,37.5,1.3C36.88,1.39,36.21,1.51,35.42,1.65C34.76,1.77,33.25,2.12,32.91,2.22C32.75,2.27,32.55,2.32,32.47,2.32C32.38,2.32,32.24,2.35,32.15,2.4C32.06,2.45,31.67,2.55,31.27,2.64C30.88,2.73,30.53,2.84,30.5,2.88C30.48,2.93,30.35,2.96,30.23,2.96C30.1,2.96,29.93,3,29.84,3.04C29.75,3.09,29.43,3.2,29.12,3.29C28.82,3.38,28.18,3.59,27.71,3.76C27.23,3.93,26.8,4.07,26.75,4.07C26.69,4.07,26.52,4.13,26.36,4.2C25.52,4.57,24.84,4.82,24.7,4.82C24.62,4.82,24.52,4.86,24.49,4.91C24.46,4.96,24.35,5,24.25,5C24.15,5,24.04,5.06,24.02,5.14C23.98,5.21,23.86,5.28,23.74,5.28C23.62,5.28,23.52,5.32,23.52,5.37C23.52,5.42,23.43,5.46,23.33,5.46C23.23,5.46,23.12,5.53,23.09,5.6C23.06,5.68,22.97,5.74,22.88,5.75C22.8,5.75,22.61,5.83,22.45,5.93C22.3,6.02,22.03,6.18,21.85,6.27C21.67,6.35,21.51,6.45,21.48,6.48C21.46,6.5,21.27,6.61,21.07,6.71C20.86,6.81,20.45,7.04,20.14,7.22C19.83,7.4,19.43,7.62,19.23,7.72C19.04,7.82,18.89,7.93,18.89,7.98C18.89,8.02,18.84,8.05,18.78,8.05C18.63,8.05,17.5,8.8,17.5,8.9C17.5,8.95,17.45,8.98,17.4,8.98C17.34,8.98,17.16,9.1,16.99,9.23C16.82,9.38,16.43,9.7,16.1,9.95C15.77,10.21,15.43,10.49,15.32,10.59C15.22,10.68,14.9,10.95,14.61,11.17C14.31,11.4,14.07,11.62,14.07,11.66C14.07,11.7,13.97,11.79,13.84,11.85C13.71,11.92,13.61,12,13.61,12.04C13.61,12.08,13.14,12.58,12.57,13.16C11.99,13.74,11.41,14.36,11.28,14.54C11.14,14.71,10.92,14.99,10.77,15.14C10.63,15.3,10.41,15.58,10.28,15.77C10.15,15.96,10.02,16.11,9.98,16.11C9.94,16.11,9.91,16.17,9.91,16.25C9.91,16.33,9.88,16.39,9.84,16.39C9.79,16.39,9.69,16.5,9.61,16.64C9.52,16.79,9.36,17,9.24,17.13C9.12,17.26,8.9,17.56,8.75,17.8C8.6,18.04,8.45,18.24,8.41,18.24C8.38,18.24,8.33,18.34,8.3,18.47C8.26,18.6,8.2,18.7,8.15,18.7C8.1,18.7,8.05,18.74,8.05,18.79C8.05,18.84,7.94,19.06,7.79,19.28C7.64,19.5,7.37,19.97,7.18,20.32C6.98,20.68,6.73,21.12,6.62,21.3C6.51,21.47,6.34,21.8,6.25,22.02C6.15,22.23,6.04,22.41,6,22.41C5.96,22.41,5.93,22.48,5.93,22.56C5.93,22.64,5.83,22.84,5.71,23C5.6,23.16,5.46,23.39,5.4,23.52C5.34,23.64,5.19,23.98,5.06,24.26C4.93,24.54,4.76,24.98,4.67,25.23C4.58,25.48,4.47,25.73,4.43,25.78C4.39,25.83,4.35,25.96,4.35,26.07C4.35,26.17,4.32,26.3,4.27,26.35C4.23,26.39,4.12,26.68,4.02,26.99C3.93,27.3,3.83,27.59,3.79,27.64C3.76,27.69,3.66,27.96,3.57,28.24C3.47,28.52,3.34,28.91,3.27,29.1C3.2,29.29,3.15,29.53,3.15,29.63C3.15,29.73,3.11,29.82,3.05,29.82C3,29.82,2.96,29.94,2.96,30.09C2.96,30.24,2.92,30.38,2.88,30.41C2.83,30.44,2.76,30.65,2.73,30.88C2.69,31.11,2.63,31.32,2.58,31.35C2.54,31.38,2.5,31.54,2.5,31.7C2.5,31.86,2.46,32.04,2.43,32.09C2.38,32.14,2.3,32.41,2.23,32.68C2.17,32.96,2.08,33.36,2.04,33.57C1.87,34.28,1.68,35.14,1.58,35.67C1.35,36.88,1.29,37.23,1.16,38.24C1.07,38.83,0.97,39.52,0.93,39.77C0.88,40.02,0.82,40.54,0.79,40.93C0.77,41.31,0.68,42.45,0.59,43.47C0.35,46.14,0.35,53.59,0.59,56.3C0.68,57.34,0.79,58.59,0.83,59.07C0.88,59.56,0.98,60.39,1.06,60.93C1.14,61.46,1.25,62.17,1.3,62.5C1.43,63.48,1.67,64.74,1.89,65.7C1.97,66.05,2.08,66.53,2.13,66.76C2.18,66.99,2.26,67.32,2.31,67.5C2.36,67.68,2.48,68.18,2.59,68.61C2.7,69.04,2.83,69.44,2.88,69.48C2.93,69.54,2.96,69.66,2.96,69.75C2.96,69.95,3.29,70.98,3.76,72.29C3.93,72.77,4.07,73.2,4.07,73.25C4.07,73.31,4.13,73.48,4.2,73.64C4.28,73.8,4.41,74.14,4.5,74.4C4.59,74.65,4.7,74.9,4.74,74.95C4.78,75,4.82,75.13,4.82,75.25C4.82,75.36,4.86,75.48,4.91,75.51C4.96,75.54,5,75.65,5,75.75C5,75.85,5.06,75.96,5.14,75.98C5.21,76.02,5.28,76.14,5.28,76.26C5.28,76.38,5.32,76.48,5.37,76.48C5.42,76.48,5.46,76.57,5.46,76.67C5.46,76.77,5.53,76.88,5.6,76.91C5.68,76.94,5.74,77.03,5.75,77.12C5.75,77.2,5.83,77.39,5.93,77.55C6.02,77.7,6.2,78.01,6.32,78.24C6.65,78.88,7.13,79.73,7.38,80.11C7.5,80.3,7.59,80.49,7.59,80.52C7.59,80.65,8.81,82.5,8.9,82.5C8.94,82.5,8.98,82.55,8.98,82.62C8.98,82.69,9.1,82.88,9.23,83.04C9.38,83.2,9.7,83.59,9.95,83.91C10.21,84.23,10.43,84.51,10.46,84.54C10.49,84.56,10.7,84.81,10.92,85.09C11.69,86.05,13.74,88.11,14.67,88.84C14.86,89,15.11,89.2,15.22,89.3C15.34,89.41,15.58,89.59,15.77,89.72C15.96,89.85,16.11,89.98,16.11,90.02C16.11,90.06,16.17,90.09,16.25,90.09C16.33,90.09,16.39,90.13,16.39,90.18C16.39,90.23,16.5,90.33,16.64,90.41C16.79,90.48,17,90.64,17.14,90.77C17.27,90.89,17.56,91.11,17.78,91.25C18.01,91.39,18.25,91.57,18.32,91.63C18.38,91.7,18.5,91.76,18.56,91.76C18.63,91.76,18.7,91.79,18.72,91.84C18.77,91.95,21.25,93.39,22.73,94.16C22.93,94.27,23.23,94.44,23.38,94.54C23.53,94.63,23.73,94.71,23.82,94.71C23.91,94.72,23.98,94.76,23.98,94.81C23.98,94.86,24.07,94.92,24.19,94.95C24.3,94.98,24.48,95.05,24.58,95.09C24.68,95.14,24.98,95.24,25.23,95.33C25.48,95.42,25.73,95.53,25.78,95.57C25.83,95.61,25.94,95.65,26.03,95.65C26.12,95.65,26.31,95.71,26.45,95.78C26.71,95.91,27.16,96.07,28.2,96.41C28.5,96.51,28.89,96.65,29.05,96.72C29.22,96.79,29.44,96.85,29.54,96.85C29.63,96.85,29.74,96.89,29.77,96.95C29.8,97,29.93,97.04,30.05,97.04C30.18,97.04,30.35,97.07,30.44,97.12C30.71,97.27,31.55,97.5,31.79,97.5C31.92,97.5,32.05,97.54,32.08,97.58C32.11,97.63,32.24,97.68,32.38,97.71C32.52,97.73,33.22,97.88,33.93,98.04C34.65,98.2,35.45,98.38,35.72,98.43C36.69,98.61,37.18,98.7,37.55,98.75C37.75,98.78,38.33,98.87,38.84,98.95C40.09,99.13,40.54,99.18,44.49,99.5C46.86,99.69,53.84,99.64,56.48,99.41C59.71,99.12,60.04,99.09,61.02,98.94C61.55,98.86,62.26,98.75,62.59,98.7C63.23,98.6,63.91,98.49,64.68,98.35C65.14,98.26,67,97.83,67.59,97.67C67.77,97.62,68.06,97.55,68.24,97.5C69.02,97.33,69.45,97.2,69.5,97.12C69.53,97.07,69.64,97.04,69.75,97.04C69.94,97.04,70.27,96.95,70.93,96.71C71.43,96.54,72.4,96.21,72.92,96.05C73.17,95.98,73.5,95.86,73.66,95.79C73.81,95.72,74.14,95.59,74.4,95.5C74.65,95.41,74.9,95.3,74.95,95.26C75,95.22,75.15,95.18,75.3,95.18C75.44,95.18,75.55,95.14,75.55,95.09C75.55,95.04,75.63,95,75.73,95C75.82,95,75.95,94.94,76.02,94.86C76.08,94.79,76.21,94.72,76.31,94.72C76.4,94.72,76.48,94.68,76.48,94.63C76.48,94.58,76.57,94.54,76.67,94.54C76.77,94.54,76.88,94.47,76.91,94.4C76.94,94.32,77.02,94.26,77.08,94.26C77.2,94.26,77.79,93.99,77.87,93.89C77.89,93.87,78.06,93.77,78.24,93.68C78.42,93.6,78.86,93.36,79.21,93.16C79.57,92.96,80.07,92.68,80.32,92.54C81.04,92.16,83.15,90.73,83.15,90.64C83.15,90.59,83.21,90.55,83.28,90.55C83.35,90.55,83.43,90.52,83.44,90.48C83.46,90.44,83.66,90.27,83.89,90.09C84.11,89.91,84.35,89.73,84.41,89.68C84.46,89.62,84.67,89.46,84.86,89.3C85.94,88.45,88.68,85.68,89.05,85.07C89.14,84.93,89.23,84.82,89.27,84.82C89.3,84.82,89.46,84.61,89.64,84.35C89.81,84.1,89.98,83.89,90.02,83.89C90.06,83.89,90.09,83.85,90.09,83.8C90.09,83.7,90.18,83.59,90.61,83.11C90.73,82.97,90.83,82.82,90.83,82.77C90.83,82.73,90.87,82.68,90.91,82.68C90.95,82.68,91.07,82.54,91.16,82.36C91.26,82.18,91.37,82.04,91.41,82.04C91.45,82.04,91.48,81.98,91.48,81.91C91.48,81.83,91.52,81.76,91.56,81.74C91.63,81.71,92.51,80.27,93.15,79.12C93.77,78,93.98,77.63,94.16,77.27C94.27,77.07,94.44,76.77,94.54,76.62C94.63,76.47,94.71,76.27,94.71,76.18C94.72,76.09,94.76,76.02,94.81,76.02C94.86,76.02,94.92,75.93,94.95,75.81C94.98,75.7,95.05,75.52,95.09,75.42C95.13,75.32,95.23,75.04,95.32,74.82C95.41,74.59,95.52,74.32,95.56,74.21C95.6,74.11,95.7,73.88,95.78,73.69C95.86,73.5,95.93,73.27,95.93,73.17C95.93,73.07,95.95,72.96,95.99,72.93C96.06,72.86,96.24,72.39,96.45,71.71C96.53,71.46,96.65,71.11,96.72,70.95C96.79,70.78,96.85,70.56,96.85,70.46C96.85,70.37,96.89,70.26,96.95,70.23C97,70.2,97.04,70.06,97.04,69.92C97.04,69.78,97.08,69.63,97.12,69.58C97.22,69.48,97.4,68.82,97.47,68.31C97.5,68.12,97.56,67.96,97.6,67.96C97.65,67.96,97.68,67.87,97.68,67.76C97.68,67.65,97.73,67.43,97.78,67.27C97.88,66.94,98.23,65.42,98.35,64.77C98.56,63.59,98.64,63.12,98.93,61.25C99.12,60.05,99.16,59.65,99.5,55.51C99.69,53.18,99.63,46.08,99.41,43.52C99.32,42.58,99.21,41.39,99.17,40.88C99.12,40.37,99.02,39.52,98.93,38.98C98.85,38.45,98.75,37.76,98.7,37.45C98.62,36.94,98.54,36.44,98.38,35.51C98.35,35.3,98.21,34.7,98.09,34.17C97.96,33.63,97.82,33.01,97.77,32.78C97.71,32.55,97.63,32.28,97.59,32.18C97.55,32.07,97.45,31.67,97.36,31.27C97.27,30.88,97.16,30.53,97.12,30.5C97.07,30.48,97.04,30.35,97.04,30.23C97.04,30.1,97,29.93,96.96,29.84C96.91,29.75,96.8,29.43,96.71,29.12C96.62,28.82,96.47,28.34,96.37,28.05C96.27,27.78,96.13,27.34,96.05,27.08C95.97,26.83,95.86,26.5,95.79,26.34C95.72,26.19,95.59,25.86,95.5,25.6C95.41,25.35,95.3,25.1,95.26,25.05C95.22,25,95.18,24.87,95.18,24.75C95.18,24.64,95.14,24.52,95.09,24.49C95.04,24.46,95,24.36,95,24.27C95,24.17,94.94,24.05,94.86,23.98C94.79,23.92,94.72,23.79,94.72,23.69C94.72,23.6,94.68,23.52,94.63,23.52C94.58,23.52,94.54,23.43,94.54,23.33C94.54,23.23,94.47,23.12,94.4,23.09C94.32,23.06,94.26,22.97,94.25,22.88C94.25,22.8,94.17,22.61,94.07,22.45C93.98,22.3,93.8,21.99,93.68,21.76C93.56,21.53,93.34,21.13,93.2,20.88C93.06,20.62,92.79,20.14,92.61,19.82C92.11,18.91,91.2,17.5,91.1,17.5C91.05,17.5,91.02,17.45,91.02,17.38C91.02,17.31,90.9,17.12,90.77,16.96C90.62,16.8,90.3,16.41,90.05,16.09C89.79,15.77,89.56,15.49,89.53,15.46C89.5,15.44,89.28,15.17,89.03,14.86C88.24,13.88,86.24,11.87,85.46,11.28C85.29,11.14,85.01,10.92,84.86,10.77C84.7,10.63,84.42,10.41,84.23,10.28C84.04,10.15,83.89,10.02,83.89,9.98C83.89,9.94,83.83,9.91,83.75,9.91C83.67,9.91,83.61,9.88,83.61,9.84C83.61,9.79,83.5,9.69,83.36,9.61C83.21,9.52,82.96,9.32,82.79,9.17C82.61,9.01,82.31,8.79,82.11,8.68C81.92,8.57,81.76,8.45,81.76,8.42C81.76,8.38,81.66,8.33,81.53,8.3C81.4,8.26,81.3,8.2,81.3,8.15C81.3,8.1,81.26,8.05,81.21,8.05C81.16,8.05,80.94,7.94,80.72,7.79C80.5,7.64,80.03,7.37,79.68,7.18C79.32,6.98,78.88,6.73,78.7,6.62C78.53,6.52,78.23,6.35,78.05,6.26C77.88,6.17,77.52,5.98,77.27,5.84C77.02,5.69,76.7,5.52,76.57,5.46C76.45,5.41,76.09,5.24,75.79,5.09C75.48,4.95,75.02,4.76,74.77,4.67C74.52,4.58,74.27,4.47,74.22,4.43C74.17,4.39,74.04,4.35,73.92,4.35C73.81,4.35,73.69,4.32,73.66,4.27C73.64,4.22,73.5,4.16,73.36,4.12C73.21,4.09,72.73,3.93,72.27,3.76C71.81,3.59,71.18,3.37,70.88,3.28C70.57,3.19,70.29,3.08,70.23,3.04C70.19,3,70.01,2.96,69.84,2.96C69.68,2.96,69.54,2.93,69.54,2.89C69.54,2.81,68.93,2.62,68.38,2.54C68.23,2.51,68.02,2.45,67.92,2.41C67.73,2.33,67.45,2.26,66.25,1.99C65.89,1.91,65.43,1.81,65.23,1.76C64.46,1.59,63.92,1.49,62.68,1.3C62.36,1.25,61.67,1.14,61.16,1.07C60.15,0.91,59.33,0.82,56.57,0.6C54.86,0.46,47.56,0.34,46.16,0.43 false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS5/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS5/res/values/config.xml index 6075b8840..6d271e834 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS5/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS5/res/values/config.xml @@ -1,5 +1,5 @@ - M50,0 C77.6,0 100,22.4 100,50 L100,88 C100,94.6 94.6,100 88,100 L50,100 C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0 Z + M8.66,1.41C8.83,2.82,8.55,3.27,7.5,3.29C4.13,3.34,3.79,6.6,7.07,7.48C7.66,7.64,7.88,7.79,7.7,7.89C7.49,8.03,7.49,8.08,7.72,8.19C7.88,8.26,7.44,8.26,6.76,8.19C4.41,7.96,3.63,7.33,3.78,5.79C3.85,5.07,3.82,5.01,3.59,5.33C2.61,6.67,5.84,9.68,7.29,8.77C7.78,8.46,9.4,8.45,10.46,8.75C12.59,9.34,15.4,6.65,14.25,5.13C13.88,4.63,12.66,3.74,12.38,3.75C12.26,3.75,12.39,3.89,12.68,4.05C13.39,4.46,13.18,4.44,11.97,3.98C11.36,3.75,11.07,3.54,11.25,3.47C11.41,3.41,11.21,3.4,10.81,3.46C10.26,3.54,10.16,3.52,10.39,3.35C10.65,3.17,10.6,3.12,10.14,3.12C9.6,3.12,9.58,3.08,9.52,1.82C9.46,0.66,9.41,0.51,9,0.45C8.57,0.39,8.55,0.45,8.66,1.41M87.95,0.62C86.81,1.34,88.07,3.68,89.86,4.18C90.35,4.31,90.63,4.46,90.49,4.52C90.34,4.57,90.29,4.71,90.36,4.83C90.46,4.98,90.22,5.02,89.63,4.94L88.76,4.82L89.44,5.6C89.82,6.03,90.2,6.33,90.3,6.28C90.4,6.23,90.37,6.12,90.23,6.03C89.96,5.86,89.91,5.88,93.66,5.11C97.47,4.32,98.4,2.91,96.27,1.14C96,0.91,95.85,0.86,95.94,1.02C96.05,1.21,96.02,1.27,95.82,1.2C95.66,1.14,95.55,0.99,95.58,0.86C95.61,0.73,95.48,0.7,95.29,0.77C95.1,0.84,95,0.82,95.06,0.71C95.25,0.39,92.54,0.35,92.15,0.66C91.9,0.86,91.86,0.87,91.97,0.68C92.16,0.36,88.44,0.3,87.95,0.62M10.2,1.71C10.19,2.46,10.27,2.7,10.5,2.7C10.89,2.7,10.89,1.94,10.5,1.25C10.21,0.74,10.2,0.75,10.2,1.71M95.47,1.28C95.66,1.38,95.9,1.44,95.99,1.41C96.08,1.38,96.15,1.41,96.15,1.48C96.15,1.54,96.29,1.77,96.46,1.99C96.73,2.32,96.69,2.31,96.15,1.94C95.81,1.7,95.13,1.39,94.64,1.26C94.16,1.13,93.76,0.98,93.76,0.93C93.76,0.8,95.05,1.06,95.47,1.28M7.9,1.73C7.9,2.2,7.98,2.47,8.11,2.39C8.37,2.23,8.37,1.65,8.11,1.25C7.96,1.02,7.91,1.14,7.9,1.73M86.29,2.07C85.94,2.71,86.04,3.27,86.61,3.89L87.14,4.47L86.79,3.9C86.57,3.54,86.47,3.03,86.52,2.5C86.61,1.55,86.59,1.5,86.29,2.07M86.9,2.6C86.9,3.12,87.28,3.71,87.77,3.97L88.22,4.21L87.77,3.64C87.52,3.32,87.32,2.94,87.32,2.79C87.32,2.64,87.22,2.46,87.11,2.39C87,2.32,86.9,2.41,86.9,2.6M97.71,3.04C97.7,3.37,97.57,3.82,97.4,4.04C97.13,4.39,97.15,4.46,97.64,4.71C98.36,5.09,98.57,4.9,98.51,3.93C98.45,2.88,97.72,2.07,97.71,3.04M9.67,3.74C9.46,3.97,9.24,4.12,9.19,4.06C9.05,3.92,9.57,3.33,9.83,3.33C9.95,3.33,9.88,3.52,9.67,3.74M12.98,4.69C13.29,4.82,13.34,4.79,13.2,4.56C13.1,4.38,13.11,4.33,13.22,4.43C13.32,4.53,13.41,4.67,13.41,4.75C13.41,4.82,13.5,5.03,13.61,5.2C13.77,5.46,13.75,5.46,13.48,5.25C13.3,5.11,12.79,4.85,12.35,4.68C11.87,4.49,11.75,4.39,12.06,4.44C12.34,4.48,12.76,4.59,12.98,4.69M96.46,5.22L95.74,5.35L96.57,5.4C97.36,5.45,97.34,5.46,96.22,5.63C93.2,6.07,91.29,6.66,90.84,7.29C90.3,8.05,90,8.06,89.56,7.33C89.38,7.02,88.84,6.39,88.38,5.95L87.54,5.13L86.69,5.99C85.39,7.29,85.55,7.78,87.32,7.86C88.06,7.89,88.75,8,88.84,8.09C89.21,8.46,90.95,8.07,91.59,7.46C92.37,6.73,92.65,6.72,94.34,7.39C95.07,7.69,96.09,7.97,96.59,8.02L97.5,8.1L97.5,7.11C97.5,6.56,97.62,5.98,97.77,5.82C97.97,5.59,97.94,5.59,97.62,5.83C97.27,6.1,97.23,6.1,97.34,5.8C97.54,5.27,97.25,5.07,96.46,5.22M94.18,5.41C94.18,5.52,94.44,5.61,94.75,5.61C95.2,5.61,95.25,5.56,95.01,5.41C94.61,5.14,94.18,5.14,94.18,5.41M92.52,5.73L91.58,6.02L92.62,5.9C93.19,5.84,93.75,5.7,93.86,5.6C94.13,5.34,93.66,5.38,92.52,5.73M4.16,5.93C4.16,6.44,4.54,7.03,5.03,7.3L5.48,7.54L5.03,6.96C4.78,6.65,4.57,6.27,4.57,6.12C4.57,5.97,4.48,5.79,4.37,5.72C4.25,5.65,4.16,5.74,4.16,5.93M14.97,6.34C14.97,6.66,14.72,7.25,14.42,7.64C13.7,8.59,13.61,9.86,14.24,10.15C14.64,10.33,14.68,10.3,14.6,9.77C14.54,9.38,14.64,9.11,14.91,8.91C15.84,8.26,16.06,6.75,15.34,6.09C14.99,5.78,14.97,5.79,14.97,6.34M97.8,6.74C97.73,7.02,97.77,7.42,97.89,7.62C98.08,7.93,98.12,7.84,98.12,7.12C98.13,6.14,98,5.98,97.8,6.74M98.39,7.57C98.42,8.16,98.55,8.63,98.7,8.68C99.08,8.8,99.04,7.45,98.65,6.95C98.36,6.58,98.34,6.62,98.39,7.57M92.23,8.29C91.91,8.64,91.91,8.73,92.21,9.45C92.39,9.88,92.5,10.32,92.46,10.45C92.43,10.57,92.28,10.28,92.13,9.8C91.88,8.95,91.62,8.74,91.37,9.15C91.3,9.26,90.9,9.36,90.48,9.36C90.05,9.37,89.53,9.51,89.3,9.68C88.75,10.09,88.63,10.06,88.48,9.46C88.37,9.01,88.23,8.94,87.46,8.94C85.72,8.94,85.82,8.21,86.02,19.23C86.61,51.16,86.18,83.04,85.12,85.73C84.92,86.24,85.57,85.92,86.84,84.9L87.71,84.2L88.96,84.98L90.21,85.76L90.22,86.85C90.23,88.03,90.93,88.44,91.48,87.58C91.67,87.27,91.68,87.29,91.57,87.71L91.43,88.21L92.96,88.09C93.8,88.02,94.93,87.81,95.48,87.62C96.51,87.26,96.53,87.23,96.76,85.56C96.83,85.04,97.05,84.59,97.38,84.32L97.89,83.89L97.67,79.12C97.5,75.6,97.51,74.02,97.68,73.07C97.95,71.63,97.99,70.75,97.79,70.96C97.71,71.04,97.58,71.45,97.5,71.88C97.39,72.4,97.34,71.82,97.32,70.11C97.3,68.54,97.38,67.57,97.5,67.57C97.62,67.57,97.7,67.12,97.69,66.58C97.67,65.74,97.64,65.69,97.53,66.21C97.16,67.91,97.05,65.28,96.96,52.95C96.85,38.77,97.03,31.29,97.45,32.22C97.68,32.73,97.69,32.71,97.7,31.96C97.71,31.54,97.62,31.18,97.5,31.18C97.38,31.18,97.31,30.43,97.32,29.26C97.34,28.2,97.39,27.57,97.45,27.86C97.5,28.14,97.62,28.47,97.73,28.57C98,28.86,97.97,28.07,97.68,27.24C97.45,26.57,97.71,19.21,98.08,15.9C98.21,14.75,98.23,14.71,98.35,15.38L98.49,16.11L98.52,15.33C98.53,14.9,98.45,14.55,98.34,14.55C98.1,14.55,98.06,13.05,98.28,12.27L98.43,11.75L98.58,12.37C98.7,12.88,98.71,12.84,98.64,12.16C98.38,9.5,98.27,9.4,94.9,8.42C92.74,7.8,92.68,7.79,92.23,8.29M87.37,8.46C87.57,8.51,87.9,8.51,88.1,8.46C88.3,8.41,88.13,8.36,87.73,8.36C87.33,8.36,87.17,8.41,87.37,8.46M4.55,8.86C4.22,9.26,4.84,9.46,5.64,9.23L6.27,9.04L5.52,8.82C4.94,8.63,4.73,8.64,4.55,8.86M12.31,8.8L11.63,9.05L12.3,9.3C13.03,9.58,13.72,9.24,13.42,8.75C13.25,8.48,13.19,8.48,12.31,8.8M10.14,9.26C10.74,9.43,11.51,9.7,11.84,9.87C12.57,10.25,12.68,10.26,12.68,9.97C12.68,9.85,12.59,9.8,12.47,9.88C12.36,9.95,12.27,9.92,12.27,9.81C12.27,9.6,10.08,8.93,9.45,8.95C9.23,8.96,9.54,9.1,10.14,9.26M6.27,9.95C6.87,10.43,7.07,10.5,7.07,10.21C7.07,10.11,6.91,9.97,6.7,9.9C6.5,9.83,6.2,9.71,6.03,9.64C5.86,9.57,5.96,9.71,6.27,9.95M7.39,10.49L6.8,11.32L6.49,10.86C6.07,10.22,5.23,10.23,5.33,10.86C5.42,11.4,3.9,13.22,3.54,13C3.42,12.93,3.32,12.52,3.32,12.1C3.32,11.11,2.93,9.67,2.72,9.9C2.63,10,2.63,11.07,2.72,12.27C3.5,22.89,4.05,62.76,3.53,70.79C3.13,76.88,2.5,82.93,1.96,85.68C1.67,87.18,1.46,88.42,1.5,88.43C1.53,88.45,1.87,88.63,2.24,88.84L2.93,89.22L3.65,88.58C4.45,87.88,4.94,87.77,5.12,88.26C5.29,88.68,6.7,89.4,7.35,89.4C7.95,89.4,8.11,89.07,8.11,87.75C8.11,85.65,9.32,83.21,10.12,83.7C10.61,84,11.13,85.41,11.61,87.76L11.98,89.64L13.76,87.53L13.96,84.57C14.18,81.53,14.09,74.45,13.7,61.02C13.32,48.18,13.69,13.58,14.23,11.89C14.48,11.11,11.23,9.73,9.03,9.68C8.04,9.66,7.95,9.7,7.39,10.49M12.89,10.13C12.89,10.22,13.08,10.41,13.3,10.55C13.54,10.7,13.72,10.72,13.72,10.61C13.72,10.5,13.54,10.31,13.3,10.19C13.08,10.07,12.89,10.04,12.89,10.13M99.31,11.02C99.14,11.85,98.37,25.48,98.08,32.64C97.61,44.32,97.8,62.22,98.57,79.49L98.8,84.65L98.19,85.21C97.71,85.66,97.54,86.02,97.44,86.88C97.37,87.49,97.18,88.1,97.02,88.23C96.46,88.67,96.45,89.47,96.99,89.87L97.48,90.23L97.41,89.61C97.36,89.2,97.44,88.92,97.65,88.8C97.85,88.7,98.05,88.13,98.16,87.4C98.27,86.64,98.48,86.09,98.69,85.96C99.4,85.53,99.85,84.98,99.61,84.84C99.05,84.5,98.44,65.79,98.44,49.38C98.44,36.11,98.5,34.13,99.3,21.93C99.48,19.07,99.64,16.05,99.63,15.23C99.63,14.39,99.71,13.66,99.82,13.6C100.1,13.43,100.04,11.98,99.71,11.2C99.42,10.52,99.41,10.51,99.31,11.02M79.2,11.55C79.04,11.74,78.55,11.85,77.83,11.85L76.71,11.85L76.08,13.2C75.32,14.8,75.21,14.82,73.52,13.75C71.48,12.48,68.4,12.19,68.4,13.28C68.4,13.94,67.38,13.96,65.65,13.32C63.97,12.71,63.85,12.69,63.14,12.99C62.72,13.16,61.83,13.3,61.15,13.3L59.91,13.3L58.95,14.97C57.8,16.97,57.8,16.97,56.82,15.28C56.31,14.39,55.98,14,55.84,14.14C55.49,14.49,55.01,14.38,52.68,13.41L50.41,12.48L48.48,13.12C46.58,13.75,46.55,13.77,46.67,14.34C46.82,15,45.84,16.82,45.34,16.83C45.18,16.84,44.66,16.42,44.2,15.9L43.35,14.97L39.88,14.83L36.42,14.7L36.2,15.51C36.07,15.96,35.84,16.78,35.69,17.35C35.29,18.81,35.13,18.73,34.16,16.63C33.14,14.41,33.18,14.43,29.6,14.09L27.02,13.85L26.25,14.58C24.56,16.15,24.22,16.12,24.58,14.42C24.83,13.26,24.82,13.26,23.69,13.6C23.18,13.75,22.45,13.83,22.07,13.77C21.54,13.69,21.26,13.79,20.83,14.19C19.99,14.97,19.47,15.18,18.32,15.18C17.21,15.18,15.28,14.48,15.48,14.15C15.55,14.04,15.42,13.85,15.2,13.73C14.71,13.47,14.54,13.46,14.59,13.67C14.61,13.75,14.57,15.84,14.49,18.3C14.2,27.89,14.11,51.86,14.35,57.8C14.48,61.05,14.66,68.25,14.73,73.8L14.86,83.87L15.77,84.13C16.61,84.38,16.85,84.35,18.82,83.75L20.95,83.09L21.59,83.56C22.05,83.88,22.25,83.94,22.26,83.75C22.27,83.59,22.31,83.24,22.35,82.95C22.39,82.67,22.48,81.89,22.56,81.24C22.67,80.26,22.76,80.04,23.08,80.04C23.54,80.04,23.6,80.23,23.93,82.54C24.07,83.51,24.21,84.34,24.25,84.38C24.28,84.42,24.78,84.16,25.36,83.81C26.68,82.99,26.85,83,27.58,83.88C28.71,85.25,29.47,85.04,30.16,83.16C30.93,81.02,31.47,80.96,31.56,83L31.62,84.41L32.35,84.41C33.12,84.41,33.97,84.03,35.71,82.89C36.64,82.28,37.04,82.16,38.51,82.04C40.03,81.91,40.3,81.82,40.86,81.28C41.59,80.57,42,80.5,42,81.07C42,81.79,42.57,82.12,43.83,82.12C44.87,82.12,45.12,82.21,45.93,82.86C46.78,83.53,46.96,83.59,48.02,83.53L49.17,83.47L49.36,81.65C49.59,79.42,49.8,79.37,50.73,81.31C51.61,83.11,51.48,83.03,52.86,82.55C55.01,81.81,57.38,81.77,58.41,82.45L59.28,83.03L60.41,82.47C61.71,81.83,62.12,81.79,62.7,82.22C63.34,82.71,63.68,82.62,63.53,82.01C63.24,80.86,64.38,78.48,65.21,78.48C65.93,78.48,68.82,81.37,68.82,82.09C68.82,82.73,69.78,82.95,72.61,82.95L73.6,82.95L73.6,81.31C73.6,80,73.66,79.64,73.93,79.54C74.43,79.35,74.52,79.48,75.05,81.17C75.62,83,75.57,82.98,77.9,82.21C80.28,81.43,82.66,81.3,83.79,81.89C84.27,82.14,84.7,82.32,84.73,82.28C85.6,81.41,85.56,14.76,84.7,14.76C84.54,14.76,84.41,14.67,84.41,14.56C84.41,14.45,84.55,14.41,84.72,14.48C84.98,14.58,85.03,14.35,85.03,13.13C85.03,11.33,84.64,11.16,82.68,12.11L81.47,12.7L80.46,11.98C79.6,11.36,79.41,11.29,79.2,11.55M15.1,12.59C15.03,12.77,15.11,12.96,15.29,13.03C15.7,13.18,15.89,13,15.73,12.59C15.57,12.18,15.26,12.18,15.1,12.59M77.29,13.45C77.09,13.5,76.76,13.5,76.56,13.45C76.36,13.4,76.52,13.36,76.92,13.36C77.32,13.36,77.49,13.4,77.29,13.45M79.32,13.73C79.41,13.87,79.25,13.9,78.86,13.8C78.07,13.61,77.99,13.51,78.64,13.51C78.94,13.51,79.25,13.61,79.32,13.73M98.13,18.16C98.13,18.57,98.22,18.92,98.33,18.92C98.45,18.92,98.48,18.63,98.41,18.24C98.23,17.3,98.13,17.27,98.13,18.16M97.92,21.17C97.92,21.65,98.02,22.04,98.14,22.04C98.28,22.04,98.3,21.75,98.21,21.26C98.02,20.18,97.92,20.15,97.92,21.17M85.52,21.93C85.52,22.73,85.55,23.04,85.6,22.61C85.64,22.17,85.64,21.52,85.6,21.15C85.55,20.78,85.52,21.13,85.52,21.93M97.74,24.26C97.72,24.74,97.81,25.19,97.92,25.26C98.16,25.41,98.16,24.93,97.92,24.01C97.77,23.42,97.76,23.44,97.74,24.26M85.73,37.01C85.73,38.55,85.77,39.18,85.81,38.41C85.85,37.64,85.85,36.38,85.81,35.6C85.77,34.83,85.73,35.46,85.73,37.01M97.36,36.49C97.36,37.06,97.4,37.27,97.45,36.95C97.5,36.64,97.49,36.17,97.45,35.91C97.39,35.66,97.36,35.91,97.36,36.49M13.8,40.23C13.8,41.83,13.84,42.46,13.88,41.62C13.91,40.79,13.91,39.48,13.88,38.71C13.84,37.95,13.8,38.63,13.8,40.23M97.12,48.01C97.1,51.48,97.14,54.28,97.2,54.21C97.4,54.02,97.5,45.09,97.32,43.35C97.19,42.12,97.14,43.34,97.12,48.01M13.78,55.3C13.78,55.82,13.82,56.03,13.87,55.77C13.92,55.51,13.92,55.09,13.87,54.83C13.82,54.58,13.78,54.79,13.78,55.3M97.36,60.81C97.36,61.5,97.4,61.75,97.45,61.38C97.5,61,97.49,60.45,97.45,60.13C97.4,59.82,97.36,60.12,97.36,60.81M13.99,61.12C13.99,61.75,14.03,62.01,14.08,61.7C14.12,61.38,14.12,60.87,14.08,60.55C14.03,60.24,13.99,60.49,13.99,61.12M85.74,63.62C85.74,65.62,85.77,66.44,85.81,65.44C85.85,64.44,85.85,62.8,85.81,61.8C85.77,60.8,85.74,61.62,85.74,63.62M14.2,68.09C14.2,68.66,14.24,68.87,14.29,68.55C14.34,68.23,14.33,67.77,14.29,67.51C14.23,67.26,14.2,67.52,14.2,68.09M85.5,75.68C85.5,76.07,85.54,76.24,85.59,76.04C85.64,75.84,85.64,75.51,85.59,75.31C85.54,75.11,85.5,75.28,85.5,75.68M97.87,75.59C97.79,75.68,97.72,76.22,97.73,76.8L97.76,77.86L97.95,76.92C98.15,75.91,98.12,75.34,97.87,75.59M64.78,80.48C64.5,80.95,64.44,81.34,64.54,81.95C64.64,82.6,64.58,82.89,64.23,83.32C63.82,83.84,63.82,83.89,64.17,84.14C64.77,84.59,65.13,84.02,65.12,82.64C65.12,81.7,65.21,81.36,65.62,80.88C66.12,80.29,66.12,80.27,65.72,80.05C65.18,79.76,65.21,79.74,64.78,80.48M97.92,80.8C97.92,81.96,98.02,81.93,98.21,80.72C98.29,80.17,98.26,79.83,98.13,79.83C98.02,79.83,97.92,80.27,97.92,80.8M74.01,80.66C74.01,81.07,74.12,81.29,74.31,81.29C74.56,81.29,74.57,81.17,74.4,80.66C74.28,80.32,74.14,80.04,74.1,80.04C74.05,80.04,74.01,80.32,74.01,80.66M23.03,81.51C22.98,81.86,23.02,82.19,23.11,82.25C23.21,82.3,23.29,82.02,23.29,81.61C23.29,80.71,23.16,80.65,23.03,81.51M30.9,82.5C30.8,82.77,30.79,83.04,30.86,83.11C31.07,83.32,31.22,83,31.14,82.5L31.07,82.02L30.9,82.5M41.02,82.77C40.91,82.88,39.99,83.06,38.97,83.17C37.81,83.3,36.89,83.53,36.49,83.79C35.25,84.57,33.77,85.31,33.18,85.43C32.2,85.64,32.26,86.07,33.25,86.07C34.31,86.07,35.17,85.72,36.74,84.65C37.85,83.9,38.12,83.82,39.76,83.68C41.65,83.52,42.27,83.22,41.6,82.8C41.36,82.65,41.14,82.64,41.02,82.77M80.04,82.85C78.3,83.2,76.26,83.97,76.41,84.21C76.61,84.54,77.46,84.43,79.1,83.88C79.96,83.59,81.35,83.29,82.18,83.2L83.68,83.03L82.85,82.79C81.86,82.49,81.79,82.5,80.04,82.85M50.11,83.63L50.11,84.62L48.6,84.62C47.19,84.62,47.13,84.63,47.56,84.94C49.21,86.09,51.31,84.84,50.44,83.22L50.12,82.64L50.11,83.63M55.2,83.27C53.34,83.57,52.18,83.93,52.18,84.23C52.18,84.64,52.86,84.64,54.11,84.23C54.82,83.99,55.96,83.74,56.65,83.66C57.78,83.55,57.85,83.51,57.49,83.24C57.27,83.08,57.04,82.96,56.98,82.97C56.91,82.98,56.11,83.12,55.2,83.27M43.24,83.35C43.24,83.6,43.78,83.79,44.53,83.79C45.07,83.79,45.12,83.74,44.91,83.47C44.63,83.14,43.24,83.04,43.24,83.35M60.66,83.64C59.59,84.14,59.48,84.3,60.03,84.58C60.29,84.71,60.75,84.6,61.61,84.19C62.71,83.66,62.78,83.59,62.4,83.39C61.87,83.1,61.84,83.11,60.66,83.64M74.55,83.93C74.47,84.02,73.34,84.05,72.03,84.02C69.1,83.94,68.83,84.29,71.67,84.48C74.88,84.69,75.05,84.68,75.05,84.2C75.05,83.78,74.83,83.66,74.55,83.93M9.54,84.46C9.31,84.89,9.32,84.9,9.65,84.63C9.96,84.37,10.04,84.37,10.2,84.63C10.42,84.97,10.45,84.8,10.27,84.32C10.09,83.86,9.83,83.91,9.54,84.46M18.5,85.04C16.61,85.59,16.55,85.62,17.13,85.85C17.46,85.98,17.88,86.04,18.06,85.98C21.15,85.09,21.42,84.98,21.19,84.7C20.89,84.34,20.89,84.34,18.5,85.04M25.75,84.94C25.16,85.32,25.01,85.53,25.09,85.86C25.2,86.26,26.12,85.94,27.18,85.14C27.73,84.72,26.38,84.54,25.75,84.94M23.1,85.16C23.09,85.54,23.22,85.93,23.43,86.1C23.73,86.34,23.75,86.34,23.6,86.09C23.51,85.93,23.36,85.51,23.27,85.15L23.12,84.51L23.1,85.16M76.66,84.76C76.93,84.81,77.3,84.81,77.5,84.76C77.7,84.71,77.48,84.66,77.03,84.67C76.57,84.67,76.41,84.71,76.66,84.76M9.49,85.84C9.3,86.33,9.15,87.28,9.15,88.02C9.15,89.8,8.57,90.5,7.23,90.34L6.34,90.22L7.06,90.5L7.78,90.78L6.78,91.04C5.38,91.39,4.57,92.23,4.57,93.33C4.57,93.8,4.55,94.24,4.52,94.31C4.43,94.53,6.46,95.23,7.25,95.26C8.19,95.29,8.31,95.46,8.31,96.85C8.32,97.79,8.25,97.98,7.89,98.07C7.42,98.2,7.44,98.51,7.94,98.82C8.73,99.33,9.54,97.81,9.26,96.32C9.15,95.73,9.2,95.6,9.61,95.44C10.04,95.26,10.04,95.24,9.66,95.23C9.43,95.22,9.12,95.01,8.96,94.75C8.68,94.3,8.69,94.3,9.07,94.62C9.28,94.8,9.83,95.02,10.29,95.1C10.92,95.2,11.05,95.18,10.81,95C10.57,94.83,10.64,94.8,11.12,94.9C12.57,95.18,14.64,93.1,14.13,91.88C13.74,90.93,12.66,90.2,12.17,90.56C11.48,91.06,11.02,90.93,11.02,90.23C11.02,89.73,10.91,89.59,10.45,89.49C9.51,89.28,9.41,89.18,10.24,89.28C10.67,89.33,11.02,89.31,11.02,89.23C11.02,88.88,10.16,85.58,10.01,85.3C9.88,85.06,9.75,85.2,9.49,85.84M10.39,85.16C10.39,85.54,10.9,86.9,11.04,86.9C11.13,86.9,11.06,86.48,10.88,85.96C10.6,85.13,10.39,84.8,10.39,85.16M14.68,86.71C14.57,88.09,14.45,88.49,14.03,88.94C13.42,89.59,13.37,90.18,13.88,90.56C14.35,90.92,14.57,90.93,14.43,90.57C14.37,90.42,14.56,89.84,14.86,89.29C15.24,88.57,15.39,87.98,15.39,87.13C15.39,86.49,15.48,85.83,15.59,85.66C15.71,85.46,15.7,85.3,15.53,85.2C14.96,84.83,14.82,85.08,14.68,86.71M14.14,85.98C14.14,86.27,14.22,86.46,14.32,86.39C14.43,86.33,14.46,86.09,14.41,85.86C14.25,85.29,14.14,85.34,14.14,85.98M30.35,85.66C30.35,85.77,30.02,85.86,29.61,85.86C28.7,85.86,28.84,86.18,29.85,86.37C30.31,86.46,30.7,86.42,30.89,86.27C31.32,85.91,31.25,85.45,30.77,85.45C30.54,85.45,30.35,85.54,30.35,85.66M87.3,85.98C86.98,86.38,87.21,86.57,88.36,86.9C89.67,87.27,89.83,86.88,88.67,86.12C87.81,85.57,87.66,85.55,87.3,85.98M32.7,86.43C33.01,86.48,33.48,86.47,33.73,86.43C33.99,86.38,33.73,86.34,33.16,86.34C32.59,86.34,32.38,86.38,32.7,86.43M85.71,87.16C85.71,87.3,85.63,87.6,85.54,87.81C85.41,88.14,85.44,88.17,85.78,87.99C86,87.88,86.3,87.75,86.46,87.7C86.7,87.63,86.68,87.54,86.39,87.26C85.98,86.84,85.73,86.8,85.71,87.16M8.56,88.01C8.54,88.56,8.42,89.21,8.29,89.46C8.08,89.88,8.09,89.89,8.41,89.59C8.67,89.34,8.74,88.98,8.68,88.13L8.6,87.01L8.56,88.01M87.51,88.33C86.75,88.95,87.2,89.29,88.33,88.94C89.14,88.69,89.53,88.15,88.89,88.15C88.73,88.15,88.47,88.1,88.3,88.04C88.14,87.97,87.79,88.11,87.51,88.33M92.2,88.56C90.77,88.66,90.67,88.7,91.48,88.78C92.73,88.91,94.39,88.78,94.39,88.55C94.39,88.44,94.27,88.38,94.12,88.39C93.98,88.42,93.12,88.49,92.2,88.56M94.7,88.89C93.46,89.23,91.27,89.27,90.18,88.97C88.2,88.42,85.52,90.86,86.34,92.44C86.65,93.02,86.65,93.02,86.54,92.04C86.36,90.46,87.5,89.58,89.65,89.63C90.59,89.65,90.66,89.68,90.12,89.81C89.53,89.96,89.53,89.97,90.02,90.02C90.46,90.06,90.43,90.09,89.79,90.27C88.45,90.62,87.74,91.42,87.66,92.66L87.58,93.75L88.54,94.09C89.07,94.27,89.7,94.5,89.94,94.6C90.22,94.71,90.48,94.68,90.63,94.53C91.02,94.14,91.48,94.93,91.48,95.98C91.48,96.61,91.35,97.01,91.05,97.31C90.7,97.65,90.67,97.8,90.86,98.04C91.56,98.88,92.31,97.75,92.31,95.85L92.31,94.59L93.09,94.57C93.52,94.56,93.69,94.5,93.47,94.45C93.19,94.37,93.36,94.24,94.09,93.98C94.66,93.78,95.29,93.54,95.51,93.45C95.81,93.32,95.87,93.34,95.75,93.54C95.45,94.02,96.4,93.39,96.87,92.8C97.73,91.7,96.87,89.92,95.11,89.18C94.79,89.04,94.85,89.01,95.4,89.04C95.81,89.07,96.15,88.98,96.2,88.82C96.31,88.51,96.04,88.52,94.7,88.89M5.41,89.28C5.41,89.54,6.7,90.02,7.32,90C7.98,89.97,7.98,89.96,7.17,89.83C6.71,89.75,6.13,89.57,5.88,89.43C5.62,89.29,5.41,89.22,5.41,89.28M4.26,89.61C4.12,89.84,4.26,89.88,4.89,89.82C5.17,89.79,5,90.01,4.33,90.54C3.15,91.46,2.79,92.31,3.22,93.11C3.51,93.65,3.52,93.64,3.53,92.61C3.54,91.34,4.04,90.75,5.3,90.49L6.12,90.32L5.37,89.86C4.53,89.34,4.44,89.32,4.26,89.61M87.32,90.85C87.09,91.08,86.9,91.52,86.9,91.82C86.9,92.47,86.9,92.47,87.49,91.32C87.98,90.34,87.94,90.23,87.32,90.85M4.55,91.33C4.09,91.69,3.7,92.48,3.86,92.75C3.94,92.87,4.16,92.6,4.37,92.14C4.57,91.69,4.87,91.27,5.02,91.2C5.18,91.14,5.21,91.09,5.09,91.08C4.98,91.08,4.74,91.19,4.55,91.33M97.71,91.87C97.71,93.3,96.42,94.34,93.82,95.01C92.96,95.23,92.93,95.27,92.93,96.04C92.93,97.03,92.63,97.88,92.06,98.48C91.64,98.93,91.64,98.97,91.98,99.49C92.62,100.46,93.55,99.11,93.55,97.21C93.55,96.12,93.59,96.05,94.12,95.94C97.71,95.22,99.68,93.19,98.13,91.79C97.73,91.42,97.71,91.43,97.71,91.87M14.69,92.61C14.62,92.8,14.55,93.14,14.55,93.34C14.55,94.19,11.73,95.84,10.29,95.84C9.81,95.84,9.77,95.91,9.77,96.89C9.77,97.94,9.14,99.59,8.73,99.59C8.62,99.59,8.52,99.68,8.52,99.79C8.52,100.08,10.13,100.05,10.31,99.76C10.39,99.62,10.48,98.9,10.49,98.15L10.52,96.79L11.66,96.56C14.58,95.96,16.32,94.08,15.21,92.71C14.87,92.29,14.82,92.28,14.69,92.61M96.15,92.72C95.77,93.15,95.97,93.3,96.43,92.93C96.61,92.78,96.62,92.79,96.46,92.98C96.34,93.12,96.03,93.25,95.78,93.27C95.53,93.28,94.9,93.35,94.39,93.43L93.45,93.56L94.42,93.29C94.96,93.13,95.61,92.85,95.88,92.67C96.53,92.21,96.6,92.23,96.15,92.72M13.1,93.45C12.79,93.82,13.11,93.88,13.47,93.51C13.61,93.38,13.72,93.33,13.72,93.41C13.72,93.61,11.84,94.8,11.55,94.79C11.43,94.79,11.69,94.59,12.13,94.36C12.57,94.13,12.88,93.89,12.82,93.84C12.77,93.78,12.52,93.84,12.27,93.97C12.03,94.1,11.62,94.16,11.37,94.12C10.95,94.04,10.96,94.02,11.43,94C11.72,93.98,12.23,93.79,12.58,93.57C13.35,93.07,13.43,93.06,13.1,93.45M88.75,95.07C89.05,95.46,89.81,95.56,89.81,95.22C89.81,95.11,89.68,95.01,89.52,95.01C89.36,95.01,89.05,94.95,88.84,94.87C88.51,94.74,88.5,94.77,88.75,95.07M90.66,95.95C90.67,96.67,90.7,96.72,90.89,96.33C91.04,96.02,91.04,95.77,90.88,95.5C90.7,95.18,90.66,95.25,90.66,95.95M5.82,95.83C6.64,96.29,6.86,96.34,6.86,96.06C6.86,95.88,6.49,95.73,5.51,95.51C5.28,95.45,5.42,95.6,5.82,95.83M7.61,96.37C7.53,96.66,7.57,97.06,7.68,97.25C7.84,97.53,7.89,97.41,7.89,96.73C7.9,95.72,7.8,95.6,7.61,96.37 false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS6/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS6/res/values/config.xml index f7128b6f8..6075b8840 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS6/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS6/res/values/config.xml @@ -1,5 +1,5 @@ - M50,0L100,0 100,100 0,100 0,0z + M50,0 C77.6,0 100,22.4 100,50 L100,88 C100,94.6 94.6,100 88,100 L50,100 C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS7/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS7/res/values/config.xml index be6461967..f7128b6f8 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS7/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS7/res/values/config.xml @@ -1,5 +1,5 @@ - M50,0L88,0 C94.4,0 100,5.4 100 12 L100,88 C100,94.6 94.6 100 88 100 L12,100 C5.4,100 0,94.6 0,88 L0 12 C0 5.4 5.4 0 12 0 L50,0 Z + M50,0L100,0 100,100 0,100 0,0z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS8/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS8/res/values/config.xml index 66ed65917..be6461967 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS8/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS8/res/values/config.xml @@ -1,5 +1,5 @@ - M24.00,0.00L76.00,0.00A24.00 24.00 0 0 1 100.00,24.00L100.00,76.00A24.00 24.00 0 0 1 76.00,100.00L24.00,100.00A24.00 24.00 0 0 1 0.00,76.00L0.00,24.00A24.00 24.00 0 0 1 24.00,0.00z + M50,0L88,0 C94.4,0 100,5.4 100 12 L100,88 C100,94.6 94.6 100 88 100 L12,100 C5.4,100 0,94.6 0,88 L0 12 C0 5.4 5.4 0 12 0 L50,0 Z false diff --git a/app/src/main/assets/CompileOnDemand/android/SIS9/res/values/config.xml b/app/src/main/assets/CompileOnDemand/android/SIS9/res/values/config.xml index aa0099e1a..66ed65917 100644 --- a/app/src/main/assets/CompileOnDemand/android/SIS9/res/values/config.xml +++ b/app/src/main/assets/CompileOnDemand/android/SIS9/res/values/config.xml @@ -1,5 +1,5 @@ - M4,50 C2,45 0,39 0,33 C0,15 15,0 33,0 C39,0 45,2 50,4 C55,2 61,0 67,0 C85,0 100,15 100,33 C100,39 98,45 96,50 C98,55 100,61 100,66 C100,85 85,100 66,100 C61,100 55,98 50,96 C45,98 39,100 33,100 C15,100 0,85 0,66 C0,61 2,55 3,50 Z + M24.00,0.00L76.00,0.00A24.00 24.00 0 0 1 100.00,24.00L100.00,76.00A24.00 24.00 0 0 1 76.00,100.00L24.00,100.00A24.00 24.00 0 0 1 0.00,76.00L0.00,24.00A24.00 24.00 0 0 1 24.00,0.00z false diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN1/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN1/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN1/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN10/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN10/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN10/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN11/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN11/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN11/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN12/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN12/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN12/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN13/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN13/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN13/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN14/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN14/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN14/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN15/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN15/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN15/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN16/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN16/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN16/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/color_background_alpha.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/color_background_alpha.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/color_background_alpha.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/color_background_alpha.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/color_background_alpha.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/color_background_alpha.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/color_background_alpha.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/color_background_alpha.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN17/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN17/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN17/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN18/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN18/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN18/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN19/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN19/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN19/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN2/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN2/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN2/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN20/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN20/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN20/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN3/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN3/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN3/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN4/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN4/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN4/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN5/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN5/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN5/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN6/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN6/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN6/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN7/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN7/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN7/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN8/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN8/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN8/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable-night/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable-night/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/global_actions_lite_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/global_actions_lite_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/global_actions_lite_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/global_actions_lite_button.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/global_actions_lite_button.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/global_actions_lite_button.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/notif_footer_btn_background.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/notif_footer_btn_background.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/notif_footer_btn_background.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/notification_material_bg.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/notification_material_bg.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/notification_material_bg.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/notification_material_bg.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/notification_material_bg_monet.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/drawable/notification_material_bg_monet.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/drawable/notification_material_bg_monet.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/values/bools.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/values/bools.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/values/bools.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/values/bools.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN9/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/NFN9/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/NFN9/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC1/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC1/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC10/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC10/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC11/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC11/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_1x_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_1x_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_1x_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_1x_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_1x_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_1x_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_1x_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_3g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_3g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_3g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_3g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_3g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_3g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_3g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_4g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_4g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_4g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_4g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_4g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_4g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_4g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_4g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_4g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_4g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_4g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_4g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_4g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_4g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata_default.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata_default.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata_default.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata_default.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_uc_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_uc_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_uc_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_uc_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_uc_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_uc_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_uc_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_uw_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_uw_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_uw_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_uw_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_uw_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_5g_uw_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_5g_uw_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_h_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_h_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_h_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_h_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_h_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_h_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_h_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_h_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_h_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_h_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_h_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_h_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_h_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_h_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_lte_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_lte_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_lte_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_lte_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_lte_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_lte_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_lte_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_lte_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_lte_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_lte_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_lte_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_lte_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_lte_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_lte_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC12/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC12/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC13/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC13/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_1x_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_1x_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_1x_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_1x_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_1x_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_1x_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_1x_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_3g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_3g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_3g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_3g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_3g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_3g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_3g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_4g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_4g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_4g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_4g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_4g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_4g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_4g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_4g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_4g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_4g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_4g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_4g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_4g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_4g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata_default.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata_default.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata_default.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata_default.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_uc_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_uc_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_uc_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_uc_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_uc_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_uc_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_uc_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_uw_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_uw_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_uw_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_uw_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_uw_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_5g_uw_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_5g_uw_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_h_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_h_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_h_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_h_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_h_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_h_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_h_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_h_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_h_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_h_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_h_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_h_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_h_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_h_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_lte_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_lte_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_lte_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_lte_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_lte_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_lte_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_lte_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_lte_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_lte_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_lte_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_lte_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_lte_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_lte_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_lte_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC14/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC14/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_1x_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_1x_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_1x_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_1x_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_1x_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_1x_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_1x_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_3g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_3g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_3g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_3g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_3g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_3g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_3g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_4g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_4g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_4g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_4g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_4g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_4g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_4g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_4g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_4g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_4g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_4g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_4g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_4g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_4g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata_default.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata_default.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata_default.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata_default.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_uc_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_uc_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_uc_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_uc_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_uc_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_uc_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_uc_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_uw_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_uw_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_uw_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_uw_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_uw_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_5g_uw_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_5g_uw_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_h_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_h_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_h_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_h_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_h_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_h_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_h_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_h_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_h_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_h_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_h_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_h_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_h_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_h_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_lte_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_lte_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_lte_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_lte_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_lte_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_lte_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_lte_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_lte_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_lte_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_lte_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_lte_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_lte_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_lte_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_lte_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC15/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC15/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC16/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC16/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC17/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC17/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC18/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC18/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC19/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC19/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_1x_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_1x_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_1x_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_1x_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_1x_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_1x_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_1x_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_3g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_3g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_3g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_3g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_3g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_3g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_3g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_4g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_4g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_4g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_4g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_4g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_4g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_4g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_4g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_4g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_4g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_4g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_4g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_4g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_4g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata_default.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata_default.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata_default.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata_default.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_uc_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_uc_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_uc_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_uc_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_uc_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_uc_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_uc_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_uw_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_uw_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_uw_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_uw_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_uw_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_5g_uw_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_5g_uw_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_h_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_h_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_h_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_h_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_h_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_h_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_h_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_h_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_h_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_h_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_h_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_h_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_h_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_h_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_lte_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_lte_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_lte_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_lte_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_lte_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_lte_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_lte_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_lte_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_lte_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_lte_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_lte_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_lte_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_lte_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_lte_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC2/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC2/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_signal_location.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_signal_location.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/drawable/ic_signal_location.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/drawable/ic_signal_location.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC20/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC20/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC21/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC21/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC22/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC22/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_1x_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_1x_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_1x_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_1x_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_1x_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_1x_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_1x_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_1x_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_3g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_3g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_3g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_3g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_3g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_3g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_3g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_3g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_4g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_4g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_4g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_4g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_4g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_4g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_4g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_4g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_4g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_4g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_4g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_4g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_4g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_4g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_4g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_4g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata_default.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata_default.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata_default.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata_default.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_uc_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_uc_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_uc_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_uc_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_uc_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_uc_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_uc_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_uc_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_uw_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_uw_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_uw_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_uw_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_uw_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_uw_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_5g_uw_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_5g_uw_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_e_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_e_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_e_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_e_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_e_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_e_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_e_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_e_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_g_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_g_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_g_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_g_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_g_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_g_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_g_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_g_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_h_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_h_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_h_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_h_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_h_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_h_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_h_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_h_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_h_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_h_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_h_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_h_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_h_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_h_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_h_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_h_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_lte_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_lte_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_lte_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_lte_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_lte_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_lte_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_lte_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_lte_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_lte_plus_mobiledata.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_lte_plus_mobiledata.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_lte_plus_mobiledata.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_lte_plus_mobiledata.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_lte_plus_mobiledata_updated.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_lte_plus_mobiledata_updated.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_lte_plus_mobiledata_updated.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_lte_plus_mobiledata_updated.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC23/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC23/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC24/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC24/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC25/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC25/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC26/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC26/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC27/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC27/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC28/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC28/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC29/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC29/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC3/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC3/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC30/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC30/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC31/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC31/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC32/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC32/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC33/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC33/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC34/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC34/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC35/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC35/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC36/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC36/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC4/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC4/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC5/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC5/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC6/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC6/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC7/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC7/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC8/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC8/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_0_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_1_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_2_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_3_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_4_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_4_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_4_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_4_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_4_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_4_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_4_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_5_5_bar.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_5_5_bar.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_5_5_bar.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_5_5_bar_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/drawable/ic_mobile_5_5_bar_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/drawable/ic_mobile_5_5_bar_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/SGIC9/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/SGIC9/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI1/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI1/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI10/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI10/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI11/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI11/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI12/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI12/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI13/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI13/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI14/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI14/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI15/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI15/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI16/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI16/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI2/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI2/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI3/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI3/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI4/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI4/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI5/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI5/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI6/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI6/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI7/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI7/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI8/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI8/res/values/dimens.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_signal_wifi_transient_animation.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_signal_wifi_transient_animation.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_signal_wifi_transient_animation.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_signal_wifi_transient_animation_drawable.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_signal_wifi_transient_animation_drawable.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_signal_wifi_transient_animation_drawable.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_0.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_0.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_0.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_0.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_0_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_0_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_0_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_1.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_1.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_1.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_1.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_1_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_1_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_1_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_2.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_2.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_2.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_2.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_2_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_2_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_2_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_3.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_3.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_3.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_3.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_3_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_3_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_3_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_4.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_4.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_4.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_4.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_4_error.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/drawable/ic_wifi_4_error.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/drawable/ic_wifi_4_error.xml diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/values/dimens.xml b/app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/values/dimens.xml similarity index 100% rename from app/src/main/assets/Overlays/com.android.systemui/WIFI9/res/values/dimens.xml rename to app/src/main/assets/CompileOnDemand/com.android.systemui/WIFI9/res/values/dimens.xml diff --git a/app/src/main/assets/Misc/contributors.json b/app/src/main/assets/Misc/contributors.json index 92e1f1784..4a88986c6 100644 --- a/app/src/main/assets/Misc/contributors.json +++ b/app/src/main/assets/Misc/contributors.json @@ -39,7 +39,7 @@ "site_admin": false, "contributions": -3883 +3890 }, { "login": @@ -123,7 +123,7 @@ false, "site_admin": false, "contributions": -84 +87 }, { "login": diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/global_actions_lite_background.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/global_actions_lite_background.xml new file mode 100644 index 000000000..a5f2e0f7d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/global_actions_lite_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/global_actions_lite_button.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/global_actions_lite_button.xml new file mode 100644 index 000000000..83a7ca752 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/global_actions_lite_button.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notif_footer_btn_background.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notif_footer_btn_background.xml new file mode 100644 index 000000000..52f0c1d3c --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notif_footer_btn_background.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notification_material_bg.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notification_material_bg.xml new file mode 100644 index 000000000..387e40449 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notification_material_bg.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notification_material_bg_monet.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notification_material_bg_monet.xml new file mode 100644 index 000000000..387e40449 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable-night/notification_material_bg_monet.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/global_actions_lite_background.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/global_actions_lite_background.xml new file mode 100644 index 000000000..a5f2e0f7d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/global_actions_lite_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/global_actions_lite_button.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/global_actions_lite_button.xml new file mode 100644 index 000000000..4f09bc815 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/global_actions_lite_button.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notif_footer_btn_background.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notif_footer_btn_background.xml new file mode 100644 index 000000000..09f3118bb --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notif_footer_btn_background.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notification_material_bg.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notification_material_bg.xml new file mode 100644 index 000000000..dd07a3257 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notification_material_bg.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notification_material_bg_monet.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notification_material_bg_monet.xml new file mode 100644 index 000000000..dd07a3257 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/drawable/notification_material_bg_monet.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/values/bools.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/values/bools.xml new file mode 100644 index 000000000..399d1123c --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/values/bools.xml @@ -0,0 +1,6 @@ + + + false + true + true + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/NFN/res/values/dimens.xml b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/values/dimens.xml new file mode 100644 index 000000000..f4a33e755 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/NFN/res/values/dimens.xml @@ -0,0 +1,7 @@ + + + 4dp + 4dp + 2dp + 0 + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_4_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_4_bar.xml new file mode 100644 index 000000000..834225d2d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_4_bar.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_4_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_4_bar_error.xml new file mode 100644 index 000000000..834225d2d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_4_bar_error.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_5_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_5_bar.xml new file mode 100644 index 000000000..834225d2d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_5_bar.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_5_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_5_bar_error.xml new file mode 100644 index 000000000..834225d2d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_0_5_bar_error.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_4_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_4_bar.xml new file mode 100644 index 000000000..effcde5d9 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_4_bar.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_4_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_4_bar_error.xml new file mode 100644 index 000000000..effcde5d9 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_4_bar_error.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_5_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_5_bar.xml new file mode 100644 index 000000000..effcde5d9 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_5_bar.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_5_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_5_bar_error.xml new file mode 100644 index 000000000..effcde5d9 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_1_5_bar_error.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_4_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_4_bar.xml new file mode 100644 index 000000000..504cc95a7 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_4_bar.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_4_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_4_bar_error.xml new file mode 100644 index 000000000..504cc95a7 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_4_bar_error.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_5_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_5_bar.xml new file mode 100644 index 000000000..504cc95a7 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_5_bar.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_5_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_5_bar_error.xml new file mode 100644 index 000000000..504cc95a7 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_2_5_bar_error.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_4_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_4_bar.xml new file mode 100644 index 000000000..e6aad62df --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_4_bar.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_4_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_4_bar_error.xml new file mode 100644 index 000000000..e6aad62df --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_4_bar_error.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_5_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_5_bar.xml new file mode 100644 index 000000000..e6aad62df --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_5_bar.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_5_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_5_bar_error.xml new file mode 100644 index 000000000..e6aad62df --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_3_5_bar_error.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_4_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_4_bar.xml new file mode 100644 index 000000000..62f871e78 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_4_bar.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_4_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_4_bar_error.xml new file mode 100644 index 000000000..62f871e78 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_4_bar_error.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_5_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_5_bar.xml new file mode 100644 index 000000000..62f871e78 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_5_bar.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_5_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_5_bar_error.xml new file mode 100644 index 000000000..62f871e78 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_4_5_bar_error.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_5_5_bar.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_5_5_bar.xml new file mode 100644 index 000000000..62f871e78 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_5_5_bar.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_5_5_bar_error.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_5_5_bar_error.xml new file mode 100644 index 000000000..62f871e78 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/drawable/ic_mobile_5_5_bar_error.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/values/dimens.xml b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/values/dimens.xml new file mode 100644 index 000000000..09d0f1a13 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/SGIC/res/values/dimens.xml @@ -0,0 +1,6 @@ + + + 15sp + 15sp + 15sp + diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_signal_wifi_transient_animation.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_signal_wifi_transient_animation.xml new file mode 100644 index 000000000..17a804f7d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/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/com.android.systemui/WIFI/res/drawable/ic_signal_wifi_transient_animation_drawable.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_signal_wifi_transient_animation_drawable.xml new file mode 100644 index 000000000..17a804f7d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/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/com.android.systemui/WIFI/res/drawable/ic_wifi_0.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_0.xml new file mode 100644 index 000000000..17a804f7d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_0.xml @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_0_error.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_0_error.xml new file mode 100644 index 000000000..17a804f7d --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_0_error.xml @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_1.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_1.xml new file mode 100644 index 000000000..fec096e70 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_1.xml @@ -0,0 +1,22 @@ + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_1_error.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_1_error.xml new file mode 100644 index 000000000..fec096e70 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_1_error.xml @@ -0,0 +1,22 @@ + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_2.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_2.xml new file mode 100644 index 000000000..5dd08b195 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_2.xml @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_2_error.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_2_error.xml new file mode 100644 index 000000000..5dd08b195 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_2_error.xml @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_3.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_3.xml new file mode 100644 index 000000000..1974b4d26 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_3.xml @@ -0,0 +1,38 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_3_error.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_3_error.xml new file mode 100644 index 000000000..1974b4d26 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_3_error.xml @@ -0,0 +1,38 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_4.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_4.xml new file mode 100644 index 000000000..18eec4e44 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_4.xml @@ -0,0 +1,38 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_4_error.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_4_error.xml new file mode 100644 index 000000000..18eec4e44 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/drawable/ic_wifi_4_error.xml @@ -0,0 +1,38 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/values/dimens.xml b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/values/dimens.xml new file mode 100644 index 000000000..18245d841 --- /dev/null +++ b/app/src/main/assets/Overlays/com.android.systemui/WIFI/res/values/dimens.xml @@ -0,0 +1,4 @@ + + + 15sp + diff --git a/app/src/main/assets/Tools/jniLibs.zip b/app/src/main/assets/Tools/jniLibs.zip new file mode 100644 index 000000000..0bc76e62c Binary files /dev/null and b/app/src/main/assets/Tools/jniLibs.zip differ diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png deleted file mode 100644 index ec24511ea..000000000 Binary files a/app/src/main/ic_launcher-playstore.png and /dev/null differ diff --git a/app/src/main/java/com/drdisagree/iconify/BaseSplashActivity.kt b/app/src/main/java/com/drdisagree/iconify/BaseSplashActivity.kt deleted file mode 100644 index 1990c6f39..000000000 --- a/app/src/main/java/com/drdisagree/iconify/BaseSplashActivity.kt +++ /dev/null @@ -1,107 +0,0 @@ -package com.drdisagree.iconify - -import android.annotation.SuppressLint -import android.content.Intent -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.data.annotations.TestOnlyFlag -import com.drdisagree.iconify.data.common.Preferences.XPOSED_ONLY_MODE -import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.ui.activities.MainActivity -import com.drdisagree.iconify.ui.activities.OnboardingActivity -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.google.android.material.color.DynamicColors -import com.topjohnwu.superuser.Shell - -@SuppressLint("CustomSplashScreen") -abstract class BaseSplashActivity : AppCompatActivity() { - - private var keepShowing = true - private val runner = Runnable { - Shell.getShell { _: Shell? -> - 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) { - RPrefs.putBoolean(XPOSED_ONLY_MODE, false) - } else if (isModuleInstalled) { - RPrefs.putBoolean(XPOSED_ONLY_MODE, true) - isXposedOnlyMode = true - } - } - - val isModuleProperlyInstalled = isModuleInstalled && - (isOverlayInstalled || isXposedOnlyMode) - - val intent: Intent = - if (SKIP_TO_HOMEPAGE_FOR_TESTING || - (isRooted && - isModuleProperlyInstalled && - isVersionCodeCorrect) - ) { - keepShowing = false - initializeMLKit() - Intent( - this@BaseSplashActivity, - if (FORCE_OVERLAY_INSTALLATION) OnboardingActivity::class.java - else MainActivity::class.java - ) - } else { - keepShowing = false - Intent(this@BaseSplashActivity, OnboardingActivity::class.java) - } - - startActivity(intent) - finish() - } - } - - abstract fun initializeMLKit() - - override fun onCreate(savedInstanceState: Bundle?) { - val splashScreen: SplashScreen = installSplashScreen() - super.onCreate(savedInstanceState) - splashScreen.setKeepOnScreenCondition { keepShowing } - DynamicColors.applyToActivitiesIfAvailable(application) - Thread(runner).start() - } - - companion object { - - @TestOnlyFlag("Skips installation flow for debug testing") - private const val SKIP_INSTALLATION = false - - @TestOnlyFlag("Force overlay install screen") - const val FORCE_OVERLAY_INSTALLATION = false - - @get:TestOnlyFlag("Skip to homepage for testing") - @Suppress("KotlinConstantConditions", "SimplifyBooleanWithConstants") - val SKIP_TO_HOMEPAGE_FOR_TESTING: Boolean - get() = SKIP_INSTALLATION && - !FORCE_OVERLAY_INSTALLATION && - BuildConfig.DEBUG - - init { - Shell.enableVerboseLogging = BuildConfig.DEBUG - - @Suppress("DEPRECATION") - if (Shell.getCachedShell() == null) { - Shell.setDefaultBuilder( - Shell.Builder - .create() - .setFlags(Shell.FLAG_MOUNT_MASTER) - .setTimeout(20) - ) - } - } - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/Iconify.kt b/app/src/main/java/com/drdisagree/iconify/Iconify.kt deleted file mode 100644 index 1c3aaa55d..000000000 --- a/app/src/main/java/com/drdisagree/iconify/Iconify.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.drdisagree.iconify - -import android.app.Application -import android.content.Context -import com.drdisagree.iconify.utils.helper.LocaleHelper -import com.google.android.material.color.DynamicColors -import java.lang.ref.WeakReference - -class Iconify : Application() { - - companion object { - private var instance: Iconify? = null - private var contextReference: WeakReference? = null - - val appContext: Context - get() { - if (contextReference == null || contextReference?.get() == null) { - contextReference = WeakReference( - instance?.applicationContext ?: getInstance().applicationContext - ) - } - return contextReference!!.get()!! - } - - val appContextLocale: Context - get() { - return LocaleHelper.setLocale(appContext) - } - - private fun getInstance(): Iconify { - if (instance == null) { - instance = Iconify() - } - return instance!! - } - } - - override fun onCreate() { - super.onCreate() - instance = this - contextReference = WeakReference(applicationContext) - DynamicColors.applyToActivitiesIfAvailable(this) - } -} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/app/Iconify.kt b/app/src/main/java/com/drdisagree/iconify/app/Iconify.kt new file mode 100644 index 000000000..c74c9ec9b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/app/Iconify.kt @@ -0,0 +1,42 @@ +package com.drdisagree.iconify.app + +import android.app.Application +import android.content.Context +import com.drdisagree.iconify.helpers.LocaleHelper +import dagger.hilt.android.HiltAndroidApp +import java.lang.ref.WeakReference + +@HiltAndroidApp +class Iconify : Application() { + + override fun onCreate() { + super.onCreate() + instance = this + contextReference = WeakReference(applicationContext) + } + + companion object { + + private lateinit var instance: Iconify + private lateinit var contextReference: WeakReference + + val appContext: Context + get() { + if (!this::contextReference.isInitialized || contextReference.get() == null) { + contextReference = WeakReference( + LocaleHelper.setLocale( + getInstance().applicationContext + ) + ) + } + return contextReference.get()!! + } + + private fun getInstance(): Iconify { + if (!this::instance.isInitialized) { + instance = Iconify() + } + return instance + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/app/MainActivity.kt b/app/src/main/java/com/drdisagree/iconify/app/MainActivity.kt new file mode 100644 index 000000000..9919e0ae3 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/app/MainActivity.kt @@ -0,0 +1,205 @@ +package com.drdisagree.iconify.app + +import android.graphics.Color +import android.os.Bundle +import android.util.Log +import android.view.View +import android.view.View.OnAttachStateChangeListener +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.Saver +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.core.graphics.drawable.toDrawable +import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen +import com.drdisagree.iconify.BuildConfig +import com.drdisagree.iconify.app.navigation.NavGraph +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.common.LocalSettings +import com.drdisagree.iconify.core.preferences.PreferenceScreenItem +import com.drdisagree.iconify.core.ui.components.others.BLUR_RADIUS +import com.drdisagree.iconify.core.ui.theme.MyAppTheme +import com.drdisagree.iconify.data.common.References.PREFERENCE_LIST +import com.drdisagree.iconify.data.config.Config +import com.drdisagree.iconify.data.states.AppState +import com.drdisagree.iconify.services.providers.AppProviders +import com.drdisagree.iconify.xposed.modules.extras.utils.BitmapSubjectSegmenter +import com.topjohnwu.superuser.Shell +import dagger.hilt.android.AndroidEntryPoint +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.TimeoutCancellationException +import kotlinx.coroutines.delay +import kotlinx.coroutines.suspendCancellableCoroutine +import kotlinx.coroutines.withContext +import kotlinx.coroutines.withTimeout +import java.util.function.Consumer +import kotlin.coroutines.resume + +@AndroidEntryPoint +class MainActivity : ComponentActivity() { + + private var isInitializing = true + + override fun onCreate(savedInstanceState: Bundle?) { + val splashscreen = installSplashScreen() + super.onCreate(savedInstanceState) + splashscreen.setKeepOnScreenCondition { isInitializing } + enableEdgeToEdge() + setupWindowBlurListener() + + Shell.enableVerboseLogging = BuildConfig.DEBUG + + if (Shell.getCachedShell() == null) { + Shell.setDefaultBuilder( + Shell.Builder + .create() + .setFlags(Shell.FLAG_MOUNT_MASTER) + .setTimeout(10) + ) + } + + setContent { + AppProviders(this) { + val context = LocalContext.current + val settingsLoaded = LocalSettings.current.isLoaded + var appLoaded by rememberSaveable { mutableStateOf(false) } + val segmenter = remember { BitmapSubjectSegmenter(context) } + + LaunchedEffect(settingsLoaded, appLoaded) { + if (settingsLoaded && appLoaded) { + segmenter.checkModelAvailability { response -> + Log.d( + "MLKit", + "Model availability: ${response.areModulesAvailable()}" + ) + } + delay(500) + isInitializing = false + } + } + + MyAppTheme { + Surface( + modifier = Modifier.fillMaxSize(), + color = MaterialTheme.colorScheme.background + ) { + MyApp { appLoaded = true } + } + } + } + } + } + + private fun setupWindowBlurListener() { + window.setBackgroundDrawable(Color.TRANSPARENT.toDrawable()) + + val windowBlurEnabledListener: Consumer = Consumer { blursEnabled: Boolean -> + window.setBackgroundBlurRadius(if (blursEnabled) BLUR_RADIUS else 0) + } + + window.decorView.addOnAttachStateChangeListener( + object : OnAttachStateChangeListener { + override fun onViewAttachedToWindow(v: View) { + windowManager.addCrossWindowBlurEnabledListener(windowBlurEnabledListener) + } + + override fun onViewDetachedFromWindow(v: View) { + windowManager.removeCrossWindowBlurEnabledListener(windowBlurEnabledListener) + } + } + ) + } + + @Composable + fun MyApp(onLoaded: () -> Unit = {}) { + var appState by rememberSaveable( + stateSaver = Saver( + save = { state -> + when (state) { + is AppState.Loading -> null + is AppState.Ready -> state.skipOnboarding + } + }, + restore = { saved: Boolean -> AppState.Ready(saved) } + ) + ) { mutableStateOf(AppState.Loading) } + + when (val state = appState) { + is AppState.Loading -> { + InitPreferences { state -> + appState = state + } + } + + is AppState.Ready -> { + NavGraph(skipOnboarding = state.skipOnboarding) + LaunchedEffect(Unit) { + onLoaded() + } + } + } + } + + @Composable + private fun InitPreferences(onLoaded: (AppState.Ready) -> Unit) { + val prefController = LocalPreferenceController.current + + LaunchedEffect(Unit) { + withContext(Dispatchers.IO) { + val defaults = PREFERENCE_LIST + .filterIsInstance() + .flatMap { it.definition.preferences } + .associate { pref -> pref.key to pref.defaultValue } + prefController.initAll(defaults) + } + + val shellReady = withContext(Dispatchers.IO) { + try { + withTimeout(15_000L) { + suspendCancellableCoroutine { cont -> + Shell.getShell { shell -> + if (cont.isActive) cont.resume(shell.isRoot) + } + } + } + } catch (_: TimeoutCancellationException) { + Log.w(TAG, "Shell timed out — continuing without root") + false + } catch (e: Exception) { + Log.e(TAG, "Shell error", e) + false + } + } + + val skipOnboarding = withContext(Dispatchers.IO) { + if (!shellReady) { + false + } else { + try { + Config.shouldSkipOnboarding() + } catch (e: Exception) { + Log.e(TAG, "shouldSkipOnboarding error", e) + false + } + } + } + + onLoaded(AppState.Ready(skipOnboarding)) + } + } + + companion object { + private const val TAG = "MainActivity" + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/app/navigation/NavDirection.kt b/app/src/main/java/com/drdisagree/iconify/app/navigation/NavDirection.kt new file mode 100644 index 000000000..32848c046 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/app/navigation/NavDirection.kt @@ -0,0 +1,62 @@ +package com.drdisagree.iconify.app.navigation + +import androidx.compose.animation.EnterTransition +import androidx.compose.animation.ExitTransition +import androidx.compose.animation.core.tween +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.slideInHorizontally +import androidx.compose.animation.slideOutHorizontally +import androidx.compose.ui.unit.LayoutDirection +import androidx.navigation.NavDestination + +enum class NavDirection { + Start, + End +} + +fun resolveDirection( + from: NavDestination?, + to: NavDestination? +): NavDirection? { + val fromIndex = from?.bottomTabIndex() + val toIndex = to?.bottomTabIndex() + + if (fromIndex == null || toIndex == null || fromIndex == toIndex) return null + + return if (toIndex > fromIndex) { + NavDirection.End + } else { + NavDirection.Start + } +} + +fun slideInFrom( + layoutDirection: LayoutDirection, + direction: NavDirection +): EnterTransition { + val sign = when (direction) { + NavDirection.Start -> if (layoutDirection == LayoutDirection.Ltr) -1 else 1 + NavDirection.End -> if (layoutDirection == LayoutDirection.Ltr) 1 else -1 + } + + return slideInHorizontally( + initialOffsetX = { it * sign }, + animationSpec = tween(300) + ) + fadeIn(tween(300)) +} + +fun slideOutTo( + layoutDirection: LayoutDirection, + direction: NavDirection +): ExitTransition { + val sign = when (direction) { + NavDirection.Start -> if (layoutDirection == LayoutDirection.Ltr) -1 else 1 + NavDirection.End -> if (layoutDirection == LayoutDirection.Ltr) 1 else -1 + } + + return slideOutHorizontally( + targetOffsetX = { -it * sign }, + animationSpec = tween(300) + ) + fadeOut(tween(300)) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/app/navigation/NavGraph.kt b/app/src/main/java/com/drdisagree/iconify/app/navigation/NavGraph.kt new file mode 100644 index 000000000..4f5529f29 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/app/navigation/NavGraph.kt @@ -0,0 +1,257 @@ +package com.drdisagree.iconify.app.navigation + +import androidx.compose.animation.core.tween +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.scaleIn +import androidx.compose.animation.scaleOut +import androidx.compose.animation.slideInHorizontally +import androidx.compose.animation.slideOutHorizontally +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.saveable.Saver +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.platform.LocalInspectionMode +import androidx.compose.ui.platform.LocalLayoutDirection +import androidx.navigation.NavDestination +import androidx.navigation.NavDestination.Companion.hasRoute +import androidx.navigation.NavDestination.Companion.hierarchy +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.composable +import androidx.navigation.compose.currentBackStackEntryAsState +import androidx.navigation.navigation +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.ui.components.scaffolds.MainScaffold +import com.drdisagree.iconify.core.ui.utils.sharedHiltViewModel +import com.drdisagree.iconify.features.common.viewmodels.BottomNavViewModel +import com.drdisagree.iconify.features.home.cellularicons.screens.CellularIconScreen +import com.drdisagree.iconify.features.home.iconpack.screens.IconPackScreen +import com.drdisagree.iconify.features.home.iconshape.screens.IconShapeScreen +import com.drdisagree.iconify.features.home.main.screens.HomeScreen +import com.drdisagree.iconify.features.home.notification.screens.NotificationScreen +import com.drdisagree.iconify.features.home.settingsicons.screens.SettingsIconsScreen +import com.drdisagree.iconify.features.home.toastframe.screens.ToastFrameScreen +import com.drdisagree.iconify.features.home.tweaks.screens.TweaksScreen +import com.drdisagree.iconify.features.home.wifiicons.screens.WifiIconScreen +import com.drdisagree.iconify.features.onboarding.screens.OnboardingScreen +import com.drdisagree.iconify.features.settings.lookandfeel.screens.LookAndFeelScreen +import com.drdisagree.iconify.features.settings.main.screens.SettingsScreen +import com.drdisagree.iconify.features.xposed.lockscreen.albumart.screens.LockscreenAlbumArtScreen +import com.drdisagree.iconify.features.xposed.lockscreen.clock.screens.LockscreenClockScreen +import com.drdisagree.iconify.features.xposed.lockscreen.depthwallpaper.screens.DepthWallpaperScreen +import com.drdisagree.iconify.features.xposed.lockscreen.location.screens.LocationBrowseScreen +import com.drdisagree.iconify.features.xposed.lockscreen.main.screens.LockscreenScreen +import com.drdisagree.iconify.features.xposed.lockscreen.weather.screens.LockscreenWeatherScreen +import com.drdisagree.iconify.features.xposed.lockscreen.widgets.main.screens.LockscreenWidgetsScreen +import com.drdisagree.iconify.features.xposed.lockscreen.widgets.weather.screens.LockscreenWidgetsWeatherScreen +import com.drdisagree.iconify.features.xposed.main.screens.XposedScreen +import com.drdisagree.iconify.features.xposed.quicksettings.headerimage.screens.HeaderImageScreen +import com.drdisagree.iconify.features.xposed.quicksettings.main.screens.QuickSettingsScreen +import com.drdisagree.iconify.features.xposed.quicksettings.margins.screens.QsMarginsScreen +import com.drdisagree.iconify.features.xposed.quicksettings.themes.screens.QsThemesScreen +import com.drdisagree.iconify.features.xposed.quicksettings.transparency.screens.QsTransparencyScreen +import com.drdisagree.iconify.features.xposed.statusbar.clockchip.screens.ClockChipScreen +import com.drdisagree.iconify.features.xposed.statusbar.dualstatusbar.screens.DualStatusbarScreen +import com.drdisagree.iconify.features.xposed.statusbar.logo.screens.StatusbarLogoScreen +import com.drdisagree.iconify.features.xposed.statusbar.main.screens.StatusbarScreen +import com.drdisagree.iconify.features.xposed.volumepanel.screens.VolumePanelScreen +import kotlinx.serialization.json.Json + +@Composable +fun NavGraph( + skipOnboarding: Boolean, + bottomNavViewModel: BottomNavViewModel = sharedHiltViewModel() +) { + val previewMode = LocalInspectionMode.current + val navController = LocalNavController.current + val layoutDirection = LocalLayoutDirection.current + + val startDestination = rememberSaveable( + saver = Saver( + save = { route: NavRoutes -> Json.encodeToString(NavRoutes.serializer(), route) }, + restore = { str: String -> Json.decodeFromString(NavRoutes.serializer(), str) } + ) + ) { + if (!previewMode && skipOnboarding) { + NavRoutes.Main + } else { + NavRoutes.Onboarding + } + } + + MainScaffold { + NavHost( + navController = navController, + startDestination = startDestination, + enterTransition = { + when (initialState.destination) { + NavRoutes.Onboarding -> { + slideInHorizontally( + initialOffsetX = { 300 }, + animationSpec = tween(500) + ) + fadeIn(animationSpec = tween(500)) + } + + else -> { + val dir = resolveDirection( + initialState.destination, + targetState.destination + ) + + if (dir != null) { + slideInFrom( + layoutDirection = layoutDirection, + direction = dir + ) + } else { + scaleIn( + initialScale = 1.05f, + animationSpec = tween(300) + ) + fadeIn(animationSpec = tween(300)) + } + } + } + }, + exitTransition = { + when (targetState.destination) { + NavRoutes.Onboarding -> { + slideOutHorizontally( + targetOffsetX = { -300 }, + animationSpec = tween(500) + ) + fadeOut(animationSpec = tween(500)) + } + + else -> { + val dir = resolveDirection( + initialState.destination, + targetState.destination + ) + + if (dir != null) { + slideOutTo( + layoutDirection = layoutDirection, + direction = dir + ) + } else { + scaleOut( + targetScale = 0.95f, + animationSpec = tween(300) + ) + fadeOut(animationSpec = tween(300)) + } + } + } + }, + popEnterTransition = { + val dir = resolveDirection( + initialState.destination, + targetState.destination + ) + + if (dir != null) { + slideInFrom( + layoutDirection = layoutDirection, + direction = dir + ) + } else { + fadeIn(tween(300)) + scaleIn( + initialScale = 0.95f, + animationSpec = tween(300) + ) + } + }, + popExitTransition = { + val dir = resolveDirection( + initialState.destination, + targetState.destination + ) + + if (dir != null) { + slideOutTo( + layoutDirection = layoutDirection, + direction = dir + ) + } else { + fadeOut(tween(300)) + scaleOut( + targetScale = 1.05f, + animationSpec = tween(300) + ) + } + } + ) { + composable { + OnboardingScreen(navController = navController) + } + navigation(startDestination = NavRoutes.Home.Root) { + navigation(startDestination = NavRoutes.Home.Tab) { + composable { HomeScreen() } + composable { TweaksScreen() } + composable { IconPackScreen() } + composable { CellularIconScreen() } + composable { WifiIconScreen() } + composable { SettingsIconsScreen() } + composable { NotificationScreen() } + composable { IconShapeScreen() } + composable { ToastFrameScreen() } + } + + navigation(startDestination = NavRoutes.Xposed.Tab) { + composable { XposedScreen() } + + navigation(startDestination = NavRoutes.Xposed.Statusbar.Main) { + composable { StatusbarScreen() } + composable { ClockChipScreen() } + composable { StatusbarLogoScreen() } + composable { DualStatusbarScreen() } + } + + navigation(startDestination = NavRoutes.Xposed.QuickSettings.Main) { + composable { QuickSettingsScreen() } + composable { QsTransparencyScreen() } + composable { HeaderImageScreen() } + composable { QsThemesScreen() } + composable { QsMarginsScreen() } + } + + navigation(startDestination = NavRoutes.Xposed.Lockscreen.Main) { + composable { LockscreenScreen() } + composable { LockscreenClockScreen() } + composable { LockscreenWeatherScreen() } + + navigation(startDestination = NavRoutes.Xposed.Lockscreen.Widgets.Main) { + composable { LockscreenWidgetsScreen() } + composable { LockscreenWidgetsWeatherScreen() } + } + + composable { DepthWallpaperScreen() } + composable { LockscreenAlbumArtScreen() } + composable { LocationBrowseScreen() } + } + + composable { VolumePanelScreen() } + } + + navigation(startDestination = NavRoutes.Settings.Tab) { + composable { SettingsScreen() } + composable { LookAndFeelScreen() } + } + } + } + } + + val navBackStackEntry by navController.currentBackStackEntryAsState() + + LaunchedEffect(navBackStackEntry) { + val currentDestination = navBackStackEntry?.destination + val selectedIndex = currentDestination.bottomTabIndex() + ?: BOTTOM_BAR_TABS.indexOf(DEFAULT_BOTTOM_BAR_TAB) + + bottomNavViewModel.selectTab(selectedIndex) + } +} + +fun NavDestination?.bottomTabIndex(): Int? { + return BOTTOM_BAR_TABS.map { it.route }.indexOfFirst { tab -> + this?.hierarchy?.any { it.hasRoute(tab::class) } == true + }.takeIf { it >= 0 } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/app/navigation/NavRoutes.kt b/app/src/main/java/com/drdisagree/iconify/app/navigation/NavRoutes.kt new file mode 100644 index 000000000..93e443304 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/app/navigation/NavRoutes.kt @@ -0,0 +1,189 @@ +package com.drdisagree.iconify.app.navigation + +import com.drdisagree.iconify.R +import kotlinx.serialization.Serializable + +@Serializable +sealed class NavRoutes { + + interface BottomBarTab { + val route: NavRoutes + val title: Int + val iconChecked: Int + val iconUnchecked: Int + } + + @Serializable + data object Onboarding : NavRoutes() + + @Serializable + data object Main : NavRoutes() + + @Serializable + sealed class Home : NavRoutes() { + + @Serializable + data object Root : Home() + + @Serializable + data object IconPack : Home() + + @Serializable + data object CellularIcons : Home() + + @Serializable + data object WifiIcons : Home() + + @Serializable + data object SettingsIcons : Home() + + @Serializable + data object Notification : Home() + + @Serializable + data object ToastFrame : Home() + + @Serializable + data object IconShape : Home() + + @Serializable + data object More : Home() + + @Serializable + data object Tab : Home(), BottomBarTab { + override val route: NavRoutes = Root + override val title: Int = R.string.navbar_home + override val iconChecked: Int = R.drawable.ic_navbar_home_checked + override val iconUnchecked: Int = R.drawable.ic_navbar_home_unchecked + } + } + + @Serializable + sealed class Xposed : NavRoutes() { + + @Serializable + data object Root : Xposed() + + @Serializable + data object Main : Xposed() + + @Serializable + sealed class Statusbar : Xposed() { + + @Serializable + data object Root : Statusbar() + + @Serializable + data object Main : Statusbar() + + @Serializable + data object ClockChip : Statusbar() + + @Serializable + data object Logo : Statusbar() + + @Serializable + data object DualStatusbar : Statusbar() + } + + @Serializable + sealed class QuickSettings : Xposed() { + + @Serializable + data object Root : QuickSettings() + + @Serializable + data object Main : QuickSettings() + + @Serializable + data object Transparency : QuickSettings() + + @Serializable + data object HeaderImage : QuickSettings() + + @Serializable + data object Themes : QuickSettings() + + @Serializable + data object Margins : QuickSettings() + } + + @Serializable + sealed class Lockscreen : Xposed() { + + @Serializable + data object Root : Lockscreen() + + @Serializable + data object Main : Lockscreen() + + @Serializable + data object Clock : Lockscreen() + + @Serializable + data object Weather : Lockscreen() + + @Serializable + sealed class Widgets : Lockscreen() { + + @Serializable + data object Root : Widgets() + + @Serializable + data object Main : Widgets() + + @Serializable + data object Weather : Widgets() + } + + @Serializable + data object Location : Lockscreen() + + @Serializable + data object DepthWallpaper : Lockscreen() + + @Serializable + data object MediaAlbumArt : Lockscreen() + } + + @Serializable + data object VolumePanel : Xposed() + + @Serializable + data object Tab : Xposed(), BottomBarTab { + override val route: NavRoutes = Root + override val title: Int = R.string.navbar_xposed + override val iconChecked: Int = R.drawable.ic_navbar_xposed_checked + override val iconUnchecked: Int = R.drawable.ic_navbar_xposed_unchecked + } + } + + @Serializable + sealed class Settings : NavRoutes() { + + @Serializable + data object Root : Settings() + + @Serializable + data object LookAndFeel : Settings() + + @Serializable + data object Credits : Settings() + + @Serializable + data object Tab : Settings(), BottomBarTab { + override val route: NavRoutes = Root + override val title: Int = R.string.navbar_settings + override val iconChecked: Int = R.drawable.ic_navbar_settings_checked + override val iconUnchecked: Int = R.drawable.ic_navbar_settings_unchecked + } + } +} + +val BOTTOM_BAR_TABS = listOf( + NavRoutes.Xposed.Tab, + NavRoutes.Home.Tab, + NavRoutes.Settings.Tab, +) + +val DEFAULT_BOTTOM_BAR_TAB = NavRoutes.Home.Tab \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/app/navigation/NavTransitions.kt b/app/src/main/java/com/drdisagree/iconify/app/navigation/NavTransitions.kt new file mode 100644 index 000000000..3bbf041e6 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/app/navigation/NavTransitions.kt @@ -0,0 +1,49 @@ +package com.drdisagree.iconify.app.navigation + +import androidx.compose.animation.EnterTransition +import androidx.compose.animation.ExitTransition +import androidx.compose.animation.core.FastOutSlowInEasing +import androidx.compose.animation.core.LinearEasing +import androidx.compose.animation.core.tween +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.slideInHorizontally +import androidx.compose.animation.slideOutHorizontally + +fun slideFadeInFromRight(): EnterTransition { + return slideInHorizontally( + initialOffsetX = { (it * 0.15f).toInt() }, + animationSpec = tween(250, easing = FastOutSlowInEasing) + ) + fadeIn( + initialAlpha = 0.5f, + animationSpec = tween(200, delayMillis = 66, easing = LinearEasing) + ) +} + +fun slideFadeOutToRight(): ExitTransition { + return slideOutHorizontally( + targetOffsetX = { (it * 0.10f).toInt() }, + animationSpec = tween(250, easing = FastOutSlowInEasing) + ) + fadeOut( + animationSpec = tween(50, easing = LinearEasing) + ) +} + +fun slideFadeInFromLeft(): EnterTransition { + return slideInHorizontally( + initialOffsetX = { -(it * 0.15f).toInt() }, + animationSpec = tween(350, easing = FastOutSlowInEasing) + ) + fadeIn( + initialAlpha = 0.5f, + animationSpec = tween(50, delayMillis = 66, easing = LinearEasing) + ) +} + +fun slideFadeOutToLeft(): ExitTransition { + return slideOutHorizontally( + targetOffsetX = { -(it * 0.10f).toInt() }, + animationSpec = tween(250, easing = FastOutSlowInEasing) + ) + fadeOut( + animationSpec = tween(50, easing = LinearEasing) + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/common/CompositionLocals.kt b/app/src/main/java/com/drdisagree/iconify/core/common/CompositionLocals.kt new file mode 100644 index 000000000..60f2e5aab --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/common/CompositionLocals.kt @@ -0,0 +1,42 @@ +package com.drdisagree.iconify.core.common + +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.material3.windowsizeclass.WindowSizeClass +import androidx.compose.runtime.compositionLocalOf +import androidx.compose.runtime.staticCompositionLocalOf +import androidx.navigation.NavHostController +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.kyant.backdrop.backdrops.LayerBackdrop +import dev.chrisbanes.haze.HazeState + +val LocalWeakHaptic = staticCompositionLocalOf { {} } + +val LocalStrongHaptic = staticCompositionLocalOf { {} } + +val LocalDarkMode = staticCompositionLocalOf { + error("No dark mode provided") +} + +val LocalPreferenceController = compositionLocalOf { + error("No PreferenceController provided. Wrap your UI in ProvidePreferenceController { }.") +} + +val LocalLayerBackdrop = staticCompositionLocalOf { + error("No LayerBackdrop provided") +} + +val LocalHazeState = staticCompositionLocalOf { + error("No HazeState provided") +} + +val LocalNavController = staticCompositionLocalOf { + error("No NavController provided") +} + +val LocalInnerPadding = staticCompositionLocalOf { + error("No PaddingValues provided") +} + +val LocalWindowSizeClass = staticCompositionLocalOf { + error("No WindowSizeClass provided") +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/common/LocalSettings.kt b/app/src/main/java/com/drdisagree/iconify/core/common/LocalSettings.kt new file mode 100644 index 000000000..b335e5233 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/common/LocalSettings.kt @@ -0,0 +1,25 @@ +package com.drdisagree.iconify.core.common + +import androidx.appcompat.app.AppCompatDelegate +import androidx.compose.runtime.compositionLocalOf +import com.drdisagree.iconify.data.models.AppSeedColors +import com.drdisagree.iconify.data.states.SettingsState +import com.materialkolor.Contrast +import com.materialkolor.PaletteStyle + +val defaultSettings = SettingsState( + themeMode = AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM, + isDynamicColor = true, + seedColor = AppSeedColors.Blue.seedColor.primaryColor, + paletteStyle = PaletteStyle.TonalSpot, + isExpressive = false, + isAmoledTheme = false, + contrastLevel = Contrast.Default.value, + isHapticEnabled = true, + floatingBottomBar = true, + blurEffect = true, + savedVersionCode = 0, + isLoaded = false, +) + +val LocalSettings = compositionLocalOf { defaultSettings } \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/di/DataStoreModule.kt b/app/src/main/java/com/drdisagree/iconify/core/di/DataStoreModule.kt new file mode 100644 index 000000000..0da5f8760 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/di/DataStoreModule.kt @@ -0,0 +1,35 @@ +package com.drdisagree.iconify.core.di + +import android.content.Context +import androidx.datastore.core.DataStore +import androidx.datastore.preferences.core.PreferenceDataStoreFactory +import androidx.datastore.preferences.core.Preferences +import androidx.datastore.preferences.preferencesDataStoreFile +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.android.qualifiers.ApplicationContext +import dagger.hilt.components.SingletonComponent +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object DataStoreModule { + + @Provides + @Singleton + fun provideCoroutineScope(): CoroutineScope = + CoroutineScope(SupervisorJob() + Dispatchers.IO) + + @Provides + @Singleton + fun provideDataStore( + @ApplicationContext context: Context + ): DataStore = + PreferenceDataStoreFactory.create( + produceFile = { context.preferencesDataStoreFile("${context.packageName}.settings") } + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/di/PreferenceEntryPoint.kt b/app/src/main/java/com/drdisagree/iconify/core/di/PreferenceEntryPoint.kt new file mode 100644 index 000000000..38f707c67 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/di/PreferenceEntryPoint.kt @@ -0,0 +1,14 @@ +package com.drdisagree.iconify.core.di + +import com.drdisagree.iconify.data.storage.DataStoreStorage +import com.drdisagree.iconify.data.storage.SharedPreferencesStorage +import dagger.hilt.EntryPoint +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent + +@EntryPoint +@InstallIn(SingletonComponent::class) +interface PreferenceEntryPoint { + fun dataStoreStorage(): DataStoreStorage + fun sharedPrefsStorage(): SharedPreferencesStorage +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/di/PreferenceModule.kt b/app/src/main/java/com/drdisagree/iconify/core/di/PreferenceModule.kt new file mode 100644 index 000000000..4946e5161 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/di/PreferenceModule.kt @@ -0,0 +1,38 @@ +package com.drdisagree.iconify.core.di + +import com.drdisagree.iconify.data.common.XposedConst.PREF_FILE_NAME +import com.drdisagree.iconify.data.storage.DataStoreStorage +import com.drdisagree.iconify.data.storage.PreferenceStorage +import com.drdisagree.iconify.data.storage.SharedPreferencesStorage +import dagger.Binds +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class PreferenceModule { + + @Binds + @Singleton + @SharedPrefs + abstract fun bindSharedPreferencesStorage( + impl: SharedPreferencesStorage + ): PreferenceStorage + + @Binds + @Singleton + @DataStore + abstract fun bindDataStoreStorage( + impl: DataStoreStorage + ): PreferenceStorage + + companion object { + + @Provides + @Singleton + fun provideFileName(): String = PREF_FILE_NAME + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/di/Qualifiers.kt b/app/src/main/java/com/drdisagree/iconify/core/di/Qualifiers.kt new file mode 100644 index 000000000..754f8a2e3 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/di/Qualifiers.kt @@ -0,0 +1,11 @@ +package com.drdisagree.iconify.core.di + +import javax.inject.Qualifier + +@Qualifier +@Retention(AnnotationRetention.BINARY) +annotation class SharedPrefs + +@Qualifier +@Retention(AnnotationRetention.BINARY) +annotation class DataStore \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/di/WeatherModule.kt b/app/src/main/java/com/drdisagree/iconify/core/di/WeatherModule.kt new file mode 100644 index 000000000..1ec7fb7b9 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/di/WeatherModule.kt @@ -0,0 +1,23 @@ +package com.drdisagree.iconify.core.di + +import android.content.Context +import com.drdisagree.iconify.core.utils.OmniJawsClient +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.android.qualifiers.ApplicationContext +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object WeatherModule { + + @Provides + @Singleton + fun provideOmniJawsClient( + @ApplicationContext context: Context + ): OmniJawsClient { + return OmniJawsClient(context) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefArrayRes.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefArrayRes.kt new file mode 100644 index 000000000..13740dfc6 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefArrayRes.kt @@ -0,0 +1,41 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.annotation.ArrayRes +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringArrayResource + +sealed class PrefArrayRes { + data class Hardcoded(val values: List) : PrefArrayRes() + + class Composable(val producer: @androidx.compose.runtime.Composable () -> List) : + PrefArrayRes() +} + +// From a hardcoded list of PrefStringRes +@JvmName("arrayResFromPrefStringRes") +fun arrayRes(values: List): PrefArrayRes = + PrefArrayRes.Hardcoded(values) + +// From a plain string list +@JvmName("arrayResFromStrings") +fun arrayRes(values: List): PrefArrayRes = + PrefArrayRes.Hardcoded(values.map { PrefStringRes.Hardcoded(it) }) + +// From an array resource ID (e.g. R.array.my_entries) +fun arrayRes(@ArrayRes id: Int): PrefArrayRes = + PrefArrayRes.Composable { stringArrayResource(id).toList() } + +@Composable +fun PrefArrayRes.resolve(): List = when (this) { + is PrefArrayRes.Hardcoded -> values + is PrefArrayRes.Composable -> producer().map { PrefStringRes.Hardcoded(it) } +} + +@Composable +fun PrefArrayRes.resolveToStrings(): List = when (this) { + is PrefArrayRes.Hardcoded -> values.map { it.resolve() } + is PrefArrayRes.Composable -> producer() +} + +@Composable +fun PrefArrayRes?.resolveOrNull(): List? = this?.resolve() \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefIconRes.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefIconRes.kt new file mode 100644 index 000000000..b0aed4879 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefIconRes.kt @@ -0,0 +1,37 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.annotation.DrawableRes +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.painter.Painter +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.rememberVectorPainter +import androidx.compose.ui.res.painterResource + +sealed class PrefIconRes { + + data class Drawable(@param:DrawableRes val resId: Int) : PrefIconRes() + + data class Vector(val imageVector: ImageVector) : PrefIconRes() + + class Composable(val producer: @androidx.compose.runtime.Composable () -> Painter) : + PrefIconRes() +} + +fun iconRes(@DrawableRes resId: Int): PrefIconRes = + PrefIconRes.Drawable(resId) + +fun iconRes(imageVector: ImageVector): PrefIconRes = + PrefIconRes.Vector(imageVector) + +fun iconRes(producer: @Composable () -> Painter): PrefIconRes = + PrefIconRes.Composable(producer) + +@Composable +fun PrefIconRes.resolve(): Painter = when (this) { + is PrefIconRes.Drawable -> painterResource(resId) + is PrefIconRes.Vector -> rememberVectorPainter(imageVector) + is PrefIconRes.Composable -> producer() +} + +@Composable +fun PrefIconRes?.resolveOrNull(): Painter? = this?.resolve() \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefStringRes.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefStringRes.kt new file mode 100644 index 000000000..bcb4b130d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefStringRes.kt @@ -0,0 +1,32 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.annotation.StringRes +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource + +sealed class PrefStringRes { + data class Hardcoded(val value: String) : PrefStringRes() + + class Composable(val producer: @androidx.compose.runtime.Composable () -> String) : + PrefStringRes() +} + +fun stringRes(value: String): PrefStringRes = PrefStringRes.Hardcoded(value) + +fun stringRes(@StringRes id: Int): PrefStringRes = + PrefStringRes.Composable { stringResource(id) } + +fun stringRes(@StringRes id: Int, vararg formatArgs: Any): PrefStringRes = + PrefStringRes.Composable { stringResource(id, *formatArgs) } + +fun stringRes(producer: @Composable () -> String): PrefStringRes = + PrefStringRes.Composable(producer) + +@Composable +fun PrefStringRes.resolve(): String = when (this) { + is PrefStringRes.Hardcoded -> value + is PrefStringRes.Composable -> producer() +} + +@Composable +fun PrefStringRes?.resolveOrNull(): String? = this?.resolve() \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefValue.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefValue.kt new file mode 100644 index 000000000..de1ae10ff --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PrefValue.kt @@ -0,0 +1,29 @@ +package com.drdisagree.iconify.core.preferences + +import android.util.Log + +sealed class PrefValue { + data class BoolValue(val v: Boolean) : PrefValue() + data class IntValue(val v: Int) : PrefValue() + data class FloatValue(val v: Float) : PrefValue() + data class DoubleValue(val v: Double) : PrefValue() + data class StringValue(val v: String) : PrefValue() + data class StringSetValue(val v: Set) : PrefValue() + object None : PrefValue() +} + +fun Any?.toPrefValue(): PrefValue { + return if (this == null) PrefValue.None + else when (this) { + is Boolean -> PrefValue.BoolValue(this) + is Int -> PrefValue.IntValue(this) + is Float -> PrefValue.FloatValue(this) + is Double -> PrefValue.DoubleValue(this) + is String -> PrefValue.StringValue(this) + is Set<*> -> PrefValue.StringSetValue(filterIsInstance().toSet()) + else -> { + Log.w("PrefValue", "Unsupported type for PrefValue: ${this::class}") + PrefValue.None + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceCategoryScope.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceCategoryScope.kt new file mode 100644 index 000000000..d942118bb --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceCategoryScope.kt @@ -0,0 +1,392 @@ +package com.drdisagree.iconify.core.preferences + +import android.content.Context +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import androidx.navigation.NavController +import com.drdisagree.iconify.core.ui.components.preferences.FilePickerType +import com.drdisagree.iconify.data.keys.Key +import com.materialkolor.ktx.toHex + +class PreferenceCategoryScope { + val prefs = mutableListOf() + + fun composable( + key: String, + isVisible: ((PreferenceController) -> Boolean) = { true }, + content: @Composable () -> Unit, + ) = prefs.add( + PreferenceDefinition( + key = key, + title = PrefStringRes.Hardcoded(""), + defaultValue = PrefValue.None, + type = PreferenceType.Custom(content), + isVisible = isVisible, + ) + ) + + fun composable( + key: Key, + isVisible: ((PreferenceController) -> Boolean) = { true }, + content: @Composable () -> Unit, + ) = prefs.add( + PreferenceDefinition( + key = key.name, + title = PrefStringRes.Hardcoded(""), + defaultValue = PrefValue.None, + type = PreferenceType.Custom(content), + isVisible = isVisible, + ) + ) + + fun switch( + key: String, + isMasterSwitch: Boolean = false, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: Boolean = false, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key, title, defaultValue.toPrefValue(), PreferenceType.Switch(isMasterSwitch), + icon, summary, isVisible, isEnabled + ) + ) + + fun switch( + key: Key, + isMasterSwitch: Boolean = false, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: Boolean = key.default as? Boolean ?: false, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key.name, title, defaultValue.toPrefValue(), PreferenceType.Switch(isMasterSwitch), + icon, summary, isVisible, isEnabled + ) + ) + + fun twoTargetSwitch( + key: String, + icon: PrefIconRes? = null, + title: PrefStringRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + defaultValue: Boolean = false, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + onClick: (Context, PreferenceController, NavController) -> Unit, + ) = prefs.add( + PreferenceDefinition( + key, title, defaultValue.toPrefValue(), + PreferenceType.TwoTargetSwitch(onClick), + icon, summary, isVisible, isEnabled + ) + ) + + fun twoTargetSwitch( + key: Key, + icon: PrefIconRes? = null, + title: PrefStringRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + defaultValue: Boolean = key.default as? Boolean ?: false, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + onClick: (Context, PreferenceController, NavController) -> Unit, + ) = prefs.add( + PreferenceDefinition( + key.name, title, defaultValue.toPrefValue(), + PreferenceType.TwoTargetSwitch(onClick), + icon, summary, isVisible, isEnabled + ) + ) + + fun slider( + key: String, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: Float = 0f, + min: Float = 0f, + max: Float = 100f, + steps: Int = 0, + valueLabel: ((Float) -> String)? = null, + applyOnValueChangeFinished: Boolean = false, + showResetButton: Boolean = false, + showDefaultIndicator: Boolean = false, + hideDefaultValue: Boolean = false, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key, title, defaultValue.toPrefValue(), + PreferenceType.Slider( + min, max, steps, valueLabel, applyOnValueChangeFinished, + showResetButton, showDefaultIndicator, hideDefaultValue + ), + icon, summary, isVisible, isEnabled + ) + ) + + fun slider( + key: Key, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: Float = key.default as? Float ?: 0f, + min: Float = 0f, + max: Float = 100f, + steps: Int = 0, + valueLabel: ((Float) -> String)? = null, + applyOnValueChangeFinished: Boolean = false, + showResetButton: Boolean = false, + showDefaultIndicator: Boolean = false, + hideDefaultValue: Boolean = false, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key.name, title, defaultValue.toPrefValue(), + PreferenceType.Slider( + min, max, steps, valueLabel, applyOnValueChangeFinished, + showResetButton, showDefaultIndicator, hideDefaultValue + ), + icon, summary, isVisible, isEnabled + ) + ) + + fun listPref( + key: String, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: String = "", + entries: PrefArrayRes, + entryValues: PrefArrayRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key, title, defaultValue.toPrefValue(), + PreferenceType.ListPref(entries, entryValues), + icon, summary, isVisible, isEnabled + ) + ) + + fun listPref( + key: Key, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: String = key.default as? String ?: "", + entries: PrefArrayRes, + entryValues: PrefArrayRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key.name, title, defaultValue.toPrefValue(), + PreferenceType.ListPref(entries, entryValues), + icon, summary, isVisible, isEnabled + ) + ) + + fun multiList( + key: String, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: Set = emptySet(), + entries: PrefArrayRes, + entryValues: PrefArrayRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key, title, defaultValue.toPrefValue(), + PreferenceType.MultiList(entries, entryValues), + icon, summary, isVisible, isEnabled + ) + ) + + @Suppress("UNCHECKED_CAST") + fun multiList( + key: Key, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: Set = key.default as? Set ?: emptySet(), + entries: PrefArrayRes, + entryValues: PrefArrayRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key.name, title, defaultValue.toPrefValue(), + PreferenceType.MultiList(entries, entryValues), + icon, summary, isVisible, isEnabled + ) + ) + + fun editText( + key: String, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: String = "", + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key, title, defaultValue.toPrefValue(), PreferenceType.EditText, + icon, summary, isVisible, isEnabled + ) + ) + + fun editText( + key: Key, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: String = key.default as? String ?: "", + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key.name, title, defaultValue.toPrefValue(), PreferenceType.EditText, + icon, summary, isVisible, isEnabled + ) + ) + + fun colorPicker( + key: String, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: String = Color.White.toHex(), + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key, title, defaultValue.toPrefValue(), PreferenceType.ColorPicker, + icon, summary, isVisible, isEnabled + ) + ) + + fun colorPicker( + key: Key, + icon: PrefIconRes? = null, + title: PrefStringRes, + defaultValue: String = key.default as? String ?: Color.White.toHex(), + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key.name, title, defaultValue.toPrefValue(), PreferenceType.ColorPicker, + icon, summary, isVisible, isEnabled + ) + ) + + fun filePicker( + key: String, + icon: PrefIconRes? = null, + title: PrefStringRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + pickerType: FilePickerType = FilePickerType.Any, + saveFileUri: Boolean = false, + onFileSelected: (PreferenceController, String) -> Unit = { _, _ -> }, + ) = prefs.add( + PreferenceDefinition( + key, + title, + PrefValue.None, + PreferenceType.FilePicker(pickerType, saveFileUri, onFileSelected), + icon, summary, isVisible, isEnabled + ) + ) + + fun filePicker( + key: Key, + icon: PrefIconRes? = null, + title: PrefStringRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + pickerType: FilePickerType = FilePickerType.Any, + saveFileUri: Boolean = false, + onFileSelected: (PreferenceController, String) -> Unit = { _, _ -> }, + ) = prefs.add( + PreferenceDefinition( + key.name, + title, + PrefValue.None, + PreferenceType.FilePicker(pickerType, saveFileUri, onFileSelected), + icon, summary, isVisible, isEnabled + ) + ) + + fun action( + key: String, + icon: PrefIconRes? = null, + title: PrefStringRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + onClick: (Context, PreferenceController, NavController) -> Unit, + ) = prefs.add( + PreferenceDefinition( + key, title, PrefValue.None, + PreferenceType.Action(onClick), + icon, summary, isVisible, isEnabled + ) + ) + + fun action( + key: Key, + icon: PrefIconRes? = null, + title: PrefStringRes, + summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + onClick: (Context, PreferenceController, NavController) -> Unit, + ) = prefs.add( + PreferenceDefinition( + key.name, title, PrefValue.None, + PreferenceType.Action(onClick), + icon, summary, isVisible, isEnabled + ) + ) + + fun info( + key: String, + icon: PrefIconRes? = null, + text: PrefStringRes, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key, text, PrefValue.None, PreferenceType.Info, + icon, null, isVisible, isEnabled + ) + ) + + fun info( + key: Key, + icon: PrefIconRes? = null, + text: PrefStringRes, + isVisible: ((PreferenceController) -> Boolean) = { true }, + isEnabled: ((PreferenceController) -> Boolean) = { true }, + ) = prefs.add( + PreferenceDefinition( + key.name, text, PrefValue.None, PreferenceType.Info, + icon, null, isVisible, isEnabled + ) + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceController.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceController.kt new file mode 100644 index 000000000..b43c48423 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceController.kt @@ -0,0 +1,248 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.State +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.mutableStateMapOf +import androidx.compose.runtime.remember +import com.drdisagree.iconify.data.keys.Key +import com.drdisagree.iconify.data.storage.PreferenceStorage +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.filter +import kotlinx.coroutines.launch + +@Suppress("unused") +class PreferenceController( + private val storage: PreferenceStorage, + private val scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate), +) { + private val _prefs = mutableStateMapOf() + val prefs: Map get() = _prefs + + private val _changesFlow = MutableStateFlow(null) + val changesFlow: StateFlow = _changesFlow.asStateFlow() + + private val listeners = mutableListOf() + + private val storedSnapshot: Map by lazy { storage.loadAll() } + + init { + scope.launch { + storage.externalChanges + .filter { change -> _prefs.containsKey(change.key) } + .collect { change -> + val current = _prefs[change.key] + if (current != change.value) { + setInternal(change.key, change.value, persist = false) + } + } + } + } + + fun init(key: String, default: PrefValue) { + if (_prefs.containsKey(key)) return + _prefs[key] = storedSnapshot[key] + ?: storage.read(key, default)?.toPrefValue() + ?: default + } + + fun initAll(defaults: Map) = + defaults.forEach { (k, v) -> init(k, v) } + + fun set(key: Key) = setInternal(key.name, key.default.toPrefValue(), persist = true) + + fun set(key: Key, value: PrefValue) = setInternal(key.name, value, persist = true) + + fun set(key: String, value: PrefValue) = setInternal(key, value, persist = true) + + private fun setInternal(key: String, value: PrefValue, persist: Boolean) { + val old = _prefs[key] + if (old == value) return + + _prefs[key] = value + if (persist) storage.write(key, value) + + val event = PreferenceChangeEvent(key, old, value) + _changesFlow.value = event + dispatchToListeners(event) + } + + @Suppress("UNCHECKED_CAST") + inline fun get(key: String, default: T): T { + return when (val pref = get(key)) { + is PrefValue.BoolValue -> pref.v as? T ?: default + is PrefValue.IntValue -> pref.v as? T ?: default + is PrefValue.FloatValue -> pref.v as? T ?: default + is PrefValue.StringValue -> pref.v as? T ?: default + is PrefValue.StringSetValue -> pref.v as? T ?: default + else -> default + } + } + + fun get(key: String): PrefValue? = _prefs[key] + + fun get(key: String, default: PrefValue?): PrefValue? { + if (default != null) init(key, default) + return _prefs[key] ?: default + } + + fun getBoolean(key: String, default: Boolean = false): Boolean { + init(key, default.toPrefValue()) + return (_prefs[key] as? PrefValue.BoolValue)?.v ?: default + } + + fun getInt(key: String, default: Int = 0): Int { + init(key, default.toPrefValue()) + return (_prefs[key] as? PrefValue.IntValue)?.v ?: default + } + + fun getFloat(key: String, default: Float = 0f): Float { + init(key, default.toPrefValue()) + return (_prefs[key] as? PrefValue.FloatValue)?.v ?: default + } + + fun getDouble(key: String, default: Double = 0.0): Double { + init(key, default.toPrefValue()) + return (_prefs[key] as? PrefValue.DoubleValue)?.v ?: default + } + + fun getString(key: String, default: String = ""): String { + init(key, default.toPrefValue()) + return (_prefs[key] as? PrefValue.StringValue)?.v ?: default + } + + fun getStringSet(key: String, default: Set = emptySet()): Set { + init(key, default.toPrefValue()) + return (_prefs[key] as? PrefValue.StringSetValue)?.v ?: default + } + + fun get(key: Key): PrefValue? { + key.default?.toPrefValue()?.let { init(key.name, it) } + return _prefs[key.name] ?: key.default?.toPrefValue() + } + + fun get(key: Key, default: PrefValue?): PrefValue? { + init(key.name, default ?: key.default?.toPrefValue() ?: return _prefs[key.name]) + return _prefs[key.name] ?: default + } + + fun getBoolean(key: Key): Boolean { + val default = key.default as? Boolean ?: false + init(key.name, default.toPrefValue()) + return (_prefs[key.name] as? PrefValue.BoolValue)?.v ?: default + } + + fun getInt(key: Key): Int { + val default = key.default as? Int ?: 0 + init(key.name, default.toPrefValue()) + return (_prefs[key.name] as? PrefValue.IntValue)?.v ?: default + } + + fun getFloat(key: Key): Float { + val default = key.default as? Float ?: 0f + init(key.name, default.toPrefValue()) + return (_prefs[key.name] as? PrefValue.FloatValue)?.v ?: default + } + + fun getDouble(key: Key): Double { + val default = key.default as? Double ?: 0.0 + init(key.name, default.toPrefValue()) + return (_prefs[key.name] as? PrefValue.DoubleValue)?.v ?: default + } + + fun getString(key: Key): String { + val default = key.default as? String ?: "" + init(key.name, default.toPrefValue()) + return (_prefs[key.name] as? PrefValue.StringValue)?.v ?: default + } + + @Suppress("UNCHECKED_CAST") + fun getStringSet(key: Key): Set { + val default = key.default as? Set ?: emptySet() + init(key.name, default.toPrefValue()) + return (_prefs[key.name] as? PrefValue.StringSetValue)?.v ?: default + } + + fun setBoolean(key: String, value: Boolean) = set(key, value.toPrefValue()) + + fun setInt(key: String, value: Int) = set(key, value.toPrefValue()) + + fun setFloat(key: String, value: Float) = set(key, value.toPrefValue()) + + fun setLong(key: String, value: Long) = set(key, value.toPrefValue()) + + fun setString(key: String, value: String) = set(key, value.toPrefValue()) + + fun setStringSet(key: String, value: Set) = set(key, value.toPrefValue()) + + fun setBoolean(key: Key, value: Boolean) = set(key.name, value.toPrefValue()) + + fun setInt(key: Key, value: Int) = set(key.name, value.toPrefValue()) + + fun setFloat(key: Key, value: Float) = set(key.name, value.toPrefValue()) + + fun setString(key: Key, value: String) = set(key.name, value.toPrefValue()) + + fun setStringSet(key: Key, value: Set) = set(key.name, value.toPrefValue()) + + fun reset(defaults: Map = emptyMap()) { + storage.clearAll() + _prefs.clear() + defaults.forEach { (k, v) -> _prefs[k] = v } + } + + @Composable + inline fun observe(key: String, default: T): State = + remember(key) { + derivedStateOf { + @Suppress("UNCHECKED_CAST") + when (T::class) { + Boolean::class -> getBoolean(key, default as Boolean) as T + Int::class -> getInt(key, default as Int) as T + Float::class -> getFloat(key, default as Float) as T + String::class -> getString(key, default as String) as T + Set::class -> getStringSet(key, default as Set) as T + else -> default + } + } + } + + fun addListener( + key: String? = null, + callback: (PreferenceChangeEvent) -> Unit, + ): PreferenceListenerHandle { + val handle = PreferenceListenerHandle(key, callback) + synchronized(listeners) { listeners.add(handle) } + return handle + } + + fun addListener( + key: Key, + callback: (PreferenceChangeEvent) -> Unit, + ): PreferenceListenerHandle { + val handle = PreferenceListenerHandle(key.name, callback) + synchronized(listeners) { listeners.add(handle) } + return handle + } + + fun removeListener(handle: PreferenceListenerHandle?) { + if (handle != null) synchronized(listeners) { listeners.remove(handle) } + } + + private fun dispatchToListeners(event: PreferenceChangeEvent) { + val snapshot = synchronized(listeners) { listeners.toList() } + snapshot.forEach { if (it.key == null || it.key == event.key) it.callback(event) } + } + + fun dispose() { + scope.cancel() + storage.dispose() + synchronized(listeners) { listeners.clear() } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceListener.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceListener.kt new file mode 100644 index 000000000..9189e8d2b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceListener.kt @@ -0,0 +1,49 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.rememberUpdatedState +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.data.keys.Key + +/** + * Registers a preference listener scoped to the current composition. + * Automatically removed when this composable leaves the tree. + * + * @param key Specific key to watch, or null to watch ALL keys. + * + * Usage: + * PreferenceListener("dark_mode") { event -> + * val isDark = (event.newValue as PrefValue.BoolValue).v + * } + */ +@Composable +fun PreferenceListener( + key: String? = null, + callback: (PreferenceChangeEvent) -> Unit, +) { + val prefController = LocalPreferenceController.current + val latestCallback by rememberUpdatedState(callback) + + DisposableEffect(prefController, key) { + val handle = prefController.addListener(key) { latestCallback(it) } + + onDispose { prefController.removeListener(handle) } + } +} + +@Composable +fun PreferenceListener( + key: Key, + callback: (PreferenceChangeEvent) -> Unit, +) { + val prefController = LocalPreferenceController.current + val latestCallback by rememberUpdatedState(callback) + + DisposableEffect(prefController, key) { + val handle = prefController.addListener(key) { latestCallback(it) } + + onDispose { prefController.removeListener(handle) } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceListenerHandle.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceListenerHandle.kt new file mode 100644 index 000000000..5d9b54b91 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceListenerHandle.kt @@ -0,0 +1,6 @@ +package com.drdisagree.iconify.core.preferences + +class PreferenceListenerHandle internal constructor( + internal val key: String?, + internal val callback: (PreferenceChangeEvent) -> Unit, +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceModels.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceModels.kt new file mode 100644 index 000000000..aeb3c8390 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceModels.kt @@ -0,0 +1,56 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.compose.ui.graphics.vector.ImageVector + +/** + * Represents an event triggered when a preference value is modified. + * + * @property key The unique identifier of the preference that was changed. + * @property oldValue The previous value of the preference, or null if it was not previously set. + * @property newValue The new value assigned to the preference. + */ +data class PreferenceChangeEvent( + val key: String, + val oldValue: PrefValue?, + val newValue: PrefValue, +) + +/** + * Represents a grouping of related preferences under a specific section. + * + * @property title The display name of the category. + * @property icon An optional [ImageVector] to be displayed alongside the category title. + * @property preferences The list of [PreferenceDefinition] items belonging to this category. + */ +data class PreferenceCategoryDefinition( + val title: PrefStringRes, + val icon: PrefIconRes? = null, + val preferences: List, +) + +/** + * Immutable declaration of a single preference item. + * + * Visibility, enabled state, and summary are expressed as lambdas that + * receive the current [PreferenceController], allowing them to depend on + * other preference values. These are evaluated reactively during recomposition. + * + * @property key Unique identifier used for reading and writing the stored value. + * @property title The display title of the preference. + * @property defaultValue The initial value seeded into the prefController on first use. + * @property type The interaction type (e.g., switch, slider, list) used to render the UI. + * @property icon An optional leading icon to display next to the preference. + * @property summary A dynamic lambda to derive summary text from the current state. + * @property isVisible A predicate to determine if the preference should be shown in the UI. + * @property isEnabled A predicate to determine if the preference is interactive or disabled. + */ +data class PreferenceDefinition( + val key: String, + val title: PrefStringRes, + val defaultValue: PrefValue, + val type: PreferenceType, + val icon: PrefIconRes? = null, + val summary: ((PreferenceController, String) -> PrefStringRes?)? = null, + val isVisible: ((PreferenceController) -> Boolean) = { true }, + val isEnabled: ((PreferenceController) -> Boolean) = { true }, +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreen.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreen.kt new file mode 100644 index 000000000..c587c6d6d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreen.kt @@ -0,0 +1,131 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.annotation.DrawableRes +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.State +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.mutableStateMapOf +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.preferences.preferenceCategoryItems +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import kotlinx.coroutines.delay + +fun preferenceScreen( + block: PreferenceScreenScope.() -> Unit +): List = PreferenceScreenScope().apply(block).items + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun PreferenceScreen( + modifier: Modifier = Modifier, + items: List, + title: String, + subtitle: String = "", + @DrawableRes backIcon: Int? = null, + showBackIcon: Boolean = false, + onBackClick: (() -> Unit)? = null, + actions: @Composable RowScope.() -> Unit = {}, +) { + val prefController = LocalPreferenceController.current + + val categories = remember(items) { + items.filterIsInstance().map { it.definition } + } + + val firstLoadMapPerCategory = remember(items) { + categories.associateWith { cat -> + mutableStateMapOf().also { map -> + cat.preferences.forEach { map[it.key] = true } + } + } + } + + val visibleIndicesPerCategory = categories.associateWith { cat -> + rememberCategoryVisibleIndices(cat, prefController) + } + + LaunchedEffect(items) { + categories.forEach { cat -> + cat.preferences.forEach { pref -> + prefController.init(pref.key, pref.defaultValue) + } + } + delay(100) + firstLoadMapPerCategory.forEach { (_, map) -> + map.keys.forEach { map[it] = false } + } + } + + AppScaffold( + modifier = modifier, + title = title, + subtitle = subtitle, + backIcon = backIcon, + showBackIcon = showBackIcon, + onBackClick = onBackClick, + actions = actions + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + horizontal = 16.dp, + vertical = 16.dp + ) + + LazyColumn( + modifier = modifier.fillMaxSize(), + contentPadding = padding, + ) { + var firstVisibleCategoryAdded = false + + items.forEach { screenItem -> + when (screenItem) { + is PreferenceScreenItem.Category -> { + val cat = screenItem.definition + val isFirstVisible = !firstVisibleCategoryAdded + val firstLoadMap = firstLoadMapPerCategory[cat] ?: emptyMap() + val visibleIndices = visibleIndicesPerCategory[cat]?.value ?: emptyList() + + preferenceCategoryItems( + category = cat, + prefController = prefController, + addTopSpacer = !isFirstVisible, + firstLoadMap = firstLoadMap, + visibleIndices = visibleIndices, + ) + + if (visibleIndices.isNotEmpty()) { + firstVisibleCategoryAdded = true + } + } + + is PreferenceScreenItem.Custom -> { + item(key = screenItem.key, contentType = "custom") { + screenItem.content() + } + } + } + } + } + } +} + +@Composable +private fun rememberCategoryVisibleIndices( + category: PreferenceCategoryDefinition, + prefController: PreferenceController, +): State> = remember(category) { + derivedStateOf { + category.preferences.indices.filter { i -> + category.preferences[i].isVisible(prefController) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreenItem.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreenItem.kt new file mode 100644 index 000000000..2d0faf778 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreenItem.kt @@ -0,0 +1,8 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.compose.runtime.Composable + +sealed class PreferenceScreenItem { + data class Category(val definition: PreferenceCategoryDefinition) : PreferenceScreenItem() + data class Custom(val key: String, val content: @Composable () -> Unit) : PreferenceScreenItem() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreenScope.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreenScope.kt new file mode 100644 index 000000000..6c69ec953 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceScreenScope.kt @@ -0,0 +1,34 @@ +package com.drdisagree.iconify.core.preferences + +import androidx.compose.runtime.Composable +import com.drdisagree.iconify.core.preferences.PreferenceScreenItem +import com.drdisagree.iconify.core.ui.components.extensions.toStringRes + +/** Builds a list of [PreferenceCategoryDefinition]s using a concise DSL. */ +class PreferenceScreenScope { + val items = mutableListOf() + + fun category( + title: PrefStringRes, + icon: PrefIconRes? = null, + block: PreferenceCategoryScope.() -> Unit, + ) { + val scope = PreferenceCategoryScope().apply(block) + items += PreferenceScreenItem.Category( + PreferenceCategoryDefinition(title, icon, scope.prefs) + ) + } + + fun category( + title: String = "", + icon: PrefIconRes? = null, + block: PreferenceCategoryScope.() -> Unit, + ) = category(title.toStringRes(), icon, block) + + fun composable( + key: String, + content: @Composable () -> Unit + ) { + items += PreferenceScreenItem.Custom(key, content) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceType.kt b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceType.kt new file mode 100644 index 000000000..5e4b7c18b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/preferences/PreferenceType.kt @@ -0,0 +1,53 @@ +package com.drdisagree.iconify.core.preferences + +import android.content.Context +import androidx.compose.runtime.Composable +import androidx.navigation.NavController +import com.drdisagree.iconify.core.ui.components.preferences.FilePickerType + +sealed class PreferenceType { + data class Switch(val isMasterSwitch: Boolean = false) : PreferenceType() + + data class Slider( + val min: Float = 0f, + val max: Float = 100f, + val steps: Int = 0, + val valueLabel: ((Float) -> String)? = null, + val applyOnValueChangeFinished: Boolean, + val showResetButton: Boolean = false, + val showDefaultIndicator: Boolean = false, + val hideDefaultValue: Boolean = false + ) : PreferenceType() + + data class ListPref( + val entries: PrefArrayRes, + val entryValues: PrefArrayRes + ) : PreferenceType() + + data class MultiList( + val entries: PrefArrayRes, + val entryValues: PrefArrayRes + ) : PreferenceType() + + data class Action( + val onClick: (Context, PreferenceController, NavController) -> Unit + ) : PreferenceType() + + object EditText : PreferenceType() + + object ColorPicker : PreferenceType() + + data class FilePicker( + val pickerType: FilePickerType, + val saveFileUri: Boolean, + val onFileSelected: (PreferenceController, String) -> Unit + ) : PreferenceType() + + data class TwoTargetSwitch( + val onClick: (Context, PreferenceController, NavController) -> Unit + ) : PreferenceType() + + data class Custom(val content: @Composable () -> Unit) : PreferenceType() + + object Info : PreferenceType() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomnavbar/BottomBarTabs.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomnavbar/BottomBarTabs.kt new file mode 100644 index 000000000..3ed943435 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomnavbar/BottomBarTabs.kt @@ -0,0 +1,106 @@ +package com.drdisagree.iconify.core.ui.components.bottomnavbar + +import androidx.compose.animation.core.Spring +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.core.spring +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.material3.Icon +import androidx.compose.material3.LocalContentColor +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.draw.scale +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.ui.components.others.withHaptic + +@Composable +fun BottomBarTabs( + tabs: List, + selectedTab: Int, + onTabSelected: (NavRoutes.BottomBarTab) -> Unit, +) { + CompositionLocalProvider( + LocalTextStyle provides LocalTextStyle.current.copy( + fontSize = 12.sp, + fontWeight = FontWeight.Medium, + ), + LocalContentColor provides MaterialTheme.colorScheme.onSurface + ) { + Row( + modifier = Modifier + .fillMaxHeight() + .wrapContentWidth() + .padding(horizontal = 12.dp), + horizontalArrangement = Arrangement.SpaceEvenly, + verticalAlignment = Alignment.CenterVertically + ) { + for (tab in tabs) { + val index = tabs.indexOf(tab) + val alpha by animateFloatAsState( + targetValue = if (selectedTab == index) 1f else 0.35f, + label = "alpha" + ) + val scale by animateFloatAsState( + targetValue = if (selectedTab == index) 1f else 0.98f, + visibilityThreshold = 0.000001f, + animationSpec = spring( + stiffness = Spring.StiffnessLow, + dampingRatio = Spring.DampingRatioMediumBouncy + ), + label = "scale" + ) + + Column( + modifier = Modifier + .scale(scale) + .alpha(alpha) + .fillMaxHeight() + .padding(horizontal = 18.dp) + .clickable( + indication = null, + interactionSource = remember { MutableInteractionSource() }, + onClick = withHaptic { + onTabSelected(tab) + } + ), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center, + ) { + val iconRes = if (selectedTab == index) { + tab.iconChecked + } else { + tab.iconUnchecked + } + Icon( + painter = painterResource(iconRes), + contentDescription = stringResource(tab.title), + tint = MaterialTheme.colorScheme.onSurface + ) + Text( + text = stringResource(tab.title), + color = MaterialTheme.colorScheme.onSurface + ) + } + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomnavbar/BottomNavigation.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomnavbar/BottomNavigation.kt new file mode 100644 index 000000000..35210dfae --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomnavbar/BottomNavigation.kt @@ -0,0 +1,288 @@ +package com.drdisagree.iconify.core.ui.components.bottomnavbar + +import androidx.compose.animation.animateColorAsState +import androidx.compose.animation.core.Spring +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.core.spring +import androidx.compose.foundation.Canvas +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBarsPadding +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.NavigationBar +import androidx.compose.material3.NavigationBarDefaults +import androidx.compose.material3.NavigationBarItem +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.BlurredEdgeTreatment +import androidx.compose.ui.draw.blur +import androidx.compose.ui.draw.clip +import androidx.compose.ui.geometry.CornerRadius +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.geometry.RoundRect +import androidx.compose.ui.geometry.toRect +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Path +import androidx.compose.ui.graphics.PathEffect +import androidx.compose.ui.graphics.PathMeasure +import androidx.compose.ui.graphics.RectangleShape +import androidx.compose.ui.graphics.drawscope.Stroke +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.util.fastCoerceAtMost +import androidx.compose.ui.util.lerp +import androidx.lifecycle.viewmodel.compose.viewModel +import com.drdisagree.iconify.app.navigation.BOTTOM_BAR_TABS +import com.drdisagree.iconify.app.navigation.DEFAULT_BOTTOM_BAR_TAB +import com.drdisagree.iconify.core.common.LocalHazeState +import com.drdisagree.iconify.core.common.LocalLayerBackdrop +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.common.LocalSettings +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.utils.InteractiveHighlight +import com.drdisagree.iconify.core.ui.utils.sharedHiltViewModel +import com.drdisagree.iconify.features.common.viewmodels.BottomNavViewModel +import com.kyant.backdrop.drawBackdrop +import com.kyant.backdrop.effects.blur +import com.kyant.backdrop.effects.lens +import com.kyant.backdrop.effects.vibrancy +import dev.chrisbanes.haze.hazeChild +import kotlin.math.abs +import kotlin.math.atan2 +import kotlin.math.cos +import kotlin.math.sin +import kotlin.math.tanh + +@Composable +fun BottomNavigation(bottomNavViewModel: BottomNavViewModel = sharedHiltViewModel()) { + val settings = LocalSettings.current + val hazeState = LocalHazeState.current + val backdrop = LocalLayerBackdrop.current + val navController = LocalNavController.current + val selectedTabIndex by bottomNavViewModel::selectedTabIndex + val blurEffect = settings.blurEffect + val floatingBottomBar = settings.floatingBottomBar + + if (!floatingBottomBar) { + NavigationBar( + modifier = Modifier.then( + if (blurEffect) { + Modifier.hazeChild( + state = hazeState, + shape = RectangleShape + ) + } else { + Modifier + } + ), + containerColor = if (blurEffect) Color.Transparent + else NavigationBarDefaults.containerColor, + ) { + BOTTOM_BAR_TABS.forEachIndexed { index, tab -> + NavigationBarItem( + selected = selectedTabIndex == index, + onClick = { + if (index != selectedTabIndex) { + val isDefaultTab = + index == BOTTOM_BAR_TABS.indexOf(DEFAULT_BOTTOM_BAR_TAB) + navController.navigate(tab.route) { + popUpTo(DEFAULT_BOTTOM_BAR_TAB) { + inclusive = isDefaultTab + } + launchSingleTop = true + } + } + }, + icon = { + val iconRes = if (selectedTabIndex == index) { + tab.iconChecked + } else { + tab.iconUnchecked + } + Icon( + painter = painterResource(iconRes), + contentDescription = stringResource(tab.title) + ) + }, + label = { + Text(text = stringResource(tab.title)) + } + ) + } + } + return + } + + val backdropColor = MaterialTheme.colorScheme.surfaceVariant.copy( + alpha = if (blurEffect) .2f else .92f + ) + + val animationScope = rememberCoroutineScope() + val highlightColor = MaterialTheme.colorScheme.primary.copy( + alpha = if (blurEffect) 0.75f else 0.9f + ) + val interactiveHighlight = remember(animationScope) { + InteractiveHighlight( + animationScope = animationScope, + color = highlightColor + ) + } + + Box( + modifier = Modifier + .fillMaxWidth() + .navigationBarsPadding() + .padding(bottom = 8.dp), + contentAlignment = Alignment.Center + ) { + Box( + modifier = Modifier + .drawBackdrop( + backdrop = backdrop, + shape = { CircleShape }, + effects = { + vibrancy() + if (blurEffect) { + blur(6.dp.toPx()) + lens(24.dp.toPx(), 32.dp.toPx()) + } + }, + layerBlock = { + val width = size.width + val height = size.height + + val progress = interactiveHighlight.pressProgress + val scale = lerp(1f, 1f + 4f.dp.toPx() / size.height, progress) + + val maxOffset = size.minDimension + val initialDerivative = 0.05f + val offset = interactiveHighlight.offset + translationX = maxOffset * tanh(initialDerivative * offset.x / maxOffset) + translationY = maxOffset * tanh(initialDerivative * offset.y / maxOffset) + + val maxDragScale = 4f.dp.toPx() / size.height + val offsetAngle = atan2(offset.y, offset.x) + scaleX = scale + + maxDragScale * abs(cos(offsetAngle) * offset.x / size.maxDimension) * + (width / height).fastCoerceAtMost(1f) + scaleY = scale + + maxDragScale * abs(sin(offsetAngle) * offset.y / size.maxDimension) * + (height / width).fastCoerceAtMost(1f) + }, + onDrawSurface = { drawRect(backdropColor) } + ) + .clickable(interactionSource = null, indication = null) {} + .then(interactiveHighlight.modifier) + .then(interactiveHighlight.gestureModifier) + .wrapContentWidth() + .height(64.dp) + ) { + BottomBarTabs( + tabs = BOTTOM_BAR_TABS, + selectedTab = selectedTabIndex, + onTabSelected = { tab -> + val newIndex = BOTTOM_BAR_TABS.indexOf(tab) + + if (newIndex != selectedTabIndex) { + val isDefaultTab = + newIndex == BOTTOM_BAR_TABS.indexOf(DEFAULT_BOTTOM_BAR_TAB) + + navController.navigate(tab.route) { + popUpTo(DEFAULT_BOTTOM_BAR_TAB) { + inclusive = isDefaultTab + } + launchSingleTop = true + } + } + } + ) + + val animatedSelectedTabIndex by animateFloatAsState( + targetValue = selectedTabIndex.toFloat(), label = "animatedSelectedTabIndex", + animationSpec = spring( + stiffness = Spring.StiffnessLow, + dampingRatio = Spring.DampingRatioLowBouncy, + ) + ) + + val animatedColor by animateColorAsState( + targetValue = MaterialTheme.colorScheme.primary, + label = "animatedColor", + animationSpec = spring( + stiffness = Spring.StiffnessLow, + ) + ) + + Canvas( + modifier = Modifier + .matchParentSize() + .clip(CircleShape) + .blur(50.dp, edgeTreatment = BlurredEdgeTreatment.Unbounded) + ) { + val tabWidth = size.width / BOTTOM_BAR_TABS.size + drawCircle( + color = animatedColor.copy(alpha = .6f), + radius = size.height / 2, + center = Offset( + (tabWidth * animatedSelectedTabIndex) + tabWidth / 2, + size.height / 2 + ) + ) + } + + Canvas( + modifier = Modifier + .matchParentSize() + .clip(CircleShape) + ) { + val path = Path().apply { + addRoundRect(RoundRect(size.toRect(), CornerRadius(size.height))) + } + val length = PathMeasure().apply { setPath(path, false) }.length + val tabWidth = size.width / BOTTOM_BAR_TABS.size + + drawPath( + path, + brush = Brush.horizontalGradient( + colors = listOf( + animatedColor.copy(alpha = 0f), + animatedColor.copy(alpha = 1f), + animatedColor.copy(alpha = 1f), + animatedColor.copy(alpha = 0f), + ), + startX = tabWidth * animatedSelectedTabIndex, + endX = tabWidth * (animatedSelectedTabIndex + 1), + ), + style = Stroke( + width = 6f, + pathEffect = PathEffect.dashPathEffect( + intervals = floatArrayOf(length / 2, length) + ) + ) + ) + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun BottomNavigationPreview() { + PreviewComposable { + BottomNavigation(viewModel()) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomsheets/CustomBottomSheet.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomsheets/CustomBottomSheet.kt new file mode 100644 index 000000000..c8ab3b156 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/bottomsheets/CustomBottomSheet.kt @@ -0,0 +1,59 @@ +package com.drdisagree.iconify.core.ui.components.bottomsheets + +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.WindowInsetsSides +import androidx.compose.foundation.layout.only +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.safeDrawing +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ModalBottomSheet +import androidx.compose.material3.SheetState +import androidx.compose.material3.Text +import androidx.compose.material3.rememberModalBottomSheetState +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.ui.utils.navigationBarHeight + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun CustomBottomSheet( + sheetState: SheetState = rememberModalBottomSheetState(), + title: String, + onDismissRequest: () -> Unit, + content: @Composable (PaddingValues) -> Unit, +) { + val navbarHeight = navigationBarHeight() + + ModalBottomSheet( + sheetState = sheetState, + onDismissRequest = onDismissRequest, + contentWindowInsets = { WindowInsets.safeDrawing.only(WindowInsetsSides.Top) }, + ) { + Text( + text = title, + style = MaterialTheme.typography.titleLarge, + textAlign = TextAlign.Center, + modifier = Modifier + .padding(horizontal = 16.dp) + .padding(bottom = 8.dp) + .align(Alignment.CenterHorizontally) + ) + + HorizontalDivider() + + content( + PaddingValues( + start = 16.dp, + end = 16.dp, + top = 16.dp, + bottom = 16.dp + navbarHeight + ) + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/cards/IconPreviewCard.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/cards/IconPreviewCard.kt new file mode 100644 index 000000000..00eaf266b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/cards/IconPreviewCard.kt @@ -0,0 +1,163 @@ +package com.drdisagree.iconify.core.ui.components.cards + +import androidx.compose.foundation.background +import androidx.compose.foundation.basicMarquee +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.indication +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.ripple +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.Layout +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.ui.components.others.IconPreviewGrid +import com.drdisagree.iconify.core.ui.utils.CARD_CORNER_LARGE +import com.drdisagree.iconify.core.ui.utils.CARD_CORNER_SMALL + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun IconPreviewCard( + title: String, + isApplied: Boolean, + icons: List, + onClick: () -> Unit +) { + val interactionSource = remember { MutableInteractionSource() } + + Card( + shape = RoundedCornerShape(CARD_CORNER_LARGE), + colors = CardDefaults.cardColors(containerColor = Color.Transparent) + ) { + Layout( + content = { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center, + modifier = Modifier.clickable( + onClick = onClick, + interactionSource = interactionSource, + indication = null + ) + ) { + Box( + modifier = Modifier + .fillMaxWidth() + .clip( + RoundedCornerShape( + topStart = CARD_CORNER_LARGE, + topEnd = CARD_CORNER_LARGE, + bottomStart = CARD_CORNER_SMALL, + bottomEnd = CARD_CORNER_SMALL + ) + ) + .background( + if (isApplied) MaterialTheme.colorScheme.primaryContainer + else MaterialTheme.colorScheme.surfaceContainerHigh + ) + .indication( + interactionSource = interactionSource, + indication = ripple() + ) + .border( + 2.dp, + if (isApplied) MaterialTheme.colorScheme.primary + else MaterialTheme.colorScheme.surfaceContainerHigh, + RoundedCornerShape( + topStart = CARD_CORNER_LARGE, + topEnd = CARD_CORNER_LARGE, + bottomStart = CARD_CORNER_SMALL, + bottomEnd = CARD_CORNER_SMALL + ) + ), + contentAlignment = Alignment.Center + ) { + IconPreviewGrid( + modifier = Modifier.padding(12.dp), + isApplied = isApplied, + icons = icons + ) + } + + Box( + modifier = Modifier + .padding(top = 2.dp) + .fillMaxWidth() + .clip( + RoundedCornerShape( + topStart = CARD_CORNER_SMALL, + topEnd = CARD_CORNER_SMALL, + bottomStart = CARD_CORNER_LARGE, + bottomEnd = CARD_CORNER_LARGE + ) + ) + .background( + if (isApplied) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.surfaceContainerHigh + } + ) + .indication( + interactionSource = interactionSource, + indication = ripple() + ) + .padding(horizontal = 8.dp, vertical = 4.dp), + contentAlignment = Alignment.Center + ) { + Text( + text = title, + style = MaterialTheme.typography.labelLarge, + maxLines = 1, + textAlign = TextAlign.Center, + modifier = Modifier + .fillMaxWidth() + .basicMarquee(iterations = Int.MAX_VALUE), + color = if (isApplied) { + MaterialTheme.colorScheme.onPrimary + } else { + MaterialTheme.colorScheme.onSurface + }, + ) + } + } + } + ) { measurables, constraints -> + val measurable = measurables.first() + + // Ask for intrinsic height (legal, no measurement) + val intrinsicHeight = measurable.maxIntrinsicHeight(constraints.maxWidth) + + // Use that height as width + val width = intrinsicHeight.coerceIn(constraints.minWidth, constraints.maxWidth) + + // Measure ONCE with final constraints + val placeable = measurable.measure( + constraints.copy( + minWidth = width, + maxWidth = width + ) + ) + + layout(width, placeable.height) { + placeable.place(0, 0) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/ErrorDialog.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/ErrorDialog.kt new file mode 100644 index 000000000..0d7430a5a --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/ErrorDialog.kt @@ -0,0 +1,111 @@ +package com.drdisagree.iconify.core.ui.components.dialogs + +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.ui.window.Dialog +import androidx.core.text.HtmlCompat +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.others.BlurBehindDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.svg.DynamicColorImageVectors +import com.drdisagree.iconify.core.ui.components.svg.undraw404Error + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun ErrorDialog( + title: Any, + description: Any, + onDismiss: () -> Unit +) { + val title = if (title is Int) stringResource(title) else title as String + val desc = if (description is Int) stringResource(description) else description as String + + Dialog(onDismissRequest = onDismiss) { + BlurBehindDialog() + + Surface( + shape = MaterialTheme.shapes.large, + tonalElevation = 8.dp + ) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier.padding(24.dp) + ) { + Image( + imageVector = DynamicColorImageVectors.undraw404Error(), + contentDescription = null, + contentScale = ContentScale.FillWidth, + modifier = Modifier + .width(180.dp) + .padding(bottom = 16.dp) + ) + + val titleText = remember(title) { + HtmlCompat.fromHtml(title, HtmlCompat.FROM_HTML_MODE_COMPACT).toString() + } + + Text( + text = titleText, + color = MaterialTheme.colorScheme.onSurface, + textAlign = TextAlign.Center, + style = MaterialTheme.typography.titleMedium, + modifier = Modifier.wrapContentWidth() + ) + + val descText = remember(description) { + HtmlCompat.fromHtml(desc, HtmlCompat.FROM_HTML_MODE_COMPACT).toString() + } + + Text( + text = descText, + color = MaterialTheme.colorScheme.onSurface.secondaryText(), + textAlign = TextAlign.Center, + style = MaterialTheme.typography.bodyMedium, + modifier = Modifier.padding(top = 8.dp) + ) + + Button( + onClick = onDismiss, + shapes = ButtonDefaults.shapes(), + contentPadding = PaddingValues(horizontal = 30.dp, vertical = 12.dp), + modifier = Modifier.padding(top = 16.dp) + ) { + Text(text = stringResource(R.string.btn_close), fontSize = 16.sp) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun ErrorDialogPreview() { + PreviewComposable { + ErrorDialog( + title = "Error!", + description = "Something went wrong.", + onDismiss = {} + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/InstallationDialog.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/InstallationDialog.kt new file mode 100644 index 000000000..fb170d8cc --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/InstallationDialog.kt @@ -0,0 +1,196 @@ +package com.drdisagree.iconify.core.ui.components.dialogs + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.onGloballyPositioned +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.Dialog +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.others.BlurBehindDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.coloredLogText + +@Composable +fun InstallationDialog( + title: String, + desc: String, + logs: List, + onDismiss: () -> Unit = {} +) { + Dialog(onDismissRequest = onDismiss) { + BlurBehindDialog() + + Surface( + shape = MaterialTheme.shapes.large, + tonalElevation = 8.dp + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .padding(26.dp), + horizontalAlignment = Alignment.CenterHorizontally + ) { + Row( + modifier = Modifier.fillMaxWidth(), + verticalAlignment = Alignment.CenterVertically + ) { + Box( + modifier = Modifier.size(50.dp), + contentAlignment = Alignment.Center + ) { + Image( + painter = painterResource(id = R.drawable.ic_launcher_bg2), + contentDescription = null, + modifier = Modifier.fillMaxSize() + ) + Image( + painter = painterResource(id = R.drawable.ic_launcher_fg), + contentDescription = stringResource(id = R.string.iconify_logo), + modifier = Modifier + .padding(4.dp) + .fillMaxSize() + ) + } + + Spacer(modifier = Modifier.width(16.dp)) + + Column( + modifier = Modifier + .weight(1f) + .wrapContentHeight() + ) { + Text( + text = title, + style = MaterialTheme.typography.titleSmall + ) + Text( + text = desc, + style = MaterialTheme.typography.bodySmall + ) + } + } + + val logBgColor = MaterialTheme.colorScheme.surface + val listState = rememberLazyListState() + val containerHeight = 200.dp + var contentHeightPx by remember { mutableIntStateOf(0) } + val density = LocalDensity.current + + LaunchedEffect(logs.size) { + if (logs.isNotEmpty()) { + val lastIndex = (logs.size - 1).coerceAtLeast(0) + try { + listState.animateScrollToItem(lastIndex) + } catch (_: IndexOutOfBoundsException) { + // List mutated during scroll animation; safe to ignore + } + } + } + + AnimatedVisibility(logs.isNotEmpty()) { + Box( + modifier = Modifier + .padding(top = 16.dp) + .fillMaxWidth() + .heightIn(max = containerHeight) + .clip(RoundedCornerShape(8.dp)) + .background(logBgColor) + ) { + LazyColumn( + state = listState, + userScrollEnabled = false, + modifier = Modifier + .fillMaxWidth() + .onGloballyPositioned { coordinates -> + contentHeightPx = coordinates.size.height + }, + contentPadding = PaddingValues(horizontal = 8.dp, vertical = 4.dp) + ) { + itemsIndexed( + items = logs, + key = { index, _ -> index } + ) { _, log -> + Text( + text = coloredLogText(log), + fontFamily = FontFamily.Monospace, + style = MaterialTheme.typography.labelSmall + ) + } + } + + if (with(density) { contentHeightPx.toDp() >= containerHeight }) { + Box( + modifier = Modifier + .background( + Brush.verticalGradient( + colors = listOf( + logBgColor.copy(alpha = 0.8f), + Color.Transparent + ) + ) + ) + .fillMaxWidth() + .height(28.dp) + ) + } + } + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun InstallationDialogPreview() { + val sampleLogs = listOf( + "I: Creating module template", + "W: Some overlays skipped", + "E: Failed to flash module", + ) + + PreviewComposable { + InstallationDialog( + title = "Installing", + desc = "Please wait", + logs = sampleLogs + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/LoadingDialog.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/LoadingDialog.kt new file mode 100644 index 000000000..8f5acfd19 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/dialogs/LoadingDialog.kt @@ -0,0 +1,73 @@ +package com.drdisagree.iconify.core.ui.components.dialogs + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.ContainedLoadingIndicator +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.Dialog +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.others.AnimatedGradientBorder +import com.drdisagree.iconify.core.ui.components.others.BlurBehindDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.utils.CARD_CORNER_LARGE + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun LoadingDialog(onDismiss: () -> Unit = {}) { + Dialog(onDismissRequest = onDismiss) { + BlurBehindDialog() + + AnimatedGradientBorder( + borderWidth = 2.dp, + shape = RoundedCornerShape(CARD_CORNER_LARGE), + gradientColors = listOf( + MaterialTheme.colorScheme.primaryFixedDim, + MaterialTheme.colorScheme.tertiaryFixedDim, + MaterialTheme.colorScheme.tertiaryFixedDim, + MaterialTheme.colorScheme.primaryFixedDim, + ) + ) { + Surface( + shape = RoundedCornerShape(CARD_CORNER_LARGE - 2.dp), + tonalElevation = 8.dp + ) { + Column( + modifier = Modifier.padding(horizontal = 36.dp, vertical = 24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + ContainedLoadingIndicator(modifier = Modifier.size(60.dp)) + Text( + text = stringResource(R.string.loading_dialog_wait), + color = MaterialTheme.colorScheme.onSurface, + textAlign = TextAlign.Center, + style = MaterialTheme.typography.titleMedium, + modifier = Modifier.wrapContentWidth() + ) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun LoadingDialogPreview() { + PreviewComposable { + LoadingDialog(onDismiss = {}) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/LongPressButon.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/LongPressButon.kt new file mode 100644 index 000000000..aa96d78d8 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/LongPressButon.kt @@ -0,0 +1,42 @@ +package com.drdisagree.iconify.core.ui.components.extensions + +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.PressInteraction +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalViewConfiguration +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.collectLatest + +@Composable +fun Modifier.customClickable( + interactionSource: MutableInteractionSource?, + onClick: () -> Unit, + onLongClick: () -> Unit +): Modifier { + val viewConfiguration = LocalViewConfiguration.current + + LaunchedEffect(interactionSource) { + var isLongClick = false + + interactionSource?.interactions?.collectLatest { interaction -> + when (interaction) { + is PressInteraction.Press -> { + isLongClick = false + delay(viewConfiguration.longPressTimeoutMillis) + isLongClick = true + onLongClick() + } + + is PressInteraction.Release -> { + if (isLongClick.not()) { + onClick() + } + } + } + } + } + + return this +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/Shake.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/Shake.kt new file mode 100644 index 000000000..c4108d9bb --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/Shake.kt @@ -0,0 +1,77 @@ +package com.drdisagree.iconify.core.ui.components.extensions + +import androidx.compose.animation.core.Animatable +import androidx.compose.animation.core.spring +import androidx.compose.foundation.layout.offset +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.composed +import androidx.compose.ui.draw.rotate +import androidx.compose.ui.draw.scale +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.unit.IntOffset +import kotlin.math.roundToInt + +data class ShakeConfig( + val iterations: Int, + val intensity: Float = 100_000f, + val rotate: Float = 0f, + val rotateX: Float = 0f, + val rotateY: Float = 0f, + val scaleX: Float = 0f, + val scaleY: Float = 0f, + val translateX: Float = 0f, + val translateY: Float = 0f, + val trigger: Long = System.currentTimeMillis(), +) + +@Composable +fun rememberShakeController(): ShakeController { + return remember { ShakeController() } +} + +class ShakeController { + var shakeConfig: ShakeConfig? by mutableStateOf(null) + private set + + fun shake(shakeConfig: ShakeConfig) { + this.shakeConfig = shakeConfig + } +} + +fun Modifier.shake(shakeController: ShakeController) = composed { + shakeController.shakeConfig?.let { shakeConfig -> + val shake = remember { Animatable(0f) } + LaunchedEffect(shakeController.shakeConfig) { + for (i in 0..shakeConfig.iterations) { + when (i % 2) { + 0 -> shake.animateTo(1f, spring(stiffness = shakeConfig.intensity)) + else -> shake.animateTo(-1f, spring(stiffness = shakeConfig.intensity)) + } + } + shake.animateTo(0f) + } + + this + .rotate(shake.value * shakeConfig.rotate) + .graphicsLayer { + rotationX = shake.value * shakeConfig.rotateX + rotationY = shake.value * shakeConfig.rotateY + } + .scale( + scaleX = 1f + (shake.value * shakeConfig.scaleX), + scaleY = 1f + (shake.value * shakeConfig.scaleY), + ) + .offset { + IntOffset( + (shake.value * shakeConfig.translateX).roundToInt(), + (shake.value * shakeConfig.translateY).roundToInt(), + ) + } + } ?: this +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/TextExtensions.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/TextExtensions.kt new file mode 100644 index 000000000..5da5c52a8 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/extensions/TextExtensions.kt @@ -0,0 +1,12 @@ +package com.drdisagree.iconify.core.ui.components.extensions + +import androidx.compose.ui.graphics.Color +import com.drdisagree.iconify.core.preferences.PrefStringRes + +private const val SECONDARY_TEXT_ALPHA = 0.75f + +fun Color.secondaryText() = copy(alpha = SECONDARY_TEXT_ALPHA) + +/** Allows `title = "Foo"` wherever a StringRes is expected. */ +@Suppress("NOTHING_TO_INLINE") +inline fun String.toStringRes(): PrefStringRes = PrefStringRes.Hardcoded(this) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/lottie/SpinningGearsLottie.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/lottie/SpinningGearsLottie.kt new file mode 100644 index 000000000..8978690d3 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/lottie/SpinningGearsLottie.kt @@ -0,0 +1,49 @@ +package com.drdisagree.iconify.core.ui.components.lottie + +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.toArgb +import com.airbnb.lottie.LottieProperty +import com.airbnb.lottie.compose.LottieAnimation +import com.airbnb.lottie.compose.LottieCompositionSpec +import com.airbnb.lottie.compose.LottieConstants +import com.airbnb.lottie.compose.rememberLottieAnimatable +import com.airbnb.lottie.compose.rememberLottieComposition +import com.airbnb.lottie.compose.rememberLottieDynamicProperties +import com.airbnb.lottie.compose.rememberLottieDynamicProperty +import com.drdisagree.iconify.R + +@Composable +fun SpinningGearsLottie(modifier: Modifier = Modifier) { + val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.lottie_spinning_gears)) + + val color = MaterialTheme.colorScheme.onSurface + + val colorProperty = rememberLottieDynamicProperty( + property = LottieProperty.COLOR, + keyPath = arrayOf("**"), + value = color.toArgb() + ) + + val dynamicProperties = rememberLottieDynamicProperties(colorProperty) + + val lottie = rememberLottieAnimatable() + + LaunchedEffect(Unit) { + lottie.animate( + composition = composition, + iterations = LottieConstants.IterateForever + ) + } + + LottieAnimation( + composition = lottie.composition, + progress = { lottie.progress }, + dynamicProperties = dynamicProperties, + modifier = modifier + ) +} + diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/lottie/WandLottie.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/lottie/WandLottie.kt new file mode 100644 index 000000000..dc2a4985d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/lottie/WandLottie.kt @@ -0,0 +1,49 @@ +package com.drdisagree.iconify.core.ui.components.lottie + +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.toArgb +import com.airbnb.lottie.LottieProperty +import com.airbnb.lottie.compose.LottieAnimation +import com.airbnb.lottie.compose.LottieCompositionSpec +import com.airbnb.lottie.compose.LottieConstants +import com.airbnb.lottie.compose.rememberLottieAnimatable +import com.airbnb.lottie.compose.rememberLottieComposition +import com.airbnb.lottie.compose.rememberLottieDynamicProperties +import com.airbnb.lottie.compose.rememberLottieDynamicProperty +import com.drdisagree.iconify.R + +@Composable +fun WandLottie(modifier: Modifier = Modifier) { + val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.lottie_wand)) + + val color = MaterialTheme.colorScheme.onSurface + + val colorProperty = rememberLottieDynamicProperty( + property = LottieProperty.COLOR, + keyPath = arrayOf("**"), + value = color.toArgb() + ) + + val dynamicProperties = rememberLottieDynamicProperties(colorProperty) + + val lottie = rememberLottieAnimatable() + + LaunchedEffect(Unit) { + lottie.animate( + composition = composition, + iterations = LottieConstants.IterateForever + ) + } + + LottieAnimation( + composition = lottie.composition, + progress = { lottie.progress }, + dynamicProperties = dynamicProperties, + modifier = modifier + ) +} + diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AnimatePreferenceShape.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AnimatePreferenceShape.kt new file mode 100644 index 000000000..b94b9d2b8 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AnimatePreferenceShape.kt @@ -0,0 +1,25 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.animation.core.animateDpAsState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import com.drdisagree.iconify.core.ui.utils.ItemPosition +import com.drdisagree.iconify.core.ui.utils.cardCorners + +@Composable +fun animatedPreferenceShape(position: ItemPosition): RoundedCornerShape { + val target = cardCorners(position) + + val topStart by animateDpAsState(target.topStart, label = "topStart") + val topEnd by animateDpAsState(target.topEnd, label = "topEnd") + val bottomStart by animateDpAsState(target.bottomStart, label = "bottomStart") + val bottomEnd by animateDpAsState(target.bottomEnd, label = "bottomEnd") + + return RoundedCornerShape( + topStart = topStart, + topEnd = topEnd, + bottomStart = bottomStart, + bottomEnd = bottomEnd + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AnimatedGradientBorder.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AnimatedGradientBorder.kt new file mode 100644 index 000000000..097f7f20c --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AnimatedGradientBorder.kt @@ -0,0 +1,112 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.animation.core.LinearEasing +import androidx.compose.animation.core.RepeatMode +import androidx.compose.animation.core.animateFloat +import androidx.compose.animation.core.infiniteRepeatable +import androidx.compose.animation.core.rememberInfiniteTransition +import androidx.compose.animation.core.tween +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.drawWithContent +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.geometry.Rect +import androidx.compose.ui.geometry.Size +import androidx.compose.ui.graphics.ClipOp +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Matrix +import androidx.compose.ui.graphics.Paint +import androidx.compose.ui.graphics.Path +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.graphics.SweepGradientShader +import androidx.compose.ui.graphics.addOutline +import androidx.compose.ui.graphics.drawscope.drawIntoCanvas +import androidx.compose.ui.graphics.rotate +import androidx.compose.ui.graphics.withSave +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp + +@Composable +fun AnimatedGradientBorder( + modifier: Modifier = Modifier, + borderWidth: Dp = 2.dp, + shape: Shape = RoundedCornerShape(12.dp), + gradientColors: List = listOf(Color.Cyan, Color.Magenta, Color.Yellow, Color.Cyan), + animationDurationMs: Int = 2000, + content: @Composable () -> Unit +) { + val infiniteTransition = rememberInfiniteTransition(label = "border_rotation") + val angle by infiniteTransition.animateFloat( + initialValue = 0f, + targetValue = 360f, + animationSpec = infiniteRepeatable( + animation = tween(durationMillis = animationDurationMs, easing = LinearEasing), + repeatMode = RepeatMode.Restart + ), + label = "gradient_angle" + ) + + Box( + modifier = modifier.drawWithContent { + val strokeWidth = borderWidth.toPx() + val outline = shape.createOutline(size, layoutDirection, this) + val path = Path().apply { addOutline(outline) } + + drawIntoCanvas { canvas -> + canvas.withSave { + canvas.clipPath(path) + + val innerPath = Path().apply { + addOutline( + shape.createOutline( + Size( + size.width - strokeWidth * 2, + size.height - strokeWidth * 2 + ), + layoutDirection, + this@drawWithContent + ) + ) + val matrix = Matrix() + matrix.translate(strokeWidth, strokeWidth) + transform(matrix) + } + + canvas.clipPath(innerPath, ClipOp.Difference) + + canvas.withSave { + canvas.rotate(angle, size.width / 2f, size.height / 2f) + + val paint = Paint().apply { + shader = SweepGradientShader( + colors = gradientColors, + center = Offset(size.width / 2f, size.height / 2f), + colorStops = null + ) + } + + canvas.drawRect( + Rect( + -size.width, + -size.height, + size.width * 2, + size.height * 2 + ), + paint + ) + } + } + } + + drawContent() + } + ) { + Box(modifier = Modifier.padding(borderWidth)) { + content() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AutoScalingDevicePreview.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AutoScalingDevicePreview.kt new file mode 100644 index 000000000..126953799 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/AutoScalingDevicePreview.kt @@ -0,0 +1,56 @@ +package com.drdisagree.iconify.core.ui.components.others + +import android.content.res.Configuration +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.TransformOrigin +import androidx.compose.ui.layout.Layout +import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.platform.LocalResources +import androidx.compose.ui.unit.Constraints +import kotlin.math.max + +@Composable +fun AutoScalingDevicePreview( + modifier: Modifier = Modifier, + content: @Composable () -> Unit +) { + val resources = LocalResources.current + val configuration = LocalConfiguration.current + val displayMetrics = resources.displayMetrics + + val deviceWidthPx = when (configuration.orientation) { + Configuration.ORIENTATION_PORTRAIT -> displayMetrics.widthPixels + else -> displayMetrics.heightPixels + } + val deviceHeightPx = when (configuration.orientation) { + Configuration.ORIENTATION_PORTRAIT -> displayMetrics.heightPixels + else -> displayMetrics.widthPixels + } + + Layout( + content = content, + modifier = modifier + ) { measurables, constraints -> + val thisScaleX = constraints.maxWidth.toFloat() / deviceWidthPx + val thisScaleY = constraints.maxHeight.toFloat() / deviceHeightPx + + val finalScale = max(thisScaleX, thisScaleY) + + val childConstraints = Constraints.fixed(deviceWidthPx, deviceHeightPx) + val placeables = measurables.map { it.measure(childConstraints) } + + val scaledWidth = (deviceWidthPx * finalScale).toInt() + val scaledHeight = (deviceHeightPx * finalScale).toInt() + + layout(scaledWidth, scaledHeight) { + placeables.forEach { placeable -> + placeable.placeRelativeWithLayer(0, 0) { + scaleX = finalScale + scaleY = finalScale + transformOrigin = TransformOrigin(0f, 0f) + } + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/BlurBehindDialog.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/BlurBehindDialog.kt new file mode 100644 index 000000000..cf22a86fd --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/BlurBehindDialog.kt @@ -0,0 +1,30 @@ +package com.drdisagree.iconify.core.ui.components.others + +import android.view.WindowManager +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.ui.platform.LocalView +import androidx.compose.ui.window.DialogWindowProvider +import com.drdisagree.iconify.core.common.LocalSettings + +const val BLUR_RADIUS = 23 + +@Composable +fun BlurBehindDialog() { + val settings = LocalSettings.current + val blurEffect = settings.blurEffect + + if (!blurEffect) return + + val dialogWindow = (LocalView.current.parent as? DialogWindowProvider)?.window + + LaunchedEffect(dialogWindow) { + dialogWindow?.let { win -> + win.addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND) + win.attributes = win.attributes.apply { + blurBehindRadius = BLUR_RADIUS + dimAmount = 0f + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/ColoredLogText.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/ColoredLogText.kt new file mode 100644 index 000000000..8bc9037ad --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/ColoredLogText.kt @@ -0,0 +1,48 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.AnnotatedString +import androidx.compose.ui.text.SpanStyle +import androidx.compose.ui.text.buildAnnotatedString +import androidx.compose.ui.text.withStyle +import com.drdisagree.iconify.core.common.LocalDarkMode + +@Composable +fun coloredLogText( + text: String +): AnnotatedString { + val isDarkTheme = LocalDarkMode.current + + val infoColor = if (isDarkTheme) Color(0xFF66BB6A) else Color(0xFF81C784) + val warnColor = if (isDarkTheme) Color(0xFFFFA726) else Color(0xFFFFB74D) + val errorColor = MaterialTheme.colorScheme.error + + return buildAnnotatedString { + when { + text.startsWith("I: ") -> { + withStyle(SpanStyle(color = infoColor)) { + append("I: ") + } + append(text.removePrefix("I: ")) + } + + text.startsWith("W: ") -> { + withStyle(SpanStyle(color = warnColor)) { + append("W: ") + } + append(text.removePrefix("W: ")) + } + + text.startsWith("E: ") -> { + withStyle(SpanStyle(color = errorColor)) { + append("E: ") + } + append(text.removePrefix("E: ")) + } + + else -> append(text) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/ComingSoon.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/ComingSoon.kt new file mode 100644 index 000000000..c6c7e96cb --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/ComingSoon.kt @@ -0,0 +1,12 @@ +package com.drdisagree.iconify.core.ui.components.others + +import android.content.Context +import android.widget.Toast + +fun showComingSoonToast(context: Context) { + Toast.makeText( + context, + "Coming soon!", + Toast.LENGTH_SHORT + ).show() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/CustomScrollIndicator.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/CustomScrollIndicator.kt new file mode 100644 index 000000000..25b7897ac --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/CustomScrollIndicator.kt @@ -0,0 +1,156 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.ColumnScope +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyListState +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.onGloballyPositioned +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.unit.IntOffset +import androidx.compose.ui.unit.dp + +@Composable +fun RowScope.ColumnScrollIndicator( + modifier: Modifier = Modifier, + listState: LazyListState +) { + val isScrollable by remember { + derivedStateOf { + val layoutInfo = listState.layoutInfo + val visibleItemsInfo = layoutInfo.visibleItemsInfo + if (visibleItemsInfo.isEmpty()) return@derivedStateOf false + + val firstItem = visibleItemsInfo.first() + val lastItem = visibleItemsInfo.last() + + val isAtStart = listState.firstVisibleItemIndex == 0 && + firstItem.offset == layoutInfo.viewportStartOffset + val isAtEnd = lastItem.index == layoutInfo.totalItemsCount - 1 && + (lastItem.offset + lastItem.size) <= layoutInfo.viewportEndOffset + + !(isAtStart && isAtEnd) + } + } + + if (!isScrollable) return + + var trackHeightPx by remember { mutableIntStateOf(0) } + + val scrollProgress by remember { + derivedStateOf { + val layoutInfo = listState.layoutInfo + val totalItems = layoutInfo.totalItemsCount + if (totalItems <= 1) return@derivedStateOf 0f + + val firstVisibleItem = listState.firstVisibleItemIndex + val firstVisibleOffset = listState.firstVisibleItemScrollOffset + val itemHeight = layoutInfo.visibleItemsInfo.firstOrNull()?.size ?: 0 + + val scrolled = firstVisibleItem * itemHeight + firstVisibleOffset + val total = totalItems * itemHeight - layoutInfo.viewportEndOffset + + if (total <= 0) 0f else (scrolled.toFloat() / total).coerceIn(0f, 1f) + } + } + + Box( + modifier = modifier + .width(6.dp) + .fillMaxHeight() + .align(Alignment.Top) + .padding(vertical = 12.dp) + .onGloballyPositioned { trackHeightPx = it.size.height } + ) { + val thumbHeightPx = with(LocalDensity.current) { 40.dp.toPx() } + val offsetY = ((trackHeightPx - thumbHeightPx) * scrollProgress).toInt() + + Box( + modifier = Modifier + .width(6.dp) + .height(40.dp) + .offset { IntOffset(x = 0, y = offsetY) } + .background(MaterialTheme.colorScheme.outlineVariant, MaterialTheme.shapes.small) + ) + } +} + +@Composable +fun ColumnScope.RowScrollIndicator( + modifier: Modifier = Modifier, + listState: LazyListState +) { + val isScrollable by remember { + derivedStateOf { + val layoutInfo = listState.layoutInfo + val visibleItemsInfo = layoutInfo.visibleItemsInfo + if (visibleItemsInfo.isEmpty()) return@derivedStateOf false + + val firstItem = visibleItemsInfo.first() + val lastItem = visibleItemsInfo.last() + + val isAtStart = listState.firstVisibleItemIndex == 0 && + firstItem.offset == layoutInfo.viewportStartOffset + val isAtEnd = lastItem.index == layoutInfo.totalItemsCount - 1 && + (lastItem.offset + lastItem.size) <= layoutInfo.viewportEndOffset + + !(isAtStart && isAtEnd) + } + } + + if (!isScrollable) return + + var trackWidthPx by remember { mutableIntStateOf(0) } + + val scrollProgress by remember { + derivedStateOf { + val layoutInfo = listState.layoutInfo + val totalItems = layoutInfo.totalItemsCount + if (totalItems <= 1) return@derivedStateOf 0f + + val firstVisibleItem = listState.firstVisibleItemIndex + val firstVisibleOffset = listState.firstVisibleItemScrollOffset + val itemHeight = layoutInfo.visibleItemsInfo.firstOrNull()?.size ?: 0 + + val scrolled = firstVisibleItem * itemHeight + firstVisibleOffset + val total = totalItems * itemHeight - layoutInfo.viewportEndOffset + + if (total <= 0) 0f else (scrolled.toFloat() / total).coerceIn(0f, 1f) + } + } + + Box( + modifier = modifier + .height(6.dp) + .fillMaxWidth() + .align(Alignment.Start) + .padding(horizontal = 12.dp) + .onGloballyPositioned { trackWidthPx = it.size.width } + ) { + val thumbWidthPx = with(LocalDensity.current) { 40.dp.toPx() } + val offsetX = ((trackWidthPx - thumbWidthPx) * scrollProgress).toInt() + + Box( + modifier = Modifier + .height(6.dp) + .width(40.dp) + .offset { IntOffset(x = offsetX, y = 0) } + .background(MaterialTheme.colorScheme.outlineVariant, MaterialTheme.shapes.small) + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/DecorativeShape.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/DecorativeShape.kt new file mode 100644 index 000000000..950b20911 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/DecorativeShape.kt @@ -0,0 +1,33 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.size +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.unit.dp + +@Composable +fun DecorativeShape( + size: Int, + shape: Shape, + color: Color, + scale: Float, + modifier: Modifier = Modifier +) { + Box( + modifier = modifier + .size(size.dp) + .graphicsLayer { + rotationZ = 15f + scaleX = scale + scaleY = scale + this.shape = shape + clip = true + } + .background(color) + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/DisclaimerItemLayout.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/DisclaimerItemLayout.kt new file mode 100644 index 000000000..fcd21414e --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/DisclaimerItemLayout.kt @@ -0,0 +1,65 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.foundation.border +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.FirstBaseline +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun DisclaimerItemLayout( + modifier: Modifier = Modifier, + disclaimerItem: Pair, +) { + val descriptionList = splitStringToLines(disclaimerItem.second) + + Column( + modifier = modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(15.dp) + ) { + Text( + text = disclaimerItem.first, + style = MaterialTheme.typography.titleLargeEmphasized, + color = MaterialTheme.colorScheme.primary, + fontWeight = FontWeight.SemiBold + ) + + descriptionList.forEach { item -> + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(15.dp) + ) { + Box( + modifier = Modifier + .size(10.dp) + .alignBy { it.measuredHeight } + .border(2.dp, MaterialTheme.colorScheme.primary, CircleShape) + ) + + Text( + text = item, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier.alignBy(FirstBaseline) + ) + } + + } + } +} + +private fun splitStringToLines(input: String): List { + return input.split("\n").filter { it.isNotBlank() } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/GlowBorder.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/GlowBorder.kt new file mode 100644 index 000000000..c336e23ca --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/GlowBorder.kt @@ -0,0 +1,224 @@ +package com.drdisagree.iconify.core.ui.components.others + +import android.annotation.SuppressLint +import androidx.compose.animation.core.LinearEasing +import androidx.compose.animation.core.animateFloat +import androidx.compose.animation.core.infiniteRepeatable +import androidx.compose.animation.core.rememberInfiniteTransition +import androidx.compose.animation.core.tween +import androidx.compose.foundation.border +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxScope +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.blur +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawWithContent +import androidx.compose.ui.draw.dropShadow +import androidx.compose.ui.geometry.Rect +import androidx.compose.ui.geometry.center +import androidx.compose.ui.graphics.BlendMode +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Paint +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.graphics.drawscope.DrawScope +import androidx.compose.ui.graphics.drawscope.drawIntoCanvas +import androidx.compose.ui.graphics.drawscope.rotate +import androidx.compose.ui.graphics.layer.drawLayer +import androidx.compose.ui.graphics.rememberGraphicsLayer +import androidx.compose.ui.graphics.withSaveLayer +import androidx.compose.ui.unit.dp +import androidx.compose.ui.zIndex +import com.materialkolor.ktx.harmonize +import kotlin.math.pow +import kotlin.math.sqrt + +@Composable +fun GlowBorder( + modifier: Modifier = Modifier, + shape: Shape = RoundedCornerShape(12.dp), + content: @Composable () -> Unit +) { + val red400 = Color(0xFFEF5350).harmonize(MaterialTheme.colorScheme.primary) + val yellow500 = Color(0xFFFFEB3B).harmonize(MaterialTheme.colorScheme.primary) + val green200 = Color(0xFFA5D6A7).harmonize(MaterialTheme.colorScheme.primary) + val blue300 = Color(0xFF64B5F6).harmonize(MaterialTheme.colorScheme.primary) + + val red200 = Color(0xFFEF9A9A).harmonize(MaterialTheme.colorScheme.primary) + val yellow200 = Color(0xFFFFF59D).harmonize(MaterialTheme.colorScheme.primary) + val blue200 = Color(0xFF90CAF9).harmonize(MaterialTheme.colorScheme.primary) + + val rotation by rememberInfiniteTransition().animateFloat( + initialValue = 0f, + targetValue = 360f, + animationSpec = infiniteRepeatable( + animation = tween( + durationMillis = 3000, + easing = LinearEasing, + ) + ) + ) + + Box( + modifier = modifier.clip(shape), + contentAlignment = Alignment.Center + ) { + @SuppressLint("UnusedBoxWithConstraintsScope") + BoxWithConstraints { + MaskBox( + modifier = Modifier + .matchParentSize() + .blur(20.dp), + overlay = { + rotate( + degrees = rotation + ) { + drawCircle( + brush = Brush.sweepGradient( + colors = listOf( + Color.Transparent, + Color.Transparent, + red400, + yellow500, + green200, + blue300, + Color.Transparent, + ) + ), + radius = diagonal( + size.width.toDouble(), + size.height.toDouble() + ).toFloat(), + ) + } + }, + content = { + Box( + modifier = Modifier + .matchParentSize() + .dropShadow( + shape = shape, + ) { + alpha = .5f + radius = 40f + color = Color.White + } + .dropShadow( + shape = shape, + ) { + alpha = .2f + spread = 50f + radius = 400f + color = Color.White + } + .border( + width = 1.dp, + color = Color.White, + shape = shape, + ) + ) + + } + ) + + MaskBox( + modifier = Modifier + .zIndex(10f) + .matchParentSize() + .blur(20.dp), + overlay = { + rotate( + degrees = rotation + ) { + drawCircle( + brush = Brush.sweepGradient( + colors = listOf( + Color.Transparent, + Color.Transparent, + red200, + yellow200, + green200, + blue200, + Color.Transparent, + ) + ), + radius = diagonal( + size.width.toDouble(), + size.height.toDouble() + ).toFloat(), + ) + } + + }, + content = { + Box( + modifier = Modifier + .matchParentSize() + .border( + width = 1.dp, + color = Color.White, + shape = shape, + ) + ) + } + ) + + Box( + modifier = Modifier + .padding(2.dp) + .zIndex(25f) + ) { + content() + } + } + } +} + +@Composable +private fun MaskBox( + modifier: Modifier = Modifier, + overlay: DrawScope.() -> Unit, + content: @Composable BoxScope.() -> Unit, +) { + val graphicsLayer = rememberGraphicsLayer() + Box( + modifier + .drawWithContent { + graphicsLayer.record { + this@drawWithContent.drawContent() + } + graphicsLayer.blendMode = BlendMode.DstIn + layer( + bounds = Rect( + center = center, + radius = size.width * size.height, + ) + ) { + overlay() + drawLayer(graphicsLayer) + } + }, + content = content, + ) +} + +private fun DrawScope.layer( + bounds: Rect = Rect(size.center, size.width * size.height), + block: DrawScope.() -> Unit +) = drawIntoCanvas { canvas -> + canvas.withSaveLayer( + bounds = bounds, + paint = Paint(), + ) { block() } +} + +private fun diagonal(width: Double, height: Double): Double { + return sqrt(width.pow(2) + height.pow(2)) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/IconPreviewGrid.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/IconPreviewGrid.kt new file mode 100644 index 000000000..df7f350cf --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/IconPreviewGrid.kt @@ -0,0 +1,62 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.size +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.ui.utils.rememberXmlPainter + +@Composable +fun IconPreviewGrid( + modifier: Modifier = Modifier, + isApplied: Boolean, + icons: List, + shouldTint: Boolean = true +) { + val iconColor = if (shouldTint) { + if (isApplied) MaterialTheme.colorScheme.onPrimaryContainer + else MaterialTheme.colorScheme.onSurface + } else { + Color.Unspecified + } + + Column( + modifier = modifier, + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Icon( + painter = rememberXmlPainter(icons[0]), + contentDescription = null, + modifier = Modifier.size(20.dp), + tint = iconColor + ) + Icon( + painter = rememberXmlPainter(icons[1]), + contentDescription = null, + modifier = Modifier.size(20.dp), + tint = iconColor + ) + } + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Icon( + painter = rememberXmlPainter(icons[2]), + contentDescription = null, + modifier = Modifier.size(20.dp), + tint = iconColor + ) + Icon( + painter = rememberXmlPainter(icons[3]), + contentDescription = null, + modifier = Modifier.size(20.dp), + tint = iconColor + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/InnerPaddingValues.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/InnerPaddingValues.kt new file mode 100644 index 000000000..5af97fee9 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/InnerPaddingValues.kt @@ -0,0 +1,50 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues +import androidx.compose.foundation.layout.calculateEndPadding +import androidx.compose.foundation.layout.calculateStartPadding +import androidx.compose.foundation.layout.navigationBars +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalLayoutDirection +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp + +@Composable +fun innerPaddingValues( + innerPadding: PaddingValues, + top: Dp = 0.dp, + bottom: Dp = 0.dp, + start: Dp = 0.dp, + end: Dp = 0.dp +): PaddingValues { + val layoutDirection = LocalLayoutDirection.current + + return PaddingValues( + top = innerPadding.calculateTopPadding() + top, + bottom = innerPadding.calculateBottomPadding() + + WindowInsets.navigationBars.asPaddingValues().calculateBottomPadding() + + bottom, + start = innerPadding.calculateStartPadding(layoutDirection) + start, + end = innerPadding.calculateEndPadding(layoutDirection) + end + ) +} + +@Composable +fun innerPaddingValues( + innerPadding: PaddingValues, + horizontal: Dp = 0.dp, + vertical: Dp = 0.dp, +): PaddingValues { + val layoutDirection = LocalLayoutDirection.current + + return PaddingValues( + top = innerPadding.calculateTopPadding() + vertical, + bottom = innerPadding.calculateBottomPadding() + + WindowInsets.navigationBars.asPaddingValues().calculateBottomPadding() + + vertical, + start = innerPadding.calculateStartPadding(layoutDirection) + horizontal, + end = innerPadding.calculateEndPadding(layoutDirection) + horizontal + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/PreviewComposable.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/PreviewComposable.kt new file mode 100644 index 000000000..64af8a576 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/PreviewComposable.kt @@ -0,0 +1,75 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.remember +import androidx.compose.ui.unit.dp +import androidx.navigation.compose.rememberNavController +import com.drdisagree.iconify.core.common.LocalDarkMode +import com.drdisagree.iconify.core.common.LocalHazeState +import com.drdisagree.iconify.core.common.LocalInnerPadding +import com.drdisagree.iconify.core.common.LocalLayerBackdrop +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.common.LocalSettings +import com.drdisagree.iconify.core.common.defaultSettings +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.data.storage.ExternalChange +import com.drdisagree.iconify.data.storage.PreferenceStorage +import com.drdisagree.iconify.services.providers.ProvideSharedPreferencesController +import com.kyant.backdrop.backdrops.rememberLayerBackdrop +import dev.chrisbanes.haze.HazeState +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.emptyFlow + +@OptIn(ExperimentalMaterial3WindowSizeClassApi::class) +@Composable +fun PreviewComposable(content: @Composable () -> Unit) { + val hazeState = remember { HazeState() } + val backdropColor = MaterialTheme.colorScheme.surface + val backdrop = rememberLayerBackdrop { + drawRect(backdropColor) + drawContent() + } + val navController = rememberNavController() + val isDarkTheme = false + val innerPadding = PaddingValues(0.dp) + + ProvideSharedPreferencesController { + CompositionLocalProvider( + LocalHazeState provides hazeState, + LocalLayerBackdrop provides backdrop, + LocalNavController provides navController, + LocalDarkMode provides isDarkTheme, + LocalInnerPadding provides innerPadding, + LocalSettings provides defaultSettings + ) { + content() + } + } +} + +class FakeSharedPrefsStorage : PreferenceStorage { + + private val data = mutableMapOf() + + override val externalChanges: Flow = emptyFlow() + + override fun loadAll(): Map = data.toMap() + + override fun read(key: String, defaultValue: PrefValue): Any = data[key] ?: defaultValue + + override fun write(key: String, value: PrefValue) { + data[key] = value + } + + override fun clearAll() { + data.clear() + } + + override fun dispose() { + data.clear() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/TooltipArrow.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/TooltipArrow.kt new file mode 100644 index 000000000..6c8779313 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/TooltipArrow.kt @@ -0,0 +1,117 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.foundation.Canvas +import androidx.compose.foundation.clickable +import androidx.compose.foundation.indication +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.size +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ripple +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.geometry.Size +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Outline +import androidx.compose.ui.graphics.Path +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Density +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.LayoutDirection +import androidx.compose.ui.unit.dp + +class TooltipArrowShape( + private val arrowCornerRadius: Dp = 4.dp +) : Shape { + override fun createOutline( + size: Size, + layoutDirection: LayoutDirection, + density: Density + ): Outline { + val centerX = size.width / 2f + val arrowCorner = with(density) { arrowCornerRadius.toPx() } + + val path = Path().apply { + moveTo(centerX - size.width / 2f, size.height) + quadraticTo( + centerX - arrowCorner / 2f, 0f, + centerX, 0f + ) + quadraticTo( + centerX + arrowCorner / 2f, 0f, + centerX + size.width / 2f, size.height + ) + close() + } + + return Outline.Generic(path) + } +} + +@Composable +fun TooltipArrow( + modifier: Modifier = Modifier, + backgroundColor: Color = MaterialTheme.colorScheme.surfaceContainerHigh, + arrowWidth: Dp = 12.dp, + arrowHeight: Dp = 6.dp, + arrowCornerRadius: Dp = 4.dp, + onClick: (() -> Unit)? = null, + interactionSource: MutableInteractionSource? = null +) { + val density = LocalDensity.current + val shape = remember(arrowCornerRadius) { TooltipArrowShape(arrowCornerRadius) } + val resolvedInteractionSource = interactionSource ?: remember { MutableInteractionSource() } + + Canvas( + modifier = modifier + .offset(y = 0.5.dp) + .size(width = arrowWidth, height = arrowHeight + 1.dp) + .clip(shape) + .then( + if (onClick != null) { + Modifier.clickable( + onClick = onClick, + interactionSource = resolvedInteractionSource, + indication = ripple() + ) + } else if (interactionSource != null) Modifier.indication( + interactionSource = resolvedInteractionSource, + indication = ripple() + ) else Modifier + ) + ) { + val w = size.width + val h = size.height + val centerX = w / 2f + + val arrowW = size.width + val arrowH = size.height + val arrowCorner = with(density) { arrowCornerRadius.toPx() } + + val path = Path().apply { + moveTo(centerX - arrowW / 2f, arrowH) + quadraticTo( + centerX - arrowCorner / 2f, 0f, + centerX, 0f + ) + quadraticTo( + centerX + arrowCorner / 2f, 0f, + centerX + arrowW / 2f, arrowH + ) + close() + } + + drawPath(path, color = backgroundColor) + } +} + + +@Preview +@Composable +fun TooltipArrowPreview() { + TooltipArrow() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/WithHaptic.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/WithHaptic.kt new file mode 100644 index 000000000..f59e7fe98 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/others/WithHaptic.kt @@ -0,0 +1,42 @@ +package com.drdisagree.iconify.core.ui.components.others + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.rememberUpdatedState +import androidx.compose.runtime.retain.retain +import androidx.compose.ui.hapticfeedback.HapticFeedbackType +import androidx.compose.ui.platform.LocalHapticFeedback +import com.drdisagree.iconify.core.common.LocalSettings + +@Composable +fun withHaptic( + type: HapticFeedbackType = HapticFeedbackType.ContextClick, + block: () -> Unit +): () -> Unit { + val haptic = LocalHapticFeedback.current + val isHapticEnabled = LocalSettings.current.isHapticEnabled + val latestBlock = rememberUpdatedState(block) + + return retain(type, haptic, isHapticEnabled) { + { + if (isHapticEnabled) haptic.performHapticFeedback(type) + latestBlock.value() + } + } +} + +@Composable +fun withHapticResult( + type: HapticFeedbackType = HapticFeedbackType.ContextClick, + block: (Any?) -> Unit +): (Any?) -> Unit { + val haptic = LocalHapticFeedback.current + val isHapticEnabled = LocalSettings.current.isHapticEnabled + val latestBlock = rememberUpdatedState(block) + + return retain(type, haptic, isHapticEnabled) { + { value -> + if (isHapticEnabled) haptic.performHapticFeedback(type) + latestBlock.value(value) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/pagers/DevicePreviewPager.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/pagers/DevicePreviewPager.kt new file mode 100644 index 000000000..e583d7959 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/pagers/DevicePreviewPager.kt @@ -0,0 +1,829 @@ +package com.drdisagree.iconify.core.ui.components.pagers + +import android.content.res.Configuration +import android.os.Handler +import android.os.Looper +import android.view.Gravity +import android.view.View +import android.view.ViewGroup +import android.widget.FrameLayout +import androidx.annotation.LayoutRes +import androidx.asynclayoutinflater.view.AsyncLayoutInflater +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.core.Animatable +import androidx.compose.animation.core.tween +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.scaleIn +import androidx.compose.animation.scaleOut +import androidx.compose.foundation.background +import androidx.compose.foundation.gestures.awaitEachGesture +import androidx.compose.foundation.gestures.awaitFirstDown +import androidx.compose.foundation.gestures.detectTapGestures +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredWidth +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.foundation.pager.HorizontalPager +import androidx.compose.foundation.pager.PagerDefaults +import androidx.compose.foundation.pager.PagerSnapDistance +import androidx.compose.foundation.pager.PagerState +import androidx.compose.foundation.pager.rememberPagerState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.SubdirectoryArrowRight +import androidx.compose.material3.ContainedLoadingIndicator +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.SplitButtonDefaults +import androidx.compose.material3.SplitButtonLayout +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.key +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateMapOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.runtime.snapshotFlow +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.rotate +import androidx.compose.ui.draw.shadow +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.TransformOrigin +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.input.pointer.PointerEventPass +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalWindowInfo +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.IntOffset +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.ui.viewinterop.AndroidView +import androidx.compose.ui.zIndex +import coil3.compose.AsyncImage +import coil3.request.ImageRequest +import coil3.request.crossfade +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalDarkMode +import com.drdisagree.iconify.core.ui.components.others.AutoScalingDevicePreview +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.materialkolor.ktx.harmonize +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.async +import kotlinx.coroutines.awaitAll +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.flow.filter +import kotlinx.coroutines.flow.take +import kotlinx.coroutines.launch +import kotlinx.coroutines.suspendCancellableCoroutine +import kotlinx.coroutines.withContext +import kotlin.coroutines.resume +import kotlin.math.absoluteValue +import kotlin.math.roundToInt + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun DevicePreviewPager( + modifier: Modifier = Modifier, + enabled: Boolean = true, + startPageIndex: Int = 0, + @LayoutRes layoutResIds: List, + names: List = emptyList(), + wallpaperReady: Boolean = true, + wallpaperBytes: ByteArray? = null, + sidePageScale: Float = 0.82f, + onPageChanged: (index: Int) -> Unit = {}, + onSelect: (index: Int) -> Unit = {}, + horizontalPaddingToIgnore: Dp = 0.dp +) { + val context = LocalContext.current + val density = LocalDensity.current + val isDarkTheme = LocalDarkMode.current + val configuration = LocalConfiguration.current + val containerSize = LocalWindowInfo.current.containerSize + + val scope = rememberCoroutineScope() + val deviceAspectRatio = rememberDeviceAspectRatio() + + val viewCache = remember(layoutResIds) { mutableStateMapOf() } + val isReady by remember(layoutResIds, viewCache, wallpaperReady) { + derivedStateOf { + layoutResIds.isNotEmpty() && + layoutResIds.all { viewCache.containsKey(it) } && + wallpaperReady + } + } + + val count = layoutResIds.size + val isLoaded = count > 0 && names.size == count + + val resolvedNames = List(count) { i -> names.getOrNull(i) ?: "${i + 1}" } + + val virtualCount = if (isLoaded) Int.MAX_VALUE else 1 + var currentIndex by rememberSaveable { mutableIntStateOf(startPageIndex) } + val initialVirtualPage = remember(count, currentIndex) { + if (count == 0) 0 + else (Int.MAX_VALUE / 2) - ((Int.MAX_VALUE / 2) % count) + currentIndex + } + + val pagerState = rememberPagerState( + initialPage = initialVirtualPage, + pageCount = { virtualCount }, + ) + + var isRestored by remember { mutableStateOf(false) } + + LaunchedEffect(pagerState.settledPage) { + if (!isRestored) return@LaunchedEffect + + currentIndex = pagerState.settledPage.realIndex(count) + onPageChanged(currentIndex) + } + + LaunchedEffect(layoutResIds) { + if (layoutResIds.isEmpty()) return@LaunchedEffect + + val pending = layoutResIds.filter { !viewCache.containsKey(it) } + if (pending.isEmpty()) return@LaunchedEffect + + val inflated = withContext(Dispatchers.Default) { + pending.associateWith { resId -> + suspendCancellableCoroutine { cont -> + Handler(Looper.getMainLooper()).post { + AsyncLayoutInflater(context).inflate(resId, null) { view, _, _ -> + view.layoutParams = FrameLayout.LayoutParams( + FrameLayout.LayoutParams.MATCH_PARENT, + FrameLayout.LayoutParams.WRAP_CONTENT + ).apply { gravity = Gravity.CENTER_HORIZONTAL } + cont.resume(view) + } + } + } + } + } + + viewCache.putAll(inflated) + } + + LaunchedEffect(isReady, count) { + if (!isReady || count == 0) return@LaunchedEffect + + val target = (Int.MAX_VALUE / 2) - ((Int.MAX_VALUE / 2) % count) + currentIndex + if (currentIndex != target) { + pagerState.scrollToPage(target) + isRestored = true + } + } + + val deviceWidthPx = when (configuration.orientation) { + Configuration.ORIENTATION_PORTRAIT -> containerSize.width + else -> containerSize.height + } + val deviceWidthDp = with(density) { deviceWidthPx.toDp() } + + val flingBehavior = PagerDefaults.flingBehavior( + state = pagerState, + pagerSnapDistance = PagerSnapDistance.atMost(1), + ) + + Column( + modifier = modifier.fillMaxWidth(), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(8.dp, Alignment.CenterVertically) + ) { + BoxWithConstraints( + modifier = Modifier + .fillMaxWidth() + .wrapContentHeight() + ) { + val availableWidth = maxWidth + horizontalPaddingToIgnore * 2 + + Box( + contentAlignment = Alignment.Center, + modifier = Modifier + .requiredWidth(availableWidth) + .wrapContentHeight(), + ) { + val noRotationAvailableWidth = when (configuration.orientation) { + Configuration.ORIENTATION_PORTRAIT -> availableWidth + else -> deviceWidthDp + } + + val noRotationFrameWidth = noRotationAvailableWidth * 0.52f + val noRotationFrameHeight = noRotationFrameWidth / deviceAspectRatio + + val frameWidth = availableWidth * 0.52f + val frameHeight = frameWidth / deviceAspectRatio + + val bezelH = 8.dp + val bezelV = 8.dp + + val screenAreaW = noRotationFrameWidth - bezelH * 2 + val screenAreaH = noRotationFrameHeight - bezelV * 2 + + val pillW = noRotationFrameWidth * sidePageScale + val pillH = noRotationFrameHeight * sidePageScale + + val pillOffsetX = pillW * 0.75f // ~25% of pill visible at screen edge + val pillVisibleWidth = pillW - pillOffsetX + val tapThresholdPx = with(density) { pillVisibleWidth.toPx() } + + val pageSpacing = + ((availableWidth - noRotationFrameWidth) - (pillW - pillOffsetX) * 2) / 2 + + // to center the active page + val contentPad = (availableWidth - screenAreaW) / 2 + + // Shared fraction for animation + val fraction by remember { derivedStateOf { pagerState.currentPageOffsetFraction } } + + // Direction: are we moving forward or backward? + var swipeDirection by remember { mutableIntStateOf(0) } + + LaunchedEffect(pagerState) { + snapshotFlow { pagerState.currentPageOffsetFraction } + .filter { it != 0f } + .take(1) // only needed for the very first swipe seed + .collect { f -> + if (swipeDirection == 0) { + swipeDirection = if (f > 0f) 1 else -1 + } + } + } + + val leftPillAlpha = remember { Animatable(1f) } + val rightPillAlpha = remember { Animatable(1f) } + + val leftPillSlide by remember { + derivedStateOf { + if (swipeDirection < 0 && fraction < 0f && fraction > -0.5f) + (-fraction * pillOffsetX.value * 0.5f) + else 0f + } + } + val rightPillSlide by remember { + derivedStateOf { + if (swipeDirection > 0 && fraction > 0f && fraction < 0.5f) + (-fraction * pillOffsetX.value * 0.5f) + else 0f + } + } + + LaunchedEffect(pagerState) { + snapshotFlow { + Triple( + pagerState.currentPageOffsetFraction, + pagerState.isScrollInProgress, + swipeDirection + ) + }.collect { (f, isScrolling, dir) -> + val absF = f.absoluteValue + + val targetLeftAlpha = if (dir < 0 && f < 0f && f > -0.5f) + (1f - absF * 2f).coerceIn(0f, 1f) + else 1f + + val targetRightAlpha = if (dir > 0 && f > 0f && f < 0.5f) + (1f - absF * 2f).coerceIn(0f, 1f) + else 1f + + if (targetLeftAlpha < 1f) { + leftPillAlpha.snapTo(targetLeftAlpha) + } else if (!isScrolling) { + // Only animate back when finger is lifted, not mid-reverse + leftPillAlpha.animateTo(1f, animationSpec = tween(150)) + } else { + // Mid-swipe reverse: snap immediately to avoid flicker + leftPillAlpha.snapTo(targetLeftAlpha) + } + + if (targetRightAlpha < 1f) { + rightPillAlpha.snapTo(targetRightAlpha) + } else if (!isScrolling) { + rightPillAlpha.animateTo(1f, animationSpec = tween(150)) + } else { + rightPillAlpha.snapTo(targetRightAlpha) + } + } + } + + val pillCorner = 20.dp + val darkBgColor = if (isDarkTheme) MaterialTheme.colorScheme.surface + else MaterialTheme.colorScheme.inverseSurface + val pillColor = remember(MaterialTheme.colorScheme) { + Color(0xFF1C1C1E).harmonize(darkBgColor) + } + + // Left pill + Box( + modifier = Modifier + .align(Alignment.CenterStart) + .offset { + IntOffset( + x = (-pillOffsetX + leftPillSlide.dp).roundToPx(), + y = 0 + ) + } + .width(pillW) + .height(pillH) + .zIndex(0f) + .graphicsLayer { alpha = leftPillAlpha.value } + .clip(RoundedCornerShape(pillCorner)) + .background(pillColor), + ) + + // Right pill + Box( + modifier = Modifier + .align(Alignment.CenterEnd) + .offset { + IntOffset( + x = (pillOffsetX + rightPillSlide.dp).roundToPx(), + y = 0 + ) + } + .width(pillW) + .height(pillH) + .zIndex(0f) + .graphicsLayer { alpha = rightPillAlpha.value } + .clip(RoundedCornerShape(pillCorner)) + .background(pillColor), + ) + + // Phone frame + PhoneFrame( + isReady = isReady, + frameWidth = noRotationFrameWidth, + frameHeight = noRotationFrameHeight, + bezelHorizontal = bezelH, + bezelVertical = bezelV, + wallpaperBytes = wallpaperBytes, + modifier = Modifier.zIndex(1f), + ) + + val hapticFeedback = withHaptic { /* no-op */ } + + // Pager + HorizontalPager( + userScrollEnabled = isLoaded && isReady, + state = pagerState, + flingBehavior = flingBehavior, + contentPadding = PaddingValues(horizontal = contentPad), + pageSpacing = pageSpacing, + verticalAlignment = Alignment.CenterVertically, + beyondViewportPageCount = 2, + modifier = Modifier + .fillMaxWidth() + .height(noRotationFrameHeight) + .zIndex(2f) + .pointerInput(isLoaded, isReady, count) { + if (!isLoaded || !isReady) return@pointerInput + + coroutineScope { + launch { + detectTapGestures { offset -> + val width = size.width + + scope.launch { + when { + offset.x < tapThresholdPx -> { + hapticFeedback() + pagerState.animateScrollToPage(pagerState.currentPage - 1) + } + + offset.x > width - tapThresholdPx -> { + hapticFeedback() + pagerState.animateScrollToPage(pagerState.currentPage + 1) + } + } + } + } + } + + launch { + awaitEachGesture { + awaitFirstDown(requireUnconsumed = false) + swipeDirection = 0 + + var firstDragSeen = false + while (true) { + val event = + awaitPointerEvent(pass = PointerEventPass.Initial) + val drag = event.changes.firstOrNull() ?: break + + if (!drag.pressed) { + swipeDirection = 0 + break + } + + if (!firstDragSeen) { + val dx = drag.position.x - drag.previousPosition.x + if (dx != 0f) { + firstDragSeen = true + swipeDirection = if (dx < 0f) 1 else -1 + } + } + } + } + } + } + }, + ) { virtualPage -> + val scale by remember { + derivedStateOf { + pageScale(pagerState, virtualPage, sidePageScale) + } + } + + if (isLoaded) { + AutoScalingDevicePreview( + modifier = Modifier + .width(screenAreaW) + .height(screenAreaH) + .graphicsLayer { + scaleX = scale + scaleY = scale + transformOrigin = TransformOrigin(0.5f, 0.5f) + } + .clip(RoundedCornerShape(16.dp)), + ) { + val resId = layoutResIds[virtualPage.realIndex(count)] + + key(resId) { + AndroidView( + factory = { ctx -> + val cachedView = viewCache[resId] + val d = ctx.resources.displayMetrics.density + val paddingTopPx = (100 * d).toInt() + val paddingHorizontalPx = (28 * d).toInt() + + FrameLayout(ctx).apply { + setPaddingRelative( + paddingHorizontalPx, + paddingTopPx, + paddingHorizontalPx, + 0 + ) + + cachedView?.let { view -> + (view.parent as? ViewGroup)?.removeView(view) + addView( + view, FrameLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT, + Gravity.CENTER_HORIZONTAL + ) + ) + } + } + }, + update = { container -> + val view = viewCache[resId] + + if (view == null || container.getChildAt(0) === view) return@AndroidView + + (view.parent as? ViewGroup)?.removeView(view) + + container.removeAllViews() + container.addView( + view, + FrameLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT, + Gravity.CENTER_HORIZONTAL + ) + ) + }, + modifier = Modifier.fillMaxSize(), + ) + } + } + } + } + + val labelAlpha by remember { + derivedStateOf { (1f - fraction.absoluteValue * 2f).coerceIn(0f, 1f) } + } + val labelSlide by remember { derivedStateOf { fraction * -32f } } + + if (isLoaded && isReady) { + Text( + text = resolvedNames[pagerState.currentPage.realIndex(count)], + color = Color.White, + fontSize = 13.sp, + fontWeight = FontWeight.Medium, + modifier = Modifier + .zIndex(3f) + .align(Alignment.Center) + .offset { + IntOffset( + x = labelSlide.dp.toPx().roundToInt(), + y = (frameHeight / 2 - bezelV - 32.dp).toPx().roundToInt(), + ) + } + .graphicsLayer { alpha = labelAlpha }, + ) + } + } + } + + val isSelected = rememberSaveable(pagerState.currentPage, startPageIndex) { + mutableStateOf( + pagerState.currentPage.realIndex(count) == startPageIndex + ) + } + + SplitButtonLayout( + leadingButton = { + SplitButtonDefaults.LeadingButton( + enabled = enabled && isReady && !isSelected.value, + onClick = withHaptic { + onSelect(pagerState.currentPage.realIndex(count)) + } + ) { + Text(text = stringResource(R.string.btn_select)) + } + }, + trailingButton = { + SplitButtonDefaults.TrailingButton( + enabled = isReady && !isSelected.value, + onClick = withHaptic { + scope.launch { + val current = pagerState.currentPage + // Find the nearest virtual page that maps to startPageIndex + val offset = (startPageIndex - current.realIndex(count) + count) % count + val nearestPage = when { + offset == 0 -> current + offset <= count / 2 -> current + offset // go forward + else -> current - (count - offset) // go backward + } + pagerState.animateScrollToPage(nearestPage) + } + } + ) { + Icon( + imageVector = Icons.Rounded.SubdirectoryArrowRight, + contentDescription = "Reset", + modifier = Modifier + .size(SplitButtonDefaults.TrailingIconSize) + .rotate(180f), + ) + } + } + ) + } +} + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +private fun PhoneFrame( + isReady: Boolean, + frameWidth: Dp, + frameHeight: Dp, + bezelHorizontal: Dp, + bezelVertical: Dp, + wallpaperBytes: ByteArray?, + modifier: Modifier = Modifier, +) { + val context = LocalContext.current + val isDarkTheme = LocalDarkMode.current + + val cornerRadius = frameWidth * 0.10f + val cornerRadius2 = cornerRadius - 8.dp + + val darkBgColor = if (isDarkTheme) MaterialTheme.colorScheme.surface + else MaterialTheme.colorScheme.inverseSurface + + val colors = remember(MaterialTheme.colorScheme, wallpaperBytes) { + object { + val outerBodyColor = Color(0xFF1C1C1E).harmonize(darkBgColor) + val screenCutOutColor = Color.Black.harmonize(darkBgColor).copy(alpha = 0.6f) + val buttonsColor = Color(0xFF2C2C2C).harmonize(darkBgColor) + val punchHoleColor = (if (wallpaperBytes != null) Color.Black else Color.White) + .harmonize(darkBgColor) + .copy(alpha = if (wallpaperBytes != null) 0.6f else 0.2f) + val gestureIndicatorColor = Color(0xFF555555).harmonize(darkBgColor) + } + } + + Box( + modifier = modifier + .width(frameWidth) + .height(frameHeight), + ) { + // Outer body + Box( + modifier = Modifier + .fillMaxSize() + .shadow(28.dp, RoundedCornerShape(cornerRadius)) + .clip(RoundedCornerShape(cornerRadius)) + .background(colors.outerBodyColor), + ) + + // Screen cut-out + Box( + modifier = Modifier + .padding( + horizontal = bezelHorizontal, + vertical = bezelVertical, + ) + .fillMaxSize() + .clip(RoundedCornerShape(cornerRadius2)) + .background(colors.screenCutOutColor), + ) + + if (isReady) { + AsyncImage( + model = ImageRequest.Builder(context) + .data(wallpaperBytes) + .memoryCacheKey("lock_wallpaper") + .diskCacheKey("lock_wallpaper") + .crossfade(true) + .build(), + contentDescription = "Lock wallpaper", + contentScale = ContentScale.Crop, + modifier = Modifier + .padding( + horizontal = bezelHorizontal, + vertical = bezelVertical + ) + .fillMaxSize() + .clip(RoundedCornerShape(cornerRadius2)) + ) + } + + // Volume up + Box( + modifier = Modifier + .width(bezelHorizontal * 0.45f) + .height(frameHeight * 0.09f) + .offset(x = -(bezelHorizontal * 0.42f), y = frameHeight * 0.22f) + .clip(RoundedCornerShape(topStart = 3.dp, bottomStart = 3.dp)) + .background(colors.buttonsColor), + ) + // Volume down + Box( + modifier = Modifier + .width(bezelHorizontal * 0.45f) + .height(frameHeight * 0.09f) + .offset(x = -(bezelHorizontal * 0.42f), y = frameHeight * 0.33f) + .clip(RoundedCornerShape(topStart = 3.dp, bottomStart = 3.dp)) + .background(colors.buttonsColor), + ) + // Power / lock button + Box( + modifier = Modifier + .align(Alignment.CenterEnd) + .width(bezelHorizontal * 0.45f) + .height(frameHeight * 0.11f) + .offset(x = bezelHorizontal * 0.42f, y = -(frameHeight * 0.04f)) + .clip(RoundedCornerShape(topEnd = 3.dp, bottomEnd = 3.dp)) + .background(colors.buttonsColor), + ) + + // Camera punch-hole + Box( + modifier = Modifier + .align(Alignment.TopCenter) + .offset(y = bezelVertical + 8.dp) + .size(bezelVertical * 1.2f) + .clip(RoundedCornerShape(50)) + .background(colors.punchHoleColor), + ) + + // Gesture indicator pill + Box( + modifier = Modifier + .align(Alignment.BottomCenter) + .padding(bottom = bezelVertical + 8.dp) + .width(frameWidth * 0.30f) + .height(bezelVertical * 0.45f) + .clip(RoundedCornerShape(50)) + .background(colors.gestureIndicatorColor), + ) + + // Loading indicator + AnimatedVisibility( + visible = !isReady, + modifier = Modifier.align(Alignment.Center), + enter = fadeIn() + scaleIn(initialScale = 0.8f), + exit = fadeOut() + scaleOut(targetScale = 0.8f), + ) { + CompositionLocalProvider(LocalDarkMode provides true) { + ContainedLoadingIndicator( + modifier = Modifier.size(48.dp), + ) + } + } + } +} + +/** Maps a virtual infinite-pager page index back to the real 0-based index. */ +private fun Int.realIndex(count: Int): Int { + return if (count == 0) 0 else ((this % count) + count) % count +} + +private fun pageScale(state: PagerState, virtualPage: Int, sideScale: Float): Float { + val offset = ((state.currentPage - virtualPage) + state.currentPageOffsetFraction).absoluteValue + return lerp(1f, sideScale, offset.coerceIn(0f, 1f)) +} + +@Suppress("SameParameterValue") +private fun lerp(start: Float, stop: Float, fraction: Float): Float = + start + fraction * (stop - start) + +@Composable +private fun rememberDeviceAspectRatio(): Float { + val configuration = LocalConfiguration.current + val containerSize = LocalWindowInfo.current.containerSize + + return remember(containerSize) { + val w = when (configuration.orientation) { + Configuration.ORIENTATION_PORTRAIT -> containerSize.width + else -> containerSize.height + }.toFloat() + val h = when (configuration.orientation) { + Configuration.ORIENTATION_PORTRAIT -> containerSize.height + else -> containerSize.width + }.toFloat() + + (w / h).coerceIn(0.40f, 0.75f) + } +} + +private val clockLayouts = listOf( + R.layout.preview_lockscreen_clock_1, + R.layout.preview_lockscreen_clock_2, + R.layout.preview_lockscreen_clock_3, + R.layout.preview_lockscreen_clock_4, + R.layout.preview_lockscreen_clock_5, +) + +@Preview(showBackground = true) +@Composable +private fun ClockPagerPortraitPreview() { + PreviewComposable { + DevicePreviewPager( + layoutResIds = clockLayouts, + onPageChanged = {}, + ) + } +} + +@Preview( + name = "Landscape Mode", + showBackground = true, + device = "spec:parent=pixel_9_pro,orientation=landscape", +) +@Composable +private fun ClockPagerWidePreview() { + PreviewComposable { + DevicePreviewPager( + layoutResIds = clockLayouts, + onPageChanged = {}, + ) + } +} + +@Preview( + name = "Night Mode", + showBackground = true, + uiMode = Configuration.UI_MODE_NIGHT_YES, +) +@Composable +private fun ClockPagerNightPreview() { + PreviewComposable { + DevicePreviewPager( + layoutResIds = clockLayouts, + onPageChanged = {}, + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ActionPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ActionPreferenceItem.kt new file mode 100644 index 000000000..f1b29e5aa --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ActionPreferenceItem.kt @@ -0,0 +1,42 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.PreferenceType +import com.drdisagree.iconify.core.ui.components.others.withHaptic + +@Composable +fun ActionPreferenceItem( + def: PreferenceDefinition, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + type: PreferenceType.Action, + modifier: Modifier, +) { + val context = LocalContext.current + val prefController = LocalPreferenceController.current + val navController = LocalNavController.current + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 1 else 2, + onClick = withHaptic { + if (isEnabled) type.onClick( + context, + prefController, + navController + ) + } + ) { + LeadingIcon(def.icon, isEnabled) + TitleSummaryBlock(def.title, summary, isEnabled) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/CategoryTitleRow.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/CategoryTitleRow.kt new file mode 100644 index 000000000..819d145f5 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/CategoryTitleRow.kt @@ -0,0 +1,48 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.preferences.PrefIconRes +import com.drdisagree.iconify.core.preferences.PrefStringRes +import com.drdisagree.iconify.core.preferences.resolve + +@Composable +fun CategoryTitleRow( + title: PrefStringRes, + icon: PrefIconRes? = null, +) { + if (title.resolve().isEmpty()) return + + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 8.dp) + .padding(bottom = 12.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp) + ) { + if (icon != null) { + Icon( + painter = icon.resolve(), + contentDescription = null, + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(16.dp) + ) + } + Text( + text = title.resolve(), + style = MaterialTheme.typography.titleSmallEmphasized, + color = MaterialTheme.colorScheme.primary, + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ColorPickerPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ColorPickerPreferenceItem.kt new file mode 100644 index 000000000..31ea1f55e --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ColorPickerPreferenceItem.kt @@ -0,0 +1,262 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.border +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.rounded.ArrowForward +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialShapes +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.toShape +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.input.KeyboardCapitalization +import androidx.compose.ui.text.input.KeyboardType +import androidx.compose.ui.unit.dp +import androidx.compose.ui.window.Dialog +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.helpers.fromHex +import com.drdisagree.iconify.helpers.fromHexSafe +import com.github.skydoves.colorpicker.compose.AlphaSlider +import com.github.skydoves.colorpicker.compose.AlphaTile +import com.github.skydoves.colorpicker.compose.BrightnessSlider +import com.github.skydoves.colorpicker.compose.ColorEnvelope +import com.github.skydoves.colorpicker.compose.HsvColorPicker +import com.github.skydoves.colorpicker.compose.rememberColorPickerController +import com.materialkolor.ktx.toHex + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun ColorPickerPreferenceItem( + def: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + modifier: Modifier, +) { + val colorPickerController = rememberColorPickerController() + var showDialog by rememberSaveable { mutableStateOf(false) } + val storedValue by prefController.observe(def.key, (def.defaultValue as PrefValue.StringValue).v) + var dialogSessionKey by rememberSaveable { mutableIntStateOf(0) } + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 1 else 2, + onClick = withHaptic { + if (isEnabled) { + dialogSessionKey++ + showDialog = true + } + } + ) { + LeadingIcon(def.icon, isEnabled) + TitleSummaryBlock(def.title, summary, isEnabled) + AlphaTile( + modifier = Modifier + .size(40.dp) + .clip(MaterialShapes.Cookie9Sided.toShape()) + .border( + 1.dp, + MaterialTheme.colorScheme.outline, + MaterialShapes.Cookie9Sided.toShape() + ), + selectedColor = Color.fromHex(storedValue) + ) + } + + if (showDialog) { + var draft by rememberSaveable(dialogSessionKey) { mutableStateOf(storedValue) } + var hexInput by rememberSaveable(dialogSessionKey) { + mutableStateOf(storedValue.removePrefix("#")) + } + + LaunchedEffect(dialogSessionKey, draft) { + colorPickerController.selectByColor( + color = Color.fromHexSafe(draft) ?: Color.fromHex(storedValue), + fromUser = false + ) + } + + Dialog(onDismissRequest = { showDialog = false }) { + Surface( + shape = MaterialTheme.shapes.large, + tonalElevation = 6.dp + ) { + Column( + modifier = Modifier + .padding(16.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text( + text = "Pick a color", + style = MaterialTheme.typography.titleLarge, + modifier = Modifier.padding(bottom = 16.dp) + ) + + Row( + modifier = Modifier + .padding(bottom = 16.dp) + .fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy( + 8.dp, + Alignment.CenterHorizontally + ), + verticalAlignment = Alignment.CenterVertically + ) { + AlphaTile( + modifier = Modifier + .width(48.dp) + .height(32.dp) + .clip(MaterialTheme.shapes.small) + .border( + 1.dp, + MaterialTheme.colorScheme.outline, + MaterialTheme.shapes.small + ), + selectedColor = Color.fromHex(storedValue) + ) + Icon( + imageVector = Icons.AutoMirrored.Rounded.ArrowForward, + contentDescription = null, + tint = MaterialTheme.colorScheme.onSurface, + modifier = Modifier.size(24.dp) + ) + AlphaTile( + modifier = Modifier + .width(48.dp) + .height(32.dp) + .clip(MaterialTheme.shapes.small) + .border( + 1.dp, + MaterialTheme.colorScheme.outline, + MaterialTheme.shapes.small + ), + selectedColor = colorPickerController.selectedColor.value + ) + } + + HsvColorPicker( + modifier = Modifier + .padding(bottom = 16.dp) + .size(220.dp), + controller = colorPickerController, + initialColor = Color.fromHexSafe(draft) ?: Color.fromHex(storedValue), + onColorChanged = { colorEnvelope: ColorEnvelope -> + draft = colorEnvelope.color.toHex() + hexInput = draft.removePrefix("#") + } + ) + AlphaSlider( + modifier = Modifier + .padding(bottom = 16.dp) + .height(28.dp) + .widthIn(max = 280.dp) + .fillMaxWidth(), + controller = colorPickerController, + ) + BrightnessSlider( + modifier = Modifier + .padding(bottom = 16.dp) + .height(28.dp) + .widthIn(max = 280.dp) + .fillMaxWidth(), + controller = colorPickerController, + ) + + val isValidHex = hexInput.length == 6 || hexInput.length == 8 + + OutlinedTextField( + value = hexInput, + onValueChange = { raw -> + val sanitized = raw + .removePrefix("#") + .filter { it.isDigit() || it.uppercaseChar() in 'A'..'F' } + .take(8) + .uppercase() + hexInput = sanitized + + if (sanitized.length == 6 || sanitized.length == 8) { + draft = "#$sanitized" + colorPickerController.selectByColor( + color = Color.fromHex(draft), + fromUser = true + ) + } + }, + label = { Text("Hex color") }, + prefix = { Text("#") }, + isError = hexInput.isNotEmpty() && !isValidHex, + supportingText = if (hexInput.isNotEmpty() && !isValidHex) { + { Text("Enter 6 (RRGGBB) or 8 (AARRGGBB) hex digits") } + } else null, + singleLine = true, + keyboardOptions = KeyboardOptions( + capitalization = KeyboardCapitalization.Characters, + keyboardType = KeyboardType.Ascii + ), + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 16.dp) + ) + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.End) + ) { + TextButton(onClick = withHaptic { showDialog = false }) { + Text("Cancel") + } + TextButton( + onClick = withHaptic { + val toSave = when { + isValidHex -> "#$hexInput" + draft != storedValue -> draft + else -> storedValue + } + prefController.setString(def.key, toSave) + showDialog = false + } + ) { + Text(stringResource(R.string.btn_select)) + } + } + } + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/EditTextPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/EditTextPreferenceItem.kt new file mode 100644 index 000000000..8e97f23c0 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/EditTextPreferenceItem.kt @@ -0,0 +1,69 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.resolve +import com.drdisagree.iconify.core.ui.components.others.withHaptic + +@Composable +fun EditTextPreferenceItem( + def: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + modifier: Modifier, +) { + var showDialog by rememberSaveable { mutableStateOf(false) } + val storedValue by prefController.observe(def.key, "") + val displaySummary = summary ?: storedValue.ifBlank { null } + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 1 else 2, + onClick = withHaptic { if (isEnabled) showDialog = true } + ) { + LeadingIcon(def.icon, isEnabled) + TitleSummaryBlock(def.title, displaySummary, isEnabled) + } + + if (showDialog) { + var draft by remember { mutableStateOf(storedValue) } + AlertDialog( + onDismissRequest = { showDialog = false }, + title = { Text(def.title.resolve()) }, + text = { + OutlinedTextField( + value = draft, + onValueChange = { draft = it }, + singleLine = true, + modifier = Modifier.fillMaxWidth() + ) + }, + confirmButton = { + TextButton(onClick = withHaptic { + prefController.setString(def.key, draft) + showDialog = false + }) { Text("OK") } + }, + dismissButton = { + TextButton(onClick = withHaptic { showDialog = false }) { Text("Cancel") } + } + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/FilePickerPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/FilePickerPreferenceItem.kt new file mode 100644 index 000000000..5268447d2 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/FilePickerPreferenceItem.kt @@ -0,0 +1,319 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import android.content.Context +import android.net.Uri +import android.provider.OpenableColumns +import androidx.activity.compose.rememberLauncherForActivityResult +import androidx.activity.result.PickVisualMediaRequest +import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.wrapContentSize +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.rounded.AttachFile +import androidx.compose.material.icons.rounded.AudioFile +import androidx.compose.material.icons.rounded.Description +import androidx.compose.material.icons.rounded.FontDownload +import androidx.compose.material.icons.rounded.Image +import androidx.compose.material.icons.rounded.PictureAsPdf +import androidx.compose.material.icons.rounded.VideoFile +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.preferences.PrefStringRes +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.PreferenceType +import com.drdisagree.iconify.core.preferences.resolve +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.withHaptic + +sealed class FilePickerType { + + abstract val mimeTypes: List + abstract val label: PrefStringRes + + object Image : FilePickerType() { + override val mimeTypes = listOf("image/*") + override val label = stringRes("Pick image") + } + + object Video : FilePickerType() { + override val mimeTypes = listOf("video/*") + override val label = stringRes("Pick video") + } + + object Audio : FilePickerType() { + override val mimeTypes = listOf("audio/*") + override val label = stringRes("Pick audio") + } + + object Pdf : FilePickerType() { + override val mimeTypes = listOf("application/pdf") + override val label = stringRes("Pick PDF") + } + + object Document : FilePickerType() { + override val mimeTypes = listOf( + "application/pdf", + "application/msword", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "text/plain", + ) + override val label = stringRes("Pick document") + } + + object Font : FilePickerType() { + override val mimeTypes = listOf( + "font/ttf", + "font/otf", + "font/woff", + "font/woff2", + "application/x-font-ttf", + "application/x-font-opentype", + "application/font-woff", + "application/vnd.ms-fontobject" + ) + override val label = stringRes("Pick font") + } + + object Any : FilePickerType() { + override val mimeTypes = listOf("*/*") + override val label = stringRes("Pick file") + } + + data class Custom( + override val mimeTypes: List, + override val label: PrefStringRes = stringRes("Pick file"), + ) : FilePickerType() +} + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun FilePickerPreferenceItem( + def: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + type: PreferenceType.FilePicker, + modifier: Modifier = Modifier, +) { + val context = LocalContext.current + + val uriString by prefController.observe(def.key, "") + val uri: Uri? = remember(uriString) { uriString.takeIf { it.isNotEmpty() }?.let(Uri::parse) } + val fileName: String? = remember(uri) { uri?.let { resolveFileName(context, it) } } + + val isImageType = type.pickerType is FilePickerType.Image + val isImage: Boolean = remember(uri) { + uri?.let { context.contentResolver.getType(it)?.startsWith("image/") } ?: false + } + + val photoPickerLauncher = rememberLauncherForActivityResult( + contract = ActivityResultContracts.PickVisualMedia(), + ) { pickedUri -> + if (pickedUri != null && isEnabled) { + runCatching { + context.contentResolver.takePersistableUriPermission( + pickedUri, + android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION, + ) + } + val uriStr = pickedUri.toString() + if (type.saveFileUri) prefController.setString(def.key, uriStr) + type.onFileSelected(prefController, uriStr) + } + } + + val documentLauncher = rememberLauncherForActivityResult( + contract = ActivityResultContracts.OpenDocument(), + ) { pickedUri -> + if (pickedUri != null && isEnabled) { + runCatching { + context.contentResolver.takePersistableUriPermission( + pickedUri, + android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION, + ) + } + val uriStr = pickedUri.toString() + if (type.saveFileUri) prefController.setString(def.key, uriStr) + type.onFileSelected(prefController, uriStr) + } + } + + val onPickClick = withHaptic { + if (isEnabled) { + if (isImageType) { + photoPickerLauncher.launch( + PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly) + ) + } else { + documentLauncher.launch(type.pickerType.mimeTypes.toTypedArray()) + } + } + } + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 2 else 3, + ) { + Column(modifier = Modifier.fillMaxWidth()) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(16.dp), + ) { + LeadingIcon(def.icon, isEnabled) + TitleSummaryBlock(def.title, summary, isEnabled) + } + + Spacer(Modifier.height(10.dp)) + + // if (isImage && uri != null) { + // Box( + // modifier = Modifier + // .fillMaxWidth() + // .height(160.dp) + // .clip(RoundedCornerShape(8.dp)) + // .border( + // 1.dp, + // MaterialTheme.colorScheme.outlineVariant, + // RoundedCornerShape(8.dp), + // ), + // ) { + // AsyncImage( + // model = uri, + // contentDescription = "Preview", + // contentScale = ContentScale.Crop, + // modifier = Modifier.fillMaxSize(), + // ) + // } + // Spacer(Modifier.height(8.dp)) + // } + + if (uri != null && type.saveFileUri) { + FilenameChip( + name = fileName ?: "Unknown file", + type = type.pickerType, + isEnabled = isEnabled, + onClear = withHaptic { + if (type.saveFileUri) { + prefController.setString(def.key, "") + } + type.onFileSelected(prefController, "") + }, + ) + Spacer(Modifier.height(8.dp)) + } + + Button( + onClick = onPickClick, + enabled = isEnabled, + shapes = ButtonDefaults.shapes(), + contentPadding = PaddingValues(horizontal = 16.dp, vertical = 8.dp), + ) { + Text(text = if (uri != null) "Replace" else type.pickerType.label.resolve()) + } + } + } +} + +private fun resolveFileName(context: Context, uri: Uri): String? { + runCatching { + context.contentResolver.query(uri, null, null, null, null)?.use { cursor -> + val col = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME) + if (col != -1 && cursor.moveToFirst()) return cursor.getString(col) + } + } + return uri.lastPathSegment +} + +@Composable +private fun FileTypeIcon(type: FilePickerType, contentColor: Color) { + val icon = when (type) { + FilePickerType.Image -> Icons.Rounded.Image + FilePickerType.Video -> Icons.Rounded.VideoFile + FilePickerType.Audio -> Icons.Rounded.AudioFile + FilePickerType.Pdf -> Icons.Rounded.PictureAsPdf + FilePickerType.Document -> Icons.Rounded.Description + FilePickerType.Font -> Icons.Rounded.FontDownload + else -> Icons.Rounded.AttachFile + } + + Icon( + imageVector = icon, + contentDescription = null, + tint = contentColor, + modifier = Modifier.size(16.dp), + ) +} + +@Composable +private fun FilenameChip( + name: String, + type: FilePickerType, + isEnabled: Boolean, + onClear: () -> Unit +) { + val containerColor = MaterialTheme.colorScheme.secondaryContainer + val contentColor = MaterialTheme.colorScheme.onSecondaryContainer + + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(4.dp), + modifier = Modifier + .wrapContentSize() + .clip(RoundedCornerShape(50)) + .background(containerColor) + .padding(horizontal = 12.dp, vertical = 6.dp), + ) { + FileTypeIcon(type, contentColor) + Text( + text = name, + style = MaterialTheme.typography.bodySmall, + color = contentColor, + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + IconButton( + onClick = onClear, + modifier = Modifier + .padding(start = 4.dp) + .size(20.dp), + enabled = isEnabled + ) { + Icon( + imageVector = Icons.Outlined.Close, + contentDescription = "Clear", + tint = contentColor, + modifier = Modifier.size(14.dp), + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/InfoPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/InfoPreferenceItem.kt new file mode 100644 index 000000000..c5bbd1a0b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/InfoPreferenceItem.kt @@ -0,0 +1,63 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.iconRes +import com.drdisagree.iconify.core.preferences.resolve +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText + +@Composable +fun InfoPreferenceItem( + def: PreferenceDefinition, + isEnabled: Boolean, + summary: String?, + modifier: Modifier, +) { + val contentColor = MaterialTheme.colorScheme.onSurface + + PreferenceContainer( + shape = RoundedCornerShape(0.dp), + isEnabled = isEnabled, + modifier = modifier, + minLine = 1, + containerColor = Color.Transparent, + contentPadding = PaddingValues(0.dp) + ) { + Column( + modifier = modifier + .fillMaxWidth() + .padding(vertical = 16.dp) + ) { + LeadingIcon(def.icon ?: iconRes(R.drawable.ic_info), isEnabled) + Spacer(Modifier.height(12.dp)) + Text( + text = def.title.resolve(), + style = MaterialTheme.typography.bodyMedium, + color = if (isEnabled) contentColor + else contentColor.copy(alpha = 0.38f), + ) + if (!summary.isNullOrBlank()) { + Spacer(Modifier.height(2.dp)) + Text( + text = summary, + style = MaterialTheme.typography.bodyMedium, + color = if (isEnabled) contentColor.secondaryText() + else contentColor.copy(alpha = 0.38f), + ) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ListPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ListPreferenceItem.kt new file mode 100644 index 000000000..eaccafea5 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/ListPreferenceItem.kt @@ -0,0 +1,145 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.RadioButton +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.PreferenceType +import com.drdisagree.iconify.core.preferences.resolve +import com.drdisagree.iconify.core.preferences.resolveOrNull +import com.drdisagree.iconify.core.preferences.resolveToStrings +import com.drdisagree.iconify.core.ui.components.others.ColumnScrollIndicator +import com.drdisagree.iconify.core.ui.components.others.withHaptic + +@Composable +fun ListPreferenceItem( + def: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + type: PreferenceType.ListPref, + modifier: Modifier, +) { + var showDialog by rememberSaveable { mutableStateOf(false) } + val selectedValue by prefController.observe(def.key, (def.defaultValue as PrefValue.StringValue).v) + + val displaySummary = summary + ?: type.entries.resolve() + .getOrNull(type.entryValues.resolveToStrings().indexOf(selectedValue)).resolveOrNull() + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 1 else 2, + onClick = withHaptic { if (isEnabled) showDialog = true } + ) { + LeadingIcon(def.icon, isEnabled) + TitleSummaryBlock(def.title, displaySummary, isEnabled) + } + + if (showDialog) { + AlertDialog( + onDismissRequest = { showDialog = false }, + title = { Text(def.title.resolve()) }, + text = { + val listState = rememberLazyListState() + val entries = type.entries.resolve() + + val showTopDivider by remember { + derivedStateOf { listState.firstVisibleItemIndex > 0 || listState.firstVisibleItemScrollOffset > 0 } + } + val showBottomDivider by remember { + derivedStateOf { + val layoutInfo = listState.layoutInfo + val lastVisibleItem = layoutInfo.visibleItemsInfo.lastOrNull() + lastVisibleItem != null && + (lastVisibleItem.index < layoutInfo.totalItemsCount - 1 || + lastVisibleItem.offset + lastVisibleItem.size > layoutInfo.viewportEndOffset) + } + } + + Column(modifier = Modifier.fillMaxWidth()) { + if (showTopDivider) HorizontalDivider() + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.Start), + verticalAlignment = Alignment.Top + ) { + LazyColumn( + state = listState, + modifier = Modifier + .wrapContentHeight() + .weight(1f) + ) { + itemsIndexed(entries) { i, entry -> + val value = type.entryValues.resolveToStrings()[i] + + Row( + modifier = Modifier + .fillMaxWidth() + .clip(RoundedCornerShape(8.dp)) + .clickable( + onClick = withHaptic { + prefController.setString(def.key, value) + showDialog = false + } + ), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(4.dp) + ) { + RadioButton( + selected = selectedValue == value, + onClick = withHaptic { + prefController.setString(def.key, value) + showDialog = false + } + ) + Text( + text = entry.resolve(), + style = MaterialTheme.typography.bodyLarge + ) + } + } + } + + ColumnScrollIndicator(listState = listState) + } + + if (showBottomDivider) HorizontalDivider() + } + }, + confirmButton = { + TextButton(onClick = withHaptic { showDialog = false }) { Text("Cancel") } + } + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/MultiListPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/MultiListPreferenceItem.kt new file mode 100644 index 000000000..b0cecc3cc --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/MultiListPreferenceItem.kt @@ -0,0 +1,164 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Checkbox +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.PreferenceType +import com.drdisagree.iconify.core.preferences.resolve +import com.drdisagree.iconify.core.preferences.resolveToStrings +import com.drdisagree.iconify.core.ui.components.others.ColumnScrollIndicator +import com.drdisagree.iconify.core.ui.components.others.withHaptic + +@Composable +fun MultiListPreferenceItem( + def: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + type: PreferenceType.MultiList, + modifier: Modifier, +) { + var showDialog by rememberSaveable { mutableStateOf(false) } + val selectedValues by prefController.observe(def.key, emptySet()) + + val displaySummary = summary + ?: selectedValues.mapNotNull { v -> + type.entries.resolve() + .getOrNull(type.entryValues.resolveToStrings().indexOf(v)) + }.joinToString(", ").ifBlank { null } + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 1 else 2, + onClick = withHaptic { if (isEnabled) showDialog = true } + ) { + LeadingIcon(def.icon, isEnabled) + TitleSummaryBlock(def.title, displaySummary, isEnabled) + } + + if (showDialog) { + var localSelected by remember { mutableStateOf(selectedValues) } + + AlertDialog( + onDismissRequest = { showDialog = false }, + title = { Text(def.title.resolve()) }, + text = { + val listState = rememberLazyListState() + val entries = type.entries.resolve() + + val showTopDivider by remember { + derivedStateOf { + listState.firstVisibleItemIndex > 0 || + listState.firstVisibleItemScrollOffset > 0 + } + } + val showBottomDivider by remember { + derivedStateOf { + val layoutInfo = listState.layoutInfo + val lastVisibleItem = layoutInfo.visibleItemsInfo.lastOrNull() + lastVisibleItem != null && + (lastVisibleItem.index < layoutInfo.totalItemsCount - 1 || + lastVisibleItem.offset + lastVisibleItem.size > + layoutInfo.viewportEndOffset) + } + } + + Column(modifier = Modifier.fillMaxWidth()) { + if (showTopDivider) HorizontalDivider() + + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(8.dp), + verticalAlignment = Alignment.Top + ) { + LazyColumn( + state = listState, + modifier = Modifier + .wrapContentHeight() + .weight(1f) + ) { + itemsIndexed(entries) { i, entry -> + val value = type.entryValues.resolveToStrings()[i] + + Row( + modifier = Modifier + .fillMaxWidth() + .clip(RoundedCornerShape(8.dp)) + .clickable( + onClick = withHaptic { + localSelected = + if (value in localSelected) + localSelected - value + else localSelected + value + } + ), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(4.dp) + ) { + Checkbox( + checked = value in localSelected, + onCheckedChange = { + localSelected = + if (it) localSelected + value + else localSelected - value + } + ) + Text( + text = entry.resolve(), + style = MaterialTheme.typography.bodyLarge + ) + } + } + } + + ColumnScrollIndicator(listState = listState) + } + + if (showBottomDivider) HorizontalDivider() + } + }, + confirmButton = { + TextButton( + onClick = withHaptic { + prefController.setStringSet(def.key, localSelected) + showDialog = false + } + ) { Text("OK") } + }, + dismissButton = { + TextButton( + onClick = withHaptic { showDialog = false } + ) { Text("Cancel") } + } + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceCategoryItems.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceCategoryItems.kt new file mode 100644 index 000000000..f095c8d01 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceCategoryItems.kt @@ -0,0 +1,69 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.EnterTransition +import androidx.compose.animation.ExitTransition +import androidx.compose.animation.expandVertically +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.shrinkVertically +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyListScope +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.preferences.PreferenceCategoryDefinition +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.resolveOrNull +import com.drdisagree.iconify.core.ui.components.others.animatedPreferenceShape +import com.drdisagree.iconify.core.ui.utils.CARD_ITEM_SPACING +import com.drdisagree.iconify.core.ui.utils.resolvePosition + +fun LazyListScope.preferenceCategoryItems( + category: PreferenceCategoryDefinition, + prefController: PreferenceController, + addTopSpacer: Boolean = true, + firstLoadMap: Map, + visibleIndices: List, +) { + item( + key = "header_${System.identityHashCode(category)}", + contentType = "category_header" + ) { + if (visibleIndices.isEmpty()) return@item + if (addTopSpacer) Spacer(Modifier.height(24.dp)) + CategoryTitleRow(title = category.title, icon = category.icon) + } + + itemsIndexed( + items = category.preferences, + key = { _, pref -> pref.key }, + contentType = { _, pref -> pref.type::class.simpleName }, + ) { index, pref -> + val isVisible = index in visibleIndices + val position = resolvePosition(visibleIndices, index) + val shape = animatedPreferenceShape(position) + val firstLoad = firstLoadMap[pref.key] ?: false + + AnimatedVisibility( + visible = isVisible, + enter = if (firstLoad) EnterTransition.None else fadeIn() + expandVertically(), + exit = if (firstLoad) ExitTransition.None else fadeOut() + shrinkVertically(), + ) { + val isEnabled = pref.isEnabled(prefController) + val summary = pref.summary?.invoke(prefController, pref.key).resolveOrNull() + val topPad = if (index == visibleIndices.firstOrNull()) 0.dp else CARD_ITEM_SPACING + + PreferenceItem( + definition = pref, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + modifier = Modifier.padding(top = topPad), + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceContainer.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceContainer.kt new file mode 100644 index 000000000..576e5559e --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceContainer.kt @@ -0,0 +1,73 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ripple +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.semantics.Role +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.ui.components.others.withHaptic + +private val SINGLE_LINE_LIST_ITEM_MIN_HEIGHT = 56.dp +private val TWO_LINE_LIST_ITEM_MIN_HEIGHT = 72.dp +private val THREE_LINE_LIST_ITEM_MIN_HEIGHT = 88.dp + +@Composable +fun PreferenceContainer( + modifier: Modifier = Modifier, + shape: RoundedCornerShape = RoundedCornerShape(28.dp), + isEnabled: Boolean, + minLine: Int = 1, + onClick: (() -> Unit)? = null, + containerColor: Color = MaterialTheme.colorScheme.surfaceContainerHigh, + contentPadding: PaddingValues = PaddingValues(horizontal = 16.dp, vertical = 14.dp), + spaceAmongItems: Dp = 16.dp, + content: @Composable RowScope.() -> Unit, +) { + Row( + modifier = modifier + .fillMaxWidth() + .heightIn( + min = when { + minLine <= 1 -> SINGLE_LINE_LIST_ITEM_MIN_HEIGHT + minLine == 2 -> TWO_LINE_LIST_ITEM_MIN_HEIGHT + else -> THREE_LINE_LIST_ITEM_MIN_HEIGHT + } + ) + .clip(shape) + .background(containerColor, shape) + .alpha(if (isEnabled) 1f else 0.38f) + .then( + if (onClick != null) { + Modifier.clickable( + interactionSource = remember { MutableInteractionSource() }, + indication = ripple(), + enabled = isEnabled, + role = Role.Button, + onClick = withHaptic { onClick() } + ) + } else Modifier + ) + .padding(contentPadding), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(spaceAmongItems), + content = content + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceIconAndText.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceIconAndText.kt new file mode 100644 index 000000000..df2def97f --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceIconAndText.kt @@ -0,0 +1,61 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.size +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.preferences.PrefIconRes +import com.drdisagree.iconify.core.preferences.PrefStringRes +import com.drdisagree.iconify.core.preferences.resolve +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText + +@Composable +fun LeadingIcon( + icon: PrefIconRes?, + isEnabled: Boolean, + contentColor: Color = MaterialTheme.colorScheme.onSurface +) { + if (icon != null) { + Icon( + painter = icon.resolve(), + contentDescription = null, + tint = if (isEnabled) contentColor + else contentColor.copy(alpha = 0.38f), + modifier = Modifier.size(24.dp) + ) + } +} + +@Composable +fun RowScope.TitleSummaryBlock( + title: PrefStringRes, + summary: String?, + isEnabled: Boolean, + contentColor: Color = MaterialTheme.colorScheme.onSurface +) { + Column(modifier = Modifier.weight(1f)) { + Text( + text = title.resolve(), + style = MaterialTheme.typography.bodyLarge, + color = if (isEnabled) contentColor + else contentColor.copy(alpha = 0.38f), + ) + if (!summary.isNullOrBlank()) { + Spacer(Modifier.height(2.dp)) + Text( + text = summary, + style = MaterialTheme.typography.bodyMedium, + color = if (isEnabled) contentColor.secondaryText() + else contentColor.copy(alpha = 0.38f), + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceItem.kt new file mode 100644 index 000000000..d38c11d78 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/PreferenceItem.kt @@ -0,0 +1,121 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.PreferenceType + +@Composable +fun PreferenceItem( + definition: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + modifier: Modifier = Modifier, +) { + when (val type = definition.type) { + is PreferenceType.Custom -> { + Box(modifier = modifier) { + type.content() + } + } + + is PreferenceType.Switch -> SwitchPreferenceItem( + def = definition, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + type = type, + modifier = modifier + ) + + is PreferenceType.Slider -> SliderPreferenceItem( + def = definition, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + type = type, + modifier = modifier + ) + + is PreferenceType.ListPref -> ListPreferenceItem( + def = definition, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + type = type, + modifier = modifier + ) + + is PreferenceType.MultiList -> MultiListPreferenceItem( + def = definition, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + type = type, + modifier = modifier + ) + + is PreferenceType.Action -> ActionPreferenceItem( + def = definition, + shape = shape, + isEnabled = isEnabled, + summary = summary, + type = type, + modifier = modifier + ) + + is PreferenceType.EditText -> EditTextPreferenceItem( + def = definition, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + modifier = modifier + ) + + is PreferenceType.TwoTargetSwitch -> TwoTargetSwitchPreferenceItem( + def = definition, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + type = type, + modifier = modifier, + ) + + is PreferenceType.ColorPicker -> ColorPickerPreferenceItem( + def = definition, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + modifier = modifier + ) + + is PreferenceType.FilePicker -> FilePickerPreferenceItem( + def = definition, + prefController = prefController, + shape = shape, + isEnabled = isEnabled, + summary = summary, + type = type, + modifier = modifier + ) + + is PreferenceType.Info -> InfoPreferenceItem( + def = definition, + isEnabled = isEnabled, + summary = summary, + modifier = modifier + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/SliderPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/SliderPreferenceItem.kt new file mode 100644 index 000000000..47f4ff576 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/SliderPreferenceItem.kt @@ -0,0 +1,151 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.IconButtonDefaults +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Slider +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableFloatStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.PreferenceType +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.helpers.replaceAll + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun SliderPreferenceItem( + def: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + type: PreferenceType.Slider, + modifier: Modifier, +) { + val defaultValue = (def.defaultValue as PrefValue.FloatValue).v + val persistedValue by prefController.observe(def.key, defaultValue) + var sliderValue by remember { mutableFloatStateOf(persistedValue) } + var previousLabel by remember { mutableStateOf(null) } + val originalValueLabel = type.valueLabel?.invoke(sliderValue) ?: sliderValue.toInt().toString() + val valueLabel = if (type.showDefaultIndicator && sliderValue == defaultValue) { + if (type.hideDefaultValue) { + stringResource(R.string.opt_default).replaceAll("(" to "", ")" to "") + } else { + "%s %s".format(originalValueLabel, stringResource(R.string.opt_default)) + } + } else { + originalValueLabel + } + + val onValueChangeWithHaptic = withHaptic { /* no-op */ } + + fun updateUiValue(newValue: Float) { + if (!isEnabled || sliderValue == newValue) return + + val newLabel = type.valueLabel?.invoke(newValue) + ?: newValue.toInt().toString() + + if (newLabel != previousLabel) { + onValueChangeWithHaptic() + previousLabel = newLabel + } + + sliderValue = newValue + } + + fun persistValue(value: Float) { + prefController.setFloat(def.key, value) + } + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 2 else 3, + ) { + Column(modifier = Modifier.fillMaxWidth()) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(16.dp) + ) { + LeadingIcon(def.icon, isEnabled) + TitleSummaryBlock(def.title, summary, isEnabled) + Text( + text = valueLabel, + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.primary, + ) + } + Row( + modifier = Modifier + .fillMaxWidth() + .padding(top = 6.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(16.dp) + ) { + Slider( + value = sliderValue, + onValueChange = { newValue -> + updateUiValue(newValue) + + if (!type.applyOnValueChangeFinished) { + persistValue(newValue) + } + }, + onValueChangeFinished = { + if (type.applyOnValueChangeFinished) { + persistValue(sliderValue) + } + }, + valueRange = type.min..type.max, + steps = type.steps, + enabled = isEnabled, + modifier = Modifier + .wrapContentHeight() + .weight(1f) + .padding(top = 4.dp) + ) + if (type.showResetButton) { + IconButton( + enabled = isEnabled && sliderValue != defaultValue, + shapes = IconButtonDefaults.shapes(), + colors = IconButtonDefaults.filledIconButtonColors(), + onClick = { + updateUiValue(defaultValue) + persistValue(defaultValue) + } + ) { + Icon( + painter = painterResource(R.drawable.ic_reset), + contentDescription = stringResource(R.string.btn_reset), + modifier = Modifier.size(20.dp) + ) + } + } + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/SwitchPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/SwitchPreferenceItem.kt new file mode 100644 index 000000000..0579c6bcd --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/SwitchPreferenceItem.kt @@ -0,0 +1,61 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.LocalMinimumInteractiveComponentSize +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Switch +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.PreferenceType +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.ui.components.others.withHapticResult + +@Composable +fun SwitchPreferenceItem( + def: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + type: PreferenceType.Switch, + modifier: Modifier, +) { + val checked by prefController.observe(def.key, false) + val containerColor = if (type.isMasterSwitch) MaterialTheme.colorScheme.primaryContainer + else MaterialTheme.colorScheme.surfaceContainerHigh + val contentColor = if (type.isMasterSwitch) MaterialTheme.colorScheme.onPrimaryContainer + else MaterialTheme.colorScheme.onSurface + val shape = if (type.isMasterSwitch) CircleShape else shape + val contentPadding = if (type.isMasterSwitch) PaddingValues(20.dp) + else PaddingValues(horizontal = 16.dp, vertical = 14.dp) + val summary = if (type.isMasterSwitch) null else summary + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 1 else 2, + containerColor = containerColor, + contentPadding = contentPadding, + onClick = withHaptic { if (isEnabled) prefController.setBoolean(def.key, !checked) } + ) { + LeadingIcon(def.icon, isEnabled, contentColor) + TitleSummaryBlock(def.title, summary, isEnabled, contentColor) + CompositionLocalProvider(LocalMinimumInteractiveComponentSize provides 1.dp) { + Switch( + checked = checked, + onCheckedChange = withHapticResult { + if (isEnabled) prefController.setBoolean(def.key, it as Boolean) + }, + enabled = isEnabled, + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/TwoTargetSwitchPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/TwoTargetSwitchPreferenceItem.kt new file mode 100644 index 000000000..0c81107e5 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/preferences/TwoTargetSwitchPreferenceItem.kt @@ -0,0 +1,86 @@ +package com.drdisagree.iconify.core.ui.components.preferences + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.rounded.ArrowForwardIos +import androidx.compose.material3.Icon +import androidx.compose.material3.LocalMinimumInteractiveComponentSize +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Switch +import androidx.compose.material3.VerticalDivider +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceDefinition +import com.drdisagree.iconify.core.preferences.PreferenceType +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.ui.components.others.withHapticResult + +@Composable +fun TwoTargetSwitchPreferenceItem( + def: PreferenceDefinition, + prefController: PreferenceController, + shape: RoundedCornerShape, + isEnabled: Boolean, + summary: String?, + type: PreferenceType.TwoTargetSwitch, + modifier: Modifier = Modifier, +) { + val context = LocalContext.current + val prefController = LocalPreferenceController.current + val navController = LocalNavController.current + + val checked by prefController.observe(def.key, false) + + PreferenceContainer( + shape = shape, + isEnabled = isEnabled, + modifier = modifier, + minLine = if (summary.isNullOrEmpty()) 1 else 2, + onClick = withHaptic { type.onClick(context, prefController, navController) } + ) { + LeadingIcon(def.icon, isEnabled) + TitleSummaryBlock(def.title, summary, isEnabled) + + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(4.dp) + ) { + Icon( + imageVector = Icons.AutoMirrored.Rounded.ArrowForwardIos, + contentDescription = null, + tint = MaterialTheme.colorScheme.outline, + modifier = Modifier.size(16.dp) + ) + VerticalDivider( + modifier = Modifier.height(32.dp), + color = MaterialTheme.colorScheme.outline, + thickness = 1.dp, + ) + } + + CompositionLocalProvider(LocalMinimumInteractiveComponentSize provides 1.dp) { + Switch( + checked = checked, + onCheckedChange = withHapticResult { + if (isEnabled) prefController.setBoolean( + def.key, + it as Boolean + ) + }, + enabled = isEnabled, + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/scaffolds/AppScaffold.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/scaffolds/AppScaffold.kt new file mode 100644 index 000000000..4d2284a32 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/scaffolds/AppScaffold.kt @@ -0,0 +1,62 @@ +package com.drdisagree.iconify.core.ui.components.scaffolds + +import androidx.annotation.DrawableRes +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.calculateEndPadding +import androidx.compose.foundation.layout.calculateStartPadding +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Scaffold +import androidx.compose.material3.TopAppBarDefaults +import androidx.compose.material3.TopAppBarScrollBehavior +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.input.nestedscroll.nestedScroll +import androidx.compose.ui.platform.LocalLayoutDirection +import com.drdisagree.iconify.core.common.LocalInnerPadding +import com.drdisagree.iconify.core.ui.components.topappbar.CollapsingTopAppBar + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun AppScaffold( + modifier: Modifier = Modifier, + title: String, + subtitle: String = "", + @DrawableRes backIcon: Int? = null, + showBackIcon: Boolean = false, + onBackClick: (() -> Unit)? = null, + actions: @Composable RowScope.() -> Unit = {}, + content: @Composable ( + innerPadding: PaddingValues, + scrollBehavior: TopAppBarScrollBehavior + ) -> Unit, +) { + val parentInnerPadding = LocalInnerPadding.current + val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior() + + Scaffold( + modifier = modifier.nestedScroll(scrollBehavior.nestedScrollConnection), + topBar = { + CollapsingTopAppBar( + scrollBehavior = scrollBehavior, + title = title, + subtitle = subtitle, + backIcon = backIcon, + showBackIcon = showBackIcon, + onBackClick = onBackClick, + actions = actions, + ) + }, + contentWindowInsets = WindowInsets(0, 0, 0, 0), + ) { innerPadding -> + val layoutDirection = LocalLayoutDirection.current + val adjustedPadding = PaddingValues( + top = innerPadding.calculateTopPadding(), + bottom = innerPadding.calculateBottomPadding() + parentInnerPadding.calculateBottomPadding(), + start = innerPadding.calculateStartPadding(layoutDirection), + end = innerPadding.calculateEndPadding(layoutDirection) + ) + content(adjustedPadding, scrollBehavior) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/scaffolds/MainScaffold.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/scaffolds/MainScaffold.kt new file mode 100644 index 000000000..55cc866fc --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/scaffolds/MainScaffold.kt @@ -0,0 +1,349 @@ +package com.drdisagree.iconify.core.ui.components.scaffolds + +import androidx.activity.compose.BackHandler +import androidx.annotation.DrawableRes +import androidx.annotation.StringRes +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.EnterTransition +import androidx.compose.animation.ExitTransition +import androidx.compose.animation.core.CubicBezierEasing +import androidx.compose.animation.core.tween +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.scaleIn +import androidx.compose.animation.scaleOut +import androidx.compose.animation.slideInVertically +import androidx.compose.animation.slideOutVertically +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.size +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.Close +import androidx.compose.material.icons.rounded.Pending +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.FloatingActionButtonMenu +import androidx.compose.material3.FloatingActionButtonMenuItem +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.NavigationBarDefaults +import androidx.compose.material3.PlainTooltip +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.material3.ToggleFloatingActionButton +import androidx.compose.material3.ToggleFloatingActionButtonDefaults +import androidx.compose.material3.ToggleFloatingActionButtonDefaults.animateIcon +import androidx.compose.material3.TooltipAnchorPosition +import androidx.compose.material3.TooltipBox +import androidx.compose.material3.TooltipDefaults +import androidx.compose.material3.rememberTooltipState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.focus.FocusRequester +import androidx.compose.ui.focus.focusRequester +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.rememberVectorPainter +import androidx.compose.ui.input.key.Key +import androidx.compose.ui.input.key.KeyEventType +import androidx.compose.ui.input.key.isShiftPressed +import androidx.compose.ui.input.key.key +import androidx.compose.ui.input.key.onKeyEvent +import androidx.compose.ui.input.key.type +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.semantics.CustomAccessibilityAction +import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.customActions +import androidx.compose.ui.semantics.isTraversalGroup +import androidx.compose.ui.semantics.semantics +import androidx.compose.ui.semantics.stateDescription +import androidx.compose.ui.unit.IntOffset +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalDarkMode +import com.drdisagree.iconify.core.common.LocalHazeState +import com.drdisagree.iconify.core.common.LocalInnerPadding +import com.drdisagree.iconify.core.common.LocalLayerBackdrop +import com.drdisagree.iconify.core.common.LocalSettings +import com.drdisagree.iconify.core.ui.components.bottomnavbar.BottomNavigation +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.ui.components.others.withHapticResult +import com.drdisagree.iconify.core.ui.utils.sharedHiltViewModel +import com.drdisagree.iconify.features.common.viewmodels.BottomNavViewModel +import com.drdisagree.iconify.features.common.viewmodels.SystemActionViewModel +import com.kyant.backdrop.backdrops.layerBackdrop +import com.materialkolor.ktx.harmonize +import dev.chrisbanes.haze.HazeDefaults +import dev.chrisbanes.haze.HazeStyle +import dev.chrisbanes.haze.haze + +private data class FabMenuItem( + @param:DrawableRes val icon: Int, + @param:StringRes val title: Int, + val containerColor: Color, + val contentColor: Color, + val onClick: () -> Unit +) + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun MainScaffold( + systemActionViewModel: SystemActionViewModel = hiltViewModel(), + bottomNavViewModel: BottomNavViewModel = sharedHiltViewModel(), + content: @Composable () -> Unit +) { + val hazeState = LocalHazeState.current + val backdrop = LocalLayerBackdrop.current + val isDarkTheme = LocalDarkMode.current + val settings = LocalSettings.current + val blurEffect = settings.blurEffect + val floatingBottomBar = settings.floatingBottomBar + + val showBottomBar by bottomNavViewModel::isBottomBarVisible + var bottomBarVisible by rememberSaveable { mutableStateOf(false) } + + val bottomNavBounceSpec = tween( + durationMillis = 400, + easing = CubicBezierEasing(0.34f, 1.56f, 0.64f, 1.0f) + ) + val bottomNavFadeSpec = tween(durationMillis = 400) + + LaunchedEffect(showBottomBar) { + if (showBottomBar) { + bottomBarVisible = true + } else if (bottomBarVisible) { + bottomBarVisible = false + } + } + + val dockedBottomBarBgColor = if (blurEffect) { + NavigationBarDefaults.containerColor.copy(alpha = .45f) + } else { + NavigationBarDefaults.containerColor + } + + var fabMenuExpanded by rememberSaveable { mutableStateOf(false) } + val focusRequester = remember { FocusRequester() } + val shouldRestartSystemUI by systemActionViewModel.shouldRestartSystemUI.collectAsStateWithLifecycle() + val shouldRebootDevice by systemActionViewModel.shouldRebootDevice.collectAsStateWithLifecycle() + var fabMenuVisible by rememberSaveable { mutableStateOf(false) } + + LaunchedEffect(shouldRestartSystemUI, shouldRebootDevice) { + if (shouldRestartSystemUI || shouldRebootDevice) { + fabMenuVisible = true + } else if (fabMenuVisible) { + fabMenuVisible = false + } + } + + val tertiaryContainer = MaterialTheme.colorScheme.tertiaryContainer + val onTertiaryContainer = MaterialTheme.colorScheme.onTertiaryContainer + + val warningContainer = if (isDarkTheme) Color(0xFFA46200) else Color(0xFFFFE0B2) + val onWarningContainer = if (isDarkTheme) Color(0xFFFFE0B2) else Color(0xFF4E2600) + + val errorContainer = if (isDarkTheme) Color(0xFF8C1D18) else Color(0xFFF9DEDC) + val onErrorContainer = if (isDarkTheme) Color(0xFFF9DEDC) else Color(0xFF410E0B) + + val harmonizedColors = remember(MaterialTheme.colorScheme) { + object { + val warningContainer = warningContainer.harmonize(tertiaryContainer) + val onWarningContainer = onWarningContainer.harmonize(onTertiaryContainer) + val errorContainer = errorContainer.harmonize(tertiaryContainer) + val onErrorContainer = onErrorContainer.harmonize(onTertiaryContainer) + } + } + + val fabMenuItems = buildList { + if (shouldRestartSystemUI || shouldRebootDevice) { + add( + FabMenuItem( + icon = R.drawable.ic_close, + title = R.string.btn_dismiss, + containerColor = tertiaryContainer, + contentColor = onTertiaryContainer, + onClick = { systemActionViewModel.clearFlags() } + ) + ) + } + if (shouldRebootDevice) { + add( + FabMenuItem( + icon = R.drawable.ic_pixel_device, + title = R.string.btn_restart_device, + containerColor = harmonizedColors.errorContainer, + contentColor = harmonizedColors.onErrorContainer, + onClick = { systemActionViewModel.triggerRestartDevice() } + ) + ) + } + if (shouldRestartSystemUI) { + add( + FabMenuItem( + icon = R.drawable.ic_restart_systemui, + title = R.string.btn_restart_systemui, + containerColor = harmonizedColors.warningContainer, + contentColor = harmonizedColors.onWarningContainer, + onClick = { systemActionViewModel.triggerRestartSystemUI() } + ) + ) + } + } + + BackHandler(fabMenuExpanded) { fabMenuExpanded = false } + + Scaffold( + bottomBar = { + AnimatedVisibility( + visible = showBottomBar, + enter = if (!bottomBarVisible) { + slideInVertically(animationSpec = bottomNavBounceSpec) { it } + + fadeIn(animationSpec = bottomNavFadeSpec) + } else EnterTransition.None, + exit = if (!bottomBarVisible) { + slideOutVertically(animationSpec = bottomNavBounceSpec) { it } + + fadeOut(animationSpec = bottomNavFadeSpec) + } else ExitTransition.None + ) { + BottomNavigation() + } + }, + floatingActionButton = { + AnimatedVisibility( + visible = fabMenuVisible, + enter = fadeIn() + scaleIn(), + exit = fadeOut() + scaleOut() + ) { + FloatingActionButtonMenu( + expanded = fabMenuExpanded, + button = { + TooltipBox( + positionProvider = TooltipDefaults.rememberTooltipPositionProvider( + if (fabMenuExpanded) TooltipAnchorPosition.Start + else TooltipAnchorPosition.Above + ), + tooltip = { + PlainTooltip { + Text(text = stringResource(R.string.btn_pending)) + } + }, + state = rememberTooltipState(), + ) { + ToggleFloatingActionButton( + modifier = Modifier + .semantics { + stateDescription = + if (fabMenuExpanded) "Expanded" else "Collapsed" + contentDescription = "Toggle menu" + } + .focusRequester(focusRequester), + checked = fabMenuExpanded, + onCheckedChange = withHapticResult { + fabMenuExpanded = !fabMenuExpanded + }, + containerColor = ToggleFloatingActionButtonDefaults.containerColor( + initialColor = MaterialTheme.colorScheme.tertiaryContainer, + finalColor = MaterialTheme.colorScheme.tertiary, + ), + ) { + val imageVector by remember { + derivedStateOf { + if (checkedProgress > 0.5f) Icons.Rounded.Close else Icons.Rounded.Pending + } + } + Icon( + painter = rememberVectorPainter(imageVector), + contentDescription = null, + modifier = Modifier.animateIcon( + checkedProgress = { checkedProgress }, + color = ToggleFloatingActionButtonDefaults.iconColor( + initialColor = MaterialTheme.colorScheme.onTertiaryContainer, + finalColor = MaterialTheme.colorScheme.onTertiary, + ) + ), + ) + } + } + } + ) { + fabMenuItems.forEachIndexed { i, item -> + FloatingActionButtonMenuItem( + modifier = Modifier + .semantics { + isTraversalGroup = true + if (i == fabMenuItems.size - 1) { + customActions = listOf( + CustomAccessibilityAction("Close menu") { + fabMenuExpanded = false + true + } + ) + } + } + .then( + if (i == 0) Modifier.onKeyEvent { + if (it.type == KeyEventType.KeyDown && + (it.key == Key.DirectionUp || (it.isShiftPressed && it.key == Key.Tab)) + ) { + focusRequester.requestFocus() + true + } else false + } else Modifier + ), + onClick = withHaptic { + fabMenuExpanded = false + item.onClick() + }, + icon = { + Icon( + painter = painterResource(item.icon), + contentDescription = null, + modifier = Modifier.size(24.dp) + ) + }, + text = { + Text( + text = stringResource(item.title), + style = MaterialTheme.typography.bodyMedium + ) + }, + containerColor = item.containerColor, + contentColor = item.contentColor + ) + } + } + } + }, + contentWindowInsets = WindowInsets(0, 0, 0, 0), + ) { innerPadding -> + CompositionLocalProvider(LocalInnerPadding provides innerPadding) { + Box( + modifier = Modifier.then( + if (floatingBottomBar) { + Modifier.layerBackdrop(backdrop) + } else { + Modifier.haze( + hazeState, + HazeStyle( + tint = dockedBottomBarBgColor, + blurRadius = 12.dp, + noiseFactor = HazeDefaults.noiseFactor + ) + ) + } + ) + ) { + content() + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/Undraw404Error.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/Undraw404Error.kt new file mode 100644 index 000000000..d4208d100 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/Undraw404Error.kt @@ -0,0 +1,249 @@ +package com.drdisagree.iconify.core.ui.components.svg + +import androidx.compose.foundation.Image +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.PathParser +import androidx.compose.ui.graphics.vector.rememberVectorPainter +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp + +@Composable +fun DynamicColorImageVectors.undraw404Error(): ImageVector { + return Builder( + name = "404 error", + defaultWidth = 860.13.dp, + defaultHeight = 571.15.dp, + viewportWidth = 860.13f, + viewportHeight = 571.15f + ).apply { + addPath( + pathData = PathParser().parsePathString( + "M435.7,160.5c-7.7,-12.7 -16.8,-26.2 -31,-30.4 -16.5,-4.8 -33.4,4.7 -47.8,14.1a1392.2,1392.2 0,0 0,-123.9 91.3l0,0.5q46.2,-3.2 92.5,-6.4c22.3,-1.5 45.3,-3.3 65,-13.8 7.5,-4 14.7,-9.3 23.2,-9.7 10.5,-0.5 19.7,6.9 26.9,14.6 42.6,45.4 54.9,114.8 102.7,154.6A1517,1517 0,0 0,435.7 160.5Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + + addPath( + pathData = PathParser().parsePathString( + "M697.6,545.4c-4.7,-6 -6.6,-7.3 -11.3,-13.4q-56.8,-73.4 -106.7,-151.8 -33.9,-53.2 -64.5,-108.5 -14.6,-26.3 -28.3,-53 -10.7,-20.7 -20.9,-41.6c-1.9,-4 -3.8,-8 -5.7,-12 -4.4,-9.4 -8.8,-18.9 -13.4,-28.2 -5.3,-10.6 -11.8,-21.7 -21.6,-28.9a29.4,29.4 0,0 0,-15.3 -5.9c-8,-0.5 -15.3,2.8 -22.2,6.4 -50.4,26.3 -97.7,59.3 -140.4,96.8A730.8,730.8 0,0 0,133.4 331.8c-1,1.4 -3.4,0.1 -2.4,-1.4q6,-8.5 12.3,-16.8A734.8,734.8 0,0 1,330.9 138.6q18.3,-11.8 37.2,-22.5c6.4,-3.6 12.8,-7.2 19.3,-10.5 6.4,-3.3 13.1,-6.2 20.4,-6.3 24.8,-0.4 37.6,27.7 46.4,46.5q4.2,8.9 8.4,17.8 16.1,33.6 33.4,66.6 10.7,20.4 21.8,40.5 34.7,62.7 73.8,122.9c34.5,53.1 68.7,100.1 108.1,149.8C700.7,544.8 698.7,546.8 697.6,545.4Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + + addPath( + pathData = PathParser().parsePathString( + "M245,191.4c-1.4,-1.6 -2.9,-3.2 -4.3,-4.8 -11.4,-12.6 -23.7,-25.1 -39.4,-32.4a57.1,57.1 0,0 0,-23.9 -5.6c-8.6,0 -16.9,2.3 -24.8,5.4 -3.7,1.5 -7.4,3.2 -11,5 -4.1,2.1 -8.2,4.3 -12.2,6.5q-11.3,6.3 -22.4,13.1 -22,13.6 -42.6,29.2 -10.7,8.1 -20.9,16.8 -9.5,8 -18.7,16.5c-1.3,1.2 -3.3,-0.7 -1.9,-1.9 1.6,-1.5 3.2,-3 4.9,-4.5q6.9,-6.2 14,-12.2 12.9,-10.9 26.6,-21 21.2,-15.7 43.8,-29.2 11.3,-6.8 22.9,-13c2.3,-1.3 4.7,-2.5 7.1,-3.6a113.1,113.1 0,0 1,16.9 -6.9,60 60,0 0,1 25.5,-2.5 66.3,66.3 0,0 1,23.5 8.1c15.4,8.6 27.4,21.9 39,34.9C248.1,190.8 246.2,192.7 245,191.4Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + + addPath( + pathData = PathParser().parsePathString( + "M560.5,322.3l36.9,-13.5 18.3,-6.7c6,-2.2 11.9,-4.7 18.1,-6.2a28.5,28.5 0,0 1,16.4 0.2,37.7 37.7,0 0,1 12.8,7.9 103.6,103.6 0,0 1,10.5 11.2c4,4.8 7.9,9.6 11.9,14.5q24.4,29.9 48.6,60 24.1,30.2 47.9,60.6 23.9,30.5 47.4,61.2 2.9,3.8 5.8,7.5c1.1,1.4 3.5,0 2.4,-1.4Q813.7,486.6 789.6,455.8q-24.1,-30.9 -48.5,-61.5 -24.4,-30.6 -49.2,-60.9 -6.2,-7.6 -12.4,-15.1c-3.5,-4.2 -6.9,-8.5 -10.7,-12.5 -7,-7.3 -15.8,-13.7 -26.2,-13.8 -6.2,-0.1 -12.1,1.9 -17.8,3.9 -6.2,2.2 -12.3,4.5 -18.5,6.8l-37.2,13.6 -9.3,3.4c-1.7,0.6 -0.9,3.3 0.7,2.7Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + + addPath( + pathData = PathParser().parsePathString( + "M196.4,170.1c-18.8,-9.6 -42.8,-7.8 -60,4.3a855.9,855.9 0,0 1,97.4 22.7C220.5,189.3 210.1,177.1 196.4,170.1Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + + addPath( + pathData = PathParser().parsePathString( + "M136.3,174.4l-3.6,2.9c1.2,-1 2.5,-2 3.8,-2.9C136.4,174.4 136.3,174.4 136.3,174.4Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M661.6,322.4c-3.6,-4.4 -7.6,-9.1 -13,-10.9l-5.1,0.2A575.4,575.4 0,0 0,796.8 487Q729.2,404.7 661.6,322.4Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M346.2,285.9A37.5,37.5 0,0 0,361.1 306.9c2.8,1.9 6.2,3.8 7.1,7a8.4,8.4 0,0 1,-0.9 6.2,24.9 24.9,0 0,1 -3.9,5l-0.1,0.5c-7,-4.2 -13.7,-9.4 -17.5,-16.6s-4.4,-16.5 0.3,-23.2" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M579.2,488.9A37.5,37.5 0,0 0,594.1 509.9c2.8,1.9 6.2,3.8 7.1,7a8.4,8.4 0,0 1,-0.9 6.2,24.9 24.9,0 0,1 -3.9,5l-0.1,0.5c-7,-4.2 -13.7,-9.4 -17.5,-16.6s-4.4,-16.5 0.3,-23.2" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M114.2,474.9A37.5,37.5 0,0 0,129.1 495.9c2.8,1.9 6.2,3.8 7.1,7a8.4,8.4 0,0 1,-0.9 6.2,24.9 24.9,0 0,1 -3.9,5l-0.1,0.5c-7,-4.2 -13.7,-9.4 -17.5,-16.6s-4.4,-16.5 0.3,-23.2" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M598.3,51a51,51 0,1 1,102 0a51,51 0,1 1,-102 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + + addPath( + pathData = PathParser().parsePathString( + "M741.3,11.9c-24.7,-3.3 -52.9,10 -59.3,34.1a21.6,21.6 0,0 0,-41.1 2.1l2.8,2a372.3,372.3 0,0 0,160.7 -0.7C787.2,31.3 766,15.2 741.3,11.9Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + + addPath( + pathData = PathParser().parsePathString( + "M635.3,79.9c-24.7,-3.3 -52.9,10 -59.3,34.1a21.6,21.6 0,0 0,-41.1 2.1l2.8,2a372.3,372.3 0,0 0,160.7 -0.7C681.2,99.3 660,83.2 635.3,79.9Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + + addPath( + pathData = PathParser().parsePathString( + "M851,92.7a1,1 0,0 1,-0.3 -0.1C586.3,9.1 353.3,20 204.3,43.9c-20.3,3.3 -40.6,7 -60.4,11.2 -5.1,1.1 -10.3,2.2 -15.6,3.4 -6.3,1.4 -12.6,2.9 -18.5,4.3q-3.9,0.9 -7.6,1.9c-3.8,0.9 -7.6,1.9 -11.7,3 -4.6,1.2 -9.2,2.4 -13.8,3.7a0.4,0.4 0,0 1,-0.1 0l0,0c-5.2,1.4 -10.3,2.9 -15.3,4.3 -2.7,0.8 -5.3,1.6 -7.8,2.3 -0.3,0.1 -0.5,0.2 -0.8,0.2l-0.5,0.2c-0.3,0.1 -0.6,0.2 -0.9,0.3l0,0 0,0 -0.8,0.3c-1,0.3 -1.9,0.6 -2.8,0.9 -24.5,7.6 -38,13 -38.2,13a1,1 0,1 1,-0.7 -1.9c0.1,-0.1 13.7,-5.5 38.3,-13.1 0.9,-0.3 1.9,-0.6 2.9,-0.9l0.8,-0.2c0,0 0.1,0 0.1,0 0.3,-0.1 0.6,-0.2 0.9,-0.3l0.5,-0.2c0.3,-0.1 0.5,-0.2 0.8,-0.2 2.5,-0.8 5.1,-1.5 7.8,-2.3 5,-1.5 10.2,-2.9 15.3,-4.3 0,0 0,0 0.1,0v-0c4.6,-1.3 9.3,-2.5 13.9,-3.7 4.1,-1.1 7.9,-2 11.7,-3q3.7,-0.9 7.6,-1.9c6,-1.5 12.2,-2.9 18.6,-4.3 5.3,-1.2 10.6,-2.3 15.6,-3.4 19.8,-4.2 40.2,-7.9 60.5,-11.2C353.2,18 586.5,7 851.3,90.8a1,1 0,0 1,-0.3 2Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + + addPath( + pathData = PathParser().parsePathString( + "M263,419.8a6.7,6.7 0,0 0,-1.7 -2.7,6.4 6.4,0 0,0 -0.9,-0.7c-2.6,-1.7 -6.5,-2.1 -9,0a5.8,5.8 0,0 0,-0.7 0.7q-1.1,1.4 -2.3,2.7c-1.3,1.5 -2.6,2.9 -4,4.2 -0.4,0.4 -0.8,0.8 -1.2,1.2 -0.2,0.2 -0.5,0.5 -0.7,0.7 -0.9,0.8 -1.8,1.7 -2.7,2.5 -0.5,0.4 -1,0.9 -1.5,1.3 -0.7,0.6 -1.5,1.2 -2.2,1.8 -0.1,0.1 -0.1,0.1 -0.2,0.2 0,0 0,0 -0.1,0 0,0 0,0 0,0a0.2,0.2 0,0 0,-0.1 0.1c-0.2,0.2 -0.4,0.3 -0.5,0.3 0,0 0.1,-0.1 0.1,-0.1 -0.2,0.1 -0.4,0.3 -0.6,0.4 -1.8,1.3 -3.5,2.5 -5.4,3.7a99.2,99.2 0,0 1,-14.2 7.6c-0.3,0.1 -0.7,0.3 -1,0.4a86,86 0,0 1,-40.9 6q-2.1,-0.2 -4.3,-0.5c-1.6,-0.2 -3.3,-0.5 -4.9,-0.9a97.9,97.9 0,0 1,-18 -5.4,118.7 118.7,0 0,1 -20.7,-12.1c-1,-0.7 -2,-1.4 -3,-2.1 1.2,-2.8 2.3,-5.6 3.4,-8.5 0.6,-1.4 1.1,-2.7 1.6,-4.1 4.1,-10.6 7.9,-21.4 11.6,-32.1q5.6,-16.4 10.5,-32.9 0.5,-1.7 1,-3.4 2.6,-8.7 5,-17.5c0.2,-0.6 0.3,-1.1 0.5,-1.7q0.7,-2.5 1.4,-5c1,-3.8 -1.3,-8.3 -5.2,-9.2a7.6,7.6 0,0 0,-9.2 5.2c-0.4,1.6 -0.9,3.2 -1.3,4.9q-3.2,11.7 -6.7,23.4 -0.5,1.7 -1,3.4 -7.7,25.4 -16.9,50.3 -1.1,3 -2.3,6c-0.4,1 -0.7,2 -1.1,2.9 -0.7,1.9 -1.5,3.9 -2.2,5.8 -0.4,1.1 -0.9,2.3 -1.3,3.4 -0.3,0.7 -0.6,1.4 -0.9,2.1a41.8,41.8 0,0 0,-8.8 -2.1l-0.5,-0.1a27.4,27.4 0,0 0,-7 0.1,23.9 23.9,0 0,0 -17.2,10.7c-4.8,7.5 -4.7,18.3 2,24.6 6.9,6.6 17.3,6.5 25.4,2.4a28.4,28.4 0,0 0,10.5 -9.9,50.6 50.6,0 0,0 2.7,-4.7c0.2,0.1 0.4,0.3 0.6,0.4 0.8,0.6 1.6,1.1 2.4,1.7a111.7,111.7 0,0 0,14.5 8.9,108.4 108.4,0 0,0 34.6,10.5c0.3,0 0.5,0.1 0.8,0.1 1.3,0.2 2.7,0.3 4,0.4a103.8,103.8 0,0 0,55.6 -11.4q2.2,-1.1 4.3,-2.4 3.3,-1.9 6.5,-4.1c1.2,-0.8 2.3,-1.6 3.4,-2.4a101,101 0,0 0,13.5 -12q2.4,-2.5 4.5,-5.1a8.1,8.1 0,0 0,2.2 -5.3A7.6,7.6 0,0 0,263 419.8ZM97.4,443.7c0.2,-0.2 0.4,-0.3 0.6,-0.5C98,443.3 97.7,443.5 97.4,443.7ZM100.6,440.4c-0.2,0.3 -0.4,0.5 -0.7,0.8a23.4,23.4 0,0 1,-2.3 2.2c-0.1,0.1 -0.2,0.2 -0.4,0.3a0,0 0,0 0,0 0,3.8 3.8,0 0,0 -0.4,0.2q-0.6,0.4 -1.3,0.7a17,17 0,0 1,-2.7 0.8,16.8 16.8,0 0,1 -2.1,0h0a14.8,14.8 0,0 1,-1.5 -0.4c-0.2,-0.1 -0.5,-0.3 -0.7,-0.4 -0.1,-0.1 -0.2,-0.2 -0.2,-0.2a2.4,2.4 0,0 1,-0.3 -0.3,0 0,0 0,0 0,0c-0.1,-0.2 -0.2,-0.4 -0.3,-0.6a0,0 0,0 1,0 0c-0.1,-0.3 -0.2,-0.5 -0.2,-0.8a12.5,12.5 0,0 1,0 -1.4,13.5 13.5,0 0,1 0.5,-1.9 11.1,11.1 0,0 1,0.7 -1.3c0,0 0.1,-0.2 0.2,-0.4 0,0 0,0 0,0 0.2,-0.2 0.3,-0.4 0.5,-0.5 0.3,-0.3 0.6,-0.6 0.9,-0.8a18,18 0,0 1,1.8 -1,19.5 19.5,0 0,1 2.9,-0.8 25,25 0,0 1,4.4 0,30.3 30.3,0 0,1 4.1,1 36.9,36.9 0,0 1,-2.8 4.5C100.7,440.3 100.7,440.4 100.6,440.4ZM89.5,437.1a2.2,2.2 0,0 1,-0.3 0.4A1.4,1.4 0,0 1,89.5 437.1Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + + addPath( + pathData = PathParser().parsePathString( + "M232.9,317.7q-0.1,4.7 -0.3,9.4 -0.3,10.5 -0.6,20.9 -0.3,11.8 -0.7,23.5 -0.2,6.1 -0.3,12.2 -0.5,16.4 -0.9,32.7c0,1.1 -0.1,2.3 -0.1,3.4q-0.2,8.1 -0.5,16.2 -0.3,8.8 -0.5,17.6 -0.2,6.6 -0.4,13.2 -1.4,47.9 -2.7,95.8a7.7,7.7 0,0 1,-7.5 7.5,7.6 7.6,0 0,1 -7.5,-7.5q0.8,-26.9 1.5,-53.9 0.7,-24.4 1.4,-48.7 0.2,-8 0.5,-16.1 0.3,-12.1 0.7,-24.2c0,-1.1 0.1,-2.3 0.1,-3.4 0,-1 0.1,-2 0.1,-3q0.7,-23.5 1.3,-47 0.3,-9.2 0.5,-18.5 0.3,-10.6 0.6,-21.1c0.1,-3.1 0.2,-6.2 0.3,-9.3a7.7,7.7 0,0 1,7.5 -7.5A7.6,7.6 0,0 1,232.9 317.7Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + + addPath( + pathData = PathParser().parsePathString( + "M644.4,319.8a893.2,893.2 0,0 1,-28.2 87.9c-3,8 -6.1,15.9 -9.4,23.7l0.8,-1.8a54.6,54.6 0,0 1,-5.6 10.6q-0.2,0.3 -0.5,0.6 1.2,-1.5 0.4,-0.6c-0.3,0.3 -0.5,0.6 -0.8,0.9a23.7,23.7 0,0 1,-2.3 2.2q-0.3,0.3 -0.6,0.5l0.9,-0.7c-0.1,0.3 -0.9,0.6 -1.1,0.7a18.3,18.3 0,0 1,-2.4 1.2l1.8,-0.8a19.1,19.1 0,0 1,-4.2 1.2l2,-0.3a17,17 0,0 1,-4.3 0.1l2,0.3a14,14 0,0 1,-3.4 -0.9l1.8,0.8a12,12 0,0 1,-1.7 -0.9c-0.3,-0.2 -1.1,-0.8 0,0 1.1,0.9 0.2,0.1 -0.1,-0.2 -0.2,-0.2 -0.4,-0.4 -0.6,-0.6 -0.9,-0.9 1,1.6 0.4,0.5a18.2,18.2 0,0 1,-0.9 -1.6l0.8,1.8a11.9,11.9 0,0 1,-0.7 -2.7l0.3,2a13.7,13.7 0,0 1,-0 -3.4l-0.3,2a16,16 0,0 1,1 -3.7l-0.8,1.8a16.7,16.7 0,0 1,1.2 -2.3,6.7 6.7,0 0,1 0.7,-1.1c0.1,0 -1.3,1.5 -0.6,0.8 0.2,-0.2 0.4,-0.4 0.5,-0.6 0.3,-0.3 0.6,-0.6 0.9,-0.9 1,-1 -1.5,1 -0.3,0.2a19.1,19.1 0,0 1,2.8 -1.5l-1.8,0.8a20.3,20.3 0,0 1,5 -1.3l-2,0.3a25.6,25.6 0,0 1,6.5 0.1l-2,-0.3a33.2,33.2 0,0 1,7.9 2.2l-1.8,-0.8c5.4,2.3 10.2,5.8 14.9,9.1a112,112 0,0 0,14.5 8.9,108.4 108.4,0 0,0 34.6,10.5 103.9,103.9 0,0 0,92.6 -36.8,8.1 8.1,0 0,0 2.2,-5.3 7.6,7.6 0,0 0,-2.2 -5.3c-2.8,-2.5 -8,-3.2 -10.6,0a95.6,95.6 0,0 1,-8.1 8.7q-2,1.9 -4.1,3.7 -1.2,1 -2.5,2c-0.4,0.3 -1.6,1.1 0.3,-0.2 -0.4,0.3 -0.9,0.6 -1.3,1a99.3,99.3 0,0 1,-20.3 11.6l1.8,-0.8a96.8,96.8 0,0 1,-24.2 6.6l2,-0.3a97.6,97.6 0,0 1,-25.8 0l2,0.3a99.8,99.8 0,0 1,-24.9 -6.8l1.8,0.8a116,116 0,0 1,-21.7 -12.6,86.9 86.9,0 0,0 -11.1,-7 42.8,42.8 0,0 0,-14.4 -4.4c-9.4,-1.1 -19.1,2.6 -24.3,10.7 -4.8,7.5 -4.7,18.2 2,24.6 6.9,6.6 17.3,6.5 25.4,2.4 7.8,-4 12.5,-12.2 15.8,-19.9 7.4,-17.5 14,-35.3 20.1,-53.3q9.1,-26.6 16.5,-53.8 0.9,-3.4 1.8,-6.7c1,-3.8 -1.3,-8.3 -5.2,-9.2a7.6,7.6 0,0 0,-9.2 5.2Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M719.2,317.7l-2.7,95.8 -2.7,95.3 -1.5,53.9a7.6,7.6 0,0 0,7.5 7.5,7.7 7.7,0 0,0 7.5,-7.5l2.7,-95.8 2.7,-95.3 1.5,-53.9a7.6,7.6 0,0 0,-7.5 -7.5,7.7 7.7,0 0,0 -7.5,7.5Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M459.6,535.9h2.3L461.9,429.9h54.3v-2.3L461.9,427.6L461.9,382.8L503.9,382.8q-0.9,-1.2 -1.9,-2.3L461.9,380.5L461.9,351c-0.8,-0.3 -1.6,-0.6 -2.3,-0.9L459.6,380.5h-45.7L413.9,342.6c-0.8,0 -1.6,0.1 -2.3,0.2v37.7h-36.4L375.2,352.3c-0.8,0.4 -1.6,0.7 -2.3,1.1L372.9,380.5h-30.6v2.3h30.6v44.7h-30.6v2.3h30.6L372.9,535.9h2.3L375.2,429.9a36.4,36.4 0,0 1,36.4 36.4v69.6h2.3L413.9,429.9h45.7ZM375.2,427.6L375.2,382.8h36.4v44.7ZM413.9,427.6L413.9,382.8h0.9a44.7,44.7 0,0 1,44.7 44.7Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M445.4,504.1a63.1,63.1 0,0 1,-20.1 33.7c-0.7,0.6 -1.5,1.3 -2.3,1.9q-2.8,0.3 -5.6,0.5c-1.5,0.1 -3,0.3 -4.5,0.4l-0.3,0 -0.2,-1.6 -0.8,-6.6a37.6,37.6 0,0 1,-3.3 -32.4c2.6,-7.1 7.4,-13.4 12.1,-19.7 6.5,-8.6 12.8,-17.1 13,-27.7a60.5,60.5 0,0 1,7.9 13.3,16.4 16.4,0 0,0 -5.1,3.8c-0.4,0.5 -0.8,1.1 -0.5,1.6 0.2,0.5 0.8,0.6 1.4,0.6 1.3,0.1 2.5,0.3 3.8,0.4 1,0.1 2,0.2 3,0.3a64,64 0,0 1,2.5 12.2A61.2,61.2 0,0 1,445.4 504.1Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M478.6,477.9c-5.9,4.3 -9.4,10.5 -12,17.3a16.6,16.6 0,0 0,-7.2 4.6c-0.4,0.5 -0.8,1.1 -0.5,1.6 0.2,0.5 0.8,0.6 1.4,0.6 1.3,0.1 2.5,0.3 3.8,0.4 -2.7,8 -5.1,16.4 -9.9,23.2a37,37 0,0 1,-12 10.9,38.5 38.5,0 0,1 -4,2q-7.6,0.6 -15,1.3 -2.8,0.3 -5.6,0.5c-1.5,0.1 -3,0.3 -4.5,0.4q0,-0.8 0,-1.7a63.3,63.3 0,0 1,15.3 -39.9c0.5,-0.5 0.9,-1 1.4,-1.5a61.8,61.8 0,0 1,16.8 -12.7A62.7,62.7 0,0 1,478.6 477.9Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M419.2,535.1l-1.2,3.4 -0.6,1.7c-1.5,0.1 -3,0.3 -4.5,0.4l-0.3,0c-1.7,0.2 -3.3,0.3 -5,0.5 -0.4,-0.5 -0.9,-1 -1.3,-1.5a62,62 0,0 1,8.1 -87.1c-1.3,6.9 0.2,13.5 2.8,20.1 -0.3,0.1 -0.5,0.2 -0.8,0.3a16.4,16.4 0,0 0,-5.1 3.8c-0.4,0.5 -0.8,1.1 -0.5,1.6 0.2,0.5 0.8,0.6 1.4,0.6 1.3,0.1 2.5,0.3 3.8,0.4 1,0.1 2,0.2 3,0.3q0.7,0.1 1.4,0.2c0.1,0.2 0.1,0.3 0.2,0.4 2.9,6.2 5.9,12.4 7.7,18.8a43.7,43.7 0,0 1,1 4.9A37.6,37.6 0,0 1,419.2 535.1Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M519.9,390.1c-8.6,-16.8 -22,-30.9 -37.6,-41.3a114.2,114.2 0,0 0,-52.6 -18.4q-3.7,-0.3 -7.4,-0.4c-2.9,0 -46.9,12.6 -61.6,23a114.3,114.3 0,0 0,-35.3 39.5,102.5 102.5,0 0,0 -12.1,51.6 113.6,113.6 0,0 0,14.7 51.5,110.5 110.5,0 0,0 36.4,38.8C379.7,544.1 395.1,570.1 413.3,571c18.3,0.9 39.1,-23.6 55.7,-31a104.4,104.4 0,0 0,41.7 -34,110.3 110.3,0 0,0 19.6,-49c2.6,-18.1 1.4,-36.7 -4.8,-54a111.9,111.9 0,0 0,-5.6 -13c-1.8,-3.5 -7,-4.8 -10.3,-2.7a7.7,7.7 0,0 0,-2.7 10.3q1.6,3.1 2.9,6.3l-0.8,-1.8a101.2,101.2 0,0 1,6.9 25.5l-0.3,-2a109.2,109.2 0,0 1,-0.1 28.7l0.3,-2a109.7,109.7 0,0 1,-7.6 27.7l0.8,-1.8a104.2,104.2 0,0 1,-6.7 13.1q-1.9,3.2 -4.1,6.2c-0.6,0.9 -1.3,1.8 -1.9,2.6 -0.9,1.1 1.2,-1.5 0.3,-0.4 -0.2,0.2 -0.3,0.4 -0.5,0.6q-0.7,0.9 -1.4,1.7a93.6,93.6 0,0 1,-10.2 10.4q-1.4,1.2 -2.8,2.3c-0.5,0.4 -0.9,0.8 -1.4,1.1 0,0 1.6,-1.2 0.7,-0.5 -0.3,0.2 -0.6,0.4 -0.9,0.7q-2.9,2.2 -6,4.1a103.5,103.5 0,0 1,-14.8 7.7l1.8,-0.8a109.2,109.2 0,0 1,-27.6 7.6l2,-0.3a108.2,108.2 0,0 1,-28.6 0.1l2,0.3a99.8,99.8 0,0 1,-25.1 -6.8l1.8,0.8a93.6,93.6 0,0 1,-13.4 -7q-3.2,-2 -6.2,-4.3c-0.3,-0.2 -0.6,-0.4 -0.9,-0.7 -0.9,-0.7 0.7,0.5 0.7,0.5a19.2,19.2 0,0 1,-1.5 -1.2q-1.5,-1.2 -2.9,-2.4a102,102 0,0 1,-10.5 -10.7q-1.2,-1.4 -2.4,-2.9c-0.3,-0.4 -1,-1.3 0.4,0.5 -0.2,-0.2 -0.4,-0.5 -0.5,-0.7q-0.7,-0.9 -1.3,-1.7 -2.2,-3.1 -4.2,-6.3a109.3,109.3 0,0 1,-7.8 -15.1l0.8,1.8a106.6,106.6 0,0 1,-7.3 -26.8l0.3,2a97.9,97.9 0,0 1,-0.1 -25.6l-0.3,2A94.7,94.7 0,0 1,335.3 406.1l-0.8,1.8a101.6,101.6 0,0 1,7.2 -13.9q2.1,-3.3 4.4,-6.5 0.5,-0.7 1.1,-1.4c0.3,-0.4 1.2,-1.5 -0.3,0.4 0.2,-0.2 0.3,-0.4 0.4,-0.6q1.3,-1.6 2.6,-3.2A107.4,107.4 0,0 1,360.8 371.8q1.5,-1.3 3,-2.5 0.7,-0.6 1.4,-1.1c0.2,-0.2 0.4,-0.3 0.6,-0.4 -2,1.6 -0.6,0.4 -0.1,0.1q3.1,-2.4 6.4,-4.5a103.6,103.6 0,0 1,15.4 -8.1l-1.8,0.8c7.8,-3.3 42.1,-11 48.4,-10.1l-2,-0.3A106.2,106.2 0,0 1,458.8 353l-1.8,-0.8a110.3,110.3 0,0 1,12.6 6.3q3,1.8 6,3.8 1.4,0.9 2.7,1.9 0.7,0.5 1.4,1c0.3,0.2 0.5,0.4 0.7,0.6 1,0.8 -1.4,-1.1 -0.3,-0.3a110.8,110.8 0,0 1,10.4 9.3q2.4,2.4 4.6,5.1 1.2,1.3 2.3,2.7c0.4,0.5 1.6,2.1 0.1,0.1 0.4,0.5 0.8,1 1.1,1.5a98,98 0,0 1,8.4 13.5c1.8,3.5 7,4.8 10.3,2.7A7.7,7.7 0,0 0,519.9 390.1Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M432.5,512.5a3.8,3.8 0,0 1,-2.7 -6.6c0.1,-0.4 0.2,-0.7 0.3,-1q-0.1,-0.1 -0.1,-0.3c-3.5,-8.3 -25.7,14.8 -26.7,22.6a30,30 0,0 0,0.5 10.3A120.4,120.4 0,0 1,392.8 487.6a116.2,116.2 0,0 1,0.7 -13q0.6,-5.3 1.7,-10.5a121.8,121.8 0,0 1,24.2 -51.6c6.9,0.4 12.9,-0.7 13.5,-14 0.1,-2.4 1.9,-4.4 2.3,-6.8 -0.7,0.1 -1.3,0.1 -2,0.2 -0.2,0 -0.4,0 -0.6,0l-0.1,0a3.7,3.7 0,0 1,-3.1 -6.1q0.4,-0.5 0.9,-1.1c0.4,-0.5 0.9,-1.1 1.3,-1.6a1.9,1.9 0,0 0,0.1 -0.2c0.5,-0.6 1,-1.2 1.5,-1.8a10.8,10.8 0,0 0,-3.6 -3.4c-5,-2.9 -11.8,-0.9 -15.4,3.6 -3.6,4.5 -4.3,10.8 -3,16.4a43.4,43.4 0,0 0,6 13.4c-0.3,0.3 -0.6,0.7 -0.8,1a122.6,122.6 0,0 0,-12.8 20.3c1,-7.9 -11.4,-36.6 -16.2,-42.7 -5.8,-7.3 -17.6,-4.1 -18.6,5.1q0,0.1 0,0.3 1.1,0.6 2.1,1.3a5.1,5.1 0,0 1,-2.1 9.3l-0.1,0c-9.6,13.6 21.1,49.2 28.8,41.2a125.1,125.1 0,0 0,-6.7 31.7,118.7 118.7,0 0,0 0.1,19.2l0,-0.2C389,483.7 359.7,463.1 351.2,464.8c-4.9,1 -9.8,0.8 -9,5.7q0,0.1 0,0.2a34.4,34.4 0,0 1,3.9 1.9q1.1,0.6 2.1,1.3a5.1,5.1 0,0 1,-2.1 9.3l-0.1,0c-0.1,0 -0.1,0 -0.2,0 -4.4,15 27.9,39.1 47.5,31.4h0a125.1,125.1 0,0 0,8.4 24.5L431.7,539.3c0.1,-0.3 0.2,-0.7 0.3,-1a34.1,34.1 0,0 1,-8.3 -0.5c2.2,-2.7 4.5,-5.5 6.7,-8.2a1.9,1.9 0,0 0,0.1 -0.2c1.1,-1.4 2.3,-2.8 3.4,-4.2l0,-0a50,50 0,0 0,-1.5 -12.7ZM398.1,444.8 L398.1,444.8 398.1,444.9ZM391.5,504.8 L391.2,504.2c0,-0.4 0,-0.8 0,-1.3 0,-0.1 0,-0.2 0,-0.4 0.1,0.7 0.2,1.5 0.3,2.2Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M216.3,559a11,11 0,1 1,22 0a11,11 0,1 1,-22 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M717.3,559a11,11 0,1 1,22 0a11,11 0,1 1,-22 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M744.3,419a11,11 0,1 1,22 0a11,11 0,1 1,-22 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M712.3,317a11,11 0,1 1,22 0a11,11 0,1 1,-22 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M264.3,419a11,11 0,1 1,-0.2 -2.2A11,11 0,0 1,264.3 419Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M473.3,349a11,11 0,1 1,22 0a11,11 0,1 1,-22 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M375.3,349a11,11 0,1 1,-0.2 -2.2A11,11 0,0 1,375.3 349Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M233.3,317a11,11 0,1 1,-0.2 -2.2A11,11 0,0 1,233.3 317Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M410.25,338a16,16 0,1 1,32 0a16,16 0,1 1,-32 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString("M858.9,570.8l-857.8,0.3a1.2,1.2 0,1 1,0 -2.4l857.8,-0.3a1.2,1.2 0,0 1,0 2.4Z") + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.inverseSurface), + ) + }.build() +} + +@Preview +@Composable +private fun Preview() { + val painter = rememberVectorPainter(DynamicColorImageVectors.undraw404Error()) + + Image( + painter = painter, + contentDescription = null + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawPhoneLady.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawPhoneLady.kt new file mode 100644 index 000000000..5ed1daacc --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawPhoneLady.kt @@ -0,0 +1,512 @@ +package com.drdisagree.iconify.core.ui.components.svg + +import androidx.compose.foundation.Image +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.PathParser +import androidx.compose.ui.graphics.vector.rememberVectorPainter +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp + +@Composable +fun DynamicColorImageVectors.undrawPhoneLady(): ImageVector { + return Builder( + name = "phone lady", + defaultWidth = 618.73.dp, + defaultHeight = 633.21.dp, + viewportWidth = 618.73f, + viewportHeight = 633.21f + ).apply { + addPath( + pathData = PathParser().parsePathString( + "M111.33,615.18l9.48,0l4.51,-36.56l-13.99,0l0,36.56z" + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + addPath( + pathData = PathParser().parsePathString( + "M108.24,608.68l15.14,-0.9v6.49l14.4,9.94a4.05,4.05 0,0 1,-2.3 7.39h-18.03l-3.11,-6.42 -1.21,6.42h-6.8Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onTertiaryContainer), + ) + addPath( + pathData = PathParser().parsePathString( + "M187.14,615.18l9.48,0l4.51,-36.56l-13.99,0l0,36.56z" + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + addPath( + pathData = PathParser().parsePathString( + "M184.05,608.68l15.14,-0.9v6.49l14.4,9.94a4.05,4.05 0,0 1,-2.3 7.39h-18.03l-3.11,-6.42 -1.21,6.42h-6.8Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onTertiaryContainer), + ) + addPath( + pathData = PathParser().parsePathString( + "M118.83,391.86l50.4,1.26l0,-54.47l-41.4,0.2l-9,53z" + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + addPath( + pathData = PathParser().parsePathString( + "M169.49,352.65l6.74,22.45 13.98,29.44L219.75,574.6l-4.52,23.52 -43.8,-1.84L151.93,450.47l-0.31,20.13 -0.15,9.74s7.11,63.37 -1.18,75.67 -0.17,10.85 -0.17,10.85l-0.4,25.37 -51.89,0.37 11.45,-73.04s5.81,-4.59 2.7,-9.2 3.01,-10.26 3.01,-10.26l-2.75,-57.02s3.04,-9.85 -0.54,-11.13 -0.47,-9.75 -0.47,-9.75l-0.53,-11.04 11.77,-44.51Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M120.65,338.66l-5.15,-15.46 -3.68,-5.15 -1.47,-14.72c0,-39.75 8.87,-33.13 8.87,-33.13l11.56,-13.98 13.16,-0.41 10.4,-0.32 8.64,14.35 12.51,4.42 4.9,25.46 -8.95,27.17 0.39,-2.02c4.21,7.78 3.14,8.95 -0.35,14.78l-0.17,2.11c-0.41,4.98 3.06,5.84 -1.83,6.89 -42,9 -46,27 -51,20 -1.11,-1.56 3.61,-20.16 2,-20C116.07,349.09 120.65,338.66 120.65,338.66Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M146.39,228.71m-21.84,0a21.84,21.84 0,1 1,43.67 0a21.84,21.84 0,1 1,-43.67 0" + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + addPath( + pathData = PathParser().parsePathString( + "M100.33,384.5l2.24,-76.92 14.56,6.37 -7.26,70.27a7.26,7.26 0,1 1,-9.54 0.28Z" + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + addPath( + pathData = PathParser().parsePathString( + "M118.95,269.8l-1.69,0.53a22.32,22.32 0,0 0,-15.6 21.29l-3.19,14.59c4.62,7.92 11.44,11.84 20.93,10.92Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M218.5,296.35a7.25,7.25 0,1 0,-13.9 2.89l-14.28,22.5L190.32,308.25l-16.11,1.74 2.25,24.05a9.08,9.08 0,0 0,16.95 3.62l19.3,-34.2A7.25,7.25 0,0 0,218.5 296.35Z" + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + addPath( + pathData = PathParser().parsePathString( + "M172.91,273.42l1.62,0.51a21.35,21.35 0,0 1,14.92 20.36l3.05,13.95c-4.41,7.57 -10.94,11.33 -20.03,10.45Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M118.36,233.59c1.22,-4.64 1.68,-9.5 3.44,-13.96a25.34,25.34 0,0 1,45.51 -3.39,17.26 17.26,0 0,1 2.5,11.23c-0.69,4.26 -3.52,8.31 -2.63,12.54 0.59,2.83 2.73,5.02 4.42,7.36s3.03,5.43 1.81,8.05c-1.33,2.84 -5.01,3.68 -8.14,3.42 -3.13,-0.27 -6.26,-1.28 -9.34,-0.71l1.47,-5.76q-5.49,5.28 -10.97,10.56c0.4,-3.66 -1.3,-7.18 -2.47,-10.67s-1.72,-7.71 0.6,-10.56c1.39,-1.71 3.53,-2.57 5.45,-3.67s3.81,-2.74 4.01,-4.93c0.24,-2.72 -2.19,-4.89 -4.58,-6.21 -2.39,-1.31 -5.14,-2.41 -6.48,-4.79q1.44,3.1 2.89,6.2a18.24,18.24 0,0 1,-15.13 -10.25l-1.32,0.86c-10.96,12.3 3.08,30.72 -5.15,37.17C127.86,249.63 116.49,240.73 118.36,233.59Z" + ) + .toNodes(), + fill = SolidColor(Color.Black), + ) + addPath( + pathData = PathParser().parsePathString( + "M203.48,60.28L403.81,2.33A58.73,58.73 118.86,0 1,476.54 42.42L608.98,500.19A58.73,58.73 118.86,0 1,568.88 572.93L368.56,630.89A58.73,58.73 118.86,0 1,295.82 590.79L163.39,133.02A58.73,58.73 118.86,0 1,203.48 60.28z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M405.34,7.61l-26.2,7.58 2.62,9.05a16.08,16.08 0,0 1,-10.98 19.91L253.74,78.02a16.08,16.08 0,0 1,-19.91 -10.98l-2.62,-9.05 -26.2,7.58a53.29,53.29 0,0 0,-36.34 65.92L301.1,589.26A53.29,53.29 0,0 0,367.03 625.6l200.33,-57.96a53.29,53.29 0,0 0,36.34 -65.92L471.26,43.95A53.29,53.29 0,0 0,405.34 7.61Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M405.34,7.61l-26.2,7.58 2.62,9.05a16.08,16.08 0,0 1,-10.98 19.91L253.74,78.02a16.08,16.08 0,0 1,-19.91 -10.98l-2.62,-9.05 -26.2,7.58a53.29,53.29 0,0 0,-36.34 65.92L301.1,589.26A53.29,53.29 0,0 0,367.03 625.6l200.33,-57.96a53.29,53.29 0,0 0,36.34 -65.92L471.26,43.95A53.29,53.29 0,0 0,405.34 7.61Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.surface), + ) + addPath( + pathData = PathParser().parsePathString( + "M190.51,232.18a4,4 0,0 1,-4.95 -2.73l-6.12,-21.15a4,4 0,1 1,7.68 -2.22l6.12,21.15A4,4 0,0 1,190.51 232.18Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M199.68,263.86a4,4 0,0 1,-4.95 -2.73l-6.12,-21.15a4,4 0,0 1,7.68 -2.22l6.12,21.15A4,4 0,0 1,199.68 263.86Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M509.75,155.42a4,4 0,0 1,-4.95 -2.73l-14.93,-51.62a4,4 0,0 1,7.68 -2.22l14.93,51.62A4,4 0,0 1,509.75 155.42Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M254.99,183.53a1.5,1.5 0,0 1,-1.07 -0.09l-19.4,-9.35a1.5,1.5 0,0 1,-0.7 -2l9.35,-19.4a1.5,1.5 0,1 1,2.7 1.3l-8.7,18.05L255.23,180.74a1.5,1.5 0,0 1,-0.23 2.79Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M266.02,180.3a1.5,1.5 0,0 1,-1.66 -2.28L275.58,161.42l-16.6,-11.22a1.5,1.5 0,1 1,1.68 -2.48L278.51,159.77a1.5,1.5 0,0 1,0.4 2.08L266.85,179.7A1.49,1.49 0,0 1,266.02 180.3Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M462.53,144.61 L233.64,210.83a13.87,13.87 0,0 1,-17.16 -9.46l-12.86,-44.46a13.87,13.87 0,0 1,9.46 -17.16l228.9,-66.22a13.87,13.87 0,0 1,17.16 9.46l12.86,44.46A13.87,13.87 0,0 1,462.53 144.61ZM213.63,141.67a11.87,11.87 0,0 0,-8.1 14.69l12.86,44.46a11.87,11.87 0,0 0,14.69 8.1l228.9,-66.22a11.87,11.87 0,0 0,8.1 -14.69l-12.86,-44.46a11.87,11.87 0,0 0,-14.69 -8.1Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M343.41,133.27l-38.42,11.12a4,4 0,0 1,-2.22 -7.68L341.19,125.59a4,4 0,0 1,2.22 7.68Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M432.14,130.51l-122,35.29a4,4 0,0 1,-2.22 -7.68l122,-35.29a4,4 0,1 1,2.22 7.68Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M341.75,487.52a1.49,1.49 0,0 1,-1.07 -0.09l-19.4,-9.35a1.5,1.5 0,0 1,-0.7 -2l9.35,-19.4a1.5,1.5 0,0 1,2.7 1.3l-8.7,18.05 18.05,8.7a1.5,1.5 0,0 1,-0.23 2.79Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M352.78,484.28a1.5,1.5 0,0 1,-1.66 -2.28L362.35,465.4l-16.6,-11.22a1.5,1.5 0,0 1,1.68 -2.48l17.84,12.06a1.5,1.5 0,0 1,0.4 2.08L353.61,483.68A1.5,1.5 0,0 1,352.78 484.28Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M567.58,507.72 L338.68,573.94a13.87,13.87 0,0 1,-17.16 -9.46L288.37,449.9a13.87,13.87 0,0 1,9.46 -17.16L526.73,366.51a13.87,13.87 0,0 1,17.16 9.46L577.04,490.56A13.87,13.87 0,0 1,567.58 507.72ZM298.39,434.66a11.87,11.87 0,0 0,-8.1 14.69l33.15,114.58a11.87,11.87 0,0 0,14.69 8.1l228.9,-66.22a11.87,11.87 0,0 0,8.1 -14.69L541.97,376.53a11.87,11.87 0,0 0,-14.69 -8.1Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M430.17,437.26l-38.42,11.12a4,4 0,1 1,-2.22 -7.68l38.42,-11.12a4,4 0,0 1,2.22 7.68Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M518.9,434.49 L396.9,469.78a4,4 0,1 1,-2.22 -7.68L516.67,426.81a4,4 0,0 1,2.22 7.68Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M240.76,271.37L251.97,268.13A2.88,2.88 118.86,0 1,255.54 270.1L256.48,273.33A2.88,2.88 118.86,0 1,254.51 276.89L243.3,280.14A2.88,2.88 118.86,0 1,239.73 278.17L238.8,274.94A2.88,2.88 118.86,0 1,240.76 271.37z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M332.05,244.97L343.26,241.72A2.88,2.88 118.86,0 1,346.83 243.69L347.76,246.92A2.88,2.88 118.86,0 1,345.8 250.48L334.58,253.73A2.88,2.88 118.86,0 1,331.02 251.76L330.08,248.53A2.88,2.88 118.86,0 1,332.05 244.97z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M357.91,237.48L369.12,234.24A2.88,2.88 118.86,0 1,372.69 236.21L373.63,239.44A2.88,2.88 118.86,0 1,371.66 243L360.45,246.25A2.88,2.88 118.86,0 1,356.88 244.28L355.95,241.05A2.88,2.88 118.86,0 1,357.91 237.48z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M265.38,263.46L318.22,248.17A2.88,2.88 118.86,0 1,321.79 250.14L322.72,253.37A2.88,2.88 118.86,0 1,320.75 256.94L267.92,272.22A2.88,2.88 118.86,0 1,264.35 270.26L263.42,267.03A2.88,2.88 118.86,0 1,265.38 263.46z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M387.1,228.25L439.93,212.96A2.88,2.88 118.86,0 1,443.5 214.93L444.43,218.16A2.88,2.88 118.86,0 1,442.47 221.73L389.63,237.01A2.88,2.88 118.86,0 1,386.06 235.05L385.13,231.82A2.88,2.88 118.86,0 1,387.1 228.25z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M246.81,291.06L258.02,287.81A2.88,2.88 118.86,0 1,261.59 289.78L262.53,293.01A2.88,2.88 118.86,0 1,260.56 296.58L249.35,299.82A2.88,2.88 118.86,0 1,245.78 297.86L244.85,294.63A2.88,2.88 118.86,0 1,246.81 291.06z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M338.1,264.65L349.31,261.41A2.88,2.88 118.86,0 1,352.88 263.37L353.81,266.6A2.88,2.88 118.86,0 1,351.85 270.17L340.63,273.41A2.88,2.88 118.86,0 1,337.07 271.45L336.13,268.22A2.88,2.88 118.86,0 1,338.1 264.65z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M363.96,257.17L375.17,253.92A2.88,2.88 118.86,0 1,378.74 255.89L379.68,259.12A2.88,2.88 118.86,0 1,377.71 262.69L366.5,265.93A2.88,2.88 118.86,0 1,362.93 263.96L362,260.73A2.88,2.88 118.86,0 1,363.96 257.17z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M271.43,283.14L324.27,267.86A2.88,2.88 118.86,0 1,327.84 269.82L328.77,273.05A2.88,2.88 118.86,0 1,326.8 276.62L273.97,291.91A2.88,2.88 118.86,0 1,270.4 289.94L269.46,286.71A2.88,2.88 118.86,0 1,271.43 283.14z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M393.15,247.93L445.99,232.64A2.88,2.88 118.86,0 1,449.55 234.61L450.49,237.84A2.88,2.88 118.86,0 1,448.52 241.41L395.68,256.69A2.88,2.88 118.86,0 1,392.12 254.73L391.18,251.5A2.88,2.88 118.86,0 1,393.15 247.93z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M300.89,296.85L312.1,293.6A2.88,2.88 118.86,0 1,315.67 295.57L316.61,298.8A2.88,2.88 118.86,0 1,314.64 302.37L303.43,305.61A2.88,2.88 118.86,0 1,299.86 303.64L298.93,300.41A2.88,2.88 118.86,0 1,300.89 296.85z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M392.18,270.44L403.39,267.19A2.88,2.88 118.86,0 1,406.96 269.16L407.89,272.39A2.88,2.88 118.86,0 1,405.93 275.96L394.71,279.2A2.88,2.88 118.86,0 1,391.15 277.23L390.21,274A2.88,2.88 118.86,0 1,392.18 270.44z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M418.04,262.95L429.25,259.71A2.88,2.88 118.86,0 1,432.82 261.68L433.76,264.91A2.88,2.88 118.86,0 1,431.79 268.47L420.58,271.72A2.88,2.88 118.86,0 1,417.01 269.75L416.08,266.52A2.88,2.88 118.86,0 1,418.04 262.95z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M325.51,288.93L378.35,273.65A2.88,2.88 118.86,0 1,381.92 275.61L382.85,278.84A2.88,2.88 118.86,0 1,380.88 282.41L328.05,297.7A2.88,2.88 118.86,0 1,324.48 295.73L323.55,292.5A2.88,2.88 118.86,0 1,325.51 288.93z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M447.23,253.72L500.07,238.43A2.88,2.88 118.86,0 1,503.63 240.4L504.57,243.63A2.88,2.88 118.86,0 1,502.6 247.19L449.76,262.48A2.88,2.88 118.86,0 1,446.2 260.52L445.26,257.28A2.88,2.88 118.86,0 1,447.23 253.72z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M269.01,368.89L280.22,365.65A2.88,2.88 118.86,0 1,283.78 367.62L284.72,370.85A2.88,2.88 118.86,0 1,282.75 374.41L271.54,377.66A2.88,2.88 118.86,0 1,267.97 375.69L267.04,372.46A2.88,2.88 118.86,0 1,269.01 368.89z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M294.87,361.41L306.08,358.17A2.88,2.88 118.86,0 1,309.65 360.13L310.58,363.36A2.88,2.88 118.86,0 1,308.62 366.93L297.4,370.17A2.88,2.88 118.86,0 1,293.84 368.21L292.9,364.98A2.88,2.88 118.86,0 1,294.87 361.41z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M324.48,353.64L377.31,338.35A2.88,2.88 118.86,0 1,380.88 340.32L381.81,343.55A2.88,2.88 118.86,0 1,379.85 347.11L327.01,362.4A2.88,2.88 118.86,0 1,323.44 360.43L322.51,357.2A2.88,2.88 118.86,0 1,324.48 353.64z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M329.89,329.84L341.1,326.6A2.88,2.88 118.86,0 1,344.67 328.57L345.61,331.8A2.88,2.88 118.86,0 1,343.64 335.36L332.43,338.61A2.88,2.88 118.86,0 1,328.86 336.64L327.93,333.41A2.88,2.88 118.86,0 1,329.89 329.84z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M355.76,322.36L366.97,319.12A2.88,2.88 118.86,0 1,370.54 321.08L371.47,324.31A2.88,2.88 118.86,0 1,369.51 327.88L358.3,331.12A2.88,2.88 118.86,0 1,354.73 329.16L353.79,325.93A2.88,2.88 118.86,0 1,355.76 322.36z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M263.65,349.8L316.49,334.51A2.88,2.88 118.86,0 1,320.05 336.48L320.99,339.71A2.88,2.88 118.86,0 1,319.02 343.28L266.18,358.56A2.88,2.88 118.86,0 1,262.62 356.6L261.68,353.37A2.88,2.88 118.86,0 1,263.65 349.8z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M385.37,314.59L438.2,299.3A2.88,2.88 118.86,0 1,441.77 301.27L442.71,304.5A2.88,2.88 118.86,0 1,440.74 308.06L387.9,323.35A2.88,2.88 118.86,0 1,384.33 321.38L383.4,318.15A2.88,2.88 118.86,0 1,385.37 314.59z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M306.22,315.26L317.43,312.02A2.88,2.88 118.86,0 1,321 313.98L321.93,317.21A2.88,2.88 118.86,0 1,319.97 320.78L308.75,324.02A2.88,2.88 118.86,0 1,305.19 322.06L304.25,318.83A2.88,2.88 118.86,0 1,306.22 315.26z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M397.5,288.85L408.72,285.61A2.88,2.88 118.86,0 1,412.28 287.57L413.22,290.8A2.88,2.88 118.86,0 1,411.25 294.37L400.04,297.61A2.88,2.88 118.86,0 1,396.47 295.65L395.54,292.42A2.88,2.88 118.86,0 1,397.5 288.85z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M423.37,281.37L434.58,278.12A2.88,2.88 118.86,0 1,438.15 280.09L439.08,283.32A2.88,2.88 118.86,0 1,437.12 286.89L425.9,290.13A2.88,2.88 118.86,0 1,422.34 288.16L421.4,284.93A2.88,2.88 118.86,0 1,423.37 281.37z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M331.26,308.81L384.1,293.52A2.88,2.88 118.86,0 1,387.67 295.49L388.6,298.72A2.88,2.88 118.86,0 1,386.63 302.28L333.8,317.57A2.88,2.88 118.86,0 1,330.23 315.6L329.29,312.37A2.88,2.88 118.86,0 1,331.26 308.81z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M452.97,273.59L505.81,258.31A2.88,2.88 118.86,0 1,509.38 260.27L510.31,263.5A2.88,2.88 118.86,0 1,508.35 267.07L455.51,282.36A2.88,2.88 118.86,0 1,451.94 280.39L451.01,277.16A2.88,2.88 118.86,0 1,452.97 273.59z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M289.98,324.14m-4.5,0a4.5,4.5 0,1 1,9 0a4.5,4.5 0,1 1,-9 0" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M284.7,305.89m-4.5,0a4.5,4.5 0,1 1,9 0a4.5,4.5 0,1 1,-9 0" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M317,46.54 L287.22,55.16a2.5,2.5 0,0 1,-1.39 -4.8l29.78,-8.62a2.5,2.5 0,1 1,1.39 4.8Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.surface), + ) + addPath( + pathData = PathParser().parsePathString( + "M331.67,39.69m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.surface), + ) + addPath( + pathData = PathParser().parsePathString( + "M34.37,631.86a10.95,10.95 0,0 1,-0.56 -2.33,0.76 0.76,0 0,1 -0.01,-0.18c-0.51,-4.84 1.99,-9.33 4.82,-13.89l3.88,-6.24a3.44,3.44 0,0 1,6.28 1.09c0.21,0.97 0.42,1.95 0.62,2.93 2.09,-1.74 4.27,-3.35 6.18,-4.74q7.57,-5.49 15.14,-11a3.44,3.44 0,0 1,5.41 3.36l-0.96,5.57c-1.27,7.38 -2.72,15.75 -6.14,23.07 -0.38,0.84 -0.79,1.65 -1.22,2.42l-0.14,0.26L34.49,632.19Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.surface), + ) + addPath( + pathData = PathParser().parsePathString( + "M1.18,632.91l616.36,0.31a1.19,1.19 0,0 0,0 -2.38l-616.36,-0.31a1.19,1.19 0,0 0,0 2.38Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M426.38,520.45a17.08,17.08 0,1 1,11.66 -21.15A17.08,17.08 0,0 1,426.38 520.45Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M427.64,500.55l-4.86,1.4 -1.4,-4.86a1.68,1.68 0,1 0,-3.24 0.94l1.4,4.86 -4.86,1.4a1.68,1.68 0,0 0,0.94 3.24l4.86,-1.4 1.4,4.86a1.68,1.68 0,1 0,3.24 -0.94l-1.4,-4.86 4.86,-1.4a1.68,1.68 0,0 0,-0.94 -3.24Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.surface), + ) + addPath( + pathData = PathParser().parsePathString( + "M474.38,506.56a17.08,17.08 0,1 1,11.66 -21.15A17.08,17.08 0,0 1,474.38 506.56Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M475.64,486.67l-4.85,1.4 -3.24,0.94 -4.86,1.4a1.68,1.68 0,0 0,0.94 3.24l4.86,-1.4 3.24,-0.94 4.85,-1.4a1.68,1.68 0,1 0,-0.94 -3.24Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.surface), + ) + addPath( + pathData = PathParser().parsePathString( + "M522.38,492.68a17.08,17.08 0,1 1,11.66 -21.15A17.08,17.08 0,0 1,522.38 492.68Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M526.64,472.82l-6.61,-5.44a1.44,1.44 0,1 0,-1.82 2.22l4.28,3.52 -3.69,1.07 -3.24,0.94 -4.86,1.4a1.68,1.68 0,1 0,0.94 3.24l4.86,-1.4 3.24,-0.94 3.84,-1.11 -1.82,5.52a1.44,1.44 0,0 0,2.73 0.9l2.69,-8.13a1.89,1.89 0,0 0,-0.51 -1.77Z" + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.surface), + ) + + }.build() +} + +@Preview +@Composable +private fun Preview() { + val painter = rememberVectorPainter(DynamicColorImageVectors.undrawPhoneLady()) + Image( + painter = painter, + contentDescription = null + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawSelectChoice.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawSelectChoice.kt new file mode 100644 index 000000000..f8324f74f --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawSelectChoice.kt @@ -0,0 +1,287 @@ +package com.drdisagree.iconify.core.ui.components.svg + +import androidx.compose.foundation.Image +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.PathParser +import androidx.compose.ui.graphics.vector.group +import androidx.compose.ui.graphics.vector.rememberVectorPainter +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp + +@Composable +fun DynamicColorImageVectors.undrawSelectChoice(): ImageVector { + return Builder( + name = "select choice", + defaultWidth = 559.1745.dp, + defaultHeight = 582.5.dp, + viewportWidth = 559.1745f, + viewportHeight = 582.5f + ).apply { + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M833.2667 657.09714l-25.61328 23.58008 20.35547 -34.15484c-16.03711 -29.0821 -42.26563 -54.21613 -42.26563 -54.21613s-54.415 52.13391 -54.415 93.11456 24.36231 55.28956 54.415 55.28956c30.05225 0 54.41455 -14.3089 54.41455 -55.28956C840.15781 676.29935 837.4581 666.62583 833.2667 657.09714Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primaryContainer), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M801.0664 681.95377v2.02c-0.12 23.48 -4.08 41.8 -11.85 54.7 -0.11 0.19 -0.23 0.37 -0.34 0.56l-0.87 -0.53 -0.83 -0.52c8.62 -13.93 11.67 -33.62 11.78 -54.1 0.01 -0.66 0.02 -1.33 0.01 -2 -0.03 -8.67005 -0.56 -17.44 -1.41 -25.96 -0.06 -0.66 -0.13 -1.33 -0.2 -2 -1.18 -11.24 -2.88 -21.98 -4.62 -31.31 -0.12 -0.66 -0.25 -1.32 -0.38 -1.97 -3.01 -15.78 -6.08 -27.21 -6.78 -29.74 -0.08 -0.31 -0.13 -0.48 -0.14 -0.52l0.95 -0.27 0.01 -0.01 0.96 -0.27c0.01 0.04 0.18 0.61005 0.46 1.67 1.07 3.96 3.85 14.71 6.58 28.89 0.12 0.64 0.25 1.3 0.37 1.96 1.42 7.57 2.81 16.03 3.91 24.91q0.42 3.34506 0.75 6.6c0.08 0.67 0.15 1.34 0.21 2Q801.01648 669.87879 801.0664 681.95377Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M794.39641 620.59373c-0.67 0.09 -1.35 0.18 -2.04 0.25a55.1675 55.1675 0 0 1 -5.64 0.29 53.66371 53.66371 0 0 1 -23.2 -5.24c-0.42 0.53 -0.84 1.06 -1.27 1.6a55.65066 55.65066 0 0 0 24.47 5.64 57.08008 57.08008 0 0 0 6.02 -0.32c0.68 -0.07 1.36 -0.16 2.03 -0.26a55.18211 55.18211 0 0 0 15.95 -4.83q-0.645 -0.825 -1.26 -1.62A53.47953 53.47953 0 0 1 794.39641 620.59373Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M799.42644 654.06376q-1.035 0.06 -2.07 0.06c-0.21 0.01 -0.43 0.01 -0.64 0.01a53.94832 53.94832 0 0 1 -44.28 -23.13c-0.4 0.59 -0.8 1.18 -1.18994 1.78a55.95155 55.95155 0 0 0 45.47 23.35c0.28 0 0.56 0 0.84 -0.01 0.69995 -0.01 1.38995 -0.03 2.07995 -0.06a55.65566 55.65566 0 0 0 29.65 -10.4c-0.32 -0.59 -0.64 -1.18 -0.97 -1.76995A53.57789 53.57789 0 0 1 799.42644 654.06376Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M801.0664 681.95377c-0.7 0.06 -1.4 0.1 -2.1 0.13 -0.75 0.03 -1.5 0.05 -2.25 0.05a54.09422 54.09422 0 0 1 -51.86 -38.92005c-0.45 0.81006 -0.9 1.61005 -1.33 2.42005a56.07516 56.07516 0 0 0 53.19 38.5c0.75 0 1.5 -0.01 2.24 -0.05 0.71 -0.02 1.41 -0.06 2.11 -0.11005a55.91109 55.91109 0 0 0 36.9 -18.01c-0.21 -0.74 -0.45 -1.47 -0.69 -2.21A53.91969 53.91969 0 0 1 801.0664 681.95377Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M741.15954 284.69886L462.5712 249.18105a18.08642 18.08642 0 0 0 -2.263 -0.14685 17.25807 17.25807 0 0 0 -2.23055 0.14083 17.06478 17.06478 0 0 0 -2.18962 0.42854 17.49793 17.49793 0 0 0 -2.14026 0.72225 18.22231 18.22231 0 0 0 -1.9922 0.963 18.95742 18.95742 0 0 0 -1.88868 1.20375 20.2224 20.2224 0 0 0 -1.77674 1.45051 22.08582 22.08582 0 0 0 -1.65877 1.68525 23.76228 23.76228 0 0 0 -1.5119 1.90433q-0.71386 1.00272 -1.33978 2.0861 -0.62592 1.087 -1.16161 2.26064t-0.97746 2.42675q-0.45741 1.29524 -0.80168 2.64825t-0.57539 2.753q-0.2263 1.39876 -0.34667 2.84326t-0.12038 2.9239q0.00479 1.4782 0.12038 2.94678t0.34667 2.91307q0.23354 1.45053 0.57778 2.87215t0.80167 2.81075q0.44176 1.34218 0.97746 2.623 0.53567 1.282 1.16162 2.49416t1.33978 2.35454q0.71265 1.14717 1.51192 2.20767t1.65877 2.0235q0.85947 0.957 1.77673 1.80563t1.88868 1.58533a23.62545 23.62545 0 0 0 1.99221 1.35783 21.76532 21.76532 0 0 0 2.14026 1.14717 20.07486 20.07486 0 0 0 2.18962 0.86791 18.97421 18.97421 0 0 0 2.23054 0.58863 18.4762 18.4762 0 0 0 2.26305 0.307L741.162 326.75784a7.05621 7.05621 0 0 0 2.40749 -0.24075 7.55151 7.55151 0 0 0 1.16162 -0.42854 8.5987 8.5987 0 0 0 1.12791 -0.632 10.03506 10.03506 0 0 0 1.04245 -0.79447 11.67582 11.67582 0 0 0 0.98226 -0.963 13.85174 13.85174 0 0 0 0.91846 -1.1267q0.44418 -0.60429 0.85346 -1.288t0.774 -1.42644q0.36474 -0.74271 0.68252 -1.54321 0.319 -0.79929 0.58984 -1.65395t0.49354 -1.75988q0.23472 -0.93651 0.40446 -1.90674t0.2901 -1.96933q0.11676 -0.99912 0.17454 -2.02471t0.05778 -2.07406q-0.0036 -1.04727 -0.05778 -2.08489t-0.17454 -2.05961q-0.11676 -1.022 -0.2901 -2.02711t-0.40446 -1.9886q-0.2227 -0.95094 -0.49354 -1.85858 -0.26844 -0.89559 -0.58984 -1.7647t-0.68252 -1.68525q-0.36354 -0.81494 -0.774 -1.58172t-0.85346 -1.459q-0.443 -0.69216 -0.91846 -1.31208t-0.98226 -1.16042a13.498 13.498 0 0 0 -1.04245 -1.00392 11.32484 11.32484 0 0 0 -1.12791 -0.85828 9.50166 9.50166 0 0 0 -1.16162 -0.66206 8.27458 8.27458 0 0 0 -1.19171 -0.46224 7.5967 7.5967 0 0 0 -1.21819 -0.2588" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primaryContainer), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M741.15954 364.80471L462.5712 358.13233a17.90946 17.90946 0 0 0 -4.4936 0.45863 18.34354 18.34354 0 0 0 -2.18962 0.656 19.41846 19.41846 0 0 0 -2.14026 0.93892 20.721 20.721 0 0 0 -1.9922 1.16523 21.90247 21.90247 0 0 0 -1.88868 1.40237 23.57934 23.57934 0 0 0 -1.77674 1.63469q-0.86069 0.87631 -1.65877 1.8634 -0.79809 0.98947 -1.5119 2.062 -0.71386 1.07254 -1.33978 2.22453t-1.16161 2.381q-0.53567 1.229 -0.97746 2.52787 -0.45741 1.3446 -0.80168 2.73251t-0.57539 2.812q-0.2263 1.424 -0.34667 2.88057t-0.12038 2.93594q0.00479 1.47941 0.12038 2.93474t0.34667 2.87816q0.23354 1.41563 0.57778 2.80113t0.80167 2.72769q0.44176 1.30245 0.97746 2.52787t1.16162 2.37379q0.626 1.14839 1.33978 2.2161 0.71265 1.06412 1.51192 2.04638t1.65877 1.85257a23.35111 23.35111 0 0 0 1.77673 1.62385 21.70914 21.70914 0 0 0 1.88868 1.39033 20.54423 20.54423 0 0 0 1.99221 1.152 19.27673 19.27673 0 0 0 2.14026 0.92568 18.248 18.248 0 0 0 2.18962 0.6416 17.81682 17.81682 0 0 0 2.23054 0.36113 18.00466 18.00466 0 0 0 2.26305 0.07343l278.58594 -8.4756a7.25286 7.25286 0 0 0 1.21819 -0.14084 7.57443 7.57443 0 0 0 1.19171 -0.34547 8.43654 8.43654 0 0 0 1.16162 -0.54891 9.87072 9.87072 0 0 0 1.12791 -0.74873 11.67646 11.67646 0 0 0 1.04245 -0.90282 13.63477 13.63477 0 0 0 0.98226 -1.06411q0.47427 -0.56815 0.91846 -1.2218t0.85346 -1.37589q0.40927 -0.72706 0.774 -1.50709t0.68252 -1.613q0.319 -0.84624 0.58984 -1.72257t0.49354 -1.80562q0.23472 -0.951 0.40446 -1.93924t0.2901 -1.99943q0.11676 -1.01475 0.17454 -2.04637t0.05778 -2.08008q-0.0036 -1.03882 -0.05778 -2.07526t-0.17454 -2.04637q-0.11676 -1.01355 -0.2901 -1.997t-0.40446 -1.94646q-0.22391 -0.9293 -0.49474 -1.81044t-0.58864 -1.71173q-0.31658 -0.83058 -0.68132 -1.60941t-0.774 -1.50108q-0.41047 -0.72345 -0.85346 -1.37227t-0.91846 -1.217a13.50491 13.50491 0 0 0 -0.98226 -1.05809 11.56584 11.56584 0 0 0 -1.04244 -0.89559 9.78426 9.78426 0 0 0 -1.12791 -0.74151 8.37239 8.37239 0 0 0 -1.16283 -0.53928 7.53579 7.53579 0 0 0 -1.19171 -0.33825 7.23677 7.23677 0 0 0 -1.21819 -0.13242" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondaryContainer), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M589.31356 443.63612a13.97191 13.97191 0 0 0 25.28668 -11.43927l53.99307 -110.92544 -25.84464 -15.66755L596.11918 423.42923q-0.26727 0.1039 -0.52648 0.21776t-0.51651 0.23781q-0.25729 0.12394 -0.51073 0.26081t-0.50318 0.28777a13.98877 13.98877 0 0 0 -4.7497 19.20135Z" + + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M658.28678 364.0447l-38.35735 -9.83117s1.25229 -2.831 3.28772 -7.52113 4.8793 -11.23028 8.07832 -18.65563 6.74836 -15.72208 10.21514 -23.92319 6.8383 -16.3039 9.678 -23.32731 6.0655 -11.22974 9.30769 -13.58719a12.797 12.797 0 0 1 9.40493 -2.50021 18.17652 18.17652 0 0 1 7.27738 2.77018A19.818 19.818 0 0 1 680.1 269.6863l8.89339 16.17314Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M351.31474 355.2602a24.91786 24.91786 0 0 0 -2.76862 0.36112 25.34288 25.34288 0 0 0 -2.7289 0.66929 26.35031 26.35031 0 0 0 -2.67954 0.97985 27.95921 27.95921 0 0 0 -2.62056 1.288q-1.24828 0.70177 -2.44 1.52635t-2.31481 1.77192q-1.12189 0.94494 -2.17758 2.01507t-2.03433 2.257q-0.97865 1.1869 -1.855 2.45926t-1.64432 2.62177q-0.76077 1.3518 -1.42283 2.777t-1.20375 2.91669q-0.56455 1.5468 -0.98828 3.12612t-0.7066 3.18512q-0.28409 1.60581 -0.42613 3.23327t-0.142 3.26818q0 1.6407 0.142 3.23929t0.42613 3.1478q0.28288 1.54923 0.7066 3.04308t0.98467 2.92631q0.54649 1.38311 1.20374 2.67593a28.57528 28.57528 0 0 0 1.42525 2.48936 27.29148 27.29148 0 0 0 1.64432 2.28712 26.5101 26.5101 0 0 0 1.85618 2.09092 25.40859 25.40859 0 0 0 2.03433 1.849 24.07346 24.07346 0 0 0 2.17879 1.58052 23.19147 23.19147 0 0 0 4.7548 2.34009 22.74389 22.74389 0 0 0 5.2965 1.20375 23.28722 23.28722 0 0 0 2.7289 0.12037 24.48725 24.48725 0 0 0 2.76862 -0.19621 25.37071 25.37071 0 0 0 2.75417 -0.50677 25.87151 25.87151 0 0 0 2.69038 -0.80772 26.9475 26.9475 0 0 0 2.61815 -1.10384 28.59917 28.59917 0 0 0 2.53751 -1.39394q1.20014 -0.74872 2.33767 -1.6058t2.20407 -1.82729q1.06651 -0.97021 2.05961 -2.04637t1.90915 -2.25823q0.92206 -1.18088 1.7358 -2.43278t1.524 -2.57q0.71021 -1.31811 1.31449 -2.6976t1.10143 -2.81677q0.5152 -1.48784 0.90161 -3.00095t0.64521 -3.04789q0.2576 -1.536 0.38761 -3.08762t0.13 -3.1165q-0.0012 -1.56487 -0.13 -3.09123t-0.38761 -3.00937q-0.25761 -1.4806 -0.64521 -2.91789t-0.90161 -2.82038q-0.49955 -1.33857 -1.10143 -2.59648 -0.61029 -1.25432 -1.32051 -2.434a27.302 27.302 0 0 0 -3.25373 -4.34915 25.78491 25.78491 0 0 0 -1.90433 -1.87664 24.39316 24.39316 0 0 0 -2.05962 -1.63349 23.56323 23.56323 0 0 0 -2.20406 -1.38551 23.29159 23.29159 0 0 0 -2.34249 -1.13153 22.72132 22.72132 0 0 0 -5.15445 -1.46255 23.07057 23.07057 0 0 0 -2.69038 -0.26844 24.14532 24.14532 0 0 0 -2.75418 0.04575" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondaryContainer), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M351.31956 232.68006a24.34593 24.34593 0 0 0 -2.76862 0.09029 23.98521 23.98521 0 0 0 -2.7289 0.40446 24.23785 24.23785 0 0 0 -2.67954 0.72224 25.11021 25.11021 0 0 0 -2.62056 1.034 26.09237 26.09237 0 0 0 -2.44 1.2844 26.78288 26.78288 0 0 0 -2.31481 1.548 27.97275 27.97275 0 0 0 -2.17879 1.80562q-1.0605 0.97383 -2.03794 2.06443 -0.97865 1.0918 -1.855 2.2799t-1.64432 2.46287q-0.76439 1.29162 -1.42644 2.647t-1.20375 2.79992q-0.56094 1.489 -0.98467 3.02743t-0.7066 3.1165q-0.28409 1.58293 -0.42613 3.19235t-0.142 3.25012q0 1.6383 0.142 3.25012t0.42613 3.18873q0.28288 1.57691 0.7066 3.11169t0.98467 3.0214q0.54649 1.43607 1.20375 2.7927 0.66207 1.3518 1.43 2.623t1.64432 2.452q0.87513 1.18449 1.855 2.26786t2.03433 2.04638a27.71027 27.71027 0 0 0 2.16795 1.79839 26.54319 26.54319 0 0 0 2.31481 1.53237 25.88047 25.88047 0 0 0 2.44 1.26875 24.94157 24.94157 0 0 0 2.62056 1.01717 23.982 23.982 0 0 0 5.40844 1.08338 24.49013 24.49013 0 0 0 5.5216 -0.16732 24.15436 24.15436 0 0 0 2.69038 -0.5465 24.50223 24.50223 0 0 0 2.61815 -0.84985 25.45616 25.45616 0 0 0 2.5375 -1.14717 26.49778 26.49778 0 0 0 2.34249 -1.37348 27.22077 27.22077 0 0 0 2.20407 -1.61422q1.06651 -0.86671 2.05961 -1.84655t1.90915 -2.07286q0.92206 -1.093 1.7358 -2.26545t1.524 -2.42195q0.71262 -1.24948 1.31449 -2.57t1.10143 -2.70482q0.5152 -1.43727 0.90161 -2.91307t0.64521 -2.9853q0.2576 -1.51551 0.38761 -3.05511t0.13 -3.10447q-0.0012 -1.56368 -0.13 -3.10326t-0.38761 -3.04669q-0.25761 -1.5083 -0.64521 -2.98289t-0.90161 -2.90826q-0.49955 -1.38551 -1.10143 -2.70241t-1.32051 -2.56519q-0.71021 -1.23746 -1.524 -2.4075t-1.72978 -2.25341q-0.91 -1.08218 -1.90433 -2.05721t-2.05962 -1.83331a26.96321 26.96321 0 0 0 -2.20286 -1.60339 26.27265 26.27265 0 0 0 -2.34249 -1.359 25.2716 25.2716 0 0 0 -2.5375 -1.13152 24.36276 24.36276 0 0 0 -2.61815 -0.833 24.05963 24.05963 0 0 0 -2.69038 -0.52965 24.36862 24.36862 0 0 0 -2.75418 -0.22149m0 -3.01178a26.74741 26.74741 0 0 1 11.59932 3.00215 30.44173 30.44173 0 0 1 9.30257 7.515 35.43128 35.43128 0 0 1 6.18727 10.86383 39.62389 39.62389 0 0 1 0 26.33682 35.72622 35.72622 0 0 1 -6.18727 10.90355 30.72788 30.72788 0 0 1 -9.30377 7.57037 26.87245 26.87245 0 0 1 -11.59932 3.078 26.5187 26.5187 0 0 1 -11.83526 -2.35935 29.92525 29.92525 0 0 1 -9.84546 -7.2598 35.05187 35.05187 0 0 1 -6.73136 -11.11542 39.58533 39.58533 0 0 1 0 -27.62242 35.35065 35.35065 0 0 1 6.73136 -11.15875 30.20092 30.20092 0 0 1 9.84546 -7.3236 26.61731 26.61731 0 0 1 11.84248 -2.43519Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M351.31716 272.82388l-9.48192 -19.75352 2.251 -1.46616 7.80992 16.22773 32.79251 -38.544 1.985 2.115Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M696.403 662.81072l-23.4731 -0.09149 7.56917 61.3346 15.90393 0.07945Z" + + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M700.45839 739.56654l-51.2532 -0.27084v-0.64762a20.102 20.102 0 0 1 0.38279 -3.9182 19.5981 19.5981 0 0 1 2.9552 -7.12017 20.12424 20.12424 0 0 1 5.54326 -5.51558 19.60926 19.60926 0 0 1 7.13462 -2.92391 20.10992 20.10992 0 0 1 3.92061 -0.36112h0l31.31672 0.15408Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onTertiaryContainer), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M621.24452 662.51941l-23.40569 -0.09149 7.5451 61.25154 15.86059 0.07945Z" + + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M625.28911 739.16809l-51.11839 -0.26843V738.252a20.12047 20.12047 0 0 1 0.3828 -3.91218 19.59207 19.59207 0 0 1 2.94677 -7.11054 20.06641 20.06641 0 0 1 5.53 -5.51076 19.53926 19.53926 0 0 1 7.11656 -2.91669 20.03214 20.03214 0 0 1 3.911 -0.36112h0l31.23125 0.15287Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onTertiaryContainer), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M620.25022 411.82915l-39.359 146.8838 14.40647 140.79886 31.89933 0.87994 -6.94562 -127.13389 39.79472 -63.44478L668.677 701.25724l28.9357 -2.04637 16.09653 -164.603a186.93043 186.93043 0 0 0 11.95322 -40.02344 178.21728 178.21728 0 0 0 2.82761 -32.69983 152.92963 152.92963 0 0 0 -1.69729 -22.04906 80.71222 80.71222 0 0 0 -1.59015 -8.08437l-11.73534 -11.89665Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M672.39794 436.39551c-6.61914 0 -12.82983 -0.2124 -18.46167 -0.63184A138.618 138.618 0 0 1 636.802 433.5083a61.01273 61.01273 0 0 1 -13.97509 -4.3999 22.42492 22.42492 0 0 1 -9.06446 -7.15381l-0.26831 -0.39014 10.75806 -70.01318 11.60107 -78.72168a21.455 21.455 0 0 1 21.89038 -18.333l36.333 1.11328a20.36358 20.36358 0 0 1 19.70166 21.5918l-4.76953 78.28955 17.593 77.22412 -1.24585 0.17383c-0.50122 0.06641 -2.43213 0.32129 -5.45654 0.66162 -3.95313 0.44434 -7.98975 0.84473 -11.99732 1.19043 -5.66992 0.48877 -11.21826 0.873 -16.49072 1.14258C684.72484 436.22461 678.31615 436.38965 672.39794 436.39551Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M652.23623 240.58509q-0.01447 0.00006 -0.029 0a5.80447 5.80447 0 0 1 -5.80081 -5.80814V202.38413a43.28932 43.28932 0 0 1 3.415 -16.89461 43.98743 43.98743 0 0 1 23.112 -23.23235 43.31447 43.31447 0 0 1 60.38845 39.73935v32.44223a5.81392 5.81392 0 0 1 -0.45983 2.27268 5.90921 5.90921 0 0 1 -3.11289 3.12011 5.83343 5.83343 0 0 1 -2.27388 0.46826l-75.24391 0.28529Z" + + ) + .toNodes(), + fill = SolidColor(Color.Black), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M709.48651 191.27474A31.93063 31.93063 0 0 1 672.56393 237.27a31.55868 31.55868 0 0 1 -18.98311 -15.20816 31.93063 31.93063 0 0 1 36.8973 -45.9832 31.55869 31.55869 0 0 1 19.00839 15.19733Z" + + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M636.13248 205.02034a34.24421 34.24421 0 0 1 2.70121 -13.36161 34.7739 34.7739 0 0 1 18.27651 -18.3692 34.26006 34.26006 0 0 1 13.36162 -2.76863l6.48339 -0.0325q0.10922 -0.00063 0.21845 -0.00056a34.18646 34.18646 0 0 1 34.16542 34.20749v0.64882l-13.71551 0.05537L692.947 192.334l-0.93532 13.09077 -7.08406 0.03129 -2.35814 -6.59172 -0.47307 6.60015 -45.95792 0.20584Z" + + ) + .toNodes(), + fill = SolidColor(Color.Black), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M580.91626 273.16471a15.04676 15.04676 0 0 0 -5.785 2.8352 14.64818 14.64818 0 0 0 -3.35954 3.7668 15.28752 15.28752 0 0 0 -2.20959 9.53709 14.63534 14.63534 0 0 0 1.35071 4.85691 14.88942 14.88942 0 0 0 21.38117 6.27077q0.19721 -0.12731 0.3906 -0.25841t0.37992 -0.26751q0.18767 -0.1368 0.36885 -0.27777t0.3597 -0.28611l75.68285 26.936A11.40553 11.40553 0 0 0 682.557 322.192l17.9425 -24.84286 -21.69279 -14.60789 -11.384 12.93211 -69.26236 -13.778q-0.1134 -0.2692 -0.23482 -0.5357t-0.25347 -0.5307q-0.13434 -0.26343 -0.27667 -0.52416t-0.301 -0.51725A14.87713 14.87713 0 0 0 580.91626 273.16471Z" + + ) + .toNodes(), + fill = SolidColor(Color(0xFFFFB6B6)), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M668.64413 287.51774c2.264 -2.82544 5.42926 -6.49388 8.64528 -10.13238s6.4797 -7.24478 8.94157 -9.94249 4.1185 -4.48569 4.1185 -4.48569a17.83449 17.83449 0 0 1 32.39864 13.15647 17.57477 17.57477 0 0 1 -2.65988 6.51856s-2.46915 3.231 -6.19616 8.05366 -8.71376 11.24257 -13.74364 17.62495 -10.10894 12.73178 -14.02513 17.41865 -6.67216 7.71467 -7.06039 7.45538L665.40274 292.5796C665.01451 292.3203 666.38017 290.34318 668.64413 287.51774Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M676.75177 239.56431a5.71188 5.71188 0 0 0 0.24075 3.13576 5.84194 5.84194 0 0 0 0.76558 1.43848 5.90867 5.90867 0 0 0 0.94856 1.01957 5.79475 5.79475 0 0 0 3.76532 1.36867q0.12881 -0.00122 0.25761 -0.00723t0.2576 -0.01805q0.13 -0.01083 0.2588 -0.02889t0.25881 -0.04093l4.868 -0.88475 6.70488 -14.32461v13.12086l22.13212 -3.98441V184.67939l-37.10314 0.17816 0.91725 1.06532a25.51935 25.51935 0 0 1 5.778 12.5575 41.59937 41.59937 0 0 1 -0.26723 14.15006 75.01637 75.01637 0 0 1 -3.95071 13.819 110.55836 110.55836 0 0 1 -5.27723 11.58367A5.83362 5.83362 0 0 0 676.75177 239.56431Z" + + ) + .toNodes(), + fill = SolidColor(Color.Black), + ) + } + group(translationX = -320.4128f, translationY = -158.75f) { + addPath( + pathData = PathParser().parsePathString( + "M419.7553 741.25H878.3835a1.20375 1.20375 0 0 0 0 -2.4075H419.7553a1.20375 1.20375 0 1 0 0 2.4075Z" + + ) + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSecondaryContainer), + ) + } + }.build() +} + +@Preview +@Composable +private fun Preview() { + val painter = rememberVectorPainter(DynamicColorImageVectors.undrawSelectChoice()) + + Image( + painter = painter, + contentDescription = null + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawThemePicker.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawThemePicker.kt new file mode 100644 index 000000000..7f80ef715 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/UndrawThemePicker.kt @@ -0,0 +1,216 @@ +package com.drdisagree.iconify.core.ui.components.svg + +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.PathParser +import androidx.compose.ui.unit.dp + +@Composable +fun DynamicColorImageVectors.themePicker(): ImageVector { + return Builder( + name = "themePicker", + defaultWidth = 524.9256.dp, + defaultHeight = 493.29297.dp, + viewportWidth = 524.9256f, + viewportHeight = 493.29297f + ).apply { + addPath( + pathData = PathParser().parsePathString("M407.321,104.9l8.23,3.899c-3.376,-4.711 -6.284,-12.068 -7.841,-17.922 -2.637,5.453 -6.887,12.126 -11.094,16.112l8.698,-2.238c-5.36,26.268 -25.519,45.126 -48.604,45.126l-0.327,0.949c24.113,0 45.466,-18.596 50.938,-45.925Z") + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSurface), + ) + addPath( + pathData = PathParser().parsePathString("M382.442,64.876h52c2.206,0 4,1.794 4,4 0,2.206 -1.794,4 -4,4h-52c-2.206,0 -4,-1.794 -4,-4 0,-2.206 1.794,-4 4,-4Z") + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M264.923,154.721c6.2,-5.123 13.869,-6.077 17.129,-2.13 3.26,3.946 0.876,11.297 -5.327,16.421 -2.45,2.081 -5.362,3.545 -8.494,4.269l-26.544,21.375 -9.765,-12.67 27.204,-19.727c1.303,-2.94 3.29,-5.524 5.797,-7.538Z" + ).toNodes(), + fill = SolidColor(Color(0xffffd1a5)), + ) + addPath( + pathData = PathParser().parsePathString("M111.501,202.949c-0.013,-0.945 -0.005,-9.191 6.1,-14.403 7.012,-5.987 16.907,-3.564 20.378,-2.714 8.017,1.963 8.674,5.402 16.203,8.936 14.085,6.611 -3.563,3.227 4.818,1.107 2.901,-0.734 44.638,-3.628 55.027,-10.023 20.206,-12.436 33.973,-19.977 33.973,-19.977l9,18s-13.014,18.096 -31.33,31.501c-18.788,13.751 -28.182,20.627 -42.459,23.283 -1.229,0.229 -31.466,5.391 -55.819,-12.803 -5.555,-4.15 -15.733,-11.754 -15.891,-22.909Z") + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M284.2,158.334m-25.133,0a25.133,25.133 0,1 1,50.266 0a25.133,25.133 0,1 1,-50.266 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + fillAlpha = 0.2f, + strokeAlpha = 0.2f + ) + addPath( + pathData = PathParser().parsePathString( + "M308.346,169.52m-25.133,0a25.133,25.133 0,1 1,50.266 0a25.133,25.133 0,1 1,-50.266 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M308.346,169.52m-25.133,0a25.133,25.133 0,1 1,50.266 0a25.133,25.133 0,1 1,-50.266 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + fillAlpha = 0.5f, + strokeAlpha = 0.5f + ) + addPath( + pathData = PathParser().parsePathString("M333.833,181.328m-25.133,0a25.133,25.133 0,1 1,50.266 0a25.133,25.133 0,1 1,-50.266 0") + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M333.833,181.328m-25.133,0a25.133,25.133 0,1 1,50.266 0a25.133,25.133 0,1 1,-50.266 0" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + fillAlpha = 0.8f, + strokeAlpha = 0.8f + ) + addPath( + pathData = PathParser().parsePathString("M356.638,191.893m-25.133,0a25.133,25.133 0,1 1,50.266 0a25.133,25.133 0,1 1,-50.266 0") + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString("M166.208,211.497c-1.335,-2.251 -7.109,0.159 -8.171,-1.883 -1.058,-2.035 4.307,-5.136 7.372,-12.22 0.553,-1.278 4.036,-9.328 1.457,-11.812 -4.888,-4.709 -27.255,14.723 -35.082,8.364 -1.718,-1.395 -2.918,-4.181 -8.117,-8.704 -2.068,-1.799 -3.319,-2.612 -4.529,-2.309 -1.717,0.429 -1.854,2.727 -3.695,7.247 -2.762,6.778 -4.395,6.369 -6.005,11.776 -1.195,4.014 -0.922,6.348 -2.327,6.803 -1.989,0.643 -3.82,-3.615 -6.341,-3.233 -2.572,0.389 -4.128,5.347 -4.619,9.059 -0.922,6.966 1.636,11.562 3.054,16.395 1.541,5.252 2.455,13.24 -1.103,24.548l-35.219,99.229c7.775,-20.362 30.288,-76.178 39.748,-96.92 2.731,-5.988 5.746,-12.061 11.938,-14.458 5.961,-2.308 14.147,-0.93 24.584,-3.444 1.219,-0.294 4.601,-1.154 5.027,-3.144 0.352,-1.645 -1.638,-2.563 -1.332,-4.103 0.41,-2.066 4.322,-2.092 9.13,-4.476 3.39,-1.681 5.502,-3.68 7.319,-5.399 0.548,-0.518 8.687,-8.318 6.911,-11.314h-0Z") + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + fillAlpha = 0.75f + ) + addPath( + pathData = PathParser().parsePathString("M27.647,263.736c-1.49,0.006 -1.973,3.535 -3.282,3.467 -1.304,-0.068 -1.278,-3.596 -3.871,-7.144 -0.468,-0.64 -3.414,-4.672 -5.377,-4.123 -3.721,1.04 -0.638,17.625 -6.017,19.632 -1.181,0.44 -2.894,0.226 -6.614,1.472 -1.48,0.496 -2.24,0.875 -2.44,1.557 -0.285,0.967 0.804,1.697 2.491,3.905 2.53,3.311 1.858,3.995 4.047,6.345 1.626,1.745 2.85,2.284 2.667,3.105 -0.258,1.162 -2.876,0.832 -3.417,2.179 -0.551,1.375 1.433,3.569 3.113,4.881 3.153,2.462 6.147,2.533 8.928,3.232 3.022,0.759 7.207,2.615 11.73,7.624l38.541,45.916c-7.75,-9.691 -28.65,-36.845 -36.1,-47.473 -2.151,-3.068 -4.262,-6.3 -3.652,-10.031 0.587,-3.592 3.626,-7.212 5.403,-13.06 0.208,-0.683 0.761,-2.591 -0.092,-3.374 -0.706,-0.647 -1.73,0.064 -2.398,-0.53 -0.896,-0.797 0.221,-2.725 0.438,-5.773 0.153,-2.149 -0.219,-3.762 -0.538,-5.15 -0.096,-0.418 -1.576,-6.664 -3.559,-6.656v0Z") + .toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + fillAlpha = 0.9f + ) + addPath( + pathData = PathParser().parsePathString( + "M57.368,270.408l-0.898,-8.012 0.41,-0.607c1.898,-2.809 2.865,-5.552 2.876,-8.156 0.002,-0.414 -0.017,-0.828 -0.037,-1.25 -0.077,-1.671 -0.174,-3.749 0.909,-6.171 0.607,-1.35 2.314,-4.476 4.879,-4.089 0.691,0.097 1.213,0.414 1.609,0.785 0.058,-0.093 0.118,-0.186 0.182,-0.286 0.799,-1.219 1.431,-1.741 2.041,-2.244 0.468,-0.387 0.952,-0.785 1.71,-1.729 0.333,-0.414 0.592,-0.778 0.811,-1.083 0.664,-0.925 1.53,-2.027 3.058,-2.008 1.633,0.077 2.488,1.428 3.054,2.321 1.012,1.594 1.47,2.743 1.774,3.505 0.11,0.279 0.236,0.592 0.3,0.689 0.526,0.774 4.803,0.05 6.415,-0.213 3.619,-0.604 6.751,-1.126 8.042,1.157 0.925,1.633 0.238,3.791 -2.103,6.589 -0.729,0.871 -1.505,1.532 -2.194,2.051 0.571,0.34 1.081,0.863 1.288,1.683h0c0.487,1.942 -1.182,3.888 -4.96,5.792 -0.938,0.476 -2.201,1.11 -3.971,1.416 -0.834,0.143 -1.584,0.178 -2.227,0.197 -0.014,0.371 -0.101,0.774 -0.327,1.188 -0.664,1.219 -2.045,1.799 -4.126,1.66 -2.29,-0.12 -4.176,-0.557 -5.84,-0.94 -1.453,-0.333 -2.704,-0.615 -3.687,-0.549 -1.822,0.147 -3.227,1.606 -4.875,3.497l-4.115,4.809h-0Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + fillAlpha = 0.9f + ) + addPath( + pathData = PathParser().parsePathString( + "M61.531,222.701l-7.523,2.901 -0.692,-0.243c-3.198,-1.123 -6.097,-1.363 -8.618,-0.714 -0.401,0.103 -0.796,0.227 -1.199,0.353 -1.597,0.499 -3.582,1.119 -6.2,0.686 -1.46,-0.245 -4.917,-1.103 -5.193,-3.682 -0.082,-0.693 0.093,-1.278 0.351,-1.756 -0.105,-0.033 -0.21,-0.067 -0.323,-0.103 -1.381,-0.464 -2.047,-0.943 -2.688,-1.405 -0.493,-0.355 -1.001,-0.721 -2.107,-1.215 -0.485,-0.217 -0.902,-0.375 -1.253,-0.509 -1.063,-0.407 -2.349,-0.966 -2.718,-2.449 -0.339,-1.599 0.75,-2.768 1.471,-3.543 1.285,-1.383 2.28,-2.118 2.941,-2.605 0.241,-0.177 0.513,-0.378 0.59,-0.465 0.615,-0.705 -1.17,-4.659 -1.833,-6.151 -1.502,-3.348 -2.801,-6.245 -0.921,-8.072 1.345,-1.309 3.607,-1.192 6.907,0.363 1.027,0.485 1.864,1.067 2.54,1.602 0.185,-0.638 0.56,-1.265 1.301,-1.673h0c1.755,-0.964 4.061,0.157 6.86,3.329 0.698,0.787 1.632,1.848 2.377,3.482 0.35,0.77 0.574,1.487 0.756,2.104 0.363,-0.081 0.774,-0.099 1.232,0.015 1.347,0.333 2.259,1.521 2.652,3.57 0.465,2.246 0.52,4.181 0.572,5.888 0.047,1.49 0.091,2.772 0.404,3.706 0.604,1.725 2.372,2.714 4.62,3.828l5.695,2.76 -0,0Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M57.368,199.096l-0.898,-8.012 0.41,-0.607c1.898,-2.809 2.865,-5.552 2.876,-8.156 0.002,-0.414 -0.017,-0.828 -0.037,-1.25 -0.077,-1.671 -0.174,-3.749 0.909,-6.171 0.607,-1.35 2.314,-4.476 4.879,-4.089 0.691,0.097 1.213,0.414 1.609,0.785 0.058,-0.093 0.118,-0.186 0.182,-0.286 0.799,-1.219 1.431,-1.741 2.041,-2.244 0.468,-0.387 0.952,-0.785 1.71,-1.729 0.333,-0.414 0.592,-0.778 0.811,-1.083 0.664,-0.925 1.53,-2.027 3.058,-2.008 1.633,0.077 2.488,1.428 3.054,2.321 1.012,1.594 1.47,2.743 1.774,3.505 0.11,0.279 0.236,0.592 0.3,0.689 0.526,0.774 4.803,0.05 6.415,-0.213 3.619,-0.604 6.751,-1.126 8.042,1.157 0.925,1.633 0.238,3.791 -2.103,6.589 -0.729,0.871 -1.505,1.532 -2.194,2.051 0.571,0.34 1.081,0.863 1.288,1.683h0c0.487,1.942 -1.182,3.888 -4.96,5.792 -0.938,0.476 -2.201,1.11 -3.971,1.416 -0.834,0.143 -1.584,0.178 -2.227,0.197 -0.014,0.371 -0.101,0.774 -0.327,1.188 -0.664,1.219 -2.045,1.799 -4.126,1.66 -2.29,-0.12 -4.176,-0.557 -5.84,-0.94 -1.453,-0.333 -2.704,-0.615 -3.687,-0.549 -1.822,0.147 -3.227,1.606 -4.875,3.497l-4.115,4.809h-0Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M65.566,354.625l-1.679,-1.052 -0.406,-1.938 0.406,1.938 -1.958,0.224c-0.031,-0.182 -0.137,-0.6 -0.298,-1.254 -0.876,-3.583 -3.548,-14.485 -5.776,-31.655 -1.555,-11.986 -2.435,-24.308 -2.617,-36.631 -0.182,-12.342 0.402,-21.685 0.871,-29.194 0.354,-5.664 0.783,-11.057 1.205,-16.311 1.122,-14.036 2.18,-27.295 1.393,-41.973 -0.174,-3.277 -0.54,-10.098 -4.525,-17.356 -2.312,-4.209 -5.496,-7.947 -9.465,-11.104l2.468,-3.103c4.381,3.49 7.904,7.629 10.471,12.303 4.418,8.047 4.817,15.479 5.008,19.05 0.801,14.938 -0.269,28.324 -1.402,42.496 -0.418,5.235 -0.847,10.605 -1.199,16.245 -0.464,7.44 -1.043,16.702 -0.863,28.885 0.178,12.175 1.048,24.347 2.582,36.182 2.201,16.953 4.834,27.693 5.699,31.222 0.46,1.884 0.557,2.279 0.085,3.025v-0Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M35.45,174.614c-0.162,0 -0.327,-0.004 -0.493,-0.015 -3.374,-0.182 -6.498,-2.201 -9.287,-6.001 -1.308,-1.787 -1.977,-3.826 -3.312,-7.893 -0.207,-0.627 -1.213,-3.807 -1.824,-8.183 -0.4,-2.859 -0.35,-4.055 0.217,-5.111 0.629,-1.176 1.646,-1.996 2.791,-2.55 -0.05,-0.379 -0.01,-0.77 0.155,-1.168 0.675,-1.652 2.47,-1.435 3.441,-1.331 0.491,0.062 1.105,0.143 1.766,0.108 1.041,-0.05 1.6,-0.36 2.447,-0.824 0.811,-0.445 1.818,-0.998 3.314,-1.304 2.948,-0.615 5.418,0.221 6.233,0.495 4.285,1.428 6.397,4.759 8.842,8.616 0.487,0.774 2.161,3.59 3.265,7.451 0.797,2.786 0.685,4.024 0.445,4.944 -0.487,1.892 -1.638,2.975 -4.561,5.366 -3.053,2.503 -4.585,3.757 -5.9,4.519 -3.062,1.768 -4.985,2.878 -7.538,2.878v0Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.tertiary), + ) + addPath( + pathData = PathParser().parsePathString( + "M0.256,352.886c0,0.66 0.53,1.19 1.19,1.19H523.736c0.66,0 1.19,-0.53 1.19,-1.19 0,-0.66 -0.53,-1.19 -1.19,-1.19H1.446c-0.66,0 -1.19,0.53 -1.19,1.19Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M139.42,125.818m-31.352,0a31.352,31.352 0,1 1,62.705 0a31.352,31.352 0,1 1,-62.705 0" + ).toNodes(), + fill = SolidColor(Color(0xffffd1a5)), + ) + addPath( + pathData = PathParser().parsePathString( + "M384.959,336.455l-32.289,-33.051l-16.668,17.386l24.056,31.69l23.861,2.729l1.039,-18.754z" + ).toNodes(), + fill = SolidColor(Color(0xffffd1a5)), + ) + addPath( + pathData = PathParser().parsePathString( + "M200.59,274.477c1.889,0.157 7.89,1.359 13.626,-1.797 3.915,-2.154 5.923,-5.356 6.601,-6.375 8.413,-12.635 40.704,-32.339 69.684,-33.551 6.563,-0.275 10.883,0.486 14.809,2.533 5.567,2.902 7.79,7.059 14.855,16.798 3.865,5.327 8.141,10.345 12.052,15.638 22.898,30.987 31.578,33.419 30.691,43.353 -0.984,11.022 -12.872,21.479 -20.772,20.272 -3.236,-0.494 -4.489,-2.744 -8.811,-7.299 -12.675,-13.354 -17.919,-10.887 -26.943,-21.116 -10.536,-11.942 -9.157,-21.844 -14.653,-22.227 -5.097,-0.355 -7.264,8.093 -18.146,19.314 -4.98,5.135 -8.526,7.49 -19.329,14.985 -42.07,29.186 -42.741,31.237 -51.231,33.565 -3.715,1.018 -30.079,8.247 -39.471,-3.256 -14.697,-18 20.024,-72.251 37.041,-70.837Z" + ).toNodes(), + fill = SolidColor(Color(0xff2f2e41)), + ) + addPath( + pathData = PathParser().parsePathString( + "M375.088,343.924c2.375,-1.066 5.151,-2.313 6.045,-5.18 0.604,-1.94 0.256,-4.332 -0.993,-5.985 -1.442,-1.907 -3.575,-2.159 -3.489,-2.496 0.131,-0.514 5.177,-0.313 10.716,1.645 1.045,0.369 5.781,2.1 11.804,6.802 4.826,3.768 4.177,4.523 7.203,6.695 9.29,6.669 18.002,1.413 23.029,7.667 1.94,2.414 2.767,5.84 1.951,8.611 -1.64,5.564 -9.612,7.479 -13.97,8.468 -10.494,2.381 -18.438,0.437 -26.732,-0.96 -28.207,-4.753 -44.056,-0.424 -46.177,-6.959 -0.401,-1.237 0.251,-1.131 2.426,-10.208 2.147,-8.958 2.076,-11.418 3.904,-12.136 2.752,-1.08 4.6,3.832 11.532,5.513 6.143,1.49 11.212,-0.787 12.751,-1.477Z" + ).toNodes(), + fill = SolidColor(Color(0xff2f2e41)), + ) + addPath( + pathData = PathParser().parsePathString( + "M327.555,444.578l-8.158,-45.479l-23.555,5.027l2.11,39.73l18.212,15.657l11.391,-14.935z" + ).toNodes(), + fill = SolidColor(Color(0xffffd1a5)), + ) + addPath( + pathData = PathParser().parsePathString( + "M209.802,289.764c1.475,1.19 5.765,5.555 12.284,6.165 4.449,0.416 7.909,-1.106 9.042,-1.568 14.056,-5.731 51.84,-3.902 76.5,11.368 5.585,3.458 8.732,6.513 10.832,10.411 2.977,5.528 2.482,10.216 2.859,22.241 0.206,6.578 0.927,13.132 1.191,19.707 1.546,38.498 7.363,45.385 1.051,53.107 -7.004,8.567 -22.712,10.545 -28.572,5.11 -2.4,-2.226 -2.173,-4.791 -3.193,-10.987 -2.989,-18.168 -8.714,-19.071 -10.437,-32.602 -2.012,-15.798 4.69,-23.217 0.356,-26.62 -4.019,-3.156 -10.555,2.617 -25.861,5.792 -7.004,1.453 -11.261,1.41 -24.408,1.545 -51.2,0.526 -52.907,1.846 -61.239,-0.995 -3.646,-1.243 -29.52,-10.067 -30.832,-24.859 -2.053,-23.147 57.14,-48.54 70.427,-37.814Z" + ).toNodes(), + fill = SolidColor(Color(0xff2f2e41)), + ) + addPath( + pathData = PathParser().parsePathString( + "M315.193,445.215c2.564,0.451 5.561,0.979 7.911,-0.892 1.59,-1.266 2.645,-3.441 2.539,-5.51 -0.122,-2.388 -1.746,-3.794 -1.485,-4.025 0.397,-0.351 4.46,2.648 7.944,7.379 0.657,0.893 3.604,4.983 5.948,12.257 1.878,5.828 0.916,6.088 2.2,9.585 3.942,10.734 14.103,11.278 14.75,19.276 0.25,3.086 -0.99,6.387 -3.221,8.221 -4.481,3.684 -12.154,0.791 -16.315,-0.838 -10.021,-3.923 -15.502,-9.992 -21.58,-15.806 -20.671,-19.773 -36.216,-25.09 -34.302,-31.688 0.362,-1.249 0.843,-0.795 7.739,-7.084 6.806,-6.207 8.13,-8.282 10.045,-7.849 2.883,0.652 1.654,5.754 6.447,11.037 4.247,4.682 9.719,5.645 11.381,5.938Z" + ).toNodes(), + fill = SolidColor(Color(0xff2f2e41)), + ) + addPath( + pathData = PathParser().parsePathString( + "M143.694,131.812c1.221,-4.366 -0.312,-5.957 1.25,-7.917 0,-0 0.629,-0.789 6.25,-2.917h0c-1.659,-9.623 -0.417,-11.25 -0.417,-11.251 1.431,-1.875 4.298,-2.329 6.25,-2.083 4.128,0.519 4.859,4.251 7.5,4.167 3.649,-0.116 8.025,-7.42 6.667,-13.751 -1.108,-5.164 -5.886,-8.999 -7.084,-8.334 -1.188,0.66 -5.462,-2.25 -7.084,-1.667 -1.107,0.398 -6.319,-0.132 -7.5,0.417 -1.29,0.599 -4.986,4.326 -5.339,3.857 -2.455,-3.264 -2.403,-4.403 -3.828,-5.107 -2.524,-1.246 -5.269,1.057 -10,3.333 -9.736,4.683 -12.587,1.89 -17.084,5.834 -2.272,1.992 -3.49,5.8 -5.834,13.334 -3.278,10.536 -4.916,15.804 -3.333,20.834 1.614,5.13 3.992,4.013 7.5,11.251 3.906,8.056 2.56,12.739 6.25,14.584 2.852,1.426 7.436,0.518 9.167,-2.083 2.963,-4.455 -4.696,-10.481 -2.083,-17.501 1.604,-4.309 6.55,-7.577 9.584,-6.667 3.43,1.029 3.683,7.179 5.834,7.084 1.842,-0.081 3.121,-4.656 3.333,-5.417Z" + ).toNodes(), + fill = SolidColor(Color(0xff2f2e41)), + ) + addPath( + pathData = PathParser().parsePathString( + "M119.943,161.813c6.416,-7.194 32.549,0.252 35.002,11.667 1.009,4.695 -2.716,6.678 -1.667,12.084 1.534,7.907 10.22,7.368 16.667,15.417 9.153,11.427 -0.276,22.598 10,41.669 2.196,4.075 4.047,7.51 7.917,10.834 8.881,7.628 17.146,5.012 21.668,12.084 3.382,5.289 1.992,11.807 1.667,13.334 -1.335,6.261 -4.952,7.787 -7.5,12.917 -4.24,8.536 0.561,14.803 0.833,25.001 0.341,12.76 -6.44,30.448 -20.001,36.252 -15.235,6.52 -33.61,-4.279 -42.502,-15.001 -5.306,-6.398 -6.846,-12.3 -9.167,-19.584 -10.374,-32.556 -16.235,-29.612 -24.168,-55.419 -9.069,-29.503 -10.852,-64.066 0,-75.004 1.438,-1.45 5.397,-4.8 7.917,-10.834 3.391,-8.119 0.462,-12.197 3.333,-15.417Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + addPath( + pathData = PathParser().parsePathString( + "M323.709,189.636c1.577,10.357 -5.566,20.067 -15.923,21.644 -10.357,1.577 -20.067,-5.566 -21.644,-15.923 -1.577,-10.357 5.566,-20.067 15.923,-21.644 10.357,-1.577 20.067,5.566 21.644,15.923ZM288.119,195.056c1.411,9.267 10.098,15.658 19.366,14.247s15.658,-10.098 14.247,-19.366 -10.098,-15.658 -19.366,-14.247 -15.658,10.098 -14.247,19.366Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M295.195,193.978c0.817,5.365 5.846,9.065 11.212,8.248s9.065,-5.846 8.248,-11.212c-0.817,-5.365 -5.846,-9.065 -11.212,-8.248 -5.365,0.817 -9.065,5.846 -8.248,11.212Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.onSurface), + ) + addPath( + pathData = PathParser().parsePathString( + "M380.757,32.786c2.365,15.533 16.926,26.245 32.459,23.879 15.533,-2.365 26.245,-16.926 23.879,-32.459 -2.365,-15.533 -16.926,-26.245 -32.459,-23.879 -15.533,2.365 -26.245,16.926 -23.879,32.459Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.primary), + ) + addPath( + pathData = PathParser().parsePathString( + "M274.472,187.715c7.836,-1.811 15.123,0.764 16.274,5.751 1.152,4.987 -4.267,10.497 -12.106,12.308 -3.122,0.766 -6.381,0.774 -9.506,0.022l-33.299,7.255 -2.835,-13.175 32.917,-8.009c2.479,-2.047 5.413,-3.471 8.555,-4.152Z" + ).toNodes(), + fill = SolidColor(Color(0xffffd1a5)), + ) + addPath( + pathData = PathParser().parsePathString( + "M115.422,196.836c0.206,-0.923 2.128,-8.941 9.275,-12.594 8.21,-4.196 17.273,0.457 20.451,2.089 7.343,3.77 7.184,7.268 13.688,12.452 12.167,9.699 27.814,9.486 36.458,9.369 2.992,-0.041 12.233,-0.346 23.823,-4.155 22.54,-7.408 36.939,-16.705 36.939,-16.705l5.916,20.046s-17.454,19.289 -38.381,28.079c-21.466,9.016 -82.691,9.611 -97.194,8.883 -1.249,-0.063 18.634,1.856 -0.833,-21.492 -4.44,-5.326 -12.576,-15.084 -10.142,-25.971Z" + ).toNodes(), + fill = SolidColor(MaterialTheme.colorScheme.secondary), + ) + }.build() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/_DrawableVectors.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/_DrawableVectors.kt new file mode 100644 index 000000000..12a65b2f2 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/svg/_DrawableVectors.kt @@ -0,0 +1,3 @@ +package com.drdisagree.iconify.core.ui.components.svg + +object DynamicColorImageVectors \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/texts/AutoResizeableText.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/texts/AutoResizeableText.kt new file mode 100644 index 000000000..9c115a6f4 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/texts/AutoResizeableText.kt @@ -0,0 +1,117 @@ +package com.drdisagree.iconify.core.ui.components.texts + +import androidx.compose.foundation.text.TextAutoSize +import androidx.compose.material3.LocalContentColor +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.Paragraph +import androidx.compose.ui.text.TextLayoutResult +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.TextUnit +import androidx.compose.ui.unit.sp + +/** + * This is just the normal [Text] composable with [TextAutoSize] enabled and [maxLines] set to 1 by default + * + * The default [style] uses the [LocalTextStyle] provided by the [MaterialTheme] / components. If + * you are setting your own style, you may want to consider first retrieving [LocalTextStyle], and + * using [TextStyle.copy] to keep any theme defined attributes, only modifying the specific + * attributes you want to override. + * + * For ease of use, commonly used parameters from [TextStyle] are also present here. The order of + * precedence is as follows: + * - If a parameter is explicitly set here (i.e, it is _not_ `null` or [TextUnit.Unspecified]), then + * this parameter will always be used. + * - If a parameter is _not_ set, (`null` or [TextUnit.Unspecified]), then the corresponding value + * from [style] will be used instead. + * + * Additionally, for [color], if [color] is not set, and [style] does not have a color, then + * [LocalContentColor] will be used. + * + * @param text the text to be displayed + * @param modifier the [Modifier] to be applied to this layout node + * @param color [Color] to apply to the text. If [Color.Unspecified], and [style] has no color set, + * this will be [LocalContentColor]. + * @param fontSize the size of glyphs to use when painting the text. See [TextStyle.fontSize]. + * @param fontStyle the typeface variant to use when drawing the letters (e.g., italic). See + * [TextStyle.fontStyle]. + * @param fontWeight the typeface thickness to use when painting the text (e.g., [FontWeight.Bold]). + * @param fontFamily the font family to be used when rendering the text. See [TextStyle.fontFamily]. + * @param letterSpacing the amount of space to add between each letter. See + * [TextStyle.letterSpacing]. + * @param textDecoration the decorations to paint on the text (e.g., an underline). See + * [TextStyle.textDecoration]. + * @param textAlign the alignment of the text within the lines of the paragraph. See + * [TextStyle.textAlign]. + * @param lineHeight line height for the [Paragraph] in [TextUnit] unit, e.g. SP or EM. See + * [TextStyle.lineHeight]. + * @param overflow how visual overflow should be handled. + * @param softWrap whether the text should break at soft line breaks. If false, the glyphs in the + * text will be positioned as if there was unlimited horizontal space. If [softWrap] is false, + * [overflow] and TextAlign may have unexpected effects. + * @param maxLines An optional maximum number of lines for the text to span, wrapping if necessary. + * If the text exceeds the given number of lines, it will be truncated according to [overflow] and + * [softWrap]. It is required that 1 <= [minLines] <= [maxLines]. + * @param minLines The minimum height in terms of minimum number of visible lines. It is required + * that 1 <= [minLines] <= [maxLines]. + * @param onTextLayout callback that is executed when a new text layout is calculated. A + * [TextLayoutResult] object that callback provides contains paragraph information, size of the + * text, baselines and other details. The callback can be used to add additional decoration or + * functionality to the text. For example, to draw selection around the text. + * @param style style configuration for the text such as color, font, line height etc. + */ +@Composable +fun AutoResizeableText( + text: String, + modifier: Modifier = Modifier, + color: Color = Color.Unspecified, + fontSize: TextUnit = TextUnit.Unspecified, + fontStyle: FontStyle? = null, + fontWeight: FontWeight? = null, + fontFamily: FontFamily? = null, + letterSpacing: TextUnit = TextUnit.Unspecified, + textDecoration: TextDecoration? = null, + textAlign: TextAlign? = null, + lineHeight: TextUnit = TextUnit.Unspecified, + overflow: TextOverflow = TextOverflow.Clip, + softWrap: Boolean = true, + maxLines: Int = 1, + minLines: Int = 1, + onTextLayout: ((TextLayoutResult) -> Unit)? = null, + style: TextStyle = LocalTextStyle.current, + minFontSize: TextUnit = 6.sp +) { + Text( + text = text, + modifier = modifier, + color = color, + fontSize = fontSize, + fontStyle = fontStyle, + fontWeight = fontWeight, + fontFamily = fontFamily, + letterSpacing = letterSpacing, + textDecoration = textDecoration, + textAlign = textAlign, + lineHeight = lineHeight, + overflow = overflow, + softWrap = softWrap, + maxLines = maxLines, + minLines = minLines, + onTextLayout = onTextLayout, + style = style, + autoSize = TextAutoSize.StepBased( + maxFontSize = style.fontSize, + minFontSize = minFontSize, + ) + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/components/topappbar/CollapsingTopAppBar.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/components/topappbar/CollapsingTopAppBar.kt new file mode 100644 index 000000000..e6aa87047 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/components/topappbar/CollapsingTopAppBar.kt @@ -0,0 +1,129 @@ +package com.drdisagree.iconify.core.ui.components.topappbar + +import androidx.annotation.DrawableRes +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.scaleIn +import androidx.compose.animation.scaleOut +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.IconButtonDefaults +import androidx.compose.material3.LargeFlexibleTopAppBar +import androidx.compose.material3.LocalContentColor +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TopAppBarDefaults +import androidx.compose.material3.TopAppBarScrollBehavior +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.input.nestedscroll.nestedScroll +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.ui.util.lerp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalDarkMode +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.others.withHaptic + +@Composable +@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class) +fun CollapsingTopAppBar( + scrollBehavior: TopAppBarScrollBehavior, + title: String, + subtitle: String = "", + @DrawableRes backIcon: Int? = null, + showBackIcon: Boolean = false, + onBackClick: (() -> Unit)? = null, + actions: @Composable RowScope.() -> Unit = {}, +) { + val isDarkTheme = LocalDarkMode.current + val navController = LocalNavController.current + val expandedFontSize = 32.sp + val collapsedFontSize = 22.sp + val fontSize by animateFloatAsState( + targetValue = lerp( + expandedFontSize.value, + collapsedFontSize.value, + scrollBehavior.state.collapsedFraction + ), + label = "fontSizeAnimation" + ) + + var backVisible by rememberSaveable { mutableStateOf(false) } + + LaunchedEffect(showBackIcon) { + if (showBackIcon) { + backVisible = true + } else if (backVisible) { + backVisible = false + } + } + + LargeFlexibleTopAppBar( + title = { + Text( + title, + style = MaterialTheme.typography.titleLarge.copy(fontSize = fontSize.sp) + ) + }, + subtitle = { + if (subtitle.isNotEmpty()) { + Text( + subtitle, + color = MaterialTheme.colorScheme.onSurface.secondaryText(), + style = MaterialTheme.typography.bodyMedium + ) + } + }, + navigationIcon = { + AnimatedVisibility( + visible = backVisible, + enter = fadeIn() + scaleIn(), + exit = fadeOut() + scaleOut(), + ) { + IconButton( + onClick = withHaptic { + onBackClick?.invoke() + ?: navController.popBackStack() + }, + modifier = Modifier + .padding(start = 16.dp, end = 4.dp) + .size(40.dp), + colors = IconButtonDefaults.iconButtonColors( + containerColor = if (isDarkTheme) MaterialTheme.colorScheme.surfaceBright + else MaterialTheme.colorScheme.surface, + contentColor = MaterialTheme.colorScheme.onSurface + ), + ) { + Icon( + painter = painterResource( + backIcon + ?: R.drawable.ic_home_as_up_indicator + ), + contentDescription = "Navigate back", + modifier = Modifier.size(24.dp), + tint = LocalContentColor.current + ) + } + } + }, + actions = actions, + scrollBehavior = scrollBehavior, + windowInsets = TopAppBarDefaults.windowInsets, + modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection) + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/permission/NotificationPermissionLauncher.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/permission/NotificationPermissionLauncher.kt new file mode 100644 index 000000000..fd3fde59d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/permission/NotificationPermissionLauncher.kt @@ -0,0 +1,41 @@ +package com.drdisagree.iconify.core.ui.permission + +import android.Manifest +import android.content.pm.PackageManager +import androidx.activity.compose.rememberLauncherForActivityResult +import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.platform.LocalContext +import androidx.core.content.ContextCompat + +@Composable +fun rememberNotificationPermissionLauncher( + onGranted: () -> Unit = {}, + onDenied: () -> Unit = {} +): () -> Unit { + val context = LocalContext.current + + val launcher = rememberLauncherForActivityResult( + contract = ActivityResultContracts.RequestPermission() + ) { granted -> + if (granted) onGranted() else onDenied() + } + + return remember { + { + when { + ContextCompat.checkSelfPermission( + context, + Manifest.permission.POST_NOTIFICATIONS + ) == PackageManager.PERMISSION_GRANTED -> { + onGranted() + } + + else -> { + launcher.launch(Manifest.permission.POST_NOTIFICATIONS) + } + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/permission/StoragePermissionLauncher.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/permission/StoragePermissionLauncher.kt new file mode 100644 index 000000000..705f93292 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/permission/StoragePermissionLauncher.kt @@ -0,0 +1,72 @@ +package com.drdisagree.iconify.core.ui.permission + +import android.Manifest +import android.content.Intent +import android.net.Uri +import android.os.Build +import android.os.Environment +import android.provider.Settings +import androidx.activity.compose.rememberLauncherForActivityResult +import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalContext + +@Composable +fun rememberStoragePermissionLauncher( + onGranted: () -> Unit, + onDenied: () -> Unit = {} +): () -> Unit { + val context = LocalContext.current + + // Legacy storage permissions (Android ≤ 12) + val legacyPermissionLauncher = rememberLauncherForActivityResult( + ActivityResultContracts.RequestMultiplePermissions() + ) { result -> + if (result.values.all { it }) { + onGranted() + } else { + onDenied() + } + } + + // MANAGE_EXTERNAL_STORAGE (Android 11+) + val manageAllFilesLauncher = rememberLauncherForActivityResult( + ActivityResultContracts.StartActivityForResult() + ) { + if (Environment.isExternalStorageManager()) { + onGranted() + } else { + onDenied() + } + } + + return { + when { + Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> { + if (!Environment.isExternalStorageManager()) { + val intent = Intent( + Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION + ).apply { + data = Uri.fromParts( + "package", + context.packageName, + null + ) + } + manageAllFilesLauncher.launch(intent) + } else { + onGranted() + } + } + + else -> { + legacyPermissionLauncher.launch( + arrayOf( + Manifest.permission.READ_EXTERNAL_STORAGE, + Manifest.permission.WRITE_EXTERNAL_STORAGE + ) + ) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Color.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Color.kt new file mode 100644 index 000000000..9b0c24a0d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Color.kt @@ -0,0 +1,11 @@ +package com.drdisagree.iconify.core.ui.theme + +import androidx.compose.ui.graphics.Color + +val Purple80 = Color(0xFFD0BCFF) +val PurpleGrey80 = Color(0xFFCCC2DC) +val Pink80 = Color(0xFFEFB8C8) + +val Purple40 = Color(0xFF6650a4) +val PurpleGrey40 = Color(0xFF625b71) +val Pink40 = Color(0xFF7D5260) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Theme.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Theme.kt new file mode 100644 index 000000000..9f07a4151 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Theme.kt @@ -0,0 +1,177 @@ +package com.drdisagree.iconify.core.ui.theme + +import android.app.Activity +import androidx.appcompat.app.AppCompatDelegate +import androidx.compose.animation.animateColorAsState +import androidx.compose.animation.core.AnimationSpec +import androidx.compose.animation.core.FastOutSlowInEasing +import androidx.compose.animation.core.tween +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.ColorScheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Shapes +import androidx.compose.material3.dynamicDarkColorScheme +import androidx.compose.material3.dynamicLightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.SideEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalView +import androidx.compose.ui.unit.dp +import androidx.core.view.WindowCompat +import com.drdisagree.iconify.core.common.LocalDarkMode +import com.drdisagree.iconify.core.common.LocalSettings +import com.drdisagree.iconify.data.states.SettingsState +import com.materialkolor.dynamiccolor.ColorSpec +import com.materialkolor.rememberDynamicColorScheme + +@Composable +private fun ColorScheme.animate( + spec: AnimationSpec = tween(durationMillis = 400, easing = FastOutSlowInEasing) +): ColorScheme { + @Composable + fun Color.anim() = animateColorAsState(this, spec).value + return copy( + primary = primary.anim(), + onPrimary = onPrimary.anim(), + primaryContainer = primaryContainer.anim(), + onPrimaryContainer = onPrimaryContainer.anim(), + secondary = secondary.anim(), + onSecondary = onSecondary.anim(), + secondaryContainer = secondaryContainer.anim(), + onSecondaryContainer = onSecondaryContainer.anim(), + tertiary = tertiary.anim(), + onTertiary = onTertiary.anim(), + tertiaryContainer = tertiaryContainer.anim(), + onTertiaryContainer = onTertiaryContainer.anim(), + error = error.anim(), + onError = onError.anim(), + errorContainer = errorContainer.anim(), + onErrorContainer = onErrorContainer.anim(), + background = background.anim(), + onBackground = onBackground.anim(), + surface = surface.anim(), + onSurface = onSurface.anim(), + surfaceVariant = surfaceVariant.anim(), + onSurfaceVariant = onSurfaceVariant.anim(), + surfaceTint = surfaceTint.anim(), + surfaceBright = surfaceBright.anim(), + surfaceDim = surfaceDim.anim(), + surfaceContainer = surfaceContainer.anim(), + surfaceContainerLow = surfaceContainerLow.anim(), + surfaceContainerLowest = surfaceContainerLowest.anim(), + surfaceContainerHigh = surfaceContainerHigh.anim(), + surfaceContainerHighest = surfaceContainerHighest.anim(), + inverseSurface = inverseSurface.anim(), + inverseOnSurface = inverseOnSurface.anim(), + inversePrimary = inversePrimary.anim(), + outline = outline.anim(), + outlineVariant = outlineVariant.anim(), + scrim = scrim.anim(), + ) +} + +private val AppShapes = Shapes( + extraSmall = RoundedCornerShape(4.dp), + small = RoundedCornerShape(8.dp), + medium = RoundedCornerShape(16.dp), + large = RoundedCornerShape(24.dp), + extraLarge = RoundedCornerShape(28.dp) +) + +@Composable +fun getIsDarkTheme( + settingsState: SettingsState? = null +): Boolean { + val settings = settingsState ?: LocalSettings.current + val themeMode = settings.themeMode + + return when (themeMode) { + AppCompatDelegate.MODE_NIGHT_YES -> true + AppCompatDelegate.MODE_NIGHT_NO -> false + else -> isSystemInDarkTheme() + } +} + +@Composable +fun getColorScheme( + settingsState: SettingsState? = null +): ColorScheme { + val context = LocalContext.current + val settings = settingsState ?: LocalSettings.current + val isDynamicColor = settings.isDynamicColor + val seedColor = settings.seedColor + val themeMode = settings.themeMode + val paletteStyle = settings.paletteStyle + val amoledMode = settings.isAmoledTheme + val contrastLevel = settings.contrastLevel + val isExpressive = settings.isExpressive + + val isDarkTheme = when (themeMode) { + AppCompatDelegate.MODE_NIGHT_YES -> true + AppCompatDelegate.MODE_NIGHT_NO -> false + else -> isSystemInDarkTheme() + } + + val colorScheme = when { + isDynamicColor -> { + when { + isDarkTheme -> dynamicDarkColorScheme(context) + else -> dynamicLightColorScheme(context) + } + } + + else -> rememberDynamicColorScheme( + seedColor = Color(seedColor), + isDark = isDarkTheme, + isAmoled = amoledMode, + contrastLevel = contrastLevel, + style = paletteStyle, + specVersion = if (isExpressive) ColorSpec.SpecVersion.SPEC_2025 + else ColorSpec.SpecVersion.SPEC_2021, + ) + } + return colorScheme +} + +@Composable +fun MyAppTheme( + darkTheme: Boolean = LocalDarkMode.current, + content: @Composable () -> Unit +) { + val view = LocalView.current + + val targetScheme = getColorScheme() + var hasRenderedOnce by rememberSaveable { mutableStateOf(false) } + + val colorScheme = if (hasRenderedOnce) { + targetScheme.animate() + } else { + targetScheme + } + + LaunchedEffect(Unit) { + hasRenderedOnce = true + } + + if (!view.isInEditMode) { + val window = (view.context as Activity).window + + SideEffect { + WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme + } + } + + MaterialTheme( + colorScheme = colorScheme, + typography = Typography, + shapes = AppShapes, + content = content + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Type.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Type.kt new file mode 100644 index 000000000..7a1622f2d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/theme/Type.kt @@ -0,0 +1,34 @@ +package com.drdisagree.iconify.core.ui.theme + +import androidx.compose.material3.Typography +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.sp + +// Set of Material typography styles to start with +val Typography = Typography( + bodyLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp + ) + /* Other default text styles to override + titleLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 22.sp, + lineHeight = 28.sp, + letterSpacing = 0.sp + ), + labelSmall = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Medium, + fontSize = 11.sp, + lineHeight = 16.sp, + letterSpacing = 0.5.sp + ) + */ +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/utils/ComposeUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/ComposeUtils.kt new file mode 100644 index 000000000..fbb86c40e --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/ComposeUtils.kt @@ -0,0 +1,34 @@ +package com.drdisagree.iconify.core.ui.utils + +import androidx.activity.ComponentActivity +import androidx.activity.compose.LocalActivity +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.navigationBars +import androidx.compose.foundation.layout.statusBars +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.unit.Dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.ViewModel + +/** + * Returns an existing Hilt ViewModel or creates a new one scoped to the Activity. + * This ensures the same instance is shared across all composables in the app. + */ +@Composable +inline fun sharedHiltViewModel(): T { + val activity = LocalActivity.current as? ComponentActivity + ?: throw IllegalStateException("LocalActivity is not a ComponentActivity or is null.") + + return hiltViewModel(activity) +} + +@Composable +fun statusBarHeight(): Dp { + return with(LocalDensity.current) { WindowInsets.statusBars.getTop(this).toDp() } +} + +@Composable +fun navigationBarHeight(): Dp { + return with(LocalDensity.current) { WindowInsets.navigationBars.getBottom(this).toDp() } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/utils/DragGestureInspector.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/DragGestureInspector.kt new file mode 100644 index 000000000..eeb441b78 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/DragGestureInspector.kt @@ -0,0 +1,85 @@ +package com.drdisagree.iconify.core.ui.utils + +import androidx.compose.foundation.gestures.awaitEachGesture +import androidx.compose.foundation.gestures.awaitFirstDown +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.input.pointer.AwaitPointerEventScope +import androidx.compose.ui.input.pointer.PointerEventPass +import androidx.compose.ui.input.pointer.PointerId +import androidx.compose.ui.input.pointer.PointerInputChange +import androidx.compose.ui.input.pointer.PointerInputScope +import androidx.compose.ui.input.pointer.changedToUpIgnoreConsumed +import androidx.compose.ui.input.pointer.positionChange +import androidx.compose.ui.util.fastFirstOrNull + +suspend fun PointerInputScope.inspectDragGestures( + onDragStart: (down: PointerInputChange) -> Unit = {}, + onDragEnd: (change: PointerInputChange) -> Unit = {}, + onDragCancel: () -> Unit = {}, + onDrag: (change: PointerInputChange, dragAmount: Offset) -> Unit +) { + awaitEachGesture { + val initialDown = awaitFirstDown(false, PointerEventPass.Initial) + + val down = awaitFirstDown(false) + val drag = initialDown + + onDragStart(down) + onDrag(drag, Offset.Zero) + val upEvent = + drag( + pointerId = drag.id, + onDrag = { onDrag(it, it.positionChange()) } + ) + if (upEvent == null) { + onDragCancel() + } else { + onDragEnd(upEvent) + } + } +} + +private suspend inline fun AwaitPointerEventScope.drag( + pointerId: PointerId, + onDrag: (PointerInputChange) -> Unit +): PointerInputChange? { + val isPointerUp = currentEvent.changes.fastFirstOrNull { it.id == pointerId }?.pressed != true + if (isPointerUp) { + return null + } + var pointer = pointerId + while (true) { + val change = awaitDragOrUp(pointer) ?: return null + if (change.isConsumed) { + return null + } + if (change.changedToUpIgnoreConsumed()) { + return change + } + onDrag(change) + pointer = change.id + } +} + +private suspend inline fun AwaitPointerEventScope.awaitDragOrUp( + pointerId: PointerId +): PointerInputChange? { + var pointer = pointerId + while (true) { + val event = awaitPointerEvent() + val dragEvent = event.changes.fastFirstOrNull { it.id == pointer } ?: return null + if (dragEvent.changedToUpIgnoreConsumed()) { + val otherDown = event.changes.fastFirstOrNull { it.pressed } + if (otherDown == null) { + return dragEvent + } else { + pointer = otherDown.id + } + } else { + val hasDragged = dragEvent.previousPosition != dragEvent.position + if (hasDragged) { + return dragEvent + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/utils/InteractiveHighlight.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/InteractiveHighlight.kt new file mode 100644 index 000000000..d9b94059b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/InteractiveHighlight.kt @@ -0,0 +1,119 @@ +package com.drdisagree.iconify.core.ui.utils + +import android.graphics.RuntimeShader +import android.os.Build +import androidx.compose.animation.core.Animatable +import androidx.compose.animation.core.VectorConverter +import androidx.compose.animation.core.VisibilityThreshold +import androidx.compose.animation.core.spring +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.drawWithContent +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.geometry.Size +import androidx.compose.ui.graphics.BlendMode +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.ShaderBrush +import androidx.compose.ui.graphics.toArgb +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.util.fastCoerceIn +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.launch + +class InteractiveHighlight( + val animationScope: CoroutineScope, + val color: Color = Color.White, + val position: (size: Size, offset: Offset) -> Offset = { _, offset -> offset } +) { + + private val pressProgressAnimationSpec = + spring(0.5f, 300f, 0.001f) + private val positionAnimationSpec = + spring(0.5f, 300f, Offset.VisibilityThreshold) + + private val pressProgressAnimation = + Animatable(0f, 0.001f) + private val positionAnimation = + Animatable(Offset.Zero, Offset.VectorConverter, Offset.VisibilityThreshold) + + private var startPosition = Offset.Zero + val pressProgress: Float get() = pressProgressAnimation.value + val offset: Offset get() = positionAnimation.value - startPosition + + private val shader = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + RuntimeShader( + """ +uniform float2 size; +layout(color) uniform half4 color; +uniform float radius; +uniform float2 position; + +half4 main(float2 coord) { + float dist = distance(coord, position); + float intensity = smoothstep(radius, radius * 0.5, dist); + return color * intensity; +}""" + ) + } else { + null + } + + val modifier: Modifier = Modifier.drawWithContent { + val progress = pressProgressAnimation.value + if (progress > 0f) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && shader != null) { + drawRect( + color.copy(0.08f * progress), + blendMode = BlendMode.Plus + ) + shader.apply { + val position = position(size, positionAnimation.value) + setFloatUniform("size", size.width, size.height) + setColorUniform("color", color.copy(0.15f * progress).toArgb()) + setFloatUniform("radius", size.minDimension * 1.5f) + setFloatUniform( + "position", + position.x.fastCoerceIn(0f, size.width), + position.y.fastCoerceIn(0f, size.height) + ) + } + drawRect( + ShaderBrush(shader), + blendMode = BlendMode.Plus + ) + } else { + drawRect( + color.copy(0.25f * progress), + blendMode = BlendMode.Plus + ) + } + } + + drawContent() + } + + val gestureModifier: Modifier = Modifier.pointerInput(animationScope) { + inspectDragGestures( + onDragStart = { down -> + startPosition = down.position + animationScope.launch { + launch { pressProgressAnimation.animateTo(1f, pressProgressAnimationSpec) } + launch { positionAnimation.snapTo(startPosition) } + } + }, + onDragEnd = { + animationScope.launch { + launch { pressProgressAnimation.animateTo(0f, pressProgressAnimationSpec) } + launch { positionAnimation.animateTo(startPosition, positionAnimationSpec) } + } + }, + onDragCancel = { + animationScope.launch { + launch { pressProgressAnimation.animateTo(0f, pressProgressAnimationSpec) } + launch { positionAnimation.animateTo(startPosition, positionAnimationSpec) } + } + } + ) { change, _ -> + animationScope.launch { positionAnimation.snapTo(change.position) } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/utils/PreferenceShapes.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/PreferenceShapes.kt new file mode 100644 index 000000000..965d80d9b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/PreferenceShapes.kt @@ -0,0 +1,49 @@ +package com.drdisagree.iconify.core.ui.utils + +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp + +val CARD_CORNER_LARGE: Dp = 24.dp +val CARD_CORNER_SMALL: Dp = 4.dp +val CARD_ITEM_SPACING: Dp = 2.dp + +enum class ItemPosition { SOLO, FIRST, MIDDLE, LAST } + +data class CardCorners( + val topStart: Dp, + val topEnd: Dp, + val bottomStart: Dp, + val bottomEnd: Dp, +) + +fun cardCorners(position: ItemPosition): CardCorners = when (position) { + ItemPosition.SOLO -> CardCorners( + CARD_CORNER_LARGE, CARD_CORNER_LARGE, + CARD_CORNER_LARGE, CARD_CORNER_LARGE + ) + + ItemPosition.FIRST -> CardCorners( + CARD_CORNER_LARGE, CARD_CORNER_LARGE, + CARD_CORNER_SMALL, CARD_CORNER_SMALL + ) + + ItemPosition.MIDDLE -> CardCorners( + CARD_CORNER_SMALL, CARD_CORNER_SMALL, + CARD_CORNER_SMALL, CARD_CORNER_SMALL + ) + + ItemPosition.LAST -> CardCorners( + CARD_CORNER_SMALL, CARD_CORNER_SMALL, + CARD_CORNER_LARGE, CARD_CORNER_LARGE + ) +} + +fun resolvePosition(visibleIndices: List, index: Int): ItemPosition { + if (visibleIndices.size <= 1) return ItemPosition.SOLO + + return when (index) { + visibleIndices.first() -> ItemPosition.FIRST + visibleIndices.last() -> ItemPosition.LAST + else -> ItemPosition.MIDDLE + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/ui/utils/RememberXmlPainter.kt b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/RememberXmlPainter.kt new file mode 100644 index 000000000..8a6e20568 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/ui/utils/RememberXmlPainter.kt @@ -0,0 +1,15 @@ +package com.drdisagree.iconify.core.ui.utils + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.graphics.painter.Painter +import androidx.compose.ui.platform.LocalContext +import androidx.core.content.ContextCompat +import com.google.accompanist.drawablepainter.rememberDrawablePainter + +@Composable +fun rememberXmlPainter(resId: Int): Painter { + val context = LocalContext.current + val drawable = remember(resId) { ContextCompat.getDrawable(context, resId) } + return rememberDrawablePainter(drawable) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/AbiUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/AbiUtils.kt new file mode 100644 index 000000000..81464c460 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/AbiUtils.kt @@ -0,0 +1,21 @@ +package com.drdisagree.iconify.core.utils + +import android.os.Build +import android.util.Log + +object AbiUtils { + + fun getSupportedAbi(): String? { + val supported = Build.SUPPORTED_ABIS + return when { + supported.contains("arm64-v8a") -> "arm64-v8a" + supported.contains("armeabi-v7a") -> "armeabi-v7a" + supported.contains("x86_64") -> "x86_64" + supported.contains("x86") -> "x86" + else -> { + Log.e("AbiUtils", "Unsupported ABI: ${supported.joinToString()}") + null + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/utils/AppUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/AppUtils.kt similarity index 63% rename from app/src/main/java/com/drdisagree/iconify/utils/AppUtils.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/AppUtils.kt index 243527b21..6db68083c 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/AppUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/AppUtils.kt @@ -1,19 +1,20 @@ -package com.drdisagree.iconify.utils +package com.drdisagree.iconify.core.utils import android.annotation.SuppressLint import android.app.Activity +import android.content.Context import android.content.Intent import android.content.pm.ApplicationInfo import android.content.pm.PackageManager import android.graphics.drawable.Drawable -import android.net.Uri -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 androidx.core.net.toUri import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.app.MainActivity import com.topjohnwu.superuser.Shell +import kotlin.system.exitProcess object AppUtils { @@ -23,15 +24,17 @@ object AppUtils { try { pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES) return pm.getApplicationInfo(packageName, 0).enabled - } catch (ignored: PackageManager.NameNotFoundException) { + } catch (_: 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") + 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 { @@ -40,7 +43,7 @@ object AppUtils { try { pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES) return pm.getApplicationInfo(packageName, 0).uid - } catch (ignored: PackageManager.NameNotFoundException) { + } catch (_: PackageManager.NameNotFoundException) { } return 0 @@ -52,7 +55,7 @@ object AppUtils { try { appIcon = appContext.packageManager.getApplicationIcon(packageName) - } catch (ignored: PackageManager.NameNotFoundException) { + } catch (_: PackageManager.NameNotFoundException) { } return appIcon @@ -64,7 +67,7 @@ object AppUtils { try { ai = pm.getApplicationInfo(packageName, 0) - } catch (ignored: PackageManager.NameNotFoundException) { + } catch (_: PackageManager.NameNotFoundException) { } return (if (ai == null) "Unavailable" else pm.getApplicationLabel(ai)) as String @@ -94,16 +97,16 @@ object AppUtils { } } - fun openUrl(activity: Activity, url: String) { + fun openUrl(context: Context, url: String) { try { - activity.startActivity( + context.startActivity( Intent(Intent.ACTION_VIEW).apply { - data = Uri.parse(url) + data = url.toUri() } ) - } catch (ignored: Exception) { + } catch (_: Exception) { Toast.makeText( - appContext, + context, appContext.resources.getString(R.string.toast_error), Toast.LENGTH_SHORT ).show() @@ -111,34 +114,32 @@ object AppUtils { } 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 try { + appContext + .packageManager + .getApplicationInfo(packageName!!, 0) + .splitSourceDirs + ?: arrayOf( + appContext + .packageManager + .getApplicationInfo(packageName, 0) + .sourceDir ) - } - return splitLocations - } catch (ignored: PackageManager.NameNotFoundException) { + } catch (_: PackageManager.NameNotFoundException) { + arrayOfNulls(0) } - - return arrayOfNulls(0) } - val isLsposedInstalled: Boolean - get() = RootUtils.fileExists("/data/adb/lspd/manager.apk") || RootUtils.fileExists("/data/adb/modules/*lsposed*/manager.apk") + 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) + val intent = Intent(activity, MainActivity::class.java).apply { + addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + } + activity.startActivity(intent) + activity.finish() + exitProcess(0) } } diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/AssetsUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/AssetsUtils.kt new file mode 100644 index 000000000..d1cd31cb4 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/AssetsUtils.kt @@ -0,0 +1,117 @@ +package com.drdisagree.iconify.core.utils + +import android.content.Context +import android.util.Log +import androidx.annotation.RawRes +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.data.common.Dynamic.DATA_DIR +import com.topjohnwu.superuser.Shell +import java.io.BufferedReader +import java.io.File +import java.io.IOException +import java.io.InputStream +import java.io.InputStreamReader +import java.io.OutputStream +import java.nio.file.Files +import java.nio.file.Paths + +object AssetsUtils { + + private const val TAG = "AssetsUtils" + + @Throws(IOException::class) + fun copyAssets(assetFolder: String) { + cleanAssetsDir(assetFolder) + createDir(assetFolder) + copyFileOrDirectory(appContext, assetFolder, "$DATA_DIR/$assetFolder") + } + + fun cleanAssetsDir(dirName: String) { + Shell.cmd("rm -rf $DATA_DIR/$dirName").exec() + } + + private fun createDir(dirName: String) { + val dir = File("$DATA_DIR/$dirName/") + + if (dir.exists() && !dir.isDirectory) { + dir.delete() + } + + if (!dir.exists()) { + val created = dir.mkdirs() + Log.d(TAG, "Created ${dir.absolutePath}: $created") + } + + Log.d(TAG, "Writable ${dir.absolutePath}: ${dir.canWrite()}") + + if (!dir.exists() || !dir.canWrite()) { + Shell.cmd( + "rm -rf $DATA_DIR/$dirName && mkdir -p $DATA_DIR/$dirName && chmod 644 $DATA_DIR/$dirName" + ).exec() + } + } + + @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 (_: IOException) { + File(outFileName).mkdir() + copyFileOrDirectory(context, inFileName, outFileName) + } + } + } + + private fun closeQuietly(autoCloseable: AutoCloseable?) { + try { + autoCloseable?.close() + } catch (_: Exception) { + } + } + + @Throws(IOException::class) + private fun copyAndClose(input: InputStream, output: OutputStream) { + copy(input, output) + closeQuietly(input) + closeQuietly(output) + } + + @Throws(IOException::class) + private 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 readJson(fileName: String): String { + val stringBuilder = StringBuilder() + val inputStream = appContext.assets.open(fileName) + val bufferedReader = BufferedReader(InputStreamReader(inputStream)) + var line: String? + while (bufferedReader.readLine().also { line = it } != null) { + stringBuilder.append(line) + } + bufferedReader.close() + return stringBuilder.toString() + } + + fun readRawResource(@RawRes resId: Int): String = appContext + .resources + .openRawResource(resId) + .bufferedReader() + .use { it.readText() } +} diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/CacheUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/CacheUtils.kt new file mode 100644 index 000000000..f94267002 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/CacheUtils.kt @@ -0,0 +1,81 @@ +package com.drdisagree.iconify.core.utils + +import android.content.ContentUris +import android.content.Context +import android.os.Environment +import android.provider.MediaStore +import android.util.Log +import com.drdisagree.iconify.data.common.XposedConst.XPOSED_RESOURCE_FOLDER_NAME +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) + + clearIconifyDownloadDir(context) + } 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 + } + } + + private fun clearIconifyDownloadDir(context: Context) { + try { + val resolver = context.contentResolver + val collection = MediaStore.Downloads.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY) + + val projection = arrayOf(MediaStore.Downloads._ID) + val selection = "${MediaStore.Downloads.RELATIVE_PATH} LIKE ?" + val selectionArgs = arrayOf("Download/$XPOSED_RESOURCE_FOLDER_NAME/%") + + resolver.query(collection, projection, selection, selectionArgs, null)?.use { cursor -> + val idCol = cursor.getColumnIndexOrThrow(MediaStore.Downloads._ID) + while (cursor.moveToNext()) { + val id = cursor.getLong(idCol) + val uri = ContentUris.withAppendedId(collection, id) + try { + resolver.delete(uri, null, null) + } catch (e: Exception) { + Log.e("Cache", "Failed to delete uri: $uri", e) + } + } + } + + val dir = File( + Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), + XPOSED_RESOURCE_FOLDER_NAME + ) + dir.deleteRecursively() // handles non-empty too, in case MediaStore missed anything + } catch (e: Exception) { + e.printStackTrace() + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/ColorUtils.kt similarity index 96% rename from app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtils.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/ColorUtils.kt index 46d688a35..97f780c0c 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/color/ColorUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/ColorUtils.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.color +package com.drdisagree.iconify.core.utils import android.content.Context import android.graphics.Color diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/FileUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/FileUtils.kt new file mode 100644 index 000000000..b10ef06ac --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/FileUtils.kt @@ -0,0 +1,87 @@ +package com.drdisagree.iconify.core.utils + +import android.content.ContentUris +import android.content.ContentValues +import android.provider.MediaStore +import android.util.Log +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import java.io.File + +object FileUtils { + + private const val TAG = "FileUtils" + + fun moveToIconifyDir( + sourceFile: File, + customFileName: String? = null + ): Boolean { + return try { + val resolver = appContext.contentResolver + + val fileName = customFileName ?: sourceFile.name + val relativePath = "Download/Iconify" // MediaStore RELATIVE_PATH + + // Delete existing file with same name + val collection = MediaStore.Downloads.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY) + val projection = arrayOf(MediaStore.Downloads._ID) + val selection = + "${MediaStore.Downloads.DISPLAY_NAME} = ? AND ${MediaStore.Downloads.RELATIVE_PATH} LIKE ?" + val selectionArgs = arrayOf(fileName, "$relativePath%") + + resolver.query(collection, projection, selection, selectionArgs, null)?.use { cursor -> + while (cursor.moveToNext()) { + val id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Downloads._ID)) + val existingUri = ContentUris.withAppendedId(collection, id) + try { + resolver.delete(existingUri, null, null) + } catch (_: Exception) { + /* ignore */ + } + } + } + + // Insert new file + val values = ContentValues().apply { + put(MediaStore.Downloads.DISPLAY_NAME, fileName) + put(MediaStore.Downloads.RELATIVE_PATH, relativePath) + put(MediaStore.Downloads.IS_PENDING, 1) + } + + val itemUri = resolver.insert(collection, values) ?: return false + + // Copy bytes + resolver.openOutputStream(itemUri)?.use { output -> + sourceFile.inputStream().use { input -> + input.copyTo(output) + } + } + + // Mark as ready + values.clear() + values.put(MediaStore.Downloads.IS_PENDING, 0) + resolver.update(itemUri, values, null, null) + + true + } catch (e: Exception) { + Log.e("FileCopy", "Failed to copy to Iconify folder", e) + false + } + } + + fun ensureDirs(vararg paths: String) { + paths.forEach { path -> + val dir = File(path) + + if (dir.exists() && !dir.isDirectory) { + dir.delete() + } + + if (!dir.exists()) { + val created = dir.mkdirs() + Log.d(TAG, "Created ${dir.absolutePath}: $created") + } + + Log.d(TAG, "Writable ${dir.absolutePath}: ${dir.canWrite()}") + } + } +} diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/HapticUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/HapticUtils.kt new file mode 100644 index 000000000..9499a97fb --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/HapticUtils.kt @@ -0,0 +1,15 @@ +package com.drdisagree.iconify.core.utils + +import android.view.HapticFeedbackConstants +import android.view.View + +object HapticUtils { + + fun View.weakHaptic() { + performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK) + } + + fun View.strongHaptic() { + performHapticFeedback(HapticFeedbackConstants.LONG_PRESS) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/utils/helper/Logger.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/Logger.kt similarity index 94% rename from app/src/main/java/com/drdisagree/iconify/utils/helper/Logger.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/Logger.kt index ddfa088bc..800b5ef86 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/helper/Logger.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/Logger.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.helper +package com.drdisagree.iconify.core.utils import android.os.Build import android.util.Log @@ -18,7 +18,7 @@ import java.util.Locale object Logger { - private val TAG = Logger::class.java.getSimpleName() + private val TAG = Logger::class.java.simpleName fun writeLog( tag: String, @@ -38,7 +38,7 @@ object Logger { for (line in fileContents) { log.append("\n\t").append(line) } - log.append('\n') + log.append("\n\n") log.append(tag).append(":\n") for (line in errorLog) { @@ -122,9 +122,9 @@ object Logger { val dF = SimpleDateFormat("dd-MM-yy_HH_mm_ss", Locale.getDefault()) val fileName = "iconify_logcat_" + dF.format(Date()) + ".txt" - val iconifyDir: File = File(DOCUMENTS_DIR, "Iconify") + val iconifyDir = File(DOCUMENTS_DIR, "Iconify") val file = File(iconifyDir, fileName) - val fw = FileWriter(file.getAbsoluteFile()) + val fw = FileWriter(file.absoluteFile) val bw = BufferedWriter(fw) bw.write(log.toString()) diff --git a/app/src/main/java/com/drdisagree/iconify/utils/ModuleUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/ModuleUtils.kt similarity index 51% rename from app/src/main/java/com/drdisagree/iconify/utils/ModuleUtils.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/ModuleUtils.kt index 7a4bf1c5c..8c160efc8 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/ModuleUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/ModuleUtils.kt @@ -1,17 +1,18 @@ -package com.drdisagree.iconify.utils +package com.drdisagree.iconify.core.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.data.common.Const.MAGISK_UPDATE_BINARY -import com.drdisagree.iconify.data.common.Const.POST_FS_DATA +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.app.MainActivity +import com.drdisagree.iconify.core.utils.AssetsUtils.readRawResource +import com.drdisagree.iconify.core.utils.RootUtils.setPermissions +import com.drdisagree.iconify.core.utils.overlay.FabricatedUtils +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils import com.drdisagree.iconify.data.common.Const.SYSTEMUI_PACKAGE -import com.drdisagree.iconify.data.common.Dynamic.skippedInstallation import com.drdisagree.iconify.data.common.Preferences.COLOR_ACCENT_PRIMARY import com.drdisagree.iconify.data.common.Preferences.COLOR_ACCENT_SECONDARY -import com.drdisagree.iconify.data.common.Preferences.FIRST_INSTALL import com.drdisagree.iconify.data.common.Preferences.RESTART_SYSUI_AFTER_BOOT import com.drdisagree.iconify.data.common.References.ICONIFY_COLOR_ACCENT_PRIMARY import com.drdisagree.iconify.data.common.References.ICONIFY_COLOR_ACCENT_SECONDARY @@ -19,13 +20,10 @@ import com.drdisagree.iconify.data.common.Resources import com.drdisagree.iconify.data.common.Resources.MODULE_DIR import com.drdisagree.iconify.data.common.Resources.TEMP_DIR import com.drdisagree.iconify.data.common.Resources.TEMP_MODULE_DIR -import com.drdisagree.iconify.data.config.RPrefs.getBoolean -import com.drdisagree.iconify.data.config.RPrefs.getString -import com.drdisagree.iconify.utils.RootUtils.setPermissions -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.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.data.keys.SettingsKey +import com.drdisagree.iconify.helpers.BackupRestore +import com.drdisagree.iconify.helpers.replaceAll import com.topjohnwu.superuser.Shell import net.lingala.zip4j.ZipFile import net.lingala.zip4j.model.ZipParameters @@ -35,132 +33,95 @@ import java.io.File object ModuleUtils { - private val TAG = ModuleUtils::class.java.getSimpleName() + private val TAG = ModuleUtils::class.java.simpleName - fun handleModule() { + fun handleModule(skippedInstallation: Boolean) { if (moduleExists()) { // Clean temporary directory Shell.cmd("rm -rf $TEMP_DIR").exec() // Backup necessary files - backupFiles() + BackupRestore.backupFiles() } - installModule() + installModule(skippedInstallation) } - private fun installModule() { + private fun installModule(skippedInstallation: Boolean) { Log.d(TAG, "Module does not exist, creating...") // Clean temporary directory - Shell.cmd("mkdir -p $TEMP_DIR").exec() - Shell.cmd("mkdir -p $TEMP_MODULE_DIR").exec() + FileUtils.ensureDirs( + TEMP_DIR, + TEMP_MODULE_DIR + ) + + val moduleProp = readRawResource(R.raw.module_module).replaceAll( + "{{VERSION_NAME}}" to BuildConfig.VERSION_NAME, + "{{VERSION_CODE}}" to BuildConfig.VERSION_CODE, + "{{APP_MOTO}}" to appContext.resources.getString(R.string.app_motto) + ) + val postFsDataSh = readRawResource( + if (RootUtils.isSusfsBinaryAvailable) R.raw.module_post_fs_data_susfs + else R.raw.module_post_fs_data + ) + val actionSh = readRawResource(R.raw.module_action).replaceAll( + "{{PACKAGE_NAME}}" to BuildConfig.APPLICATION_ID, + "{{CLASS_PATH}}" to MainActivity::class.qualifiedName!! + ) + val serviceSh = readRawResource(R.raw.module_service).replaceAll( + "{{RESTART_SYSUI_AFTER_BOOT}}" to ("killall $SYSTEMUI_PACKAGE\n" + .takeIf { RPrefs.getBoolean(RESTART_SYSUI_AFTER_BOOT, false) } + ?: "") + ) + val skippedServiceSh = readRawResource(R.raw.module_service_skipped) 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" + - "' > $TEMP_MODULE_DIR/module.prop".trimIndent() + "printf '$moduleProp' > $TEMP_MODULE_DIR/module.prop", + "printf '$postFsDataSh' > $TEMP_MODULE_DIR/post-fs-data.sh", + if (!skippedInstallation) "printf '$serviceSh' > $TEMP_MODULE_DIR/service.sh" + else "printf '$skippedServiceSh' > $TEMP_MODULE_DIR/service.sh", + "printf '$actionSh' > $TEMP_MODULE_DIR/action.sh", + "touch $TEMP_MODULE_DIR/system.prop", + "touch $TEMP_MODULE_DIR/auto_mount", ).exec() - Shell.cmd("printf '$POST_FS_DATA' > $TEMP_MODULE_DIR/post-fs-data.sh".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 (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" + - "' > $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" + - "' > $TEMP_MODULE_DIR/service.sh".trimIndent() - ).exec() - } - - Shell.cmd("touch $TEMP_MODULE_DIR/system.prop").exec() - Shell.cmd("touch $TEMP_MODULE_DIR/auto_mount").exec() - Shell.cmd("mkdir -p $TEMP_MODULE_DIR/system").exec() - Shell.cmd("mkdir -p $TEMP_MODULE_DIR/system/product").exec() - Shell.cmd("mkdir -p $TEMP_MODULE_DIR/system/product/overlay").exec() + FileUtils.ensureDirs("$TEMP_MODULE_DIR/system/product/overlay") createMETAINF() - writePostExec() - symLinkBinaries() + writePostExec(skippedInstallation) Log.i(TAG, "Module successfully created.") } private fun createMETAINF() { - Shell.cmd("mkdir -p $TEMP_MODULE_DIR/META-INF").exec() - Shell.cmd("mkdir -p $TEMP_MODULE_DIR/META-INF/com").exec() - Shell.cmd("mkdir -p $TEMP_MODULE_DIR/META-INF/com/google").exec() - Shell.cmd("mkdir -p $TEMP_MODULE_DIR/META-INF/com/google/android").exec() - Shell.cmd( - "printf '$MAGISK_UPDATE_BINARY' > $TEMP_MODULE_DIR/META-INF/com/google/android/update-binary" - ).exec() + val updateBinary = readRawResource(R.raw.module_update_binary) + + FileUtils.ensureDirs("$TEMP_MODULE_DIR/META-INF/com/google/android") + Shell.cmd( + "printf '$updateBinary' > $TEMP_MODULE_DIR/META-INF/com/google/android/update-binary", "printf '#MAGISK' > $TEMP_MODULE_DIR/META-INF/com/google/android/updater-script" ).exec() } - private fun writePostExec() { + private fun writePostExec(skippedInstallation: Boolean) { val postExec = StringBuilder() var primaryColorEnabled = false var secondaryColorEnabled = false - val firstInstall = getBoolean(FIRST_INSTALL, true) - val map = appContext.getSharedPreferences( - BuildConfig.APPLICATION_ID, - Context.MODE_PRIVATE - ).all + val firstInstall = RPrefs.getBoolean(SettingsKey.FIRST_INSTALL) + val map = RPrefs.prefs.all for ((key, value) in map) { if (value is Boolean && value && key.startsWith("fabricated")) { try { val name = key.replace("fabricated", "") val commands = FabricatedUtils.buildCommands( - getString("FOCMDtarget$name")!!, - getString("FOCMDname$name")!!, - getString("FOCMDtype$name")!!, - getString("FOCMDresourceName$name")!!, - getString("FOCMDval$name")!! + 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') diff --git a/app/src/main/java/com/drdisagree/iconify/utils/NetworkUtils.java b/app/src/main/java/com/drdisagree/iconify/core/utils/NetworkUtils.java similarity index 93% rename from app/src/main/java/com/drdisagree/iconify/utils/NetworkUtils.java rename to app/src/main/java/com/drdisagree/iconify/core/utils/NetworkUtils.java index 5b47345df..b5d83669e 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/NetworkUtils.java +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/NetworkUtils.java @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils; +package com.drdisagree.iconify.core.utils; /* * Copyright (C) 2018 The OmniROM Project @@ -89,7 +89,7 @@ public void onFailure(@NonNull Call call, @NonNull IOException e) { @Override public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException { // Handle success - String result = response.body() != null ? response.body().string() : ""; + String result = response.body().string(); // Process the response data if (callback != null) { callback.onDownloadComplete(result); @@ -139,14 +139,11 @@ public static boolean downloadUrlFile(String url, File f) { byte[] buffer = new byte[262144]; InputStream is = urlConnection.getInputStream(); - FileOutputStream os = new FileOutputStream(f, false); - try { + try (FileOutputStream os = new FileOutputStream(f, false)) { int r; while ((r = is.read(buffer)) > 0) { os.write(buffer, 0, r); } - } finally { - os.close(); } return true; @@ -183,12 +180,7 @@ public static String downloadUrlMemoryAsString(String url) { byteArray.write(byteInt); } - byte[] bytes = byteArray.toByteArray(); - if (bytes == null) { - return null; - } - - return new String(bytes, StandardCharsets.UTF_8); + return byteArray.toString(StandardCharsets.UTF_8); } catch (Exception e) { // Download failed for any number of reasons, timeouts, connection // drops, etc. Just log it in debugging mode. diff --git a/app/src/main/java/com/drdisagree/iconify/utils/OmniJawsClient.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/OmniJawsClient.kt similarity index 96% rename from app/src/main/java/com/drdisagree/iconify/utils/OmniJawsClient.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/OmniJawsClient.kt index 29370a0f6..c9bdc0670 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/OmniJawsClient.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/OmniJawsClient.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils +package com.drdisagree.iconify.core.utils import android.annotation.SuppressLint import android.content.BroadcastReceiver @@ -15,9 +15,10 @@ import android.os.Build import android.text.TextUtils import android.text.format.DateFormat import android.util.Log +import androidx.core.net.toUri import com.drdisagree.iconify.BuildConfig -import com.drdisagree.iconify.utils.weather.WeatherConfig -import com.drdisagree.iconify.utils.weather.WeatherContentProvider.Companion.WEATHER_AUTHORITY +import com.drdisagree.iconify.core.utils.weather.WeatherConfig +import com.drdisagree.iconify.core.utils.weather.WeatherContentProvider.Companion.WEATHER_AUTHORITY import java.text.DecimalFormat import java.text.SimpleDateFormat import java.util.Date @@ -188,7 +189,7 @@ class OmniJawsClient(private val mContext: Context) { hour.condition = it.getString(16) hour.conditionCode = it.getInt(17) hourlyForecastList.add(hour) - } else if (isDailyForecast){ + } else if (isDailyForecast) { val day = DayForecast() day.low = getFormattedValue(it.getFloat(7)) day.high = getFormattedValue(it.getFloat(8)) @@ -335,7 +336,7 @@ class OmniJawsClient(private val mContext: Context) { } val isOmniJawsEnabled: Boolean - get() = WeatherConfig.isEnabled(mContext) + get() = WeatherConfig.isEnabled() private val temperatureUnit: String get() = "\u00b0" + (if (mMetric) "C" else "F") @@ -394,9 +395,9 @@ class OmniJawsClient(private val mContext: Context) { 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://$WEATHER_AUTHORITY/weather") - val SETTINGS_URI: Uri = Uri.parse("content://$WEATHER_AUTHORITY/settings") - val CONTROL_URI: Uri = Uri.parse("content://$WEATHER_AUTHORITY/control") + val WEATHER_URI: Uri = "content://$WEATHER_AUTHORITY/weather".toUri() + val SETTINGS_URI: Uri = "content://$WEATHER_AUTHORITY/settings".toUri() + val CONTROL_URI: Uri = "content://$WEATHER_AUTHORITY/control".toUri() private const val ICON_PACKAGE_DEFAULT = BuildConfig.APPLICATION_ID private const val ICON_PREFIX_DEFAULT = "google" diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/RootUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/RootUtils.kt new file mode 100644 index 000000000..71fcdfebc --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/RootUtils.kt @@ -0,0 +1,90 @@ +package com.drdisagree.iconify.core.utils + +import com.drdisagree.iconify.data.common.Resources.OVERLAY_DIR +import com.topjohnwu.superuser.Shell + +object RootUtils { + + val isDeviceRooted: Boolean + get() = Shell.isAppGrantedRoot() == java.lang.Boolean.TRUE + + val isMagiskInstalled: Boolean + get() = Shell.cmd("magisk -v").exec().isSuccess + + val isKSUInstalled: Boolean + get() = Shell.cmd("ksud -h").exec().isSuccess + + val isApatchInstalled: Boolean + get() = Shell.cmd("apd --help").exec().isSuccess + + val isSusfsBinaryAvailable: Boolean + get() = !isMagiskInstalled && + isKSUInstalled && + fileExists("/data/adb/ksu/bin/ksu_susfs") + + fun moduleExists(moduleId: String): Boolean { + return folderExists("/data/adb/modules/$moduleId") + } + + fun moduleUpdateExists(moduleId: String): Boolean { + return fileExists("/data/adb/modules_update/$moduleId/module.prop") + } + + 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(path: String): Boolean { + return Shell.cmd("[ -f \"$path\" ]").exec().code == 0 + } + + fun folderExists(path: String): Boolean { + return Shell.cmd("[ -d \"$path\" ]").exec().code == 0 + } + + fun deviceProperlyRooted(): Boolean { + return isDeviceRooted && (isMagiskInstalled || isKSUInstalled || isApatchInstalled) + } + + fun requireMetamodule(): Boolean { + return isKSUInstalled && getKsuVersion() >= 3 && !isMetaModuleInstalled() + } + + fun getKsuVersion(): Int { + val ksuVersion = Shell.cmd("ksud -V").exec().out.joinToString().trim() + val majorVersion = Regex("""\b(\d+)(?=\.)""") + .find(ksuVersion) + ?.groupValues + ?.get(1) + + return majorVersion?.toInt() ?: 0 + } + + fun isMetaModuleInstalled(): Boolean { + val result = Shell.cmd( + $$"for d in /data/adb/modules/*; do prop=\"$d/module.prop\"; [ -f \"$prop\" ] && grep -qiE \"^metamodule[[:space:]]*=[[:space:]]*(1|true)$\" \"$prop\" && echo true && exit 0; done; echo false" + ).exec() + + return result.out.firstOrNull() == "true" + } + + fun isModuleUpdatePending(): Boolean { + return !folderExists(OVERLAY_DIR) && + folderExists( + OVERLAY_DIR.replace( + "modules", + "modules_update" + ) + ) + } +} diff --git a/app/src/main/java/com/drdisagree/iconify/utils/SystemUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/SystemUtils.kt similarity index 59% rename from app/src/main/java/com/drdisagree/iconify/utils/SystemUtils.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/SystemUtils.kt index 2f2f65815..04f35035b 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/SystemUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/SystemUtils.kt @@ -1,34 +1,29 @@ -package com.drdisagree.iconify.utils +package com.drdisagree.iconify.core.utils import android.Manifest import android.app.Activity import android.content.Context import android.content.Intent +import android.content.pm.PackageManager 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 androidx.core.content.ContextCompat import com.drdisagree.iconify.BuildConfig -import com.drdisagree.iconify.Iconify.Companion.appContext import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.common.Const.SYSTEMUI_PACKAGE -import com.drdisagree.iconify.data.common.Preferences.BOOT_ID -import com.drdisagree.iconify.data.common.Preferences.FORCE_RELOAD_OVERLAY_STATE -import com.drdisagree.iconify.data.common.Preferences.FORCE_RELOAD_PACKAGE_NAME -import com.drdisagree.iconify.data.common.Preferences.RESTART_SYSUI_BEHAVIOR_EXT -import com.drdisagree.iconify.data.common.Preferences.VER_CODE -import com.drdisagree.iconify.data.common.References.DEVICE_BOOT_ID_CMD -import com.drdisagree.iconify.data.common.Resources.MODULE_DIR +import com.drdisagree.iconify.app.Iconify +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.data.common.Const +import com.drdisagree.iconify.data.common.Preferences +import com.drdisagree.iconify.data.common.References +import com.drdisagree.iconify.data.common.Resources import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.data.config.RPrefs.getString -import com.drdisagree.iconify.data.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.drdisagree.iconify.xposed.utils.BootLoopProtector import com.topjohnwu.superuser.Shell import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -50,21 +45,29 @@ object SystemUtils { 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 + get() = Iconify.Companion.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 loadTimeKey = String.format( + "%s%s", + BootLoopProtector.LOAD_TIME_KEY_KEY, + Const.SYSTEMUI_PACKAGE + ) + val strikeKey = String.format( + "%s%s", + BootLoopProtector.PACKAGE_STRIKE_KEY_KEY, + Const.SYSTEMUI_PACKAGE + ) val currentTime = Calendar.getInstance().time.time RPrefs.putLong(loadTimeKey, currentTime) RPrefs.putInt(strikeKey, 0) - Shell.cmd("killall $SYSTEMUI_PACKAGE").submit() + Shell.cmd("killall ${Const.SYSTEMUI_PACKAGE}").submit() } private fun forceReloadUI() { - val state = RPrefs.getBoolean(FORCE_RELOAD_OVERLAY_STATE, false) - val pkgName: String = FORCE_RELOAD_PACKAGE_NAME + val state = RPrefs.getBoolean(Preferences.FORCE_RELOAD_OVERLAY_STATE, false) + val pkgName: String = Preferences.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 @@ -72,21 +75,18 @@ object SystemUtils { } fun handleSystemUIRestart() { - val selectedBehavior = getString(RESTART_SYSUI_BEHAVIOR_EXT, "0")!!.toInt() + val selectedBehavior = + RPrefs.getString(Preferences.RESTART_SYSUI_BEHAVIOR_EXT, "0")!!.toInt() when (selectedBehavior) { - 0 -> { - restartSystemUI() - } + 0 -> restartSystemUI() - 1 -> { - forceReloadUI() - } + 1 -> forceReloadUI() else -> { Toast.makeText( - appContext, - appContext.resources.getString(R.string.settings_systemui_restart_required), + Iconify.Companion.appContext, + Iconify.Companion.appContext.resources.getString(R.string.settings_systemui_restart_required), Toast.LENGTH_SHORT ).show() } @@ -99,9 +99,9 @@ object SystemUtils { fun disableBlur(force: Boolean) { Shell.cmd( - if (!force) "mv " + MODULE_DIR + + if (!force) "mv " + Resources.MODULE_DIR + "/system.prop " + - MODULE_DIR + + Resources.MODULE_DIR + "/system.txt; " + "grep -vE \"" + BLUR_CMD_1 + "|" + @@ -109,26 +109,26 @@ object SystemUtils { BLUR_CMD_3 + "|" + BLUR_CMD_4 + "|" + BLUR_CMD_5 + "\" " + - MODULE_DIR + + Resources.MODULE_DIR + "/system.txt > " + - MODULE_DIR + + Resources.MODULE_DIR + "/system.txt.tmp; " + "rm -rf " + - MODULE_DIR + + Resources.MODULE_DIR + "/system.prop; " + - "mv " + MODULE_DIR + + "mv " + Resources.MODULE_DIR + "/system.txt.tmp " + - MODULE_DIR + + Resources.MODULE_DIR + "/system.prop; " + - "rm -rf " + MODULE_DIR + + "rm -rf " + Resources.MODULE_DIR + "/system.txt; " + - "rm -rf " + MODULE_DIR + + "rm -rf " + Resources.MODULE_DIR + "/system.txt.tmp" else ":", // do nothing "grep -v \"ro.surface_flinger.supports_background_blur\" " + - MODULE_DIR + "/service.sh > " + - MODULE_DIR + "/service.sh.tmp && mv " + - MODULE_DIR + "/service.sh.tmp " + - MODULE_DIR + "/service.sh" + Resources.MODULE_DIR + "/service.sh > " + + Resources.MODULE_DIR + "/service.sh.tmp && mv " + + Resources.MODULE_DIR + "/service.sh.tmp " + + Resources.MODULE_DIR + "/service.sh" ).submit() } @@ -136,44 +136,20 @@ object SystemUtils { disableBlur(false) Shell.cmd( "echo \"$BLUR_CMD_1\n$BLUR_CMD_2\n$BLUR_CMD_3\n$BLUR_CMD_4\n$BLUR_CMD_5\"" + - " >> $MODULE_DIR/system.prop", + " >> ${Resources.MODULE_DIR}/system.prop", if (force) "sed '/*}/a " + BLUR_CMD_0 + "' " + - MODULE_DIR + + Resources.MODULE_DIR + "/service.sh > " + - MODULE_DIR + + Resources.MODULE_DIR + "/service.sh.tmp && mv " + - MODULE_DIR + + Resources.MODULE_DIR + "/service.sh.tmp " + - MODULE_DIR + + Resources.MODULE_DIR + "/service.sh" else ":" // do nothing ).submit() } - private fun clearExpressiveThemeFromServiceSh() { - Shell.cmd( - "grep -v -e \"setprop is_expressive_design_enabled true\" " + - "-e \"setprop is_expressive_design_enabled false\" " + - MODULE_DIR + "/service.sh > " + - MODULE_DIR + "/service.sh.tmp && mv " + - MODULE_DIR + "/service.sh.tmp " + - MODULE_DIR + "/service.sh" - ).exec() - } - - fun switchExpressiveTheme(enable: Boolean) { - clearExpressiveThemeFromServiceSh() - - Shell.cmd("setprop is_expressive_design_enabled ${if (enable) "true" else "false"}").exec() - Shell.cmd( - "sed '/sleep 6/a setprop is_expressive_design_enabled ${if (enable) "true" else "false"}' " + - MODULE_DIR + "/service.sh > " + - MODULE_DIR + "/service.sh.tmp && mv " + - MODULE_DIR + "/service.sh.tmp " + - MODULE_DIR + "/service.sh" - ).submit() - } - fun mountRW() { Shell.cmd("mount -o remount,rw /").exec() @@ -215,7 +191,7 @@ object SystemUtils { delay(500) darkSwitching = false - } catch (ignored: Exception) { + } catch (_: Exception) { } } } @@ -223,43 +199,32 @@ object SystemUtils { fun isBlurEnabled(force: Boolean): Boolean { return Shell.cmd( "if grep -q \"ro.surface_flinger.supports_background_blur\" " + - MODULE_DIR + + Resources.MODULE_DIR + (if (force) "/service.sh;" else "/system.prop;") + " then echo yes; else echo no; fi" ).exec().out[0] == "yes" } - fun isExpressiveThemeEnabled(): Boolean { - return Shell.cmd( - "if grep -q \"setprop is_expressive_design_enabled true\" " + - "$MODULE_DIR/service.sh;" + - " 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) + val bootId = Shell.cmd(References.DEVICE_BOOT_ID_CMD).exec().out.toString() + if (RPrefs.getString(Preferences.BOOT_ID) != bootId) { + RPrefs.putString(Preferences.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 hasNotificationPermission(): Boolean { + return ContextCompat.checkSelfPermission( + appContext, + Manifest.permission.POST_NOTIFICATIONS + ) == PackageManager.PERMISSION_GRANTED } 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)) + val intent = Intent().apply { + action = Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION + data = Uri.fromParts("package", BuildConfig.APPLICATION_ID, null) + } (context as Activity).startActivityForResult(intent, 0) ActivityCompat.requestPermissions( @@ -275,13 +240,13 @@ object SystemUtils { disableRestartSystemuiAfterBoot() Shell.cmd( - "sed '/^sleep.6/i killall $SYSTEMUI_PACKAGE' $MODULE_DIR/service.sh > $MODULE_DIR/service.sh.tmp && mv $MODULE_DIR/service.sh.tmp $MODULE_DIR/service.sh" + "sed '/^sleep.6/i killall ${Const.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\" $MODULE_DIR/service.sh > $MODULE_DIR/service.sh.tmp && mv $MODULE_DIR/service.sh.tmp $MODULE_DIR/service.sh" + "grep -v \"killall ${Const.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() } @@ -315,4 +280,4 @@ object SystemUtils { .getInsetsIgnoringVisibility(WindowInsets.Type.systemBars()) return windowMetrics.bounds.height() - (insets.top + insets.bottom) } -} +} \ 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/core/utils/TextUtils.kt similarity index 97% rename from app/src/main/java/com/drdisagree/iconify/utils/TextUtils.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/TextUtils.kt index a2c7ba78e..aa5250ccf 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/TextUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/TextUtils.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils +package com.drdisagree.iconify.core.utils import android.view.View import android.view.ViewGroup diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/ViewHelper.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/ViewHelper.kt new file mode 100644 index 000000000..8bf0a74a8 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/ViewHelper.kt @@ -0,0 +1,153 @@ +package com.drdisagree.iconify.core.utils + +import android.content.Context +import android.graphics.Canvas +import android.graphics.drawable.Drawable +import android.graphics.drawable.LayerDrawable +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 +import androidx.core.content.res.ResourcesCompat +import androidx.core.graphics.withRotation +import androidx.fragment.app.FragmentManager +import androidx.recyclerview.widget.RecyclerView +import androidx.viewpager2.widget.ViewPager2 +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.data.common.Const + +object ViewHelper { + + fun disableNestedScrolling(viewPager: ViewPager2) { + var recyclerView: RecyclerView? = null + + for (i in 0 until viewPager.childCount) { + if (viewPager.getChildAt(i) is RecyclerView) { + recyclerView = viewPager.getChildAt(i) as RecyclerView + break + } + } + + if (recyclerView != null) { + recyclerView.isNestedScrollingEnabled = false + } + } + + fun setHeader(context: Context, toolbar: Toolbar, title: Any) { + (context as AppCompatActivity).setSupportActionBar(toolbar) + context.supportActionBar?.setDisplayHomeAsUpEnabled(true) + context.supportActionBar?.setDisplayShowHomeEnabled(true) + if (title is Int) { + toolbar.setTitle(title) + } else if (title is String) { + toolbar.setTitle(title) + } + } + + fun setHeader( + context: Context, + fragmentManager: FragmentManager, + toolbar: Toolbar, + title: Int + ) { + 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) + + toolbar.setNavigationOnClickListener { + Handler(Looper.getMainLooper()).postDelayed( + { fragmentManager.popBackStack() }, Const.FRAGMENT_BACK_BUTTON_DELAY.toLong() + ) + } + } + + fun dp2px(dp: Float): Int { + return dp2px(dp.toInt()) + } + + fun dp2px(dp: Int): Int { + return TypedValue.applyDimension( + TypedValue.COMPLEX_UNIT_DIP, + dp.toFloat(), + appContext.resources.displayMetrics + ).toInt() + } + + private fun getRotateDrawable(d: Drawable, angle: Float): Drawable { + val arD = arrayOf(d) + return object : LayerDrawable(arD) { + override fun draw(canvas: Canvas) { + canvas.withRotation( + angle, + d.bounds.width().toFloat() / 2, + d.bounds.height().toFloat() / 2 + ) { + super.draw(this) + } + } + + override fun getConstantState(): ConstantState { + return RotateDrawableConstantState(d, angle) + } + } + } + + private class RotateDrawableConstantState( + private val drawable: Drawable, + private val angle: Float + ) : Drawable.ConstantState() { + override fun newDrawable(): Drawable { + return getRotateDrawable(drawable.constantState?.newDrawable() ?: drawable, angle) + } + + override fun getChangingConfigurations(): Int { + return drawable.changingConfigurations + } + } + + 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()) + } + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/WallpaperUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/WallpaperUtils.kt new file mode 100644 index 000000000..a926e7a3c --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/WallpaperUtils.kt @@ -0,0 +1,86 @@ +package com.drdisagree.iconify.core.utils + +import android.util.Log +import com.drdisagree.iconify.data.common.Resources.WALLPAPER_DIR +import com.topjohnwu.superuser.Shell +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import java.io.File + +object WallpaperUtils { + + private const val TAG = "WallpaperUtils" + + suspend fun prepareLockWallpaper(): File? { + val targetFile = File( + WALLPAPER_DIR.also { FileUtils.ensureDirs(it) }, + "wallpaper_lock" + ) + + val systemFile1 = File("/data/system/users/0/wallpaper_lock") + val systemFile2 = File("/data/system/users/0/wallpaper") + + fun hashViaShell(path: String): String? { + fun run(cmd: String): String? { + return try { + val result = Shell.cmd(cmd).exec() + + if (result.code != 0 || result.out.isEmpty()) { + null + } else { + result.out.first().trim().split(Regex("\\s+")).firstOrNull() + } + } catch (_: Exception) { + null + } + } + + run("sha256sum \"$path\"")?.let { return it } + run("md5sum \"$path\"")?.let { return it } + + return null + } + + return withContext(Dispatchers.IO) { + try { + when { + RootUtils.fileExists(targetFile.absolutePath) -> { + val systemFile = when { + RootUtils.fileExists(systemFile1.absolutePath) -> systemFile1 + RootUtils.fileExists(systemFile2.absolutePath) -> systemFile2 + else -> return@withContext null + } + + val targetHash = hashViaShell(targetFile.absolutePath) + val systemHash = hashViaShell(systemFile.absolutePath) + + if (targetHash == null || systemHash == null || targetHash != systemHash) { + Shell.cmd( + "cp \"${systemFile.absolutePath}\" \"${targetFile.absolutePath}\" && chmod 644 \"${targetFile.absolutePath}\"" + ).exec() + } + } + + RootUtils.fileExists(systemFile1.absolutePath) -> { + Shell.cmd( + "cp \"${systemFile1.absolutePath}\" \"${targetFile.absolutePath}\" && chmod 644 \"${targetFile.absolutePath}\"" + ).exec() + } + + RootUtils.fileExists(systemFile2.absolutePath) -> { + Shell.cmd( + "cp \"${systemFile2.absolutePath}\" \"${targetFile.absolutePath}\" && chmod 644 \"${targetFile.absolutePath}\"" + ).exec() + } + + else -> return@withContext null + } + + if (targetFile.exists()) targetFile else null + } catch (e: Exception) { + Log.e(TAG, "Exception while preparing wallpaper", e) + null + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/ApkSignerV2.java b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ApkSignerV2.java similarity index 99% rename from app/src/main/java/com/drdisagree/iconify/utils/apksigner/ApkSignerV2.java rename to app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ApkSignerV2.java index a26910c22..1c29b1c63 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/ApkSignerV2.java +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ApkSignerV2.java @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.apksigner; +package com.drdisagree.iconify.core.utils.apksigner; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; diff --git a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/ByteArrayStream.java b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ByteArrayStream.java similarity index 94% rename from app/src/main/java/com/drdisagree/iconify/utils/apksigner/ByteArrayStream.java rename to app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ByteArrayStream.java index 258123842..7f8ae79e2 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/ByteArrayStream.java +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ByteArrayStream.java @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.apksigner; +package com.drdisagree.iconify.core.utils.apksigner; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/CryptoUtils.java b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/CryptoUtils.java similarity index 91% rename from app/src/main/java/com/drdisagree/iconify/utils/apksigner/CryptoUtils.java rename to app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/CryptoUtils.java index c67655f4b..7f30ff3c8 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/CryptoUtils.java +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/CryptoUtils.java @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.apksigner; +package com.drdisagree.iconify.core.utils.apksigner; import org.bouncycastle.asn1.ASN1InputStream; import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; @@ -20,11 +20,9 @@ public class CryptoUtils { public static X509Certificate readCertificate(InputStream input) throws IOException, GeneralSecurityException { - try { + try (input) { CertificateFactory cf = CertificateFactory.getInstance("X.509"); return (X509Certificate) cf.generateCertificate(input); - } finally { - input.close(); } } @@ -33,7 +31,7 @@ public static X509Certificate readCertificate(InputStream input) */ public static PrivateKey readPrivateKey(InputStream input) throws IOException, GeneralSecurityException { - try { + try (input) { ByteArrayStream buf = new ByteArrayStream(); buf.readFrom(input); byte[] bytes = buf.toByteArray(); @@ -47,8 +45,6 @@ public static PrivateKey readPrivateKey(InputStream input) PrivateKeyInfo pki = PrivateKeyInfo.getInstance(bIn.readObject()); String algOid = pki.getPrivateKeyAlgorithm().getAlgorithm().getId(); return KeyFactory.getInstance(algOid).generatePrivate(spec); - } finally { - input.close(); } } } \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/Pair.java b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/Pair.java similarity index 96% rename from app/src/main/java/com/drdisagree/iconify/utils/apksigner/Pair.java rename to app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/Pair.java index 1720cbc88..862c0210a 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/Pair.java +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/Pair.java @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.apksigner; +package com.drdisagree.iconify.core.utils.apksigner; /** * Pair of two elements. diff --git a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/SignAPK.java b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/SignAPK.java similarity index 99% rename from app/src/main/java/com/drdisagree/iconify/utils/apksigner/SignAPK.java rename to app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/SignAPK.java index ac1dc7f1d..c34a2d4e3 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/SignAPK.java +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/SignAPK.java @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.apksigner; +package com.drdisagree.iconify.core.utils.apksigner; import org.bouncycastle.asn1.ASN1Encoding; import org.bouncycastle.asn1.ASN1InputStream; diff --git a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/ZipUtils.java b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ZipUtils.java similarity index 99% rename from app/src/main/java/com/drdisagree/iconify/utils/apksigner/ZipUtils.java rename to app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ZipUtils.java index 0c7f9cc5e..79fad03a3 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/apksigner/ZipUtils.java +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/apksigner/ZipUtils.java @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.apksigner; +package com.drdisagree.iconify.core.utils.apksigner; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/FabricatedUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/FabricatedUtils.kt similarity index 98% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/FabricatedUtils.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/FabricatedUtils.kt index 6ed073ffc..12f82a8bf 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/FabricatedUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/FabricatedUtils.kt @@ -1,10 +1,10 @@ -package com.drdisagree.iconify.utils.overlay +package com.drdisagree.iconify.core.utils.overlay import android.os.Build import android.util.TypedValue import com.drdisagree.iconify.data.common.Resources import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.utils.helper.TypedValueUtils.createComplexDimension +import com.drdisagree.iconify.helpers.TypedValueUtils.createComplexDimension import com.topjohnwu.superuser.Shell object FabricatedUtils { diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/OverlayUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/OverlayUtils.kt similarity index 83% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/OverlayUtils.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/OverlayUtils.kt index fe5cef932..1094f5858 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/OverlayUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/OverlayUtils.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.overlay +package com.drdisagree.iconify.core.utils.overlay import android.annotation.SuppressLint import android.content.Context @@ -6,9 +6,8 @@ import android.content.pm.PackageManager import android.graphics.drawable.Drawable import android.util.Log import androidx.core.content.ContextCompat -import com.drdisagree.iconify.Iconify.Companion.appContext -import com.drdisagree.iconify.data.common.Resources -import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.data.common.Resources.OVERLAY_DIR import com.topjohnwu.superuser.Shell import java.util.Objects @@ -52,16 +51,7 @@ object OverlayUtils { return false } - fun enableOverlay(pkgName: String) { - RPrefs.putBoolean(pkgName, true) - Shell.cmd( - "cmd overlay enable --user current $pkgName", - "cmd overlay set-priority $pkgName highest" - ).submit() - } - - fun enableOverlay(pkgName: String, priority: String) { - RPrefs.putBoolean(pkgName, true) + fun enableOverlay(pkgName: String, priority: String = "highest") { Shell.cmd( "cmd overlay enable --user current $pkgName", "cmd overlay set-priority $pkgName $priority" @@ -72,8 +62,6 @@ object OverlayUtils { val command = StringBuilder() for (pkgName in pkgNames) { - RPrefs.putBoolean(pkgName, true) - command.append("cmd overlay enable --user current ").append(pkgName) .append("; cmd overlay set-priority ").append(pkgName).append(" highest; ") } @@ -82,19 +70,23 @@ object OverlayUtils { } fun enableOverlayExclusiveInCategory(pkgName: String) { - RPrefs.putBoolean(pkgName, true) Shell.cmd( "cmd overlay enable-exclusive --user current --category $pkgName", "cmd overlay set-priority $pkgName highest" ).submit() } + fun enableOverlayExclusiveInCategory(pkgName: String, priority: String) { + Shell.cmd( + "cmd overlay enable-exclusive --user current --category $pkgName", + "cmd overlay set-priority $pkgName $priority" + ).submit() + } + fun enableOverlaysExclusiveInCategory(vararg pkgNames: String?) { val command = StringBuilder() for (pkgName in pkgNames) { - RPrefs.putBoolean(pkgName, true) - command.append("cmd overlay enable-exclusive --user current --category ") .append(pkgName).append("; cmd overlay set-priority ").append(pkgName) .append(" highest; ") @@ -104,7 +96,6 @@ object OverlayUtils { } fun disableOverlay(pkgName: String) { - RPrefs.putBoolean(pkgName, false) Shell.cmd("cmd overlay disable --user current $pkgName").submit() } @@ -112,8 +103,6 @@ object OverlayUtils { val command = StringBuilder() for (pkgName in pkgNames) { - RPrefs.putBoolean(pkgName, false) - command.append("cmd overlay disable --user current ").append(pkgName).append("; ") } @@ -130,8 +119,6 @@ object OverlayUtils { val pkgName = args[i] as String val state = args[i + 1] as Boolean - RPrefs.putBoolean(pkgName, state) - if (state) { command.append("cmd overlay enable --user current ").append(pkgName) .append("; cmd overlay set-priority ").append(pkgName).append(" highest; ") @@ -148,10 +135,9 @@ object OverlayUtils { fun overlayExists(): Boolean { return Shell.cmd( "[ -f /system/product/overlay/IconifyComponentAMGC.apk ] && echo \"found\" || echo \"not found\"" - ).exec().out[0] == "found" + ).exec().takeIf { it.out.isNotEmpty() }?.out[0] == "found" } - @Suppress("unused") fun matchOverlayAgainstAssets(): Boolean { return try { val packages = appContext.assets.list("Overlays") @@ -166,7 +152,7 @@ object OverlayUtils { } val numberOfOverlaysInstalled = - Shell.cmd("find /" + Resources.OVERLAY_DIR + "/ -maxdepth 1 -type f -print| wc -l") + Shell.cmd("find /$OVERLAY_DIR/ -maxdepth 1 -type f -print| wc -l") .exec().out[0].toInt() numberOfOverlaysInAssets <= numberOfOverlaysInstalled @@ -204,20 +190,24 @@ object OverlayUtils { } fun checkEnabledOverlay(componentName: String): String { - val component = - Shell.cmd("cmd overlay list | grep \".x..IconifyComponent$componentName\"") - .exec().out - Log.d("OverlayUtil", "checkEnabledOverlay: $component") + val component = Shell.cmd( + "cmd overlay list | grep \".x..IconifyComponent$componentName\"" + ).exec().out + if (component.isNotEmpty()) { val num = component[0].split("IconifyComponent$componentName".toRegex()) .dropLastWhile { it.isEmpty() } .toTypedArray()[1].split("\\.overlay".toRegex()).dropLastWhile { it.isEmpty() } .toTypedArray()[0] - Log.d("OverlayUtil", "checkEnabledOverlay: $num") - Log.d("OverlayUtil", "checkEnabledOverlay: IconifyComponent$componentName$num.overlay") return "IconifyComponent$componentName$num.overlay" } - return ""; + + return "" } -} + fun enableRoundnessIfDisabled() { + if (!isOverlayEnabled("IconifyComponentCR1.overlay") || !isOverlayEnabled("IconifyComponentCR2.overlay")) { + enableOverlays("IconifyComponentCR1.overlay", "IconifyComponentCR2.overlay") + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/CompilerUtils.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/CompilerUtils.kt similarity index 97% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/CompilerUtils.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/CompilerUtils.kt index d19cbb28f..8050bca04 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/CompilerUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/CompilerUtils.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.overlay.compiler +package com.drdisagree.iconify.core.utils.overlay.compilers import android.os.Build import android.util.Log @@ -105,7 +105,7 @@ object CompilerUtils { fun getOverlayName(filePath: String): String { val file = File(filePath) - val fileName = file.getName() + val fileName = file.name return fileName.replace("IconifyComponent|-unsigned|-unaligned|.apk".toRegex(), "") } @@ -122,7 +122,7 @@ object CompilerUtils { category += when (mPackageName) { "AMAC", "AMGC" -> "stock_monet_colors" - "NF" -> "notification_style" + "NFN" -> "notification_style" "IPAS" -> "icon_pack_android_style" "IPSUI" -> "icon_pack_sysui_style" "WIFI" -> "icon_pack_wifi_icons" diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OnDemandCompiler.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OnDemandCompiler.kt similarity index 64% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OnDemandCompiler.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OnDemandCompiler.kt index 6103c215b..712ff3416 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OnDemandCompiler.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OnDemandCompiler.kt @@ -1,9 +1,16 @@ -package com.drdisagree.iconify.utils.overlay.compiler +package com.drdisagree.iconify.core.utils.overlay.compilers import android.util.Log +import com.drdisagree.iconify.core.utils.AssetsUtils.copyAssets +import com.drdisagree.iconify.core.utils.FileUtils +import com.drdisagree.iconify.core.utils.RootUtils.setPermissions +import com.drdisagree.iconify.core.utils.SystemUtils.mountRO +import com.drdisagree.iconify.core.utils.SystemUtils.mountRW +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.disableOverlay +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.enableOverlay import com.drdisagree.iconify.data.common.Dynamic.DATA_DIR -import com.drdisagree.iconify.data.common.Resources import com.drdisagree.iconify.data.common.Resources.BACKUP_DIR +import com.drdisagree.iconify.data.common.Resources.OVERLAY_DIR import com.drdisagree.iconify.data.common.Resources.SIGNED_DIR import com.drdisagree.iconify.data.common.Resources.SYSTEM_OVERLAY_DIR import com.drdisagree.iconify.data.common.Resources.TEMP_CACHE_DIR @@ -11,14 +18,7 @@ import com.drdisagree.iconify.data.common.Resources.TEMP_DIR import com.drdisagree.iconify.data.common.Resources.TEMP_OVERLAY_DIR import com.drdisagree.iconify.data.common.Resources.UNSIGNED_DIR import com.drdisagree.iconify.data.common.Resources.UNSIGNED_UNALIGNED_DIR -import com.drdisagree.iconify.utils.FileUtils.copyAssets -import com.drdisagree.iconify.utils.MiscUtils.requiresNewToastStyle -import com.drdisagree.iconify.utils.RootUtils.setPermissions -import com.drdisagree.iconify.utils.SystemUtils.mountRO -import com.drdisagree.iconify.utils.SystemUtils.mountRW -import com.drdisagree.iconify.utils.helper.BinaryInstaller.symLinkBinaries -import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlay -import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlay +import com.drdisagree.iconify.helpers.BinaryInstaller.symLinkBinaries import com.topjohnwu.superuser.Shell import java.io.IOException @@ -27,13 +27,29 @@ object OnDemandCompiler { private val TAG = OnDemandCompiler::class.java.simpleName private var mOverlayName: String? = null private var mPackage: String? = null - private var mStyle = 0 + private var mStyle = "0" private var mForce = false + /** + * Builds an Android overlay APK on-demand by compiling resources, creating a manifest, + * aligning, and signing the package. + * + * This function manages the lifecycle of overlay creation, including environment setup, + * resource manipulation, and optional system-level installation. + * + * @param overlayName The name of the overlay component to be built. + * @param style The specific style variant identifier (e.g., "0", "1"). + * @param targetPackage The package name of the application being targeted by the overlay. + * @param force If true, the overlay will be forcibly installed to the system and enabled; + * if false, it will be backed up without immediate installation. + * @return True if an error occurred during the build process; false if the build and + * deployment were successful. + * @throws IOException If an error occurs during file operations or resource extraction. + */ @Throws(IOException::class) fun buildOverlay( overlayName: String, - style: Int, + style: String, targetPackage: String, force: Boolean ): Boolean { @@ -59,11 +75,7 @@ object OnDemandCompiler { } // Build APK using AAPT - if (OverlayCompiler.runAapt( - "$TEMP_CACHE_DIR/$targetPackage/$overlayName", - targetPackage - ) - ) { + if (OverlayCompiler.runAapt("$TEMP_CACHE_DIR/$targetPackage/$overlayName", targetPackage)) { Log.e(TAG, "Failed to build $overlayName! Exiting...") postExecute(true) return true @@ -100,16 +112,18 @@ object OnDemandCompiler { copyAssets("CompileOnDemand/$mPackage/$mOverlayName$mStyle") // Create temp directory - Shell.cmd("rm -rf $TEMP_DIR; mkdir -p $TEMP_DIR").exec() - Shell.cmd("mkdir -p $TEMP_OVERLAY_DIR").exec() - Shell.cmd("mkdir -p $TEMP_CACHE_DIR").exec() - Shell.cmd("mkdir -p $UNSIGNED_UNALIGNED_DIR").exec() - Shell.cmd("mkdir -p $UNSIGNED_DIR").exec() - Shell.cmd("mkdir -p $SIGNED_DIR").exec() - Shell.cmd("mkdir -p $TEMP_CACHE_DIR/$mPackage/").exec() + FileUtils.ensureDirs( + TEMP_DIR, + TEMP_OVERLAY_DIR, + TEMP_CACHE_DIR, + UNSIGNED_UNALIGNED_DIR, + UNSIGNED_DIR, + SIGNED_DIR, + "$TEMP_CACHE_DIR/$mPackage" + ) if (!mForce) { - Shell.cmd("mkdir -p " + Resources.BACKUP_DIR).exec() + FileUtils.ensureDirs(BACKUP_DIR) } else { // Disable the overlay in case it is already enabled disableOverlay("IconifyComponent$mOverlayName.overlay") @@ -120,9 +134,9 @@ object OnDemandCompiler { // Move all generated overlays to module if (!hasErroredOut) { Shell.cmd( - "cp -rf " + SIGNED_DIR + "/IconifyComponent" + mOverlayName + ".apk " + Resources.OVERLAY_DIR + "/IconifyComponent" + mOverlayName + ".apk" + "cp -rf $SIGNED_DIR/IconifyComponent$mOverlayName.apk $OVERLAY_DIR/IconifyComponent$mOverlayName.apk" ).exec() - setPermissions(644, Resources.OVERLAY_DIR + "/IconifyComponent" + mOverlayName + ".apk") + setPermissions(644, "$OVERLAY_DIR/IconifyComponent$mOverlayName.apk") // Move to files dir and install if (mForce) { @@ -172,10 +186,10 @@ object OnDemandCompiler { } private fun handleNewToastStyle() { - if (mOverlayName != "TSTFRM" || !requiresNewToastStyle()) return + if (mOverlayName != "TSTFRM") return Shell.cmd( - "find \"$TEMP_CACHE_DIR/$mPackage/$mOverlayName/\" -type f -name \"*.xml\" -exec sh -c 'for file; do if echo \"\$file\" | grep -q \"/[^/]*-night/\"; then sed -i \"s/?android:colorBackgroundFloating/@*android:color\\/system_neutral2_800/g\" \"\$file\"; else sed -i \"s/?android:colorBackgroundFloating/@*android:color\\/system_neutral2_10/g\" \"\$file\"; fi; done' sh {} +" + $$"find \"$$TEMP_CACHE_DIR/$$mPackage/$$mOverlayName/\" -type f -name \"*.xml\" -exec sh -c 'for file; do if echo \"$file\" | grep -q \"/[^/]*-night/\"; then sed -i \"s/?android:colorBackgroundFloating/@*android:color\\/system_neutral2_800/g\" \"$file\"; else sed -i \"s/?android:colorBackgroundFloating/@*android:color\\/system_neutral2_10/g\" \"$file\"; fi; done' sh {} +" ).exec() } } diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OnboardingCompiler.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OnboardingCompiler.kt similarity index 78% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OnboardingCompiler.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OnboardingCompiler.kt index d81610cad..6101853ea 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OnboardingCompiler.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OnboardingCompiler.kt @@ -1,17 +1,19 @@ -package com.drdisagree.iconify.utils.overlay.compiler +package com.drdisagree.iconify.core.utils.overlay.compilers import android.util.Log -import com.drdisagree.iconify.Iconify.Companion.appContext +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.core.utils.Logger.writeLog +import com.drdisagree.iconify.core.utils.apksigner.CryptoUtils +import com.drdisagree.iconify.core.utils.apksigner.SignAPK +import com.drdisagree.iconify.core.utils.overlay.managers.QsResourceManager import com.drdisagree.iconify.data.common.Dynamic.AAPT2 import com.drdisagree.iconify.data.common.Dynamic.ZIPALIGN -import com.drdisagree.iconify.data.common.Resources import com.drdisagree.iconify.data.common.Resources.FRAMEWORK_DIR +import com.drdisagree.iconify.data.common.Resources.SIGNED_DIR +import com.drdisagree.iconify.data.common.Resources.UNSIGNED_DIR import com.drdisagree.iconify.data.common.Resources.UNSIGNED_UNALIGNED_DIR -import com.drdisagree.iconify.utils.apksigner.CryptoUtils -import com.drdisagree.iconify.utils.apksigner.SignAPK -import com.drdisagree.iconify.utils.helper.Logger.writeLog -import com.drdisagree.iconify.utils.overlay.manager.QsResourceManager import com.topjohnwu.superuser.Shell +import java.io.File import java.security.PrivateKey import java.security.cert.X509Certificate @@ -31,7 +33,7 @@ object OnboardingCompiler { if (OverlayCompiler.createManifest(name, target, source)) { try { Thread.sleep(1000) - } catch (ignored: Exception) { + } catch (_: Exception) { } } else { hasErroredOut = true @@ -61,7 +63,7 @@ object OnboardingCompiler { ) val foundKeywords = keywords.filter { keyword -> - result!!.out.any { it.contains(keyword, ignoreCase = true) } + result.out.any { it.contains(keyword, ignoreCase = true) } } if (foundKeywords.isNotEmpty()) { @@ -84,7 +86,7 @@ object OnboardingCompiler { ) try { Thread.sleep(1000) - } catch (ignored: Exception) { + } catch (_: Exception) { } } } @@ -116,7 +118,7 @@ object OnboardingCompiler { while (attempt-- != 0) { result = Shell.cmd( - zipalign + " -p -f 4 " + source + ' ' + Resources.UNSIGNED_DIR + '/' + name + "$zipalign -p -f 4 $source $UNSIGNED_DIR/$name" ).exec() if (result.isSuccess) { @@ -137,7 +139,7 @@ object OnboardingCompiler { ) try { Thread.sleep(1000) - } catch (ignored: Exception) { + } catch (_: Exception) { } } } @@ -154,15 +156,22 @@ object OnboardingCompiler { fun apkSigner(source: String?, name: String): Boolean { try { if (key == null) { - key = - CryptoUtils.readPrivateKey(appContext.assets.open("Keystore/testkey.pk8")) + key = CryptoUtils.readPrivateKey( + appContext.assets.open("Keystore/testkey.pk8") + ) } if (cert == null) { - cert = - CryptoUtils.readCertificate(appContext.assets.open("Keystore/testkey.x509.pem")) + cert = CryptoUtils.readCertificate( + appContext.assets.open("Keystore/testkey.x509.pem") + ) + } + + File("$SIGNED_DIR/IconifyComponent$name").let { file -> + if (file.parentFile?.exists() == false) file.parentFile?.mkdirs() + if (!file.exists()) file.createNewFile() } - SignAPK.sign(cert, key, source, Resources.SIGNED_DIR + "/IconifyComponent" + name) + SignAPK.sign(cert, key, source, "$SIGNED_DIR/IconifyComponent$name") Log.i("$TAG - APKSigner", "Successfully signed " + name.replace(".apk", "")) } catch (e: Exception) { diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OverlayCompiler.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OverlayCompiler.kt similarity index 81% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OverlayCompiler.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OverlayCompiler.kt index 932f0730b..1df8f4c5c 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/OverlayCompiler.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/OverlayCompiler.kt @@ -1,16 +1,16 @@ -package com.drdisagree.iconify.utils.overlay.compiler +package com.drdisagree.iconify.core.utils.overlay.compilers import android.util.Log -import com.drdisagree.iconify.Iconify.Companion.appContext +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.core.utils.AppUtils.getSplitLocations +import com.drdisagree.iconify.core.utils.Logger.writeLog +import com.drdisagree.iconify.core.utils.apksigner.CryptoUtils +import com.drdisagree.iconify.core.utils.apksigner.SignAPK import com.drdisagree.iconify.data.common.Dynamic.AAPT2 import com.drdisagree.iconify.data.common.Dynamic.ZIPALIGN import com.drdisagree.iconify.data.common.Resources import com.drdisagree.iconify.data.common.Resources.FRAMEWORK_DIR import com.drdisagree.iconify.data.common.Resources.UNSIGNED_DIR -import com.drdisagree.iconify.utils.AppUtils.getSplitLocations -import com.drdisagree.iconify.utils.apksigner.CryptoUtils -import com.drdisagree.iconify.utils.apksigner.SignAPK -import com.drdisagree.iconify.utils.helper.Logger.writeLog import com.topjohnwu.superuser.Shell import java.security.PrivateKey import java.security.cert.X509Certificate @@ -65,7 +65,7 @@ object OverlayCompiler { } val command = aaptCommand.toString() - var result = Shell.cmd(command).exec() + var result = Shell.cmd("$command 2>&1").exec() if (!result.isSuccess) { val keywords = listOf( @@ -82,7 +82,7 @@ object OverlayCompiler { "find $source/res -type f -name \"*.xml\" -exec sed -i '/$keyword/d' {} +" ).exec() } - result = Shell.cmd(command).exec() + result = Shell.cmd("$command 2>&1").exec() } } @@ -91,7 +91,10 @@ object OverlayCompiler { } else { Log.e( "$TAG - AAPT", - "Failed to build APK for $name\n${result.out.joinToString("\n")}" + "Failed to build APK for $name\n${ + (if (result.out.firstOrNull().isNullOrEmpty()) result.err + else result.out).joinToString("\n") + }" ) val fileContents = Shell.cmd( @@ -103,7 +106,7 @@ object OverlayCompiler { header = "Failed to build APK for $name", command = command, fileContents = fileContents, - errorLog = result.out + errorLog = if (result.out.firstOrNull().isNullOrEmpty()) result.err else result.out ) } @@ -153,18 +156,23 @@ object OverlayCompiler { try { if (key == null) { - key = - CryptoUtils.readPrivateKey(appContext.assets.open("Keystore/testkey.pk8")) + key = CryptoUtils.readPrivateKey( + appContext.assets.open("Keystore/testkey.pk8") + ) } if (cert == null) { - cert = - CryptoUtils.readCertificate(appContext.assets.open("Keystore/testkey.x509.pem")) + cert = CryptoUtils.readCertificate( + appContext.assets.open("Keystore/testkey.x509.pem") + ) } fileName = CompilerUtils.getOverlayName(source) SignAPK.sign( - cert, key, source, Resources.SIGNED_DIR + "/IconifyComponent" + fileName + ".apk" + cert, + key, + source, + Resources.SIGNED_DIR + "/IconifyComponent" + fileName + ".apk" ) Log.i("$TAG - APKSigner", "Successfully signed $fileName") diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/RoundnessCompiler.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/RoundnessCompiler.kt similarity index 89% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/RoundnessCompiler.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/RoundnessCompiler.kt index 8fa978fa3..6ffa7a516 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/RoundnessCompiler.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/RoundnessCompiler.kt @@ -1,6 +1,14 @@ -package com.drdisagree.iconify.utils.overlay.compiler +package com.drdisagree.iconify.core.utils.overlay.compilers import android.util.Log +import com.drdisagree.iconify.core.utils.AssetsUtils.copyAssets +import com.drdisagree.iconify.core.utils.FileUtils +import com.drdisagree.iconify.core.utils.Logger.writeLog +import com.drdisagree.iconify.core.utils.RootUtils.setPermissions +import com.drdisagree.iconify.core.utils.SystemUtils.mountRO +import com.drdisagree.iconify.core.utils.SystemUtils.mountRW +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.disableOverlays +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.enableOverlays import com.drdisagree.iconify.data.common.Const.FRAMEWORK_PACKAGE import com.drdisagree.iconify.data.common.Const.SYSTEMUI_PACKAGE import com.drdisagree.iconify.data.common.Dynamic.DATA_DIR @@ -13,14 +21,7 @@ import com.drdisagree.iconify.data.common.Resources.TEMP_DIR import com.drdisagree.iconify.data.common.Resources.TEMP_OVERLAY_DIR import com.drdisagree.iconify.data.common.Resources.UNSIGNED_DIR import com.drdisagree.iconify.data.common.Resources.UNSIGNED_UNALIGNED_DIR -import com.drdisagree.iconify.utils.FileUtils.copyAssets -import com.drdisagree.iconify.utils.RootUtils.setPermissions -import com.drdisagree.iconify.utils.SystemUtils.mountRO -import com.drdisagree.iconify.utils.SystemUtils.mountRW -import com.drdisagree.iconify.utils.helper.BinaryInstaller.symLinkBinaries -import com.drdisagree.iconify.utils.helper.Logger.writeLog -import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlays -import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlays +import com.drdisagree.iconify.helpers.BinaryInstaller.symLinkBinaries import com.topjohnwu.superuser.Shell import java.io.IOException @@ -108,14 +109,16 @@ object RoundnessCompiler { } // Create temp directory - Shell.cmd("rm -rf $TEMP_DIR; mkdir -p $TEMP_DIR").exec() - Shell.cmd("mkdir -p $TEMP_OVERLAY_DIR").exec() - Shell.cmd("mkdir -p $UNSIGNED_UNALIGNED_DIR").exec() - Shell.cmd("mkdir -p $UNSIGNED_DIR").exec() - Shell.cmd("mkdir -p $SIGNED_DIR").exec() + FileUtils.ensureDirs( + TEMP_DIR, + TEMP_OVERLAY_DIR, + UNSIGNED_UNALIGNED_DIR, + UNSIGNED_DIR, + SIGNED_DIR + ) if (!mForce) { - Shell.cmd("mkdir -p $BACKUP_DIR").exec() + FileUtils.ensureDirs(BACKUP_DIR) } else { // Disable the overlay in case it is already enabled val overlayNames = arrayOfNulls(mOverlayName.size) diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/SettingsIconsCompiler.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/SettingsIconsCompiler.kt similarity index 81% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/SettingsIconsCompiler.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/SettingsIconsCompiler.kt index e8fb13eda..904809202 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/compiler/SettingsIconsCompiler.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/compilers/SettingsIconsCompiler.kt @@ -1,6 +1,14 @@ -package com.drdisagree.iconify.utils.overlay.compiler +package com.drdisagree.iconify.core.utils.overlay.compilers import android.util.Log +import com.drdisagree.iconify.core.utils.AssetsUtils.copyAssets +import com.drdisagree.iconify.core.utils.FileUtils +import com.drdisagree.iconify.core.utils.Logger.writeLog +import com.drdisagree.iconify.core.utils.RootUtils.setPermissions +import com.drdisagree.iconify.core.utils.SystemUtils.mountRO +import com.drdisagree.iconify.core.utils.SystemUtils.mountRW +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.disableOverlays +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.enableOverlays import com.drdisagree.iconify.data.common.Const.GMS_PACKAGE import com.drdisagree.iconify.data.common.Const.SETTINGS_PACKAGE import com.drdisagree.iconify.data.common.Const.WELLBEING_PACKAGE @@ -14,15 +22,9 @@ import com.drdisagree.iconify.data.common.Resources.TEMP_DIR import com.drdisagree.iconify.data.common.Resources.TEMP_OVERLAY_DIR import com.drdisagree.iconify.data.common.Resources.UNSIGNED_DIR import com.drdisagree.iconify.data.common.Resources.UNSIGNED_UNALIGNED_DIR -import com.drdisagree.iconify.utils.FileUtils.copyAssets -import com.drdisagree.iconify.utils.RootUtils.setPermissions -import com.drdisagree.iconify.utils.SystemUtils.mountRO -import com.drdisagree.iconify.utils.SystemUtils.mountRW -import com.drdisagree.iconify.utils.helper.BinaryInstaller.symLinkBinaries -import com.drdisagree.iconify.utils.helper.Logger.writeLog -import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlays -import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlays +import com.drdisagree.iconify.helpers.BinaryInstaller.symLinkBinaries import com.topjohnwu.superuser.Shell +import java.io.File import java.io.IOException object SettingsIconsCompiler { @@ -62,7 +64,7 @@ object SettingsIconsCompiler { // Write resources if (resources != "" && writeResources( - TEMP_CACHE_DIR + "/" + mPackages[i] + "/" + overlayName, + "$TEMP_CACHE_DIR/${mPackages[i]}/$overlayName", resources ) ) { @@ -73,7 +75,7 @@ object SettingsIconsCompiler { // Build APK using AAPT if (OverlayCompiler.runAapt( - TEMP_CACHE_DIR + "/" + mPackages[i] + "/" + overlayName, + "$TEMP_CACHE_DIR/${mPackages[i]}/$overlayName", mPackages[i] ) ) { @@ -116,19 +118,21 @@ object SettingsIconsCompiler { } // Create temp directory - Shell.cmd("rm -rf $TEMP_DIR; mkdir -p $TEMP_DIR").exec() - Shell.cmd("mkdir -p $TEMP_OVERLAY_DIR").exec() - Shell.cmd("mkdir -p $TEMP_CACHE_DIR").exec() - Shell.cmd("mkdir -p $UNSIGNED_UNALIGNED_DIR").exec() - Shell.cmd("mkdir -p $UNSIGNED_DIR").exec() - Shell.cmd("mkdir -p $SIGNED_DIR").exec() - - for (aPackages in mPackages) { - Shell.cmd("mkdir -p $TEMP_CACHE_DIR/$aPackages/").exec() + FileUtils.ensureDirs( + TEMP_DIR, + TEMP_OVERLAY_DIR, + TEMP_CACHE_DIR, + UNSIGNED_UNALIGNED_DIR, + UNSIGNED_DIR, + SIGNED_DIR + ) + + for (mPackage in mPackages) { + FileUtils.ensureDirs("$TEMP_CACHE_DIR/$mPackage/") } if (!mForce) { - Shell.cmd("mkdir -p $BACKUP_DIR").exec() + FileUtils.ensureDirs(BACKUP_DIR) } else { // Disable the overlay in case it is already enabled val overlayNames = arrayOfNulls(mPackages.size) @@ -219,31 +223,37 @@ object SettingsIconsCompiler { } private fun writeResources(source: String, resources: String): Boolean { - val result = Shell.cmd( - "rm -rf $source/res/values/Iconify.xml", - "printf '$resources' > $source/res/values/Iconify.xml;" - ).exec() - - if (result.isSuccess) Log.i( - "$TAG - WriteResources", - "Successfully written resources for SettingsIcons" - ) else { + return try { + val valuesDir = File("$source/res/values").also { + FileUtils.ensureDirs(it.absolutePath) + } + + val iconifyFile = File(valuesDir, "Iconify.xml") + + if (iconifyFile.exists()) iconifyFile.delete() + + iconifyFile.writeText(resources, Charsets.UTF_8) + + Log.i( + "$TAG - WriteResources", + "Successfully written resources for SettingsIcons" + ) + + false + } catch (e: Exception) { Log.e( "$TAG - WriteResources", - "Failed to write resources for SettingsIcons\n${ - java.lang.String.join( - "\n", - result.out - ) - }" + "Failed to write resources for SettingsIcons", + e ) + writeLog( "$TAG - WriteResources", "Failed to write resources for SettingsIcons", - result.out + listOf(e.stackTraceToString()) ) - } - return !result.isSuccess + true + } } } diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/IconPackManager.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/IconPackManager.kt similarity index 81% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/IconPackManager.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/IconPackManager.kt index 400696310..c8c1ff929 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/IconPackManager.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/IconPackManager.kt @@ -1,8 +1,8 @@ -package com.drdisagree.iconify.utils.overlay.manager +package com.drdisagree.iconify.core.utils.overlay.managers import com.drdisagree.iconify.data.config.RPrefs.putBoolean -import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlays -import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlaysExclusiveInCategory +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.disableOverlays +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.enableOverlaysExclusiveInCategory import com.topjohnwu.superuser.Shell object IconPackManager { diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/MediaPlayerIconManager.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/MediaPlayerIconManager.kt similarity index 68% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/MediaPlayerIconManager.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/MediaPlayerIconManager.kt index 6c654b124..27e756897 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/MediaPlayerIconManager.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/MediaPlayerIconManager.kt @@ -1,8 +1,8 @@ -package com.drdisagree.iconify.utils.overlay.manager +package com.drdisagree.iconify.core.utils.overlay.managers import com.drdisagree.iconify.data.config.RPrefs.putBoolean -import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlay -import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlayExclusiveInCategory +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.disableOverlay +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.enableOverlayExclusiveInCategory object MediaPlayerIconManager { diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/NotificationManager.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/NotificationManager.kt similarity index 82% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/NotificationManager.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/NotificationManager.kt index 680b1e837..5c7c7fa1f 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/NotificationManager.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/NotificationManager.kt @@ -1,15 +1,15 @@ -package com.drdisagree.iconify.utils.overlay.manager +package com.drdisagree.iconify.core.utils.overlay.managers import com.drdisagree.iconify.data.common.Dynamic.TOTAL_NOTIFICATIONS import com.drdisagree.iconify.data.common.Dynamic.isAtleastA14 import com.drdisagree.iconify.data.common.Preferences.FIX_NOTIFICATION_COLOR import com.drdisagree.iconify.data.common.Preferences.FIX_NOTIFICATION_FOOTER_BUTTON_COLOR import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.utils.SystemUtils -import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlay -import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlayExclusiveInCategory -import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlays -import com.drdisagree.iconify.utils.overlay.OverlayUtils.isOverlayEnabled +import com.drdisagree.iconify.core.utils.SystemUtils +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.disableOverlay +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.enableOverlayExclusiveInCategory +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.enableOverlays +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.isOverlayEnabled object NotificationManager { diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/QsResourceManager.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/QsResourceManager.kt similarity index 92% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/QsResourceManager.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/QsResourceManager.kt index 2824284e3..7151c1a88 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/QsResourceManager.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/QsResourceManager.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.overlay.manager +package com.drdisagree.iconify.core.utils.overlay.managers import com.topjohnwu.superuser.Shell diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/RoundnessManager.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/RoundnessManager.kt similarity index 96% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/RoundnessManager.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/RoundnessManager.kt index 2254fa44f..b04ef6fe6 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/RoundnessManager.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/RoundnessManager.kt @@ -1,6 +1,6 @@ -package com.drdisagree.iconify.utils.overlay.manager +package com.drdisagree.iconify.core.utils.overlay.managers -import com.drdisagree.iconify.utils.overlay.compiler.RoundnessCompiler +import com.drdisagree.iconify.core.utils.overlay.compilers.RoundnessCompiler import java.io.IOException import kotlin.math.max diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/SettingsIconResourceManager.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/SettingsIconResourceManager.kt similarity index 95% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/SettingsIconResourceManager.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/SettingsIconResourceManager.kt index 452b4e70f..59443da52 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/SettingsIconResourceManager.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/SettingsIconResourceManager.kt @@ -1,17 +1,17 @@ -package com.drdisagree.iconify.utils.overlay.manager +package com.drdisagree.iconify.core.utils.overlay.managers -import com.drdisagree.iconify.utils.overlay.compiler.SettingsIconsCompiler.buildOverlay +import com.drdisagree.iconify.core.utils.overlay.compilers.SettingsIconsCompiler.buildOverlay import java.io.IOException object SettingsIconResourceManager { @Throws(IOException::class) fun buildOverlay( - iconSet: Int, backgroundStyle: Int, backgroundShape: Int, iconSize: Int, iconColor: Int, + iconSet: Int, force: Boolean ): Boolean { var resources = "" @@ -83,8 +83,8 @@ object SettingsIconResourceManager { when (backgroundShape) { 1 -> resources += """ - 48.0dip - 48.0dip + 48.0dip + 48.0dip """.trimIndent() diff --git a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/SignalIconManager.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/SignalIconManager.kt similarity index 80% rename from app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/SignalIconManager.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/SignalIconManager.kt index 6a091e09d..a2eaf0c63 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/overlay/manager/SignalIconManager.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/overlay/managers/SignalIconManager.kt @@ -1,10 +1,10 @@ -package com.drdisagree.iconify.utils.overlay.manager +package com.drdisagree.iconify.core.utils.overlay.managers import com.drdisagree.iconify.data.config.RPrefs.putBoolean -import com.drdisagree.iconify.utils.overlay.OverlayUtils -import com.drdisagree.iconify.utils.overlay.OverlayUtils.checkEnabledOverlay -import com.drdisagree.iconify.utils.overlay.OverlayUtils.disableOverlays -import com.drdisagree.iconify.utils.overlay.OverlayUtils.enableOverlaysExclusiveInCategory +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.checkEnabledOverlay +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.disableOverlays +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.enableOverlaysExclusiveInCategory import com.topjohnwu.superuser.Shell object SignalIconManager { diff --git a/app/src/main/java/com/drdisagree/iconify/utils/weather/AbstractWeatherProvider.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/AbstractWeatherProvider.kt similarity index 95% rename from app/src/main/java/com/drdisagree/iconify/utils/weather/AbstractWeatherProvider.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/weather/AbstractWeatherProvider.kt index 366419fa1..17de2b50b 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/weather/AbstractWeatherProvider.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/AbstractWeatherProvider.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.weather +package com.drdisagree.iconify.core.utils.weather import android.content.Context import android.location.Geocoder @@ -6,9 +6,9 @@ import android.location.Location import android.text.TextUtils import android.util.Log import com.drdisagree.iconify.R -import com.drdisagree.iconify.utils.NetworkUtils -import com.drdisagree.iconify.utils.weather.WeatherConfig.getLocationName -import com.drdisagree.iconify.utils.weather.WeatherConfig.isCustomLocation +import com.drdisagree.iconify.core.utils.NetworkUtils +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.getLocationName +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.isCustomLocation import org.json.JSONObject import java.io.IOException import java.text.SimpleDateFormat @@ -158,7 +158,7 @@ abstract class AbstractWeatherProvider(protected var mContext: Context) { protected fun getWeatherDataLocality(coordinates: String): String? { var city: String? - if (isCustomLocation(mContext)) { + if (isCustomLocation()) { city = getLocationName(mContext) if (TextUtils.isEmpty(city)) { city = getCoordinatesLocality(coordinates) diff --git a/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherConfig.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherConfig.kt new file mode 100644 index 000000000..bf2eb173f --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherConfig.kt @@ -0,0 +1,188 @@ +package com.drdisagree.iconify.core.utils.weather + +import android.Manifest +import android.content.Context +import android.content.Context.MODE_PRIVATE +import android.content.SharedPreferences +import android.content.pm.PackageManager +import android.util.Log +import androidx.core.content.edit +import com.drdisagree.iconify.core.utils.weather.providers.METNorwayProvider +import com.drdisagree.iconify.core.utils.weather.providers.OpenMeteoProvider +import com.drdisagree.iconify.core.utils.weather.providers.OpenWeatherMapProvider +import com.drdisagree.iconify.core.utils.weather.providers.YandexProvider +import com.drdisagree.iconify.data.common.XposedConst.WEATHER_PREF_FILE_NAME +import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.xposed.utils.XPrefs.Xprefs +import com.drdisagree.iconify.xposed.utils.XPrefs.XprefsIsInitialized + +object WeatherConfig { + + private const val PREF_KEY_LOCATION_LAT: String = "location_lat" + private const val PREF_KEY_LOCATION_LON: String = "location_lon" + private const val PREF_KEY_LOCATION_NAME: String = "location_name" + private const val PREF_KEY_WEATHER_DATA: String = "weather_data" + private const val PREF_KEY_LAST_UPDATE: String = "last_update" + private const val PREF_KEY_UPDATE_ERROR: String = "update_error" + + private fun getPrefs(): SharedPreferences { + if (XprefsIsInitialized) return Xprefs + + return RPrefs.getPrefs + } + + private fun Context.getWeatherPrefs(): SharedPreferences { + return createDeviceProtectedStorageContext() + .getSharedPreferences(WEATHER_PREF_FILE_NAME, MODE_PRIVATE) + } + + fun clear(context: Context) { + context.getWeatherPrefs().edit { clear() } + val prefs = listOf( + XposedKey.WEATHER_PROVIDER.name, + XposedKey.WEATHER_UNITS.name, + XposedKey.WEATHER_UPDATE_INTERVAL.name, + XposedKey.WEATHER_OWM_KEY.name, + PREF_KEY_UPDATE_ERROR + ) + prefs.forEach { + getPrefs().edit { remove(it) } + } + } + + fun getProvider(context: Context): AbstractWeatherProvider { + val provider = getPrefs().getString(XposedKey.WEATHER_PROVIDER.name, "0") + return when (provider) { + "1" -> OpenWeatherMapProvider(context) + "2" -> YandexProvider(context) + "3" -> METNorwayProvider(context) + else -> OpenMeteoProvider(context) + } + } + + fun getProviderId(): String { + val provider = getPrefs().getString(XposedKey.WEATHER_PROVIDER.name, "0") + return when (provider) { + "1" -> "OpenWeatherMap" + "2" -> "Yandex" + "3" -> "MET Norway" + else -> "OpenMeteo" + } + } + + fun isMetric(): Boolean { + return getPrefs().getString(XposedKey.WEATHER_UNITS.name, "0") == "0" + } + + fun isCustomLocation(): Boolean { + return getPrefs().getBoolean(XposedKey.WEATHER_CUSTOM_LOCATION.name, false) + } + + fun getLocationLat(context: Context): String? { + return context.getWeatherPrefs().getString(PREF_KEY_LOCATION_LAT, null) + } + + fun getLocationLon(context: Context): String? { + return context.getWeatherPrefs().getString(PREF_KEY_LOCATION_LON, null) + } + + fun setLocationId(context: Context, lat: String?, lon: String?) { + context.getWeatherPrefs().edit { putString(PREF_KEY_LOCATION_LAT, lat) } + context.getWeatherPrefs().edit { putString(PREF_KEY_LOCATION_LON, lon) } + } + + fun getLocationName(context: Context): String? { + return context.getWeatherPrefs().getString(PREF_KEY_LOCATION_NAME, null) + } + + fun setLocationName(context: Context, name: String?) { + context.getWeatherPrefs().edit { putString(PREF_KEY_LOCATION_NAME, name) } + } + + fun getWeatherData(context: Context): WeatherInfo? { + var str: String? = null + + try { + str = context.getWeatherPrefs().getString(PREF_KEY_WEATHER_DATA, null) + } catch (t: Throwable) { + Log.e("WeatherConfig", t.toString()) + } + + if (str != null) { + return WeatherInfo.fromSerializedString(context, str) + } + + return null + } + + fun setWeatherData(data: WeatherInfo, context: Context) { + context.getWeatherPrefs().edit { + putString( + PREF_KEY_WEATHER_DATA, + data.toSerializedString() + ) + } + context.getWeatherPrefs().edit { + putLong( + PREF_KEY_LAST_UPDATE, + System.currentTimeMillis() + ) + } + } + + fun clearLastUpdateTime(context: Context) { + context.getWeatherPrefs().edit { putLong(PREF_KEY_LAST_UPDATE, 0) } + } + + fun isEnabled(): Boolean { + val lsWeather = getPrefs().getBoolean(XposedKey.LOCKSCREEN_WEATHER.name, false) + val lsWidgets = getPrefs().getBoolean(XposedKey.LOCKSCREEN_WIDGETS.name, false) + + val bigWidgets = getPrefs().getString(XposedKey.LOCKSCREEN_WIDGETS_MAIN.name, "")!! + val miniWidgets = + getPrefs().getString(XposedKey.LOCKSCREEN_WIDGETS_EXTRAS.name, "")!! + + return lsWeather || (lsWidgets && (listOf( + bigWidgets, + miniWidgets + ).any { it.contains("weather") })) + } + + fun setEnabled(value: Boolean, key: String?) { + getPrefs().edit { putBoolean(key, value) } + } + + fun getUpdateInterval(): Int { + var updateValue = 2 + try { + updateValue = + getPrefs().getString(XposedKey.WEATHER_UPDATE_INTERVAL.name, "2")!!.toInt() + } catch (_: Throwable) { + } + + return updateValue + } + + fun getIconPack(): String? { + return getPrefs().getString(XposedKey.WEATHER_ICON_PACK.name, null) + } + + fun setUpdateError(context: Context, value: Boolean) { + context.getWeatherPrefs().edit { putBoolean(PREF_KEY_UPDATE_ERROR, value) } + } + + fun isSetupDone(context: Context): Boolean { + return (context.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) + == PackageManager.PERMISSION_GRANTED) + } + + fun getOwmKey(): String { + return getPrefs().getString(XposedKey.WEATHER_OWM_KEY.name, "") ?: "" + } + + fun getYandexKey(): String { + return getPrefs().getString(XposedKey.WEATHER_YANDEX_KEY.name, "") ?: "" + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherContentProvider.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherContentProvider.kt similarity index 94% rename from app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherContentProvider.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherContentProvider.kt index f3201aa53..2d95768ac 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherContentProvider.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherContentProvider.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.weather +package com.drdisagree.iconify.core.utils.weather import android.annotation.SuppressLint import android.content.ContentProvider @@ -9,7 +9,7 @@ import android.database.Cursor import android.database.MatrixCursor import android.net.Uri import android.util.Log -import com.drdisagree.iconify.services.WeatherScheduler.scheduleUpdateNow +import com.drdisagree.iconify.services.schedulers.WeatherScheduler.scheduleUpdateNow class WeatherContentProvider : ContentProvider() { @@ -34,13 +34,13 @@ class WeatherContentProvider : ContentProvider() { if (projectionType == URI_TYPE_SETTINGS) { result.newRow() - .add(COLUMN_ENABLED, if (WeatherConfig.isEnabled(mContext)) 1 else 0) - .add(COLUMN_PROVIDER, WeatherConfig.getProviderId(mContext)) - .add(COLUMN_INTERVAL, WeatherConfig.getUpdateInterval(mContext)) - .add(COLUMN_UNITS, if (WeatherConfig.isMetric(mContext)) 0 else 1) + .add(COLUMN_ENABLED, if (WeatherConfig.isEnabled()) 1 else 0) + .add(COLUMN_PROVIDER, WeatherConfig.getProviderId()) + .add(COLUMN_INTERVAL, WeatherConfig.getUpdateInterval()) + .add(COLUMN_UNITS, if (WeatherConfig.isMetric()) 0 else 1) .add( COLUMN_LOCATION, - if (WeatherConfig.isCustomLocation(mContext)) WeatherConfig.getLocationName( + if (WeatherConfig.isCustomLocation()) WeatherConfig.getLocationName( mContext ) else "" ) @@ -50,8 +50,7 @@ class WeatherContentProvider : ContentProvider() { ) .add( COLUMN_ICON_PACK, - if (WeatherConfig.getIconPack(mContext) != null) WeatherConfig.getIconPack( - mContext + if (WeatherConfig.getIconPack() != null) WeatherConfig.getIconPack( ) else "" ) @@ -176,7 +175,8 @@ class WeatherContentProvider : ContentProvider() { private const val COLUMN_FORECAST_HOUR: String = "forecast_hour" private const val COLUMN_FORECAST_HOUR_TEMP: String = "forecast_hour_temp" private const val COLUMN_FORECAST_HOUR_CONDITION: String = "forecast_hour_condition" - private const val COLUMN_FORECAST_HOUR_CONDITION_CODE: String = "forecast_hour_condition_code" + private const val COLUMN_FORECAST_HOUR_CONDITION_CODE: String = + "forecast_hour_condition_code" private const val COLUMN_ENABLED = "enabled" private const val COLUMN_PROVIDER = "provider" diff --git a/app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherInfo.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherInfo.kt similarity index 99% rename from app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherInfo.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherInfo.kt index 5374da181..154432ed8 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherInfo.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherInfo.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.weather +package com.drdisagree.iconify.core.utils.weather import android.content.Context import android.text.TextUtils diff --git a/app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherWork.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherWork.kt similarity index 88% rename from app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherWork.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherWork.kt index 3e17e3ecc..ad2ba57e1 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/weather/WeatherWork.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/WeatherWork.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.weather +package com.drdisagree.iconify.core.utils.weather import android.Manifest import android.annotation.SuppressLint @@ -13,18 +13,18 @@ import androidx.concurrent.futures.CallbackToFutureAdapter import androidx.work.ListenableWorker import androidx.work.WorkerParameters import com.drdisagree.iconify.BuildConfig -import com.drdisagree.iconify.utils.OmniJawsClient.Companion.EXTRA_ERROR_DISABLED -import com.drdisagree.iconify.utils.OmniJawsClient.Companion.EXTRA_ERROR_LOCATION -import com.drdisagree.iconify.utils.OmniJawsClient.Companion.EXTRA_ERROR_NETWORK -import com.drdisagree.iconify.utils.OmniJawsClient.Companion.EXTRA_ERROR_NO_PERMISSIONS -import com.drdisagree.iconify.utils.weather.WeatherConfig.getLocationLat -import com.drdisagree.iconify.utils.weather.WeatherConfig.getLocationLon -import com.drdisagree.iconify.utils.weather.WeatherConfig.getProvider -import com.drdisagree.iconify.utils.weather.WeatherConfig.isCustomLocation -import com.drdisagree.iconify.utils.weather.WeatherConfig.isEnabled -import com.drdisagree.iconify.utils.weather.WeatherConfig.isMetric -import com.drdisagree.iconify.utils.weather.WeatherConfig.setUpdateError -import com.drdisagree.iconify.utils.weather.WeatherConfig.setWeatherData +import com.drdisagree.iconify.core.utils.OmniJawsClient.Companion.EXTRA_ERROR_DISABLED +import com.drdisagree.iconify.core.utils.OmniJawsClient.Companion.EXTRA_ERROR_LOCATION +import com.drdisagree.iconify.core.utils.OmniJawsClient.Companion.EXTRA_ERROR_NETWORK +import com.drdisagree.iconify.core.utils.OmniJawsClient.Companion.EXTRA_ERROR_NO_PERMISSIONS +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.getLocationLat +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.getLocationLon +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.getProvider +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.isCustomLocation +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.isEnabled +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.isMetric +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.setUpdateError +import com.drdisagree.iconify.core.utils.weather.WeatherConfig.setWeatherData import com.google.common.util.concurrent.ListenableFuture import java.text.SimpleDateFormat import java.util.Locale @@ -39,7 +39,7 @@ class WeatherWork(val mContext: Context, workerParams: WorkerParameters) : override fun startWork(): ListenableFuture { return CallbackToFutureAdapter.getFuture { completer: CallbackToFutureAdapter.Completer -> - if (!isEnabled(mContext)) { + if (!isEnabled()) { handleError( completer, EXTRA_ERROR_DISABLED, @@ -48,7 +48,7 @@ class WeatherWork(val mContext: Context, workerParams: WorkerParameters) : return@getFuture completer } - if (!isCustomLocation(mContext)) { + if (!isCustomLocation()) { // Check permissions and location enabled // only if not using custom location if (!checkPermissions()) { @@ -71,7 +71,7 @@ class WeatherWork(val mContext: Context, workerParams: WorkerParameters) : if (location != null) { Log.d(TAG, "Location retrieved") updateWeather(location, completer) - } else if (isCustomLocation(mContext)) { + } else if (isCustomLocation()) { Log.d(TAG, "Using custom location configuration") updateWeather(null, completer) } else { @@ -119,7 +119,7 @@ class WeatherWork(val mContext: Context, workerParams: WorkerParameters) : private fun getCurrentLocation(): CompletableFuture { val locationFuture = CompletableFuture() - if (isCustomLocation(mContext)) { + if (isCustomLocation()) { locationFuture.complete(null) return locationFuture } @@ -193,12 +193,12 @@ class WeatherWork(val mContext: Context, workerParams: WorkerParameters) : var w: WeatherInfo? = null try { val provider = getProvider(mContext) - val isMetric = isMetric(mContext) + val isMetric = isMetric() var i = 0 while (i < RETRY_MAX_NUM) { - Log.i(TAG, "location: $location, isCustomLocation: ${isCustomLocation(mContext)}") + Log.i(TAG, "location: $location, isCustomLocation: ${isCustomLocation()}") Log.i(TAG, "getLocationLat: ${getLocationLat(mContext)}, getLocationLon: ${getLocationLon(mContext)}") - w = if (location != null && !isCustomLocation(mContext)) { + w = if (location != null && !isCustomLocation()) { provider.getLocationWeather(location, isMetric) } else if (!TextUtils.isEmpty(getLocationLat(mContext)) && !TextUtils.isEmpty( getLocationLon(mContext) diff --git a/app/src/main/java/com/drdisagree/iconify/utils/weather/providers/METNorwayProvider.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/METNorwayProvider.kt similarity index 99% rename from app/src/main/java/com/drdisagree/iconify/utils/weather/providers/METNorwayProvider.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/METNorwayProvider.kt index bdadd9a73..f105de735 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/weather/providers/METNorwayProvider.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/METNorwayProvider.kt @@ -1,11 +1,11 @@ -package com.drdisagree.iconify.utils.weather.providers +package com.drdisagree.iconify.core.utils.weather.providers import android.content.Context import android.location.Location import android.util.Log import com.drdisagree.iconify.BuildConfig -import com.drdisagree.iconify.utils.weather.AbstractWeatherProvider -import com.drdisagree.iconify.utils.weather.WeatherInfo +import com.drdisagree.iconify.core.utils.weather.AbstractWeatherProvider +import com.drdisagree.iconify.core.utils.weather.WeatherInfo import org.json.JSONArray import org.json.JSONException import org.json.JSONObject diff --git a/app/src/main/java/com/drdisagree/iconify/utils/weather/providers/OpenMeteoProvider.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/OpenMeteoProvider.kt similarity index 98% rename from app/src/main/java/com/drdisagree/iconify/utils/weather/providers/OpenMeteoProvider.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/OpenMeteoProvider.kt index b7b632175..849489bd3 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/weather/providers/OpenMeteoProvider.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/OpenMeteoProvider.kt @@ -1,10 +1,10 @@ -package com.drdisagree.iconify.utils.weather.providers +package com.drdisagree.iconify.core.utils.weather.providers import android.content.Context import android.location.Location import android.util.Log -import com.drdisagree.iconify.utils.weather.AbstractWeatherProvider -import com.drdisagree.iconify.utils.weather.WeatherInfo +import com.drdisagree.iconify.core.utils.weather.AbstractWeatherProvider +import com.drdisagree.iconify.core.utils.weather.WeatherInfo import org.json.JSONException import org.json.JSONObject import java.text.SimpleDateFormat diff --git a/app/src/main/java/com/drdisagree/iconify/utils/weather/providers/OpenWeatherMapProvider.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/OpenWeatherMapProvider.kt similarity index 96% rename from app/src/main/java/com/drdisagree/iconify/utils/weather/providers/OpenWeatherMapProvider.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/OpenWeatherMapProvider.kt index e848b7aa4..ce47efe0d 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/weather/providers/OpenWeatherMapProvider.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/OpenWeatherMapProvider.kt @@ -1,12 +1,12 @@ -package com.drdisagree.iconify.utils.weather.providers +package com.drdisagree.iconify.core.utils.weather.providers import android.content.Context import android.location.Location import android.text.TextUtils import android.util.Log -import com.drdisagree.iconify.utils.weather.AbstractWeatherProvider -import com.drdisagree.iconify.utils.weather.WeatherConfig -import com.drdisagree.iconify.utils.weather.WeatherInfo +import com.drdisagree.iconify.core.utils.weather.AbstractWeatherProvider +import com.drdisagree.iconify.core.utils.weather.WeatherConfig +import com.drdisagree.iconify.core.utils.weather.WeatherInfo import org.json.JSONArray import org.json.JSONException import org.json.JSONObject @@ -63,7 +63,7 @@ class OpenWeatherMapProvider(context: Context?) : AbstractWeatherProvider(contex val city: String = getWeatherDataLocality(selection).toString() - val w: WeatherInfo = WeatherInfo( + val w = WeatherInfo( mContext, selection, city, /* condition */ weather.getString("main"), /* conditionCode */ mapConditionIconToCode( @@ -251,7 +251,7 @@ class OpenWeatherMapProvider(context: Context?) : AbstractWeatherProvider(contex private val aPIKey: String? get() { - val customKey: String = WeatherConfig.getOwmKey(mContext).toString() + val customKey: String = WeatherConfig.getOwmKey() if (!TextUtils.isEmpty(customKey)) { return customKey } diff --git a/app/src/main/java/com/drdisagree/iconify/utils/weather/providers/YandexProvider.kt b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/YandexProvider.kt similarity index 97% rename from app/src/main/java/com/drdisagree/iconify/utils/weather/providers/YandexProvider.kt rename to app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/YandexProvider.kt index d054a45c9..38dd2ec97 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/weather/providers/YandexProvider.kt +++ b/app/src/main/java/com/drdisagree/iconify/core/utils/weather/providers/YandexProvider.kt @@ -1,12 +1,12 @@ -package com.drdisagree.iconify.utils.weather.providers +package com.drdisagree.iconify.core.utils.weather.providers import android.content.Context import android.location.Location import android.text.TextUtils import android.util.Log -import com.drdisagree.iconify.utils.weather.AbstractWeatherProvider -import com.drdisagree.iconify.utils.weather.WeatherConfig -import com.drdisagree.iconify.utils.weather.WeatherInfo +import com.drdisagree.iconify.core.utils.weather.AbstractWeatherProvider +import com.drdisagree.iconify.core.utils.weather.WeatherConfig +import com.drdisagree.iconify.core.utils.weather.WeatherInfo import org.json.JSONArray import org.json.JSONException import org.json.JSONObject @@ -38,7 +38,7 @@ class YandexProvider(context: Context?) : AbstractWeatherProvider(context!!) { URL_WEATHER + coordinates + PART_PARAMETERS, language ) - val apiKey: String = WeatherConfig.getYandexKey(mContext) + val apiKey: String = WeatherConfig.getYandexKey() // Check API Key first if (TextUtils.isEmpty(apiKey)) { Log.e(TAG, "Yandex API key is not set") diff --git a/app/src/main/java/com/drdisagree/iconify/data/annotations/TestOnlyFlag.kt b/app/src/main/java/com/drdisagree/iconify/data/annotations/TestOnlyFlag.kt deleted file mode 100644 index 2047095c1..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/annotations/TestOnlyFlag.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.drdisagree.iconify.data.annotations - -@Target( - AnnotationTarget.CLASS, - AnnotationTarget.FUNCTION, - AnnotationTarget.PROPERTY, - AnnotationTarget.PROPERTY_GETTER, - AnnotationTarget.FIELD -) -@Retention(AnnotationRetention.SOURCE) -annotation class TestOnlyFlag( - val description: String = "" -) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/common/Const.kt b/app/src/main/java/com/drdisagree/iconify/data/common/Const.kt index a6da4af03..05360be2c 100644 --- a/app/src/main/java/com/drdisagree/iconify/data/common/Const.kt +++ b/app/src/main/java/com/drdisagree/iconify/data/common/Const.kt @@ -1,7 +1,6 @@ package com.drdisagree.iconify.data.common import com.drdisagree.iconify.BuildConfig -import com.drdisagree.iconify.utils.RootUtils import com.drdisagree.iconify.xposed.utils.BootLoopProtector object Const { @@ -31,7 +30,7 @@ object Const { const val GITHUB_REPO = "https://github.com/Mahmud0808/Iconify" // Telegram group - const val TELEGRAM_GROUP = "https://t.me/IconifyDiscussion" + const val TELEGRAM_GROUP = "https://t.me/DrDsProjectsChat" // Crowdin const val ICONIFY_CROWDIN = "https://crowdin.com/project/iconify" @@ -82,74 +81,15 @@ object Const { const val ACTION_UPDATE_DEPTH_WALLPAPER_FOREGROUND_VISIBILITY = "${BuildConfig.APPLICATION_ID}.ACTION_UPDATE_DEPTH_WALLPAPER_FOREGROUND_VISIBILITY" - // Module script - val MAGISK_UPDATE_BINARY = """ - #!/sbin/sh - - ################# - # Initialization - ################# - - umask 022 - - # echo before loading util_functions - ui_print() { echo "${'$'}1"; } - - require_new_magisk() { - ui_print "*******************************" - ui_print " Please install Magisk v20.4+! " - ui_print "*******************************" - exit 1 - } - - ######################### - # Load util_functions.sh - ######################### - - OUTFD=${'$'}2 - ZIPFILE=${'$'}3 - - mount /data 2>/dev/null - - [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk - . /data/adb/magisk/util_functions.sh - [ ${'$'}MAGISK_VER_CODE -lt 20400 ] && require_new_magisk - - install_module - exit 0 - """.trimIndent() - - val POST_FS_DATA = if (RootUtils.isSusfsBinaryAvailable) { - """ - #!/usr/bin/env sh - MODDIR="${'$'}{0%%/*}" - modid="Iconify" - SUSFS_BIN=/data/adb/ksu/bin/ksu_susfs - - if [ ${'$'}KSU_MAGIC_MOUNT = true ]; then - exit 0 - fi - - [ ! -f ${'$'}MODDIR/skip_mount ] && touch ${'$'}MODDIR/skip_mount - - [ -w /mnt ] && basefolder=/mnt - [ -w /mnt/vendor ] && basefolder=/mnt/vendor - - mkdir ${'$'}basefolder/${'$'}modid - - cd ${'$'}MODDIR - - for i in ${'$'}(ls -d */*); do - mkdir -p ${'$'}basefolder/${'$'}modid/${'$'}i - mount --bind ${'$'}MODDIR/${'$'}i ${'$'}basefolder/${'$'}modid/${'$'}i - mount -t overlay -o "lowerdir=${'$'}basefolder/${'$'}modid/${'$'}i:/${'$'}i" overlay /${'$'}i - ${'$'}{SUSFS_BIN} add_sus_mount /${'$'}i - done - """ - } else { - """ - #!/usr/bin/env sh - MODDIR="${'$'}{0%%/*}" - """ - }.trimIndent() + val BROADCAST_ACTIONS = listOf( + ACTION_HOOK_CHECK_REQUEST, + ACTION_HOOK_CHECK_RESULT, + ACTION_BOOT_COMPLETED, + ACTION_LS_CLOCK_INFLATED, + ACTION_WEATHER_INFLATED, + ACTION_EXTRACT_SUBJECT, + ACTION_EXTRACT_SUCCESS, + ACTION_EXTRACT_FAILURE, + ACTION_UPDATE_DEPTH_WALLPAPER_FOREGROUND_VISIBILITY + ) } diff --git a/app/src/main/java/com/drdisagree/iconify/data/common/Dynamic.kt b/app/src/main/java/com/drdisagree/iconify/data/common/Dynamic.kt index 1710aa280..5e79bc763 100644 --- a/app/src/main/java/com/drdisagree/iconify/data/common/Dynamic.kt +++ b/app/src/main/java/com/drdisagree/iconify/data/common/Dynamic.kt @@ -1,7 +1,7 @@ package com.drdisagree.iconify.data.common import android.os.Build -import com.drdisagree.iconify.Iconify.Companion.appContext +import com.drdisagree.iconify.app.Iconify.Companion.appContext import com.topjohnwu.superuser.Shell import java.io.File @@ -13,21 +13,11 @@ object Dynamic { ).exec().out.size // Overlay compiler tools - val NATIVE_LIBRARY_DIR: String = appContext.applicationInfo.nativeLibraryDir val DATA_DIR: String = appContext.filesDir.absolutePath val BIN_DIR = appContext.dataDir.toString() + "/bin" - val AAPT2LIB = File(NATIVE_LIBRARY_DIR, "libaapt2.so") - val AAPT2 = File(BIN_DIR, "aapt2") - val ZIPALIGNLIB = File(NATIVE_LIBRARY_DIR, "libzipalign.so") - val ZIPALIGN = File(BIN_DIR, "zipalign") - - // Onboarding overlay installation - var skippedInstallation = false + val AAPT2 = File(BIN_DIR, "libaapt2.so") + val ZIPALIGN = File(BIN_DIR, "libzipalign.so") // Device information val isAtleastA14 = 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/data/common/Preferences.kt b/app/src/main/java/com/drdisagree/iconify/data/common/Preferences.kt index e85b01b37..639166edf 100644 --- a/app/src/main/java/com/drdisagree/iconify/data/common/Preferences.kt +++ b/app/src/main/java/com/drdisagree/iconify/data/common/Preferences.kt @@ -1,7 +1,7 @@ package com.drdisagree.iconify.data.common -import com.drdisagree.iconify.BaseSplashActivity -import com.drdisagree.iconify.data.config.RPrefs.getBoolean +import com.drdisagree.iconify.data.config.Config +import com.drdisagree.iconify.data.config.RPrefs object Preferences { @@ -423,11 +423,10 @@ object Preferences { const val XPOSED_ONLY_MODE = "IconifyXposedOnlyMode" const val NEW_UPDATE_FOUND = "newUpdateFound" - var isXposedOnlyMode = getBoolean(XPOSED_ONLY_MODE, true) && - !BaseSplashActivity.SKIP_TO_HOMEPAGE_FOR_TESTING + var isXposedOnlyMode = RPrefs.getBoolean(XPOSED_ONLY_MODE, true) && + !Config.SKIP_TO_HOMEPAGE_FOR_TESTING // Others const val BOOT_ID = "boot_id" - const val VER_CODE = "versionCode" const val ALERT_DIALOG_QSROWCOL = "alertDialogQsRowCol" } diff --git a/app/src/main/java/com/drdisagree/iconify/data/common/References.kt b/app/src/main/java/com/drdisagree/iconify/data/common/References.kt index 546e0c937..49b782d22 100644 --- a/app/src/main/java/com/drdisagree/iconify/data/common/References.kt +++ b/app/src/main/java/com/drdisagree/iconify/data/common/References.kt @@ -1,9 +1,55 @@ package com.drdisagree.iconify.data.common import com.drdisagree.iconify.BuildConfig +import com.drdisagree.iconify.features.settings.lookandfeel.screens.lookAndFeelPreferences +import com.drdisagree.iconify.features.settings.main.screens.settingsPreferences +import com.drdisagree.iconify.features.xposed.lockscreen.albumart.screens.lsAlbumArtPreferences +import com.drdisagree.iconify.features.xposed.lockscreen.clock.screens.lsClockPreferences +import com.drdisagree.iconify.features.xposed.lockscreen.depthwallpaper.screens.depthWallpaperPreferences +import com.drdisagree.iconify.features.xposed.lockscreen.main.screens.lockscreenPreferences +import com.drdisagree.iconify.features.xposed.lockscreen.weather.screens.lsWeatherPreferences +import com.drdisagree.iconify.features.xposed.lockscreen.widgets.main.screens.lsWidgetsPreferences +import com.drdisagree.iconify.features.xposed.main.screens.xposedPreferences +import com.drdisagree.iconify.features.xposed.quicksettings.headerimage.screens.headerImagePreferences +import com.drdisagree.iconify.features.xposed.quicksettings.main.screens.quickSettingsPreferences +import com.drdisagree.iconify.features.xposed.quicksettings.margins.screens.qsMarginsPreferences +import com.drdisagree.iconify.features.xposed.quicksettings.themes.screens.qsThemesPreferences +import com.drdisagree.iconify.features.xposed.quicksettings.transparency.screens.qsTransparencyPreferences +import com.drdisagree.iconify.features.xposed.statusbar.clockchip.screens.clockChipPreferences +import com.drdisagree.iconify.features.xposed.statusbar.dualstatusbar.screens.dualStatusbarPreferences +import com.drdisagree.iconify.features.xposed.statusbar.logo.screens.statusbarLogoPreferences +import com.drdisagree.iconify.features.xposed.statusbar.main.screens.statusbarPreferences +import com.drdisagree.iconify.features.xposed.volumepanel.screens.volumePanelPreferences object References { + // Xposed preferences + private val allXposedPreferences = xposedPreferences() + + lockscreenPreferences + + lsAlbumArtPreferences + + lsClockPreferences + + depthWallpaperPreferences() + + lsWeatherPreferences() + + lsWidgetsPreferences() + + quickSettingsPreferences + + headerImagePreferences + + qsMarginsPreferences + + qsThemesPreferences + + qsTransparencyPreferences + + statusbarPreferences + + clockChipPreferences + + dualStatusbarPreferences + + statusbarLogoPreferences() + + volumePanelPreferences + + + // Settings preferences + private val allSettingsPreferences = settingsPreferences() + + lookAndFeelPreferences + + // All preference list + val PREFERENCE_LIST = allXposedPreferences + allSettingsPreferences + // Fabricated overlays const val ICONIFY_COLOR_ACCENT_PRIMARY = "0xFF50A6D7" const val ICONIFY_COLOR_ACCENT_SECONDARY = "0xFF387BFF" diff --git a/app/src/main/java/com/drdisagree/iconify/data/common/Resources.kt b/app/src/main/java/com/drdisagree/iconify/data/common/Resources.kt index 3aa7759c9..f5876069e 100644 --- a/app/src/main/java/com/drdisagree/iconify/data/common/Resources.kt +++ b/app/src/main/java/com/drdisagree/iconify/data/common/Resources.kt @@ -1,58 +1,66 @@ package com.drdisagree.iconify.data.common -import android.os.Build import android.os.Environment -import com.drdisagree.iconify.BuildConfig -import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.models.SearchPreferenceItem -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.AlbumArt -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.DualStatusbar -import com.drdisagree.iconify.ui.fragments.xposed.HeaderClock -import com.drdisagree.iconify.ui.fragments.xposed.Lockscreen -import com.drdisagree.iconify.ui.fragments.xposed.LockscreenClockParent -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.StatusbarLogo -import com.drdisagree.iconify.ui.fragments.xposed.Themes -import com.drdisagree.iconify.ui.fragments.xposed.TransparencyBlur -import com.drdisagree.iconify.ui.fragments.xposed.VolumePanelParent -import com.drdisagree.iconify.ui.fragments.xposed.Xposed -import com.drdisagree.iconify.ui.preferences.preferencesearch.SearchConfiguration +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.core.utils.FileUtils object Resources { - // Preference files - const val SHARED_XPREFERENCES = BuildConfig.APPLICATION_ID + "_xpreference" - // Storage location - val DOCUMENTS_DIR: String = - Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).absolutePath - val DOWNLOADS_DIR: String = - Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).absolutePath + val DOCUMENTS_DIR: String + get() = Environment + .getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) + .absolutePath + .also { FileUtils.ensureDirs(it) } + + val DOWNLOADS_DIR: String + get() = Environment + .getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + .absolutePath + .also { FileUtils.ensureDirs(it) } + + private val BASE_DIR: String + get() = appContext + .getExternalFilesDir(null)!! + .absolutePath + .also { FileUtils.ensureDirs(it) } + + val LOG_DIR: String + get() = "$DOCUMENTS_DIR/Iconify" + + val BACKUP_DIR: String + get() = "$BASE_DIR/.iconify_backup" + + val WALLPAPER_DIR: String + get() = "$BASE_DIR/.wallpapers" + + val TEMP_DIR: String + get() = "$BASE_DIR/.iconify" + + val TEMP_MODULE_DIR: String + get() = "$TEMP_DIR/Iconify" + + val TEMP_MODULE_OVERLAY_DIR: String + get() = "$TEMP_MODULE_DIR/system/product/overlay" + + val TEMP_OVERLAY_DIR: String + get() = "$TEMP_DIR/overlays" + + val TEMP_CACHE_DIR: String + get() = "$TEMP_OVERLAY_DIR/cache" + + val UNSIGNED_UNALIGNED_DIR: String + get() = "$TEMP_OVERLAY_DIR/unsigned_unaligned" + + val UNSIGNED_DIR: String + get() = "$TEMP_OVERLAY_DIR/unsigned" + + val SIGNED_DIR: String + get() = "$TEMP_OVERLAY_DIR/signed" - val LOG_DIR = "$DOCUMENTS_DIR/Iconify" const val MODULE_DIR = "/data/adb/modules/Iconify" const val SYSTEM_OVERLAY_DIR = "/system/product/overlay" const val OVERLAY_DIR = "$MODULE_DIR/system/product/overlay" - val BACKUP_DIR = Environment.getExternalStorageDirectory().absolutePath + "/.iconify_backup" - val TEMP_DIR = Environment.getExternalStorageDirectory().absolutePath + "/.iconify" - val TEMP_MODULE_DIR = "$TEMP_DIR/Iconify" - val TEMP_MODULE_OVERLAY_DIR = "$TEMP_MODULE_DIR/system/product/overlay" - val TEMP_OVERLAY_DIR = "$TEMP_DIR/overlays" - val TEMP_CACHE_DIR = "$TEMP_OVERLAY_DIR/cache" - val UNSIGNED_UNALIGNED_DIR = "$TEMP_OVERLAY_DIR/unsigned_unaligned" - val UNSIGNED_DIR = "$TEMP_OVERLAY_DIR/unsigned" - val SIGNED_DIR = "$TEMP_OVERLAY_DIR/signed" // File resources const val FRAMEWORK_DIR = "/system/framework/framework-res.apk" @@ -64,125 +72,4 @@ object Resources { // Database const val DYNAMIC_RESOURCE_DATABASE_NAME = "dynamic_resource_database" const val DYNAMIC_RESOURCE_TABLE = "dynamic_resource_table" - - 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_lockscreen, - R.string.activity_title_lockscreen, - Lockscreen() - ), - 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_dual_statusbar, - R.string.activity_title_dual_statusbar, - DualStatusbar() - ), - SearchPreferenceItem( - R.xml.xposed_statusbar_logo, - R.string.status_bar_logo_title, - StatusbarLogo() - ), - SearchPreferenceItem( - R.xml.xposed_volume_panel, - R.string.activity_title_volume_panel, - VolumePanelParent() - ), - 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, - LockscreenClockParent() - ), - 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_lockscreen_album_art, - R.string.activity_title_lockscreen_album_art, - AlbumArt() - ), - SearchPreferenceItem( - R.xml.xposed_others, - R.string.activity_title_xposed_others, - Others(), - Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU - ) - ).filter { it.shouldAdd } - .distinctBy { it.fragment::class.java } - .toTypedArray() } diff --git a/app/src/main/java/com/drdisagree/iconify/data/common/XposedConst.kt b/app/src/main/java/com/drdisagree/iconify/data/common/XposedConst.kt index cbc7a1b74..37ad8fa84 100644 --- a/app/src/main/java/com/drdisagree/iconify/data/common/XposedConst.kt +++ b/app/src/main/java/com/drdisagree/iconify/data/common/XposedConst.kt @@ -1,29 +1,45 @@ package com.drdisagree.iconify.data.common import android.os.Environment +import com.drdisagree.iconify.BuildConfig import java.io.File object XposedConst { - // Xposed resource dir - val XPOSED_RESOURCE_TEMP_DIR: File - get() = File(Environment.getExternalStorageDirectory(), ".iconify_files") + const val PREF_FILE_NAME = "${BuildConfig.APPLICATION_ID}.preferences" + const val WEATHER_PREF_FILE_NAME = "${BuildConfig.APPLICATION_ID}.weather.preferences" + const val XPOSED_RESOURCE_FOLDER_NAME = "Iconify" + + val XPOSED_RESOURCE_DIR: File + get() = File( + Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), + XPOSED_RESOURCE_FOLDER_NAME + ) + val LSCLOCK_FONT_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "lsclock_font.ttf") + get() = File(XPOSED_RESOURCE_DIR, "lsclock_font.ttf") + val LSCLOCK_IMAGE1_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "lsclock_image1.png") + get() = File(XPOSED_RESOURCE_DIR, "lsclock_image1.png") + val LSCLOCK_IMAGE2_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "lsclock_image2.png") + get() = File(XPOSED_RESOURCE_DIR, "lsclock_image2.png") + val HEADER_CLOCK_FONT_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "headerclock_font.ttf") + get() = File(XPOSED_RESOURCE_DIR, "headerclock_font.ttf") + val HEADER_IMAGE_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "header_image.png") + get() = File(XPOSED_RESOURCE_DIR, "header_image.png") + val DEPTH_WALL_FG_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "depth_wallpaper_fg.png") + get() = File(XPOSED_RESOURCE_DIR, "depth_wallpaper_fg.png") + val DEPTH_WALL_BG_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "depth_wallpaper_bg.png") + get() = File(XPOSED_RESOURCE_DIR, "depth_wallpaper_bg.png") + val LOCKSCREEN_WEATHER_FONT_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "lockscreen_weather_font.ttf") + get() = File(XPOSED_RESOURCE_DIR, "lockscreen_weather_font.ttf") + val STATUSBAR_LOGO_FILE: File - get() = File(XPOSED_RESOURCE_TEMP_DIR, "statusbar_logo.png") + get() = File(XPOSED_RESOURCE_DIR, "statusbar_logo.png") } diff --git a/app/src/main/java/com/drdisagree/iconify/data/config/Config.kt b/app/src/main/java/com/drdisagree/iconify/data/config/Config.kt new file mode 100644 index 000000000..78f0909fc --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/config/Config.kt @@ -0,0 +1,47 @@ +package com.drdisagree.iconify.data.config + +import com.drdisagree.iconify.BuildConfig +import com.drdisagree.iconify.core.utils.ModuleUtils +import com.drdisagree.iconify.core.utils.RootUtils +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.data.common.Preferences +import com.drdisagree.iconify.data.keys.SettingsKey + +object Config { + + @SuppressWarnings("ConstantConditions") + private val SKIP_INSTALLATION = false + + @SuppressWarnings("ConstantConditions") + val FORCE_OVERLAY_INSTALLATION = false + + val SKIP_TO_HOMEPAGE_FOR_TESTING: Boolean + get() = SKIP_INSTALLATION && + !FORCE_OVERLAY_INSTALLATION && + BuildConfig.DEBUG + + fun shouldSkipOnboarding(): Boolean { + val isRooted = RootUtils.deviceProperlyRooted() + val isModuleInstalled = ModuleUtils.moduleExists() + val isOverlayInstalled = OverlayUtils.overlayExists() + var isXposedOnlyMode = RPrefs.getBoolean(Preferences.XPOSED_ONLY_MODE, false) + val savedVersionCode = RPrefs.getInt(SettingsKey.SAVED_VERSION_CODE) + val isVersionCodeCorrect = BuildConfig.VERSION_CODE == savedVersionCode + + if (isRooted) { + if (isOverlayInstalled) { + RPrefs.putBoolean(Preferences.XPOSED_ONLY_MODE, false) + } else if (isModuleInstalled) { + RPrefs.putBoolean(Preferences.XPOSED_ONLY_MODE, true) + isXposedOnlyMode = true + } + } + + val isModuleProperlyInstalled = isModuleInstalled && + (isOverlayInstalled || isXposedOnlyMode) && + !FORCE_OVERLAY_INSTALLATION + + return SKIP_TO_HOMEPAGE_FOR_TESTING || + (isRooted && isModuleProperlyInstalled && isVersionCodeCorrect) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/config/PrefsHelper.kt b/app/src/main/java/com/drdisagree/iconify/data/config/PrefsHelper.kt deleted file mode 100644 index ae65f1a6e..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/config/PrefsHelper.kt +++ /dev/null @@ -1,601 +0,0 @@ -package com.drdisagree.iconify.data.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.R -import com.drdisagree.iconify.data.common.Dynamic.isAtleastA14 -import com.drdisagree.iconify.data.common.Preferences.AGGRESSIVE_QSPANEL_BLUR_SWITCH -import com.drdisagree.iconify.data.common.Preferences.ALBUM_ART_ON_LOCKSCREEN_BLUR -import com.drdisagree.iconify.data.common.Preferences.ALBUM_ART_ON_LOCKSCREEN_FILTER -import com.drdisagree.iconify.data.common.Preferences.APP_DRAWER_THEMED_ICONS -import com.drdisagree.iconify.data.common.Preferences.APP_LANGUAGE -import com.drdisagree.iconify.data.common.Preferences.AUTO_UPDATE -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_CIRCLE -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_DEFAULT -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_DEFAULT_LANDSCAPE -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_DEFAULT_RLANDSCAPE -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_DOTTED_CIRCLE -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_FILLED_CIRCLE -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYA -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYI -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYJ -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYL -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYM -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_BATTERYO -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_IOS_16 -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_KIM -import com.drdisagree.iconify.data.common.Preferences.BATTERY_STYLE_LANDSCAPE_ONEUI7 -import com.drdisagree.iconify.data.common.Preferences.BLUR_MEDIA_PLAYER_ARTWORK -import com.drdisagree.iconify.data.common.Preferences.BLUR_MEDIA_PLAYER_ARTWORK_RADIUS -import com.drdisagree.iconify.data.common.Preferences.BLUR_RADIUS_VALUE -import com.drdisagree.iconify.data.common.Preferences.CHIP_STATUS_ICONS_SWITCH -import com.drdisagree.iconify.data.common.Preferences.COLORED_NOTIFICATION_ALTERNATIVE_SWITCH -import com.drdisagree.iconify.data.common.Preferences.COLORED_NOTIFICATION_VIEW_SWITCH -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_BLEND_COLOR -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_CHARGING_COLOR -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_MARGIN_LEFT -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_MARGIN_RIGHT -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_STYLE -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_SWITCH -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_CHARGING_ICON_WIDTH_HEIGHT -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_DIMENSION -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_FILL_ALPHA -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_FILL_COLOR -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_FILL_GRAD_COLOR -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_HEIGHT -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_HIDE_BATTERY -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_HIDE_PERCENTAGE -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_INSIDE_PERCENTAGE -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_LAYOUT_REVERSE -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_MARGIN_BOTTOM -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_MARGIN_LEFT -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_MARGIN_RIGHT -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_MARGIN_TOP -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_PERIMETER_ALPHA -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_POWERSAVE_FILL_COLOR -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_POWERSAVE_INDICATOR_COLOR -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_RAINBOW_FILL_COLOR -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_STYLE -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_SWAP_PERCENTAGE -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_BATTERY_WIDTH -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_DEPTH_WALLPAPER_SWITCH -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_QS_MARGIN -import com.drdisagree.iconify.data.common.Preferences.CUSTOM_QS_TEXT_COLOR -import com.drdisagree.iconify.data.common.Preferences.DEPTH_WALLPAPER_AI_MODE -import com.drdisagree.iconify.data.common.Preferences.DEPTH_WALLPAPER_AI_STATUS -import com.drdisagree.iconify.data.common.Preferences.DEPTH_WALLPAPER_BACKGROUND_MOVEMENT_MULTIPLIER -import com.drdisagree.iconify.data.common.Preferences.DEPTH_WALLPAPER_FADE_ANIMATION -import com.drdisagree.iconify.data.common.Preferences.DEPTH_WALLPAPER_FOREGROUND_MOVEMENT_MULTIPLIER -import com.drdisagree.iconify.data.common.Preferences.DEPTH_WALLPAPER_ON_AOD -import com.drdisagree.iconify.data.common.Preferences.DEPTH_WALLPAPER_PARALLAX_EFFECT -import com.drdisagree.iconify.data.common.Preferences.DUALTONE_QSPANEL -import com.drdisagree.iconify.data.common.Preferences.FIRST_INSTALL -import com.drdisagree.iconify.data.common.Preferences.FIXED_STATUS_ICONS_SIDEMARGIN -import com.drdisagree.iconify.data.common.Preferences.FIXED_STATUS_ICONS_SWITCH -import com.drdisagree.iconify.data.common.Preferences.FIXED_STATUS_ICONS_TOPMARGIN -import com.drdisagree.iconify.data.common.Preferences.FIX_NOTIFICATION_COLOR -import com.drdisagree.iconify.data.common.Preferences.FIX_NOTIFICATION_FOOTER_BUTTON_COLOR -import com.drdisagree.iconify.data.common.Preferences.FIX_QS_TILE_COLOR -import com.drdisagree.iconify.data.common.Preferences.FLUID_NOTIF_TRANSPARENCY -import com.drdisagree.iconify.data.common.Preferences.FLUID_POWERMENU_TRANSPARENCY -import com.drdisagree.iconify.data.common.Preferences.FLUID_QSPANEL -import com.drdisagree.iconify.data.common.Preferences.FORCE_THEMED_ICONS -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT1 -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT2 -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_COLOR_CODE_ACCENT3 -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_COLOR_CODE_TEXT1 -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_COLOR_CODE_TEXT2 -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_COLOR_SWITCH -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_EXPANSION_Y -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_FONT_PICKER -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_FONT_SWITCH -import com.drdisagree.iconify.data.common.Preferences.HEADER_CLOCK_LANDSCAPE_SWITCH -import com.drdisagree.iconify.data.common.Preferences.HIDE_BATTERY_VIEW -import com.drdisagree.iconify.data.common.Preferences.HIDE_QSLABEL_SWITCH -import com.drdisagree.iconify.data.common.Preferences.LIGHT_QSPANEL -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_SHADE_SWITCH -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WALLPAPER_BLUR -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WALLPAPER_BLUR_RADIUS -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_BIG_ACTIVE -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_BIG_ICON_ACTIVE -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_BIG_ICON_INACTIVE -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_BIG_INACTIVE -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_CUSTOM_COLOR -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CIRCULAR_COLOR -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CUSTOM_COLOR_SWITCH -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_DEVICE_NAME -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_LINEAR_COLOR -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_STYLE -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_DEVICE_WIDGET_TEXT_COLOR -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_SMALL_ACTIVE -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_SMALL_ICON_ACTIVE -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_SMALL_ICON_INACTIVE -import com.drdisagree.iconify.data.common.Preferences.LOCKSCREEN_WIDGETS_SMALL_INACTIVE -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_BOTTOMMARGIN -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT1 -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT2 -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_COLOR_CODE_ACCENT3 -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_COLOR_CODE_TEXT1 -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_COLOR_CODE_TEXT2 -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_COLOR_SWITCH -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_DEVICENAME -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_FONT_LINEHEIGHT -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_FONT_PICKER -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_FONT_SWITCH -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_FONT_TEXT_SCALING -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_IMAGE_PICKER1 -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_IMAGE_PICKER2 -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_IMAGE_SWITCH -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_MOVE_NOTIFICATION_ICONS -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_STYLE -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_SWITCH -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_TOPMARGIN -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_USERNAME -import com.drdisagree.iconify.data.common.Preferences.NEW_UPDATE_FOUND -import com.drdisagree.iconify.data.common.Preferences.NOTIFICATION_HEADSUP_BLUR -import com.drdisagree.iconify.data.common.Preferences.NOTIFICATION_HEADSUP_BLUR_RADIUS -import com.drdisagree.iconify.data.common.Preferences.NOTIFICATION_HEADSUP_TRANSPARENCY -import com.drdisagree.iconify.data.common.Preferences.NOTIF_TRANSPARENCY_SWITCH -import com.drdisagree.iconify.data.common.Preferences.OP_QS_HEADER_BLUR_LEVEL -import com.drdisagree.iconify.data.common.Preferences.OP_QS_HEADER_SHOW_ARTWORK -import com.drdisagree.iconify.data.common.Preferences.OP_QS_HEADER_SWITCH -import com.drdisagree.iconify.data.common.Preferences.PREF_KEY_UPDATE_STATUS -import com.drdisagree.iconify.data.common.Preferences.QSALPHA_LEVEL -import com.drdisagree.iconify.data.common.Preferences.QSPANEL_BLUR_SWITCH -import com.drdisagree.iconify.data.common.Preferences.QS_TRANSPARENCY_SWITCH -import com.drdisagree.iconify.data.common.Preferences.SB_CLOCK_SIZE -import com.drdisagree.iconify.data.common.Preferences.SB_CLOCK_SIZE_SWITCH -import com.drdisagree.iconify.data.common.Preferences.SELECTED_QS_TEXT_COLOR -import com.drdisagree.iconify.data.common.Preferences.SHOW_HOME_CARD -import com.drdisagree.iconify.data.common.Preferences.STATUSBAR_LOGO_STYLE -import com.drdisagree.iconify.data.common.Preferences.STATUSBAR_LOGO_TINT -import com.drdisagree.iconify.data.common.Preferences.UNZOOM_DEPTH_WALLPAPER -import com.drdisagree.iconify.data.common.Preferences.UPDATE_DETECTED -import com.drdisagree.iconify.data.common.Preferences.UPDATE_OVER_WIFI -import com.drdisagree.iconify.data.common.Preferences.VERTICAL_QSTILE_SWITCH -import com.drdisagree.iconify.data.common.Preferences.WEATHER_CUSTOM_LOCATION -import com.drdisagree.iconify.data.common.Preferences.WEATHER_CUSTOM_LOCATION_PICKER -import com.drdisagree.iconify.data.common.Preferences.WEATHER_ICON_PACK -import com.drdisagree.iconify.data.common.Preferences.WEATHER_OWM_KEY -import com.drdisagree.iconify.data.common.Preferences.WEATHER_PROVIDER -import com.drdisagree.iconify.data.common.Preferences.WEATHER_TEXT_COLOR -import com.drdisagree.iconify.data.common.Preferences.WEATHER_TEXT_COLOR_SWITCH -import com.drdisagree.iconify.data.common.Preferences.WEATHER_UNITS -import com.drdisagree.iconify.data.common.Preferences.WEATHER_UPDATE_INTERVAL -import com.drdisagree.iconify.data.common.Preferences.WEATHER_YANDEX_KEY -import com.drdisagree.iconify.data.common.Preferences.XPOSED_HOOK_CHECK -import com.drdisagree.iconify.data.config.RPrefs.getBoolean -import com.drdisagree.iconify.data.config.RPrefs.getInt -import com.drdisagree.iconify.data.config.RPrefs.getSliderFloat -import com.drdisagree.iconify.data.config.RPrefs.getString -import com.drdisagree.iconify.data.config.RPrefs.getStringSet -import com.drdisagree.iconify.ui.preferences.TwoTargetSwitchPreference -import com.drdisagree.iconify.utils.RootUtils.folderExists -import com.drdisagree.iconify.utils.weather.WeatherConfig - -object PrefsHelper { - - fun isVisible(key: String?): Boolean { - val lockscreenClockStyle = getInt(LSCLOCK_STYLE, 0) - val lockscreenClockWithImage1 = lockscreenClockStyle in setOf(26, 27, 30, 39, 40, 42, 53) - val lockscreenClockWithImage2 = lockscreenClockStyle in setOf(26) - - return when (key) { - UPDATE_OVER_WIFI -> getBoolean(AUTO_UPDATE, true) - - "iconifyHomeCard" -> getBoolean(SHOW_HOME_CARD, true) - - "rebootReminder" -> (!getBoolean(FIRST_INSTALL) && getBoolean(UPDATE_DETECTED)) || - folderExists("/data/adb/modules_update/Iconify") - - "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) - - 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 -> lockscreenClockStyle in setOf(19, 32, 47) - - LSCLOCK_USERNAME -> lockscreenClockStyle in setOf(7, 32, 35, 36, 42, 48, 50, 53) - - // Weather Common - WEATHER_OWM_KEY -> getString(WEATHER_PROVIDER, "0") == "1" - WEATHER_YANDEX_KEY -> getString(WEATHER_PROVIDER, "0") == "2" - 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_NAME -> getBoolean(LOCKSCREEN_WIDGETS_DEVICE_WIDGET) - - LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CIRCULAR_COLOR, - LOCKSCREEN_WIDGETS_DEVICE_WIDGET_TEXT_COLOR -> - getBoolean(LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CUSTOM_COLOR_SWITCH) - - LOCKSCREEN_WIDGETS_DEVICE_WIDGET_LINEAR_COLOR -> { - return getBoolean(LOCKSCREEN_WIDGETS_DEVICE_WIDGET_CUSTOM_COLOR_SWITCH) && - getString(LOCKSCREEN_WIDGETS_DEVICE_WIDGET_STYLE, "0") == "0" - } - - 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, - HIDE_BATTERY_VIEW, - 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 - - "xposedOthers", - "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 - - DEPTH_WALLPAPER_AI_MODE, - DEPTH_WALLPAPER_AI_STATUS -> Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU && - !getBoolean(CUSTOM_DEPTH_WALLPAPER_SWITCH) - - COLORED_NOTIFICATION_ALTERNATIVE_SWITCH -> getBoolean(COLORED_NOTIFICATION_VIEW_SWITCH) - - LOCKSCREEN_WALLPAPER_BLUR -> Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE - - LOCKSCREEN_WALLPAPER_BLUR_RADIUS -> Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && - getBoolean(LOCKSCREEN_WALLPAPER_BLUR) - - SELECTED_QS_TEXT_COLOR -> getBoolean(CUSTOM_QS_TEXT_COLOR) - - FORCE_THEMED_ICONS, APP_DRAWER_THEMED_ICONS -> Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU - - LSCLOCK_MOVE_NOTIFICATION_ICONS -> Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM - - ALBUM_ART_ON_LOCKSCREEN_BLUR -> getString( - ALBUM_ART_ON_LOCKSCREEN_FILTER, - "0" - )!!.toInt() in setOf(3, 4) - - OP_QS_HEADER_BLUR_LEVEL -> getBoolean(OP_QS_HEADER_SHOW_ARTWORK) - - LOCKSCREEN_WIDGETS_DEVICE_WIDGET_STYLE -> getBoolean(LOCKSCREEN_WIDGETS_DEVICE_WIDGET) - - BLUR_RADIUS_VALUE -> getBoolean(QSPANEL_BLUR_SWITCH) - - HEADER_CLOCK_FONT_PICKER -> getBoolean(HEADER_CLOCK_FONT_SWITCH) - - LSCLOCK_FONT_PICKER -> getBoolean(LSCLOCK_FONT_SWITCH) - - LSCLOCK_IMAGE_SWITCH -> lockscreenClockWithImage1 - - LSCLOCK_IMAGE_PICKER1 -> getBoolean(LSCLOCK_IMAGE_SWITCH) && lockscreenClockWithImage1 - - LSCLOCK_IMAGE_PICKER2 -> getBoolean(LSCLOCK_IMAGE_SWITCH) && lockscreenClockWithImage2 - - BLUR_MEDIA_PLAYER_ARTWORK_RADIUS -> getBoolean(BLUR_MEDIA_PLAYER_ARTWORK) - - NOTIFICATION_HEADSUP_BLUR_RADIUS, - NOTIFICATION_HEADSUP_TRANSPARENCY -> getBoolean(NOTIFICATION_HEADSUP_BLUR) - - STATUSBAR_LOGO_TINT -> { - listOf( - *appContext.resources.getStringArray(R.array.status_bar_logo_style_entries) - )[getString(STATUSBAR_LOGO_STYLE, "0")!!.toInt()] == - appContext.resources.getString(R.string.status_bar_logo_style_custom) - } - - else -> true - } - } - - private fun isBatteryPrefsVisible(key: String): Boolean { - val batteryStyle: Int = getString(CUSTOM_BATTERY_STYLE, 0.toString())!!.toInt() - - val defaultBatteryStyle = batteryStyle == BATTERY_STYLE_DEFAULT - - val showAdvancedCustomizations = - batteryStyle in BATTERY_STYLE_LANDSCAPE_BATTERYA..BATTERY_STYLE_LANDSCAPE_BATTERYO - - val showColorPickers: Boolean = getBoolean(CUSTOM_BATTERY_BLEND_COLOR) - - 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 && - batteryStyle != BATTERY_STYLE_LANDSCAPE_ONEUI7 - - val kimBattery = batteryStyle == BATTERY_STYLE_LANDSCAPE_KIM - - val showInsidePercentage = showPercentage && !kimBattery && - !getBoolean(CUSTOM_BATTERY_HIDE_PERCENTAGE) - - val showChargingIconCustomization: Boolean = - batteryStyle > BATTERY_STYLE_DEFAULT_LANDSCAPE && - getBoolean(CUSTOM_BATTERY_CHARGING_ICON_SWITCH) - - 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) { - HIDE_BATTERY_VIEW -> defaultBatteryStyle - - CUSTOM_BATTERY_PERIMETER_ALPHA, - CUSTOM_BATTERY_FILL_ALPHA -> showAdvancedCustomizations - - CUSTOM_BATTERY_LAYOUT_REVERSE -> showAdvancedCustomizations || kimBattery - - 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) - - WEATHER_YANDEX_KEY -> getString(WEATHER_PROVIDER, "0") == "2" && - WeatherConfig.isEnabled(appContext) - - CUSTOM_BATTERY_WIDTH, - CUSTOM_BATTERY_HEIGHT -> getString( - CUSTOM_BATTERY_STYLE, - 0.toString() - )!!.toInt() != BATTERY_STYLE_DEFAULT - - LSCLOCK_FONT_SWITCH, - LSCLOCK_FONT_PICKER, - LSCLOCK_IMAGE_PICKER1, - LSCLOCK_IMAGE_PICKER2, - LSCLOCK_STYLE, - LSCLOCK_TOPMARGIN, - LSCLOCK_BOTTOMMARGIN, - LSCLOCK_COLOR_SWITCH, - LSCLOCK_COLOR_CODE_ACCENT1, - LSCLOCK_COLOR_CODE_ACCENT2, - LSCLOCK_COLOR_CODE_ACCENT3, - LSCLOCK_COLOR_CODE_TEXT1, - LSCLOCK_COLOR_CODE_TEXT2, - LSCLOCK_FONT_LINEHEIGHT, - LSCLOCK_FONT_TEXT_SCALING, - LSCLOCK_USERNAME, - LSCLOCK_DEVICENAME -> getBoolean(LSCLOCK_SWITCH) - - CUSTOM_QS_MARGIN -> !getBoolean(OP_QS_HEADER_SWITCH) - - else -> true - } - } - - @SuppressLint("DefaultLocale") - fun getSummary(fragmentCompat: Context, key: String): String? { - when { - key.endsWith("Slider") -> { - val value = String.format("%.2f", getSliderFloat(key, 0f)) - return if (value.endsWith(".00")) value.substring(0, value.length - 3) else value - } - - key.endsWith("List") -> { - return getString(key, "") - } - - key.endsWith("EditText") -> { - return getString(key, "") - } - - key.endsWith("MultiSelect") -> { - return getStringSet(key, emptySet()).toString() - } - - else -> 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 - - 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) - } else if (thisPreference is TwoTargetSwitchPreference) { - val switchPreference: TwoTargetSwitchPreference = thisPreference - switchPreference.isChecked = getBoolean(switchPreference.key) - } - } catch (_: 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 - } - } catch (_: Throwable) { - } - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/data/config/RPrefs.kt b/app/src/main/java/com/drdisagree/iconify/data/config/RPrefs.kt index d5c9bbdfe..4babd4675 100644 --- a/app/src/main/java/com/drdisagree/iconify/data/config/RPrefs.kt +++ b/app/src/main/java/com/drdisagree/iconify/data/config/RPrefs.kt @@ -3,24 +3,21 @@ package com.drdisagree.iconify.data.config import android.content.Context.MODE_PRIVATE import android.content.SharedPreferences import android.content.SharedPreferences.OnSharedPreferenceChangeListener -import com.drdisagree.iconify.Iconify.Companion.appContext -import com.drdisagree.iconify.data.common.Resources.SHARED_XPREFERENCES -import com.drdisagree.iconify.ui.preferences.SliderPreference +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.data.common.XposedConst.PREF_FILE_NAME +import com.drdisagree.iconify.data.keys.Key @Suppress("unused") object RPrefs : SharedPreferences { - private val prefs: SharedPreferences by lazy { - appContext.createDeviceProtectedStorageContext().getSharedPreferences( - SHARED_XPREFERENCES, MODE_PRIVATE - ) + val prefs: SharedPreferences by lazy { + appContext + .createDeviceProtectedStorageContext() + .getSharedPreferences(PREF_FILE_NAME, MODE_PRIVATE) } private val editor: SharedPreferences.Editor by lazy { prefs.edit() } - val instance: RPrefs - get() = this - val getPrefs: SharedPreferences get() = prefs @@ -29,65 +26,87 @@ object RPrefs : SharedPreferences { editor.putBoolean(key, value).apply() } + fun putBoolean(key: Key, value: Boolean) = putBoolean(key.name, value) + fun putInt(key: String?, value: Int) { editor.putInt(key, value).apply() } + fun putInt(key: Key, value: Int) = putInt(key.name, value) + fun putFloat(key: String?, value: Float) { editor.putFloat(key, value).apply() } + fun putFloat(key: Key, value: Float) = putFloat(key.name, value) + fun putLong(key: String?, value: Long) { editor.putLong(key, value).apply() } + fun putLong(key: Key, value: Long) = putLong(key.name, value) + fun putString(key: String?, value: String?) { editor.putString(key, value).apply() } + fun putString(key: Key, value: String?) = putString(key.name, value) + // Basic get methods fun getBoolean(key: String?): Boolean { return prefs.getBoolean(key, false) } + fun getBoolean(key: Key): Boolean = getBoolean(key.name, key.default as? Boolean ?: false) + + fun getBoolean(key: Key, defValue: Boolean): Boolean = + getBoolean(key.name, defValue) + fun getInt(key: String?): Int { return prefs.getInt(key, 0) } + fun getInt(key: Key): Int = getInt(key.name, key.default as? Int ?: 0) + + fun getInt(key: Key, defValue: Int): Int = getInt(key.name, defValue) + fun getLong(key: String?): Long { return prefs.getLong(key, 0) } + fun getLong(key: Key): Long = getLong(key.name, key.default as? Long ?: 0) + + fun getLong(key: Key, defValue: Long): Long = getLong(key.name, defValue) + fun getFloat(key: String?): Float { return prefs.getFloat(key, 0f) } + fun getFloat(key: Key): Float = getFloat(key.name, key.default as? Float ?: 0f) + + fun getFloat(key: Key, defValue: Float): Float = getFloat(key.name, defValue) + fun getString(key: String?): String? { return prefs.getString(key, null) } - // Custom slider preference methods - fun getSliderInt(key: String?, defaultVal: Int): Int { - return SliderPreference.getSingleIntValue(this, key, defaultVal) - } - - fun getSliderValues(key: String?, defaultValue: Float): List { - return SliderPreference.getValues(this, key, defaultValue) - } + fun getString(key: Key): String? = getString(key.name, key.default as? String) - fun getSliderFloat(key: String?, defaultVal: Float): Float { - return SliderPreference.getSingleFloatValue(this, key, defaultVal) - } + fun getString(key: Key, defValue: String?): String? = getString(key.name, defValue) // Clear methods fun clearPref(key: String?) { editor.remove(key).apply() } + fun clearPref(key: Key) = clearPref(key.name) + fun clearPrefs(vararg keys: String?) { - keys.forEach { key -> - editor.remove(key).apply() - } + keys.forEach { key -> clearPref(key) } + } + + fun clearPrefs(vararg keys: Key) { + keys.forEach { key -> clearPref(key.name) } } fun clearAllPrefs() { diff --git a/app/src/main/java/com/drdisagree/iconify/data/dao/DynamicResourceDao.kt b/app/src/main/java/com/drdisagree/iconify/data/dao/DynamicResourceDao.kt deleted file mode 100644 index 55f45bd34..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/dao/DynamicResourceDao.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.drdisagree.iconify.data.dao - -import androidx.room.Dao -import androidx.room.Insert -import androidx.room.OnConflictStrategy -import androidx.room.Query -import androidx.room.Transaction -import com.drdisagree.iconify.data.common.Resources.DYNAMIC_RESOURCE_TABLE -import com.drdisagree.iconify.data.entity.DynamicResourceEntity - -@Dao -interface DynamicResourceDao { - - @Insert(onConflict = OnConflictStrategy.REPLACE) - suspend fun insertResources(resources: List) - - @Query( - """ - DELETE FROM $DYNAMIC_RESOURCE_TABLE WHERE - (packageName, startEndTag, resourceName, resourceValue, isPortrait, isLandscape, isNightMode) IN - (SELECT packageName, startEndTag, resourceName, resourceValue, isPortrait, isLandscape, isNightMode FROM $DYNAMIC_RESOURCE_TABLE WHERE - packageName IN (:packageNames) AND - startEndTag IN (:startEndTags) AND - resourceName IN (:resourceNames) AND - isPortrait IN (:isPortraits) AND - isLandscape IN (:isLandscapes) AND - isNightMode IN (:isNightModes)) - """ - ) - suspend fun deleteResources( - packageNames: List, - startEndTags: List, - resourceNames: List, - isPortraits: List, - isLandscapes: List, - isNightModes: List - ) - - @Query("SELECT * FROM $DYNAMIC_RESOURCE_TABLE") - suspend fun getAllResources(): List - - @Transaction - @Query("SELECT * FROM $DYNAMIC_RESOURCE_TABLE WHERE packageName = :packageName") - suspend fun getResourcesForPackage(packageName: String): List - - @Query("DELETE FROM $DYNAMIC_RESOURCE_TABLE WHERE packageName = :packageName") - suspend fun deleteResourcesForPackage(packageName: String) - - @Query("SELECT * FROM $DYNAMIC_RESOURCE_TABLE WHERE isPortrait = 1") - suspend fun getPortraitResources(): List - - @Query("SELECT * FROM $DYNAMIC_RESOURCE_TABLE WHERE isLandscape = 1") - suspend fun getLandscapeResources(): List - - @Query("SELECT * FROM $DYNAMIC_RESOURCE_TABLE WHERE isNightMode = 1") - suspend fun getNightModeResources(): List -} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/database/DynamicResourceDatabase.kt b/app/src/main/java/com/drdisagree/iconify/data/database/DynamicResourceDatabase.kt deleted file mode 100644 index c8290ba7c..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/database/DynamicResourceDatabase.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.drdisagree.iconify.data.database - -import androidx.room.Database -import androidx.room.Room -import androidx.room.RoomDatabase -import com.drdisagree.iconify.Iconify.Companion.appContext -import com.drdisagree.iconify.data.common.Resources.DYNAMIC_RESOURCE_DATABASE_NAME -import com.drdisagree.iconify.data.dao.DynamicResourceDao -import com.drdisagree.iconify.data.entity.DynamicResourceEntity - -@Database(entities = [DynamicResourceEntity::class], version = 2) -abstract class DynamicResourceDatabase : RoomDatabase() { - abstract fun dynamicResourceDao(): DynamicResourceDao - - companion object { - @Volatile - private var INSTANCE: DynamicResourceDatabase? = null - - fun getInstance(): DynamicResourceDatabase { - return INSTANCE ?: synchronized(this) { - Room.databaseBuilder( - appContext, - DynamicResourceDatabase::class.java, - DYNAMIC_RESOURCE_DATABASE_NAME - ).build().also { INSTANCE = it } - } - } - - fun reloadInstance() { - synchronized(this) { - INSTANCE = Room.databaseBuilder( - appContext, - DynamicResourceDatabase::class.java, - DYNAMIC_RESOURCE_DATABASE_NAME - ).build() - } - } - } -} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/entity/DynamicResourceEntity.kt b/app/src/main/java/com/drdisagree/iconify/data/entity/DynamicResourceEntity.kt deleted file mode 100644 index c663afb17..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/entity/DynamicResourceEntity.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.drdisagree.iconify.data.entity - -import androidx.room.Entity -import androidx.room.Index -import com.drdisagree.iconify.data.common.Resources.DYNAMIC_RESOURCE_TABLE - -@Entity( - tableName = DYNAMIC_RESOURCE_TABLE, - indices = [Index("packageName")], - primaryKeys = ["packageName", "resourceName", "startEndTag", "isPortrait", "isLandscape", "isNightMode"] -) -data class DynamicResourceEntity( - val packageName: String, - var startEndTag: String, - var resourceName: String, - var resourceValue: String, - var isPortrait: Boolean, - var isLandscape: Boolean, - var isNightMode: Boolean -) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/entity/OnboardingPage.kt b/app/src/main/java/com/drdisagree/iconify/data/entity/OnboardingPage.kt deleted file mode 100644 index aadd2c558..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/entity/OnboardingPage.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.drdisagree.iconify.data.entity - -import androidx.annotation.DrawableRes -import androidx.annotation.StringRes -import com.drdisagree.iconify.R - -enum class OnboardingPage( - @field:StringRes val titleResource: Int, - @field:StringRes val subTitleResource: Int, - @field:StringRes val descriptionResource: Int, - @field:DrawableRes val logoResource: Int -) { - ONE( - R.string.onboarding_title_1, - R.string.onboarding_subtitle_1, - R.string.onboarding_desc_1, - R.drawable.onboarding_img_1 - ), - TWO( - R.string.onboarding_title_2, - R.string.onboarding_subtitle_2, - R.string.onboarding_desc_2, - R.drawable.onboarding_img_2 - ), - THREE( - R.string.onboarding_title_3, - R.string.onboarding_subtitle_3, - R.string.onboarding_desc_3, - R.drawable.onboarding_img_3 - ) -} diff --git a/app/src/main/java/com/drdisagree/iconify/data/events/ColorDismissedEvent.kt b/app/src/main/java/com/drdisagree/iconify/data/events/ColorDismissedEvent.kt deleted file mode 100644 index d186fd78f..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/events/ColorDismissedEvent.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.drdisagree.iconify.data.events - -data class ColorDismissedEvent(@JvmField val dialogId: Int) diff --git a/app/src/main/java/com/drdisagree/iconify/data/events/ColorSelectedEvent.kt b/app/src/main/java/com/drdisagree/iconify/data/events/ColorSelectedEvent.kt deleted file mode 100644 index bfd0833e0..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/events/ColorSelectedEvent.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.drdisagree.iconify.data.events - -data class ColorSelectedEvent( - val dialogId: Int, - val selectedColor: Int -) diff --git a/app/src/main/java/com/drdisagree/iconify/data/events/ToastUiEvent.kt b/app/src/main/java/com/drdisagree/iconify/data/events/ToastUiEvent.kt new file mode 100644 index 000000000..755250548 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/events/ToastUiEvent.kt @@ -0,0 +1,7 @@ +package com.drdisagree.iconify.data.events + +sealed class ToastUiEvent { + object Applied : ToastUiEvent() + object Disabled : ToastUiEvent() + object Error : ToastUiEvent() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/keys/CustomizationKey.kt b/app/src/main/java/com/drdisagree/iconify/data/keys/CustomizationKey.kt new file mode 100644 index 000000000..2c41d534c --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/keys/CustomizationKey.kt @@ -0,0 +1,10 @@ +package com.drdisagree.iconify.data.keys + +enum class CustomizationKey(override val default: Any?) : Key { + CELLULAR_ICON_STYLE("0"), + WIFI_ICON_STYLE("0"), + NOTIFICATION_STYLE("0"), + SETTINGS_ICONS_STYLE("-1,-1,-1,-1,-1"), + TOAST_FRAME_STYLE("0"), + ICON_SHAPE_STYLE("0"), +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/keys/Key.kt b/app/src/main/java/com/drdisagree/iconify/data/keys/Key.kt new file mode 100644 index 000000000..6b5567659 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/keys/Key.kt @@ -0,0 +1,6 @@ +package com.drdisagree.iconify.data.keys + +interface Key { + val name: String + val default: Any? +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/keys/SettingsKey.kt b/app/src/main/java/com/drdisagree/iconify/data/keys/SettingsKey.kt new file mode 100644 index 000000000..62229f272 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/keys/SettingsKey.kt @@ -0,0 +1,27 @@ +package com.drdisagree.iconify.data.keys + +import androidx.appcompat.app.AppCompatDelegate +import com.drdisagree.iconify.data.models.AppSeedColors +import com.materialkolor.Contrast +import com.materialkolor.PaletteStyle + +enum class SettingsKey(override val default: Any?) : Key { + THEME_MODE(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM.toString()), + PALETTE_STYLE(PaletteStyle.TonalSpot.name), + AMOLED_THEME(false), + EXPRESSIVE_COLORS(false), + CONTRAST_LEVEL(Contrast.Default.value.toString()), + SEED_COLOR(AppSeedColors.Blue.seedColor.primaryColor.toString()), + DYNAMIC_COLORS(true), + HAPTICS_AND_VIBRATION(true), + FLOATING_BOTTOM_BAR(true), + BLUR_EFFECT(true), + UI_SCALE(1f), + TEXT_SCALE(1f), + SAVED_VERSION_CODE(-1), + RESTART_SYSTEMUI_AFTER_BOOT(false), + ON_HOME_PAGE(false), + FIRST_INSTALL(true), + UPDATE_DETECTED(false), + XPOSED_ONLY_MODE(false), +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/keys/XposedKey.kt b/app/src/main/java/com/drdisagree/iconify/data/keys/XposedKey.kt new file mode 100644 index 000000000..3f72937b5 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/keys/XposedKey.kt @@ -0,0 +1,222 @@ +package com.drdisagree.iconify.data.keys + +enum class XposedKey(override val default: Any?) : Key { + // Statusbar + STATUSBAR_CLOCK_POSITION("0"), + STATUSBAR_CLOCK_CLICKABLE(false), + STATUSBAR_CLOCK_TEXT_SIZE_SWITCH(false), + STATUSBAR_CLOCK_TEXT_SIZE(14f), + HIDE_BATTERY_VIEW(false), + COLORED_STATUSBAR_ICON(false), + STATUSBAR_SWAP_WIFI_CELLULAR(false), + STATUSBAR_SWAP_CELLULAR_NETWORK_TYPE(false), + SHOW_4G_INSTEAD_OF_LTE(false), + NOTIFICATION_ICONS_LIMIT(-1), + ONGOING_ACTION_CHIP_SWITCH(false), + + // Statusbar - Clock Chip + STATUSBAR_CLOCK_CHIP(false), + STATUSBAR_CLOCK_CHIP_TEXT_COLOR_OPTION("0"), + STATUSBAR_CLOCK_CHIP_TEXT_COLOR_CODE("#FFFFFF"), + STATUSBAR_CLOCK_CHIP_FILL_COLOR_OPTION("0"), + STATUSBAR_CLOCK_CHIP_FILL_COLOR_GRADIENT_DIRECTION("0"), + STATUSBAR_CLOCK_CHIP_FILL_COLOR_GRADIENT_COLOR1("#FF0000"), + STATUSBAR_CLOCK_CHIP_FILL_COLOR_GRADIENT_COLOR2("#0000FF"), + STATUSBAR_CLOCK_CHIP_BORDER(false), + STATUSBAR_CLOCK_CHIP_BORDER_COLOR_OPTION("0"), + STATUSBAR_CLOCK_CHIP_BORDER_COLOR_CODE("#00FF00"), + STATUSBAR_CLOCK_CHIP_DASHED_BORDER(false), + STATUSBAR_CLOCK_CHIP_DASHED_BORDER_WIDTH(4f), + STATUSBAR_CLOCK_CHIP_DASHED_BORDER_GAP(4f), + STATUSBAR_CLOCK_CHIP_DASHED_BORDER_THICKNESS(3f), + STATUSBAR_CLOCK_CHIP_PADDING_LEFT(8f), + STATUSBAR_CLOCK_CHIP_PADDING_RIGHT(8f), + STATUSBAR_CLOCK_CHIP_PADDING_TOP(4f), + STATUSBAR_CLOCK_CHIP_PADDING_BOTTOM(4f), + STATUSBAR_CLOCK_CHIP_RADIUS_TOP_LEFT(28f), + STATUSBAR_CLOCK_CHIP_RADIUS_TOP_RIGHT(28f), + STATUSBAR_CLOCK_CHIP_RADIUS_BOTTOM_LEFT(28f), + STATUSBAR_CLOCK_CHIP_RADIUS_BOTTOM_RIGHT(28f), + + // Statusbar - Logo + STATUSBAR_LOGO(false), + STATUSBAR_LOGO_POSITION("0"), + STATUSBAR_LOGO_STYLE("0"), + STATUSBAR_LOGO_FILE_URI(""), + STATUSBAR_LOGO_SIZE(18f), + STATUSBAR_LOGO_TINT(false), + + // Statusbar - Dual Statusbar + DUAL_STATUSBAR(false), + DUAL_STATUSBAR_PORTRAIT_ONLY(false), + DUAL_STATUSBAR_START_SIDE_SINGLE_ROW(false), + DUAL_STATUSBAR_END_SIDE_SINGLE_ROW(false), + DUAL_STATUSBAR_SWAP_START_SIDE(false), + DUAL_STATUSBAR_SWAP_END_SIDE(false), + DUAL_STATUSBAR_HEIGHT(-1f), + DUAL_STATUSBAR_START_PADDING(-1f), + DUAL_STATUSBAR_END_PADDING(-1f), + DUAL_STATUSBAR_TOP_PADDING(-1f), + DUAL_STATUSBAR_START_TOP_MARGIN(0f), + DUAL_STATUSBAR_START_BOTTOM_MARGIN(0f), + DUAL_STATUSBAR_END_TOP_MARGIN(0f), + DUAL_STATUSBAR_END_BOTTOM_MARGIN(0f), + + // Quick Settings + COLORED_NOTIFICATION_ICON_SWITCH(false), + COLORED_NOTIFICATION_VIEW_SWITCH(false), + COLORED_NOTIFICATION_ALTERNATIVE_SWITCH(false), + NOTIFICATION_HEADS_UP_BLUR(false), + NOTIFICATION_HEADS_UP_BLUR_RADIUS(48f), + NOTIFICATION_HEADS_UP_TRANSPARENCY(70f), + COMPACT_MEDIA_PLAYER(false), + BLUR_MEDIA_PLAYER_ARTWORK(false), + BLUR_MEDIA_PLAYER_ARTWORK_RADIUS(60f), + HIDE_QS_SILENT_TEXT(false), + HIDE_QS_FOOTER_BUTTONS(false), + QS_PANEL_HIDE_CARRIER(false), + HIDE_STATUS_ICONS(false), + FIX_QS_TILE_COLOR(false), + FIX_NOTIFICATION_COLOR(false), + FIX_NOTIFICATION_FOOTER_BUTTON_COLOR(false), + + // Quick Settings - Transparency & Blur + QUICK_SETTINGS_TRANSPARENCY(false), + NOTIFICATION_TRANSPARENCY(false), + LOCKSCREEN_SHADE(false), + QUICK_SETTINGS_ALPHA_LEVEL(60f), + QUICK_SETTINGS_BLUR(false), + QUICK_SETTINGS_AGGRESSIVE_BLUR(false), + QUICK_SETTINGS_BLUR_RADIUS(23), + + // Quick Settings - Header Image + CUSTOM_HEADER_IMAGE(false), + HEADER_IMAGE_FILE_URI(""), + HEADER_IMAGE_HEIGHT(140f), + HEADER_IMAGE_OPACITY(100f), + HEADER_IMAGE_BOTTOM_FADE_AMOUNT(40f), + HEADER_IMAGE_ZOOM_TO_FIT(false), + HEADER_IMAGE_HIDE_IN_LANDSCAPE(true), + + // Quick Settings - Themes + CUSTOM_QS_THEME(false), + ACTIVE_QS_TILE_BACKGROUND_COLOR("#FFFFFF"), + ACTIVE_QS_TILE_ICON_COLOR("#FFFFFF"), + ACTIVE_QS_TILE_ICON_BACKGROUND_COLOR("#FFFFFF"), + ACTIVE_QS_TILE_LABEL_COLOR("#FFFFFF"), + ACTIVE_QS_TILE_SECONDARY_LABEL_COLOR("#FFFFFF"), + INACTIVE_QS_TILE_BACKGROUND_COLOR("#FFFFFF"), + INACTIVE_QS_TILE_ICON_COLOR("#FFFFFF"), + INACTIVE_QS_TILE_ICON_BACKGROUND_COLOR("#FFFFFF"), + INACTIVE_QS_TILE_LABEL_COLOR("#FFFFFF"), + INACTIVE_QS_TILE_SECONDARY_LABEL_COLOR("#FFFFFF"), + UNAVAILABLE_QS_TILE_BACKGROUND_COLOR("#FFFFFF"), + UNAVAILABLE_QS_TILE_ICON_COLOR("#FFFFFF"), + UNAVAILABLE_QS_TILE_ICON_BACKGROUND_COLOR("#FFFFFF"), + UNAVAILABLE_QS_TILE_LABEL_COLOR("#FFFFFF"), + UNAVAILABLE_QS_TILE_SECONDARY_LABEL_COLOR("#FFFFFF"), + + // Quick Settings - Margins + CUSTOM_QS_MARGINS(false), + QQS_TOP_MARGIN_PORTRAIT(100f), + QS_TOP_MARGIN_PORTRAIT(100f), + QQS_TOP_MARGIN_LANDSCAPE(0f), + QS_TOP_MARGIN_LANDSCAPE(0f), + + // Lock Screen + LOCKSCREEN_WALLPAPER_BLUR(false), + LOCKSCREEN_WALLPAPER_BLUR_RADIUS(25f), + HIDE_LOCKSCREEN_LOCK_ICON(false), + HIDE_LOCKSCREEN_CARRIER(false), + HIDE_LOCKSCREEN_STATUSBAR(false), + + // Lockscreen - Clock + CUSTOM_LOCKSCREEN_CLOCK(false), + LSCLOCK_STYLE(0), + LSCLOCK_FONT_FILE_URI(""), + LSCLOCK_CUSTOM_COLOR(false), + LSCLOCK_COLOR_ACCENT_PRIMARY("#FFFFFF"), + LSCLOCK_COLOR_ACCENT_SECONDARY("#FFFFFF"), + LSCLOCK_COLOR_ACCENT_TERTIARY("#FFFFFF"), + LSCLOCK_COLOR_TEXT_PRIMARY("#FFFFFF"), + LSCLOCK_COLOR_TEXT_INVERSE("#FFFFFF"), + LSCLOCK_LINE_HEIGHT(0f), + LSCLOCK_TEXT_SCALE(1f), + LSCLOCK_TOP_MARGIN(100f), + LSCLOCK_BOTTOM_MARGIN(40f), + LSCLOCK_DEVICE_NAME(""), + LSCLOCK_USER_NAME(""), + + // Lockscreen - Weather + LOCKSCREEN_WEATHER(false), + WEATHER_ICON_PACK(null), + WEATHER_UPDATE_INTERVAL("1"), + WEATHER_SHOW_LOCATION(true), + WEATHER_SHOW_CONDITION(true), + WEATHER_SHOW_HUMIDITY(true), + WEATHER_SHOW_WIND(true), + WEATHER_TEXT_SIZE(16f), + WEATHER_ICON_SIZE(18f), + WEATHER_TEXT_COLOR_ENABLED(false), + WEATHER_TEXT_COLOR("#FFFFFF"), + WEATHER_OWM_KEY(""), + WEATHER_YANDEX_KEY(""), + WEATHER_UNITS("0"), + WEATHER_PROVIDER("0"), + WEATHER_CUSTOM_LOCATION(false), + WEATHER_CUSTOM_MARGINS_TOP(0f), + WEATHER_CUSTOM_MARGINS_SIDE(32f), + WEATHER_CUSTOM_MARGINS_BOTTOM(0f), + WEATHER_STYLE("0"), + WEATHER_CENTER_VIEW(false), + WEATHER_CUSTOM_FONT_FILE_URI(""), + + // Lockscreen - Widgets + LOCKSCREEN_WIDGETS(false), + LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET(false), + LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET_STYLE("0"), + LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET_CUSTOM_COLORS(false), + LOCKSCREEN_WIDGETS_LINEAR_PROGRESS_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_CIRCULAR_PROGRESS_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_TEXT_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_CUSTOM_DEVICE_NAME(""), + LOCKSCREEN_WIDGETS_MAIN("none,none"), + LOCKSCREEN_WIDGETS_EXTRAS("none,none,none,none"), + LOCKSCREEN_WIDGETS_LARGE_WIDGET1("none"), + LOCKSCREEN_WIDGETS_LARGE_WIDGET2("none"), + LOCKSCREEN_WIDGETS_MINI_WIDGET1("none"), + LOCKSCREEN_WIDGETS_MINI_WIDGET2("none"), + LOCKSCREEN_WIDGETS_MINI_WIDGET3("none"), + LOCKSCREEN_WIDGETS_MINI_WIDGET4("none"), + LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS(false), + LOCKSCREEN_WIDGETS_LARGE_WIDGET_ACTIVE_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_LARGE_WIDGET_INACTIVE_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_LARGE_WIDGET_ICON_ACTIVE_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_LARGE_WIDGET_ICON_INACTIVE_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_MINI_WIDGET_ACTIVE_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_MINI_WIDGET_INACTIVE_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_MINI_WIDGET_ICON_ACTIVE_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_MINI_WIDGET_ICON_INACTIVE_COLOR("#FFFFFF"), + LOCKSCREEN_WIDGETS_TOP_MARGIN(0f), + LOCKSCREEN_WIDGETS_BOTTOM_MARGIN(0f), + LOCKSCREEN_WIDGETS_CORNER_RADIUS(100f), + LOCKSCREEN_WIDGETS_VIEW_SCALE(1f), + + // Lockscreen - Depth Wallpaper + LOCKSCREEN_DEPTH_WALLPAPER(false), + DEPTH_WALLPAPER_CUSTOM_IMAGE(false), + DEPTH_WALLPAPER_AI_MODE("0"), + DEPTH_WALLPAPER_FOREGROUND_IMAGE_FILE_URI(""), + DEPTH_WALLPAPER_BACKGROUND_IMAGE_FILE_URI(""), + DEPTH_WALLPAPER_FOREGROUND_IMAGE_OPACITY(80f), + DEPTH_WALLPAPER_SHOW_ON_AOD(true), + + // Lockscreen - Media Album Art + ALBUM_ART_ON_LOCKSCREEN(false), + ALBUM_ART_ON_LOCKSCREEN_FILTER("0"), + ALBUM_ART_ON_LOCKSCREEN_BLUR(30f), + + // Volume Panel + VOLUME_PANEL_PERCENTAGE(false), + VOLUME_PANEL_SAFETY_WARNING(true), +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/AppSeedColors.kt b/app/src/main/java/com/drdisagree/iconify/data/models/AppSeedColors.kt new file mode 100644 index 000000000..1b4537d2b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/models/AppSeedColors.kt @@ -0,0 +1,76 @@ +package com.drdisagree.iconify.data.models + +data class SeedColor( + val name: String, + val primaryColor: Long, +) + +sealed class AppSeedColors(val seedColor: SeedColor) { + + data object Blue : AppSeedColors( + SeedColor( + name = "Blue", + primaryColor = 0xFF2196F3 + ) + ) + + data object Red : AppSeedColors( + SeedColor( + name = "Red", + primaryColor = 0xFFF44336 + ) + ) + + data object Green : AppSeedColors( + SeedColor( + name = "Green", + primaryColor = 0xFF4CAF50 + ) + ) + + data object Purple : AppSeedColors( + SeedColor( + name = "Purple", + primaryColor = 0xFF9C27B0 + ) + ) + + data object Orange : AppSeedColors( + SeedColor( + name = "Orange", + primaryColor = 0xFFFF9800 + ) + ) + + data object Teal : AppSeedColors( + SeedColor( + name = "Teal", + primaryColor = 0xFF009688 + ) + ) + + data object Pink : AppSeedColors( + SeedColor( + name = "Pink", + primaryColor = 0xFFE91E63 + ) + ) + + data object Brown : AppSeedColors( + SeedColor( + name = "Brown", + primaryColor = 0xFF80471C + ) + ) +} + +val allSeedColors = listOf( + AppSeedColors.Blue, + AppSeedColors.Red, + AppSeedColors.Green, + AppSeedColors.Purple, + AppSeedColors.Orange, + AppSeedColors.Teal, + AppSeedColors.Pink, + AppSeedColors.Brown +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/BrightnessBarModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/BrightnessBarModel.kt deleted file mode 100644 index 5c316a90b..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/BrightnessBarModel.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.drdisagree.iconify.data.models - -class BrightnessBarModel { - - var name: String - var brightness: Int - var autoBrightness: Int - var inverseColor: Boolean - - constructor(name: String, brightness: Int, autoBrightness: Int) { - this.name = name - this.brightness = brightness - this.autoBrightness = autoBrightness - inverseColor = false - } - - constructor(name: String, brightness: Int, autoBrightness: Int, inverseColor: Boolean) { - this.name = name - this.brightness = brightness - this.autoBrightness = autoBrightness - this.inverseColor = inverseColor - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/ClockCarouselItemModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/ClockCarouselItemModel.kt deleted file mode 100644 index ce9226bb4..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/ClockCarouselItemModel.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.drdisagree.iconify.data.models - -import android.view.View - -class ClockCarouselItemModel( - val clockName: String, - val clockLayout: Int, - val isSelected: Boolean, - val contentDescription: String, - val view: View -) diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/ClockModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/ClockModel.kt deleted file mode 100644 index 11de1bcd0..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/ClockModel.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.drdisagree.iconify.data.models - -class ClockModel( - var title: String, - var layout: Int -) { - var isSelected = false -} diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/IconPackModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/IconPackModel.kt deleted file mode 100644 index db8cfed00..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/IconPackModel.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.drdisagree.iconify.data.models - -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/data/models/IconPackPreview.kt b/app/src/main/java/com/drdisagree/iconify/data/models/IconPackPreview.kt new file mode 100644 index 000000000..b8ad6a38b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/models/IconPackPreview.kt @@ -0,0 +1,14 @@ +package com.drdisagree.iconify.data.models + +import android.os.Parcelable +import com.drdisagree.iconify.data.states.UiText +import kotlinx.parcelize.Parcelize + +@Parcelize +data class IconPackPreview( + val id: String, + val title: UiText, + val summary: UiText, + val icons: List, + val isApplied: Boolean = false, +) : Parcelable \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/IconShapeModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/IconShapeModel.kt deleted file mode 100644 index 8b4629b0b..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/IconShapeModel.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.drdisagree.iconify.data.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/data/models/IconShapePreview.kt b/app/src/main/java/com/drdisagree/iconify/data/models/IconShapePreview.kt new file mode 100644 index 000000000..bd6a2067f --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/models/IconShapePreview.kt @@ -0,0 +1,14 @@ +package com.drdisagree.iconify.data.models + +import android.os.Parcelable +import androidx.annotation.DrawableRes +import com.drdisagree.iconify.data.states.UiText +import kotlinx.parcelize.Parcelize + +@Parcelize +data class IconShapePreview( + val id: String, + val title: UiText, + @param:DrawableRes val shape: Int, + val isApplied: Boolean = false, +) : Parcelable \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/InfoModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/InfoModel.kt deleted file mode 100644 index 307e91db7..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/InfoModel.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.drdisagree.iconify.data.models - -import android.content.Intent -import android.net.Uri -import android.view.View -import com.drdisagree.iconify.Iconify.Companion.appContext - -class InfoModel { - - var icon: Any = 0 - var layout = 0 - var title: String? = null - var desc: String? = null - var onClickListener: View.OnClickListener? = null - - constructor(title: String?) { - this.title = title - } - - constructor(layout: Int) { - this.layout = layout - } - - constructor(title: String?, desc: String?, url: String?, icon: Any) { - this.title = title - this.desc = desc - this.icon = icon - this.onClickListener = View.OnClickListener { - appContext.startActivity( - Intent(Intent.ACTION_VIEW).apply { - data = Uri.parse(url) - addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - } - ) - } - } - - constructor(title: String?, desc: String?, onClickListener: View.OnClickListener?, icon: Any) { - this.title = title - this.desc = desc - this.icon = icon - this.onClickListener = onClickListener - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/MenuModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/MenuModel.kt deleted file mode 100644 index 86974bcc2..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/MenuModel.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.drdisagree.iconify.data.models - -import androidx.fragment.app.Fragment - -class MenuModel( - var fragment: Fragment, - var title: String, - var desc: String, - var icon: Int -) diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/NotificationModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/NotificationModel.kt deleted file mode 100644 index b888a8b8c..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/NotificationModel.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.drdisagree.iconify.data.models - -class NotificationModel( - var name: String, - var background: Int -) { - var isExpanded = false -} diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/NotificationPreview.kt b/app/src/main/java/com/drdisagree/iconify/data/models/NotificationPreview.kt new file mode 100644 index 000000000..f71bb1990 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/models/NotificationPreview.kt @@ -0,0 +1,14 @@ +package com.drdisagree.iconify.data.models + +import android.os.Parcelable +import androidx.annotation.DrawableRes +import com.drdisagree.iconify.data.states.UiText +import kotlinx.parcelize.Parcelize + +@Parcelize +data class NotificationPreview( + val id: String, + val title: UiText, + @param:DrawableRes val notificationStyle: Int, + val isApplied: Boolean = false, +) : Parcelable \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/ProgressBarModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/ProgressBarModel.kt deleted file mode 100644 index 7167b2c7c..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/ProgressBarModel.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.drdisagree.iconify.data.models - -class ProgressBarModel( - var name: String, - var progress: Int -) diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/QsShapeModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/QsShapeModel.kt deleted file mode 100644 index 75b96c6b0..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/QsShapeModel.kt +++ /dev/null @@ -1,68 +0,0 @@ -package com.drdisagree.iconify.data.models - -class QsShapeModel { - - var iconMarginStart: Int? - var iconMarginEnd: Int? - var name: String - var enabledDrawable: Int - var disabledDrawable: Int - var inverseColor: Boolean - - constructor(name: String, enabledDrawable1: Int, disabledDrawable1: Int) { - this.name = name - this.enabledDrawable = enabledDrawable1 - this.disabledDrawable = disabledDrawable1 - - inverseColor = false - iconMarginStart = null - iconMarginEnd = null - } - - constructor( - name: String, - enabledDrawable: Int, - disabledDrawable: Int, - inverseColor1: Boolean - ) { - this.name = name - this.enabledDrawable = enabledDrawable - this.disabledDrawable = disabledDrawable - - inverseColor = inverseColor1 - iconMarginStart = null - iconMarginEnd = null - } - - constructor( - name: String, - enabledDrawable: Int, - disabledDrawable: Int, - iconMarginStart: Int?, - iconMarginEnd: Int? - ) { - this.name = name - this.enabledDrawable = enabledDrawable - this.disabledDrawable = disabledDrawable - this.iconMarginStart = iconMarginStart - this.iconMarginEnd = iconMarginEnd - - inverseColor = false - } - - constructor( - name: String, - enabledDrawable: Int, - disabledDrawable: Int, - inverseColor: Boolean, - iconMarginStart: Int?, - iconMarginEnd: Int? - ) { - this.name = name - this.enabledDrawable = enabledDrawable - this.disabledDrawable = disabledDrawable - this.inverseColor = inverseColor - this.iconMarginStart = iconMarginStart - this.iconMarginEnd = iconMarginEnd - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/SearchPreferenceItem.kt b/app/src/main/java/com/drdisagree/iconify/data/models/SearchPreferenceItem.kt deleted file mode 100644 index 87437df80..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/SearchPreferenceItem.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.drdisagree.iconify.data.models - -import androidx.annotation.StringRes -import androidx.annotation.XmlRes -import androidx.fragment.app.Fragment - -class SearchPreferenceItem( - @field:XmlRes val xml: Int, - @field:StringRes val title: Int, - val fragment: Fragment, - val shouldAdd: Boolean = true -) diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/SettingsIconsPreview.kt b/app/src/main/java/com/drdisagree/iconify/data/models/SettingsIconsPreview.kt new file mode 100644 index 000000000..2fa6e42aa --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/models/SettingsIconsPreview.kt @@ -0,0 +1,12 @@ +package com.drdisagree.iconify.data.models + +import android.os.Parcelable +import com.drdisagree.iconify.data.states.UiText +import kotlinx.parcelize.Parcelize + +@Parcelize +data class SettingsIconsPreview( + val title: UiText, + val summary: UiText, + val icons: List, +) : Parcelable \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/SignalIconPreview.kt b/app/src/main/java/com/drdisagree/iconify/data/models/SignalIconPreview.kt new file mode 100644 index 000000000..ce2b32623 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/models/SignalIconPreview.kt @@ -0,0 +1,13 @@ +package com.drdisagree.iconify.data.models + +import android.os.Parcelable +import com.drdisagree.iconify.data.states.UiText +import kotlinx.parcelize.Parcelize + +@Parcelize +data class SignalIconPreview( + val id: String, + val title: UiText, + val icons: List, + val isApplied: Boolean = false, +) : Parcelable \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/SwitchModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/SwitchModel.kt deleted file mode 100644 index 09410b2eb..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/SwitchModel.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.drdisagree.iconify.data.models - -class SwitchModel( - var title: String, - var track: Int, - var thumb: Int -) diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/ToastFramePreview.kt b/app/src/main/java/com/drdisagree/iconify/data/models/ToastFramePreview.kt new file mode 100644 index 000000000..4396656ad --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/models/ToastFramePreview.kt @@ -0,0 +1,14 @@ +package com.drdisagree.iconify.data.models + +import android.os.Parcelable +import androidx.annotation.DrawableRes +import com.drdisagree.iconify.data.states.UiText +import kotlinx.parcelize.Parcelize + +@Parcelize +data class ToastFramePreview( + val id: String, + val title: UiText, + @param:DrawableRes val toastStyle: Int, + val isApplied: Boolean = false, +) : Parcelable \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/models/ToastModel.kt b/app/src/main/java/com/drdisagree/iconify/data/models/ToastModel.kt deleted file mode 100644 index 4262618fe..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/models/ToastModel.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.drdisagree.iconify.data.models - -class ToastModel ( - var style: Int, - var title: String, - var selected: Boolean = false -) diff --git a/app/src/main/java/com/drdisagree/iconify/data/repository/DynamicResourceRepository.kt b/app/src/main/java/com/drdisagree/iconify/data/repository/DynamicResourceRepository.kt deleted file mode 100644 index b6d651929..000000000 --- a/app/src/main/java/com/drdisagree/iconify/data/repository/DynamicResourceRepository.kt +++ /dev/null @@ -1,51 +0,0 @@ -package com.drdisagree.iconify.data.repository - -import com.drdisagree.iconify.data.dao.DynamicResourceDao -import com.drdisagree.iconify.data.database.DynamicResourceDatabase -import com.drdisagree.iconify.data.entity.DynamicResourceEntity - -class DynamicResourceRepository( - private val dynamicResourceDao: DynamicResourceDao = DynamicResourceDatabase - .getInstance() - .dynamicResourceDao() -) { - - suspend fun insertResources(resources: List) { - dynamicResourceDao.insertResources(resources) - } - - suspend fun deleteResources(resources: List) { - dynamicResourceDao.deleteResources( - resources.map { it.packageName }, - resources.map { it.startEndTag }, - resources.map { it.resourceName }, - resources.map { it.isPortrait }, - resources.map { it.isLandscape }, - resources.map { it.isNightMode } - ) - } - - suspend fun getAllResources(): List { - return dynamicResourceDao.getAllResources() - } - - suspend fun getResourcesForPackage(packageName: String): List { - return dynamicResourceDao.getResourcesForPackage(packageName) - } - - suspend fun deleteResourcesForPackage(packageName: String) { - dynamicResourceDao.deleteResourcesForPackage(packageName) - } - - suspend fun getPortraitResources(): List { - return dynamicResourceDao.getPortraitResources() - } - - suspend fun getLandscapeResources(): List { - return dynamicResourceDao.getLandscapeResources() - } - - suspend fun getNightModeResources(): List { - return dynamicResourceDao.getNightModeResources() - } -} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/repository/SystemActionRepository.kt b/app/src/main/java/com/drdisagree/iconify/data/repository/SystemActionRepository.kt new file mode 100644 index 000000000..f3e32438c --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/repository/SystemActionRepository.kt @@ -0,0 +1,40 @@ +package com.drdisagree.iconify.data.repository + +import com.drdisagree.iconify.core.utils.SystemUtils +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.asStateFlow +import javax.inject.Inject +import javax.inject.Singleton + +@Singleton +class SystemActionRepository @Inject constructor() { + + private val _shouldRestartSystemUI = MutableStateFlow(false) + val shouldRestartSystemUI = _shouldRestartSystemUI.asStateFlow() + + private val _shouldRebootDevice = MutableStateFlow(false) + val shouldRebootDevice = _shouldRebootDevice.asStateFlow() + + fun shouldRestartSystemUI() { + _shouldRestartSystemUI.value = true + } + + fun shouldRebootDevice() { + _shouldRebootDevice.value = true + } + + fun triggerRestartSystemUI() { + SystemUtils.restartSystemUI() + _shouldRestartSystemUI.value = false + } + + fun triggerRestartDevice() { + SystemUtils.restartDevice() + _shouldRebootDevice.value = false + } + + fun clearFlags() { + _shouldRestartSystemUI.value = false + _shouldRebootDevice.value = false + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/states/AppState.kt b/app/src/main/java/com/drdisagree/iconify/data/states/AppState.kt new file mode 100644 index 000000000..379b88f46 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/states/AppState.kt @@ -0,0 +1,6 @@ +package com.drdisagree.iconify.data.states + +sealed class AppState { + data object Loading : AppState() + data class Ready(val skipOnboarding: Boolean) : AppState() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/states/SettingsState.kt b/app/src/main/java/com/drdisagree/iconify/data/states/SettingsState.kt new file mode 100644 index 000000000..3a6bbf4d7 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/states/SettingsState.kt @@ -0,0 +1,18 @@ +package com.drdisagree.iconify.data.states + +import com.materialkolor.PaletteStyle + +data class SettingsState( + val themeMode: Int, + val isDynamicColor: Boolean, + val seedColor: Long, + val paletteStyle: PaletteStyle, + val isExpressive: Boolean, + val isAmoledTheme: Boolean, + val contrastLevel: Double, + val isHapticEnabled: Boolean, + val floatingBottomBar: Boolean, + val blurEffect: Boolean, + val savedVersionCode: Int, + val isLoaded: Boolean, +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/states/UiText.kt b/app/src/main/java/com/drdisagree/iconify/data/states/UiText.kt new file mode 100644 index 000000000..ec1972035 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/states/UiText.kt @@ -0,0 +1,52 @@ +package com.drdisagree.iconify.data.states + +import android.os.Parcelable +import androidx.annotation.StringRes +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import kotlinx.parcelize.Parcelize +import kotlinx.parcelize.RawValue + +@Parcelize +sealed class UiText : Parcelable { + + @Parcelize + data class Text(val value: String) : UiText() + + @Parcelize + data class Res( + @param:StringRes val resId: Int, + val args: @RawValue Array = emptyArray() + ) : UiText() { + + companion object { + fun of( + @StringRes resId: Int, + vararg args: Any + ): Res = Res(resId, args) + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (javaClass != other?.javaClass) return false + other as Res + return resId == other.resId && args.contentEquals(other.args) + } + + override fun hashCode(): Int = + 31 * resId + args.contentHashCode() + } +} + +/** + * Extension to convert UiText to String inside Compose + */ +@Composable +fun UiText.asString(): String = when (this) { + is UiText.Text -> value + is UiText.Res -> if (args.isEmpty()) { + stringResource(resId) + } else { + stringResource(resId, *args) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/storage/PreferenceStorage.kt b/app/src/main/java/com/drdisagree/iconify/data/storage/PreferenceStorage.kt new file mode 100644 index 000000000..d2e9d1daa --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/data/storage/PreferenceStorage.kt @@ -0,0 +1,205 @@ +package com.drdisagree.iconify.data.storage + +import android.content.Context +import android.content.Context.MODE_PRIVATE +import android.content.SharedPreferences +import androidx.core.content.edit +import androidx.datastore.core.DataStore +import androidx.datastore.preferences.core.Preferences +import androidx.datastore.preferences.core.booleanPreferencesKey +import androidx.datastore.preferences.core.doublePreferencesKey +import androidx.datastore.preferences.core.edit +import androidx.datastore.preferences.core.floatPreferencesKey +import androidx.datastore.preferences.core.intPreferencesKey +import androidx.datastore.preferences.core.stringPreferencesKey +import androidx.datastore.preferences.core.stringSetPreferencesKey +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.toPrefValue +import com.drdisagree.iconify.data.common.XposedConst.PREF_FILE_NAME +import dagger.hilt.android.qualifiers.ApplicationContext +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.cancel +import kotlinx.coroutines.channels.awaitClose +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.asFlow +import kotlinx.coroutines.flow.callbackFlow +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.drop +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.flow.flatMapConcat +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.launch +import kotlinx.coroutines.runBlocking +import javax.inject.Inject +import javax.inject.Singleton + +data class ExternalChange(val key: String, val value: PrefValue) + +interface PreferenceStorage { + val externalChanges: Flow + fun loadAll(): Map + fun read(key: String, defaultValue: PrefValue): Any? + fun write(key: String, value: PrefValue) + fun clearAll() + fun dispose() +} + +@Singleton +class SharedPreferencesStorage @Inject constructor( + @ApplicationContext context: Context, + fileName: String = PREF_FILE_NAME, +) : PreferenceStorage { + + private val sp: SharedPreferences = context + .applicationContext + .createDeviceProtectedStorageContext() + .getSharedPreferences(fileName, MODE_PRIVATE) + + override fun loadAll(): Map { + return sp.all.mapNotNull { (key, raw) -> + val pv = when (raw) { + is Boolean -> PrefValue.BoolValue(raw) + is Int -> PrefValue.IntValue(raw) + is Float -> PrefValue.FloatValue(raw) + is String -> PrefValue.StringValue(raw) + is Set<*> -> PrefValue.StringSetValue(raw.filterIsInstance().toSet()) + else -> null + } + pv?.let { key to it } + }.toMap() + } + + override fun read(key: String, defaultValue: PrefValue): Any? { + return when (defaultValue) { + is PrefValue.BoolValue -> sp.getBoolean(key, defaultValue.v) + is PrefValue.IntValue -> sp.getInt(key, defaultValue.v) + is PrefValue.FloatValue -> sp.getFloat(key, defaultValue.v) + is PrefValue.DoubleValue -> sp.getString(key, defaultValue.v.toString())?.toDouble() + is PrefValue.StringValue -> sp.getString(key, defaultValue.v) ?: defaultValue.v + is PrefValue.StringSetValue -> sp.getStringSet(key, defaultValue.v) ?: defaultValue.v + is PrefValue.None -> null + } + } + + override fun write(key: String, value: PrefValue) { + sp.edit { + when (value) { + is PrefValue.BoolValue -> putBoolean(key, value.v) + is PrefValue.IntValue -> putInt(key, value.v) + is PrefValue.FloatValue -> putFloat(key, value.v) + is PrefValue.DoubleValue -> putString(key, value.v.toString()) + is PrefValue.StringValue -> putString(key, value.v) + is PrefValue.StringSetValue -> putStringSet(key, value.v) + is PrefValue.None -> Unit + } + } + } + + override val externalChanges: Flow = callbackFlow { + val listener = SharedPreferences.OnSharedPreferenceChangeListener { prefs, key -> + if (key == null) return@OnSharedPreferenceChangeListener + val raw = prefs.all[key] ?: return@OnSharedPreferenceChangeListener + val pv = when (raw) { + is Boolean -> PrefValue.BoolValue(raw) + is Int -> PrefValue.IntValue(raw) + is Float -> PrefValue.FloatValue(raw) + is Double -> PrefValue.DoubleValue(raw) + is String -> PrefValue.StringValue(raw) + is Set<*> -> PrefValue.StringSetValue( + raw.filterIsInstance().toSet() + ) + + else -> return@OnSharedPreferenceChangeListener + } + trySend(ExternalChange(key, pv)) + } + sp.registerOnSharedPreferenceChangeListener(listener) + awaitClose { sp.unregisterOnSharedPreferenceChangeListener(listener) } + } + + override fun clearAll() { + sp.edit { clear() } + } + + override fun dispose() {} +} + +@Singleton +class DataStoreStorage @Inject constructor( + private val dataStore: DataStore, + private val scope: CoroutineScope, +) : PreferenceStorage { + + override fun loadAll(): Map { + val snapshot = runBlocking { dataStore.data.first() } + return snapshot.asMap().mapNotNull { (key, raw) -> + val pv = raw.toPrefValue() + key.name to pv + }.toMap() + } + + override fun read(key: String, defaultValue: PrefValue): Any? { + val snapshot = runBlocking { dataStore.data.first() } + + return when (defaultValue) { + is PrefValue.BoolValue -> snapshot[booleanPreferencesKey(key)] ?: defaultValue.v + is PrefValue.IntValue -> snapshot[intPreferencesKey(key)] ?: defaultValue.v + is PrefValue.FloatValue -> snapshot[floatPreferencesKey(key)] ?: defaultValue.v + is PrefValue.DoubleValue -> snapshot[doublePreferencesKey(key)] ?: defaultValue.v + is PrefValue.StringValue -> snapshot[stringPreferencesKey(key)] ?: defaultValue.v + is PrefValue.StringSetValue -> snapshot[stringSetPreferencesKey(key)] ?: defaultValue.v + is PrefValue.None -> null + } + } + + override fun write(key: String, value: PrefValue) { + scope.launch { + dataStore.edit { prefs -> + when (value) { + is PrefValue.BoolValue -> prefs[booleanPreferencesKey(key)] = value.v + is PrefValue.IntValue -> prefs[intPreferencesKey(key)] = value.v + is PrefValue.FloatValue -> prefs[floatPreferencesKey(key)] = value.v + is PrefValue.DoubleValue -> prefs[doublePreferencesKey(key)] = value.v + is PrefValue.StringValue -> prefs[stringPreferencesKey(key)] = value.v + is PrefValue.StringSetValue -> prefs[stringSetPreferencesKey(key)] = value.v + is PrefValue.None -> Unit + } + } + } + } + + @OptIn(ExperimentalCoroutinesApi::class) + override val externalChanges: Flow = + dataStore.data + .distinctUntilChanged() + .zipWithPrevious() // (prev, current) pairs + .drop(1) // skip the (null, initial) pair + .flatMapConcat { (prev, current) -> + val prevMap = prev?.asMap() ?: emptyMap() + val currMap = current.asMap() + // Find keys whose value changed between snapshots + val changed = currMap.filter { (k, v) -> prevMap[k] != v } + changed.mapNotNull { (key, raw) -> + ExternalChange(key.name, raw.toPrefValue()) + }.asFlow() + } + + override fun clearAll() { + scope.launch { + dataStore.edit { it.clear() } + } + } + + override fun dispose() { + scope.cancel() + } + + private fun Flow.zipWithPrevious(): Flow> = flow { + var previous: T? = null + collect { current -> + emit(previous to current) + previous = current + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/BottomNavViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/BottomNavViewModel.kt new file mode 100644 index 000000000..d058cac23 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/BottomNavViewModel.kt @@ -0,0 +1,34 @@ +package com.drdisagree.iconify.features.common.viewmodels + +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import androidx.lifecycle.ViewModel +import com.drdisagree.iconify.app.navigation.BOTTOM_BAR_TABS +import com.drdisagree.iconify.app.navigation.DEFAULT_BOTTOM_BAR_TAB +import dagger.hilt.android.lifecycle.HiltViewModel +import javax.inject.Inject +import kotlin.math.floor + +@HiltViewModel +class BottomNavViewModel @Inject constructor() : ViewModel() { + + var selectedTabIndex by mutableIntStateOf( + BOTTOM_BAR_TABS.indexOf(DEFAULT_BOTTOM_BAR_TAB) + .takeIf { it != -1 } + ?: floor((BOTTOM_BAR_TABS.size / 2).toDouble()).toInt() + ) + private set + + var isBottomBarVisible by mutableStateOf(false) + private set + + fun selectTab(index: Int) { + selectedTabIndex = index + } + + fun showBottomBar(show: Boolean) { + isBottomBarVisible = show + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/SettingsViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/SettingsViewModel.kt new file mode 100644 index 000000000..25ead127d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/SettingsViewModel.kt @@ -0,0 +1,77 @@ +package com.drdisagree.iconify.features.common.viewmodels + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.di.SharedPrefs +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.toPrefValue +import com.drdisagree.iconify.data.keys.SettingsKey +import com.drdisagree.iconify.data.storage.PreferenceStorage +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.filter +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.onStart +import kotlinx.coroutines.launch +import javax.inject.Inject + +@HiltViewModel +class SettingsViewModel @Inject constructor( + @param:SharedPrefs private val preferenceStorage: PreferenceStorage +) : ViewModel() { + + private val prefController = PreferenceController(preferenceStorage) + + init { + viewModelScope.launch { + loadSettings() + } + } + + private fun loadSettings() { + prefController.initAll( + SettingsKey.entries.associate { key -> + key.name to key.default.toPrefValue() + } + ) + } + + fun getValue(key: SettingsKey): Any? { + return prefController.get(key.name, key.default?.toPrefValue()) + ?: key.default + } + + fun setValue(key: SettingsKey, value: Any) { + prefController.set(key.name, value.toPrefValue()) + } + + fun getBooleanFlow(key: SettingsKey): Flow = prefController.changesFlow + .filterNotNull() + .filter { it.key == key.name } + .map { prefController.getBoolean(key.name, key.default as Boolean) } + .onStart { emit(prefController.getBoolean(key.name, key.default as Boolean)) } + + fun getIntFlow(key: SettingsKey): Flow = prefController.changesFlow + .filterNotNull() + .filter { it.key == key.name } + .map { prefController.getInt(key.name, key.default as Int) } + .onStart { emit(prefController.getInt(key.name, key.default as Int)) } + + fun getFloatFlow(key: SettingsKey): Flow = prefController.changesFlow + .filterNotNull() + .filter { it.key == key.name } + .map { prefController.getFloat(key.name, key.default as Float) } + .onStart { emit(prefController.getFloat(key.name, key.default as Float)) } + + fun getStringFlow(key: SettingsKey): Flow = prefController.changesFlow + .filterNotNull() + .filter { it.key == key.name } + .map { prefController.getString(key.name, key.default as String) } + .onStart { emit(prefController.getString(key.name, key.default as String)) } + + override fun onCleared() { + prefController.dispose() + super.onCleared() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/SystemActionViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/SystemActionViewModel.kt new file mode 100644 index 000000000..c95297fac --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/common/viewmodels/SystemActionViewModel.kt @@ -0,0 +1,21 @@ +package com.drdisagree.iconify.features.common.viewmodels + +import androidx.lifecycle.ViewModel +import com.drdisagree.iconify.data.repository.SystemActionRepository +import dagger.hilt.android.lifecycle.HiltViewModel +import javax.inject.Inject + +@HiltViewModel +class SystemActionViewModel @Inject constructor( + private val systemActionRepository: SystemActionRepository +) : ViewModel() { + + val shouldRestartSystemUI = systemActionRepository.shouldRestartSystemUI + val shouldRebootDevice = systemActionRepository.shouldRebootDevice + + fun shouldRestartSystemUI() = systemActionRepository.shouldRestartSystemUI() + fun shouldRebootDevice() = systemActionRepository.shouldRebootDevice() + fun triggerRestartSystemUI() = systemActionRepository.triggerRestartSystemUI() + fun triggerRestartDevice() = systemActionRepository.triggerRestartDevice() + fun clearFlags() = systemActionRepository.clearFlags() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/components/CellularIconCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/components/CellularIconCard.kt new file mode 100644 index 000000000..71872ee46 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/components/CellularIconCard.kt @@ -0,0 +1,81 @@ +package com.drdisagree.iconify.features.home.cellularicons.components + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.cards.IconPreviewCard +import com.drdisagree.iconify.data.models.SignalIconPreview +import com.drdisagree.iconify.data.states.asString +import com.drdisagree.iconify.data.states.UiText + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun CellularIconCard( + iconPack: SignalIconPreview, + onClick: () -> Unit +) { + IconPreviewCard( + title = iconPack.title.asString(), + isApplied = iconPack.isApplied, + icons = iconPack.icons, + onClick = onClick + ) +} + +@Preview(showBackground = true) +@Composable +fun CellularIconCardPreview() { + val iconPacks = listOf( + SignalIconPreview( + id = "1", + title = UiText.Text("Aurora"), + icons = listOf( + R.drawable.preview_aurora_wifi, + R.drawable.preview_aurora_signal, + R.drawable.preview_aurora_airplane, + R.drawable.preview_aurora_location + ), + isApplied = true + ), + SignalIconPreview( + id = "2", + title = UiText.Text("Gradicon"), + icons = listOf( + R.drawable.preview_gradicon_wifi, + R.drawable.preview_gradicon_signal, + R.drawable.preview_gradicon_airplane, + R.drawable.preview_gradicon_location + ) + ), + SignalIconPreview( + id = "3", + title = UiText.Text("Lorn"), + icons = listOf( + R.drawable.preview_lorn_wifi, + R.drawable.preview_lorn_signal, + R.drawable.preview_lorn_airplane, + R.drawable.preview_lorn_location + ) + ) + ) + + LazyColumn( + verticalArrangement = Arrangement.spacedBy(8.dp), + horizontalAlignment = Alignment.CenterHorizontally, + contentPadding = PaddingValues(16.dp) + ) { + items(iconPacks) { pack -> + CellularIconCard( + iconPack = pack, + onClick = {} + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/screens/CellularIconScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/screens/CellularIconScreen.kt new file mode 100644 index 000000000..4053fd2a6 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/screens/CellularIconScreen.kt @@ -0,0 +1,463 @@ +package com.drdisagree.iconify.features.home.cellularicons.screens + +import android.widget.Toast +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Devices +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.dialogs.LoadingDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.models.SignalIconPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.features.home.cellularicons.components.CellularIconCard +import com.drdisagree.iconify.features.home.cellularicons.viewmodels.CellularIconViewModel + +private val cellularIconList = listOf( + Pair( + "Aquarium", + listOf( + R.drawable.preview_aquarium_ic_signal_cellular_1_4_bar, + R.drawable.preview_aquarium_ic_signal_cellular_2_4_bar, + R.drawable.preview_aquarium_ic_signal_cellular_3_4_bar, + R.drawable.preview_aquarium_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Aurora", + listOf( + R.drawable.preview_aurora_ic_signal_cellular_1_4_bar, + R.drawable.preview_aurora_ic_signal_cellular_2_4_bar, + R.drawable.preview_aurora_ic_signal_cellular_3_4_bar, + R.drawable.preview_aurora_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Bars", + listOf( + R.drawable.preview_bars_ic_signal_cellular_1_4_bar, + R.drawable.preview_bars_ic_signal_cellular_2_4_bar, + R.drawable.preview_bars_ic_signal_cellular_3_4_bar, + R.drawable.preview_bars_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Butterfly", + listOf( + R.drawable.preview_butterfly_ic_signal_cellular_1_4_bar, + R.drawable.preview_butterfly_ic_signal_cellular_2_4_bar, + R.drawable.preview_butterfly_ic_signal_cellular_3_4_bar, + R.drawable.preview_butterfly_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Circle", + listOf( + R.drawable.preview_circle_ic_signal_cellular_1_4_bar, + R.drawable.preview_circle_ic_signal_cellular_2_4_bar, + R.drawable.preview_circle_ic_signal_cellular_3_4_bar, + R.drawable.preview_circle_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Daun", + listOf( + R.drawable.preview_daun_ic_signal_cellular_1_4_bar, + R.drawable.preview_daun_ic_signal_cellular_2_4_bar, + R.drawable.preview_daun_ic_signal_cellular_3_4_bar, + R.drawable.preview_daun_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Dec", + listOf( + R.drawable.preview_dec_ic_signal_cellular_1_4_bar, + R.drawable.preview_dec_ic_signal_cellular_2_4_bar, + R.drawable.preview_dec_ic_signal_cellular_3_4_bar, + R.drawable.preview_dec_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Deep", + listOf( + R.drawable.preview_deep_ic_signal_cellular_1_4_bar, + R.drawable.preview_deep_ic_signal_cellular_2_4_bar, + R.drawable.preview_deep_ic_signal_cellular_3_4_bar, + R.drawable.preview_deep_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Dora", + listOf( + R.drawable.preview_dora_ic_signal_cellular_1_4_bar, + R.drawable.preview_dora_ic_signal_cellular_2_4_bar, + R.drawable.preview_dora_ic_signal_cellular_3_4_bar, + R.drawable.preview_dora_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "ZigZag", + listOf( + R.drawable.preview_zigzag_ic_signal_cellular_1_4_bar, + R.drawable.preview_zigzag_ic_signal_cellular_2_4_bar, + R.drawable.preview_zigzag_ic_signal_cellular_3_4_bar, + R.drawable.preview_zigzag_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Equal", + listOf( + R.drawable.preview_equal_ic_signal_cellular_1_4_bar, + R.drawable.preview_equal_ic_signal_cellular_2_4_bar, + R.drawable.preview_equal_ic_signal_cellular_3_4_bar, + R.drawable.preview_equal_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Faint UI", + listOf( + R.drawable.preview_faint_ui_ic_signal_cellular_1_4_bar, + R.drawable.preview_faint_ui_ic_signal_cellular_2_4_bar, + R.drawable.preview_faint_ui_ic_signal_cellular_3_4_bar, + R.drawable.preview_faint_ui_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Fan", + listOf( + R.drawable.preview_fan_ic_signal_cellular_1_4_bar, + R.drawable.preview_fan_ic_signal_cellular_2_4_bar, + R.drawable.preview_fan_ic_signal_cellular_3_4_bar, + R.drawable.preview_fan_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Lorn", + listOf( + R.drawable.preview_lorn_ic_signal_cellular_1_4_bar, + R.drawable.preview_lorn_ic_signal_cellular_2_4_bar, + R.drawable.preview_lorn_ic_signal_cellular_3_4_bar, + R.drawable.preview_lorn_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Gradicon", + listOf( + R.drawable.preview_gradicon_ic_signal_cellular_1_4_bar, + R.drawable.preview_gradicon_ic_signal_cellular_2_4_bar, + R.drawable.preview_gradicon_ic_signal_cellular_3_4_bar, + R.drawable.preview_gradicon_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Huawei", + listOf( + R.drawable.preview_huawei_ic_signal_cellular_1_4_bar, + R.drawable.preview_huawei_ic_signal_cellular_2_4_bar, + R.drawable.preview_huawei_ic_signal_cellular_3_4_bar, + R.drawable.preview_huawei_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Inside", + listOf( + R.drawable.preview_inside_ic_signal_cellular_1_4_bar, + R.drawable.preview_inside_ic_signal_cellular_2_4_bar, + R.drawable.preview_inside_ic_signal_cellular_3_4_bar, + R.drawable.preview_inside_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "iOS", + listOf( + R.drawable.preview_ios_ic_signal_cellular_1_4_bar, + R.drawable.preview_ios_ic_signal_cellular_2_4_bar, + R.drawable.preview_ios_ic_signal_cellular_3_4_bar, + R.drawable.preview_ios_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Mini", + listOf( + R.drawable.preview_mini_ic_signal_cellular_1_4_bar, + R.drawable.preview_mini_ic_signal_cellular_2_4_bar, + R.drawable.preview_mini_ic_signal_cellular_3_4_bar, + R.drawable.preview_mini_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Nothing Dot", + listOf( + R.drawable.preview_nothing_dot_ic_signal_cellular_1_4_bar, + R.drawable.preview_nothing_dot_ic_signal_cellular_2_4_bar, + R.drawable.preview_nothing_dot_ic_signal_cellular_3_4_bar, + R.drawable.preview_nothing_dot_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Odin", + listOf( + R.drawable.preview_odin_ic_signal_cellular_1_4_bar, + R.drawable.preview_odin_ic_signal_cellular_2_4_bar, + R.drawable.preview_odin_ic_signal_cellular_3_4_bar, + R.drawable.preview_odin_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Pills", + listOf( + R.drawable.preview_pills_ic_signal_cellular_1_4_bar, + R.drawable.preview_pills_ic_signal_cellular_2_4_bar, + R.drawable.preview_pills_ic_signal_cellular_3_4_bar, + R.drawable.preview_pills_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Plumpy", + listOf( + R.drawable.preview_plumpy_ic_signal_cellular_1_4_bar, + R.drawable.preview_plumpy_ic_signal_cellular_2_4_bar, + R.drawable.preview_plumpy_ic_signal_cellular_3_4_bar, + R.drawable.preview_plumpy_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Rel", + listOf( + R.drawable.preview_rel_ic_signal_cellular_1_4_bar, + R.drawable.preview_rel_ic_signal_cellular_2_4_bar, + R.drawable.preview_rel_ic_signal_cellular_3_4_bar, + R.drawable.preview_rel_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Roman", + listOf( + R.drawable.preview_roman_ic_signal_cellular_1_4_bar, + R.drawable.preview_roman_ic_signal_cellular_2_4_bar, + R.drawable.preview_roman_ic_signal_cellular_3_4_bar, + R.drawable.preview_roman_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Round", + listOf( + R.drawable.preview_round_ic_signal_cellular_1_4_bar, + R.drawable.preview_round_ic_signal_cellular_2_4_bar, + R.drawable.preview_round_ic_signal_cellular_3_4_bar, + R.drawable.preview_round_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Scroll", + listOf( + R.drawable.preview_scroll_ic_signal_cellular_1_4_bar, + R.drawable.preview_scroll_ic_signal_cellular_2_4_bar, + R.drawable.preview_scroll_ic_signal_cellular_3_4_bar, + R.drawable.preview_scroll_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Sea", + listOf( + R.drawable.preview_sea_ic_signal_cellular_1_4_bar, + R.drawable.preview_sea_ic_signal_cellular_2_4_bar, + R.drawable.preview_sea_ic_signal_cellular_3_4_bar, + R.drawable.preview_sea_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Sneaky", + listOf( + R.drawable.preview_sneaky_ic_signal_cellular_1_4_bar, + R.drawable.preview_sneaky_ic_signal_cellular_2_4_bar, + R.drawable.preview_sneaky_ic_signal_cellular_3_4_bar, + R.drawable.preview_sneaky_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Stack", + listOf( + R.drawable.preview_stack_ic_signal_cellular_1_4_bar, + R.drawable.preview_stack_ic_signal_cellular_2_4_bar, + R.drawable.preview_stack_ic_signal_cellular_3_4_bar, + R.drawable.preview_stack_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Stroke", + listOf( + R.drawable.preview_stroke_ic_signal_cellular_1_4_bar, + R.drawable.preview_stroke_ic_signal_cellular_2_4_bar, + R.drawable.preview_stroke_ic_signal_cellular_3_4_bar, + R.drawable.preview_stroke_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Wannui", + listOf( + R.drawable.preview_wannui_ic_signal_cellular_1_4_bar, + R.drawable.preview_wannui_ic_signal_cellular_2_4_bar, + R.drawable.preview_wannui_ic_signal_cellular_3_4_bar, + R.drawable.preview_wannui_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Wavy", + listOf( + R.drawable.preview_wavy_ic_signal_cellular_1_4_bar, + R.drawable.preview_wavy_ic_signal_cellular_2_4_bar, + R.drawable.preview_wavy_ic_signal_cellular_3_4_bar, + R.drawable.preview_wavy_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Windows", + listOf( + R.drawable.preview_windows_ic_signal_cellular_1_4_bar, + R.drawable.preview_windows_ic_signal_cellular_2_4_bar, + R.drawable.preview_windows_ic_signal_cellular_3_4_bar, + R.drawable.preview_windows_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Wing", + listOf( + R.drawable.preview_wing_ic_signal_cellular_1_4_bar, + R.drawable.preview_wing_ic_signal_cellular_2_4_bar, + R.drawable.preview_wing_ic_signal_cellular_3_4_bar, + R.drawable.preview_wing_ic_signal_cellular_4_4_bar + ) + ), + Pair( + "Xperia", + listOf( + R.drawable.preview_xperia_ic_signal_cellular_1_4_bar, + R.drawable.preview_xperia_ic_signal_cellular_2_4_bar, + R.drawable.preview_xperia_ic_signal_cellular_3_4_bar, + R.drawable.preview_xperia_ic_signal_cellular_4_4_bar + ) + ) +).mapIndexed { index, (name, icons) -> + SignalIconPreview( + id = (index + 1).toString(), + title = UiText.Text(name), + icons = icons + ) +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun CellularIconScreen(cellularIconViewModel: CellularIconViewModel = hiltViewModel()) { + val context = LocalContext.current + val scrollState = rememberScrollState() + val cellularIcons by rememberSaveable { mutableStateOf(cellularIconList) } + val cellularIconStyle by cellularIconViewModel.cellularIconStyle.collectAsStateWithLifecycle() + val isApplying by cellularIconViewModel.isLoading.collectAsStateWithLifecycle() + + LaunchedEffect(cellularIcons) { + cellularIconViewModel.refreshState() + } + + if (isApplying) { + LoadingDialog() + } + + LaunchedEffect(Unit) { + cellularIconViewModel.uiEvent.collect { event -> + when (event) { + ToastUiEvent.Applied -> Toast.makeText( + context, + R.string.toast_applied, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Disabled -> Toast.makeText( + context, + R.string.toast_disabled, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Error -> Toast.makeText( + context, + R.string.toast_error, + Toast.LENGTH_SHORT + ).show() + } + } + } + + AppScaffold( + title = stringResource(R.string.activity_title_cellular_icons), + showBackIcon = true, + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + start = 16.dp, + end = 16.dp, + top = 16.dp + ) + + Column( + modifier = Modifier + .fillMaxSize() + .verticalScroll(scrollState) + .padding(padding) + ) { + FlowRow( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally), + verticalArrangement = Arrangement.spacedBy(16.dp), + ) { + cellularIcons.forEach { cellularIcons -> + val isApplied = cellularIconStyle == cellularIcons.id + + CellularIconCard( + iconPack = cellularIcons.copy(isApplied = isApplied), + onClick = { + cellularIconViewModel.togglePack(cellularIcons.id) + } + ) + } + } + } + } +} + +@Preview(showBackground = true, name = "Phone", device = Devices.PHONE) +@Composable +fun CellularIconScreenPhonePreview() { + PreviewComposable { + CellularIconScreen() + } +} + +@Preview(showBackground = true, name = "Tablet", device = Devices.TABLET) +@Composable +fun CellularIconScreenTabletPreview() { + PreviewComposable { + CellularIconScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/viewmodels/CellularIconViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/viewmodels/CellularIconViewModel.kt new file mode 100644 index 000000000..2f3727f8d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/cellularicons/viewmodels/CellularIconViewModel.kt @@ -0,0 +1,114 @@ +package com.drdisagree.iconify.features.home.cellularicons.viewmodels + +import android.util.Log +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.core.utils.overlay.compilers.OnDemandCompiler +import com.drdisagree.iconify.data.common.Const.SYSTEMUI_PACKAGE +import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.keys.CustomizationKey +import com.drdisagree.iconify.data.repository.SystemActionRepository +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.io.IOException +import javax.inject.Inject + +@HiltViewModel +class CellularIconViewModel @Inject constructor( + private val systemActionRepository: SystemActionRepository +) : ViewModel() { + + private val tag = "CellularIconViewModel" + + private val category = "SGIC" + private val otherCategory = "WIFI" + private val prefKey = CustomizationKey.CELLULAR_ICON_STYLE + private val prefDefaultValue = prefKey.default as String + + private val _cellularIconStyle = MutableStateFlow(prefDefaultValue) + val cellularIconStyle: StateFlow = _cellularIconStyle.asStateFlow() + + private val _isLoading = MutableStateFlow(false) + val isLoading: StateFlow = _isLoading.asStateFlow() + + private val _uiEvent = MutableSharedFlow() + val uiEvent = _uiEvent.asSharedFlow() + + fun refreshState() { + _cellularIconStyle.value = RPrefs.getString(prefKey)!! + } + + fun togglePack(packId: String) { + viewModelScope.launch(Dispatchers.IO) { + if (_isLoading.value) return@launch + + _isLoading.value = true + + if (_cellularIconStyle.value == packId) { + OverlayUtils.disableOverlay("IconifyComponent$category.overlay") + + delay(1000) + RPrefs.putString(prefKey, prefDefaultValue) + _cellularIconStyle.value = prefDefaultValue + _isLoading.value = false + systemActionRepository.shouldRestartSystemUI() + _uiEvent.emit(ToastUiEvent.Disabled) + return@launch + } + + val iconPackPkgName = OverlayUtils.checkEnabledOverlay("IPSUI") + val iconPackApplied = iconPackPkgName.isNotEmpty() + + if (iconPackApplied) { + OverlayUtils.disableOverlay(iconPackPkgName) + } + + val wifiPack = "IconifyComponent$otherCategory.overlay" + val wifiPackApplied = OverlayUtils.isOverlayEnabled(wifiPack) + + if (iconPackApplied) { + OverlayUtils.enableOverlayExclusiveInCategory(iconPackPkgName, "low") + } + + val hasError = withContext(Dispatchers.IO) { + try { + OnDemandCompiler.buildOverlay( + overlayName = category, + style = packId, + targetPackage = SYSTEMUI_PACKAGE, + force = true + ) + } catch (e: IOException) { + Log.e(tag, e.toString()) + true + } + } + + if (wifiPackApplied) { + OverlayUtils.enableOverlay(wifiPack) + } + + delay(1000) + _isLoading.value = false + systemActionRepository.shouldRestartSystemUI() + + if (!hasError) { + RPrefs.putString(prefKey, packId) + _cellularIconStyle.value = packId + _uiEvent.emit(ToastUiEvent.Applied) + } else { + _uiEvent.emit(ToastUiEvent.Error) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/components/IconPackCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/components/IconPackCard.kt new file mode 100644 index 000000000..fcd0786ba --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/components/IconPackCard.kt @@ -0,0 +1,155 @@ +package com.drdisagree.iconify.features.home.iconpack.components + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.others.IconPreviewGrid +import com.drdisagree.iconify.data.models.IconPackPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.data.states.asString + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun IconPackCard( + iconPack: IconPackPreview, + isSelected: Boolean, + onClick: () -> Unit, + onActionClick: (IconPackPreview) -> Unit, + shape: Shape = MaterialTheme.shapes.large +) { + Card( + onClick = onClick, + modifier = Modifier.fillMaxWidth(), + shape = shape, + colors = CardDefaults.cardColors( + containerColor = if (iconPack.isApplied) MaterialTheme.colorScheme.primaryContainer + else MaterialTheme.colorScheme.surfaceContainerHigh + ) + ) { + Column(modifier = Modifier.padding(16.dp)) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Column(modifier = Modifier.weight(1f)) { + Text( + text = iconPack.title.asString(), + style = MaterialTheme.typography.titleMedium, + color = if (iconPack.isApplied) MaterialTheme.colorScheme.onPrimaryContainer else MaterialTheme.colorScheme.onSurface + ) + Text( + text = iconPack.summary.asString(), + style = MaterialTheme.typography.bodyMedium, + color = (if (iconPack.isApplied) MaterialTheme.colorScheme.onPrimaryContainer else MaterialTheme.colorScheme.onSurface).secondaryText() + ) + } + + IconPreviewGrid( + isApplied = iconPack.isApplied, + icons = iconPack.icons + ) + } + + AnimatedVisibility(visible = isSelected) { + Button( + onClick = { onActionClick(iconPack) }, + shapes = ButtonDefaults.shapes(), + modifier = Modifier + .fillMaxWidth() + .padding(top = 16.dp), + colors = ButtonDefaults.buttonColors( + containerColor = if (iconPack.isApplied) + MaterialTheme.colorScheme.errorContainer + else + MaterialTheme.colorScheme.primaryContainer, + contentColor = if (iconPack.isApplied) + MaterialTheme.colorScheme.onErrorContainer + else + MaterialTheme.colorScheme.onPrimaryContainer + ) + ) { + Text( + stringResource( + if (iconPack.isApplied) R.string.btn_disable + else R.string.btn_apply + ) + ) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun IconPackPreview() { + val iconPacks = listOf( + IconPackPreview( + id = "1", + title = UiText.Text("Aurora"), + summary = UiText.Text("Dual tone linear icon pack"), + icons = listOf( + R.drawable.preview_aurora_wifi, + R.drawable.preview_aurora_signal, + R.drawable.preview_aurora_airplane, + R.drawable.preview_aurora_location + ), + isApplied = true + ), + IconPackPreview( + id = "2", + title = UiText.Text("Gradicon"), + summary = UiText.Text("Gradient shaded filled icon pack"), + icons = listOf( + R.drawable.preview_gradicon_wifi, + R.drawable.preview_gradicon_signal, + R.drawable.preview_gradicon_airplane, + R.drawable.preview_gradicon_location + ) + ), + IconPackPreview( + id = "3", + title = UiText.Text("Lorn"), + summary = UiText.Text("Thick linear icon pack"), + icons = listOf( + R.drawable.preview_lorn_wifi, + R.drawable.preview_lorn_signal, + R.drawable.preview_lorn_airplane, + R.drawable.preview_lorn_location + ) + ) + ) + + LazyColumn { + items(iconPacks) { pack -> + IconPackCard( + iconPack = pack, + isSelected = pack.id == "1", + onClick = {}, + onActionClick = {} + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/screens/IconPackScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/screens/IconPackScreen.kt new file mode 100644 index 000000000..f91921b19 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/screens/IconPackScreen.kt @@ -0,0 +1,250 @@ +package com.drdisagree.iconify.features.home.iconpack.screens + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.dialogs.LoadingDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import com.drdisagree.iconify.core.ui.utils.CARD_ITEM_SPACING +import com.drdisagree.iconify.core.ui.utils.cardCorners +import com.drdisagree.iconify.core.ui.utils.resolvePosition +import com.drdisagree.iconify.data.models.IconPackPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.features.home.iconpack.components.IconPackCard +import com.drdisagree.iconify.features.home.iconpack.viewmodels.IconPackViewModel + +private val iconPackList = listOf( + Triple( + "Aurora", + R.string.iconpack_aurora_desc, + listOf( + R.drawable.preview_aurora_wifi, + R.drawable.preview_aurora_signal, + R.drawable.preview_aurora_airplane, + R.drawable.preview_aurora_location + ) + ), + Triple( + "Gradicon", + R.string.iconpack_gradicon_desc, + listOf( + R.drawable.preview_gradicon_wifi, + R.drawable.preview_gradicon_signal, + R.drawable.preview_gradicon_airplane, + R.drawable.preview_gradicon_location + ) + ), + Triple( + "Lorn", + R.string.iconpack_lorn_desc, + listOf( + R.drawable.preview_lorn_wifi, + R.drawable.preview_lorn_signal, + R.drawable.preview_lorn_airplane, + R.drawable.preview_lorn_location + ) + ), + Triple( + "Plumpy", + R.string.iconpack_plumpy_desc, + listOf( + R.drawable.preview_plumpy_wifi, + R.drawable.preview_plumpy_signal, + R.drawable.preview_plumpy_airplane, + R.drawable.preview_plumpy_location + ) + ), + Triple( + "Acherus", + R.string.iconpack_acherus_desc, + listOf( + R.drawable.preview_acherus_wifi, + R.drawable.preview_acherus_signal, + R.drawable.preview_acherus_airplane, + R.drawable.preview_acherus_location + ) + ), + Triple( + "Circular", + R.string.iconpack_circular_desc, + listOf( + R.drawable.preview_circular_wifi, + R.drawable.preview_circular_signal, + R.drawable.preview_circular_airplane, + R.drawable.preview_circular_location + ) + ), + Triple( + "Filled", + R.string.iconpack_filled_desc, + listOf( + R.drawable.preview_filled_wifi, + R.drawable.preview_filled_signal, + R.drawable.preview_filled_airplane, + R.drawable.preview_filled_location + ) + ), + Triple( + "Kai", + R.string.iconpack_kai_desc, + listOf( + R.drawable.preview_kai_wifi, + R.drawable.preview_kai_signal, + R.drawable.preview_kai_airplane, + R.drawable.preview_kai_location + ) + ), + Triple( + "OOS", + R.string.iconpack_oos_desc, + listOf( + R.drawable.preview_oos_wifi, + R.drawable.preview_oos_signal, + R.drawable.preview_oos_airplane, + R.drawable.preview_oos_location + ) + ), + Triple( + "Outline", + R.string.iconpack_outline_desc, + listOf( + R.drawable.preview_outline_wifi, + R.drawable.preview_outline_signal, + R.drawable.preview_outline_airplane, + R.drawable.preview_outline_location + ) + ), + Triple( + "PUI", + R.string.iconpack_pui_desc, + listOf( + R.drawable.preview_pui_wifi, + R.drawable.preview_pui_signal, + R.drawable.preview_pui_airplane, + R.drawable.preview_pui_location + ) + ), + Triple( + "Rounded", + R.string.iconpack_rounded_desc, + listOf( + R.drawable.preview_rounded_wifi, + R.drawable.preview_rounded_signal, + R.drawable.preview_rounded_airplane, + R.drawable.preview_rounded_location + ) + ), + Triple( + "Sam", + R.string.iconpack_sam_desc, + listOf( + R.drawable.preview_sam_wifi, + R.drawable.preview_sam_signal, + R.drawable.preview_sam_airplane, + R.drawable.preview_sam_location + ) + ), + Triple( + "Victor", + R.string.iconpack_victor_desc, + listOf( + R.drawable.preview_victor_wifi, + R.drawable.preview_victor_signal, + R.drawable.preview_victor_airplane, + R.drawable.preview_victor_location + ) + ) +).mapIndexed { index, (name, descRes, icons) -> + IconPackPreview( + id = (index + 1).toString(), + title = UiText.Text(name), + summary = UiText.Res(descRes), + icons = icons + ) +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun IconPackScreen(iconPackViewModel: IconPackViewModel = hiltViewModel()) { + val iconPacks by rememberSaveable { mutableStateOf(iconPackList) } + val overlayStates by iconPackViewModel.iconPackStates.collectAsStateWithLifecycle() + var expandedPackId by rememberSaveable { mutableStateOf(null) } + val isApplying by iconPackViewModel.isLoading.collectAsStateWithLifecycle() + + val indices by rememberSaveable(iconPacks) { mutableStateOf(iconPacks.indices.toList()) } + + LaunchedEffect(iconPacks) { + iconPackViewModel.checkAllStatuses(iconPacks) + } + + if (isApplying) { + LoadingDialog() + } + + AppScaffold( + title = stringResource(R.string.activity_title_icon_pack), + showBackIcon = true, + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + start = 16.dp, + end = 16.dp, + top = 16.dp + ) + + LazyColumn( + modifier = Modifier.fillMaxSize(), + verticalArrangement = Arrangement.spacedBy(CARD_ITEM_SPACING), + contentPadding = padding, + ) { + itemsIndexed(iconPacks) { index, pack -> + val isApplied = overlayStates[pack.id] ?: false + val position = resolvePosition(indices, index) + val corners = cardCorners(position) + + IconPackCard( + iconPack = pack.copy(isApplied = isApplied), + isSelected = expandedPackId == pack.id, + onClick = { + expandedPackId = if (expandedPackId == pack.id) null else pack.id + }, + onActionClick = { + iconPackViewModel.togglePack(pack.id) + }, + shape = RoundedCornerShape( + topStart = corners.topStart, + topEnd = corners.topEnd, + bottomStart = corners.bottomStart, + bottomEnd = corners.bottomEnd + ) + ) + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun IconPackScreenPreview() { + PreviewComposable { + IconPackScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/viewmodels/IconPackViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/viewmodels/IconPackViewModel.kt new file mode 100644 index 000000000..9d8dabdea --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/iconpack/viewmodels/IconPackViewModel.kt @@ -0,0 +1,89 @@ +package com.drdisagree.iconify.features.home.iconpack.viewmodels + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.data.models.IconPackPreview +import com.drdisagree.iconify.data.repository.SystemActionRepository +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch +import javax.inject.Inject + +@HiltViewModel +class IconPackViewModel @Inject constructor( + private val systemActionRepository: SystemActionRepository +) : ViewModel() { + + private var hasCheckedStatus = false + + private val categories = listOf("IPAS", "IPSUI") + + private val _iconPackStates = MutableStateFlow>(emptyMap()) + val iconPackStates: StateFlow> = _iconPackStates.asStateFlow() + + private val _isLoading = MutableStateFlow(false) + val isLoading: StateFlow = _isLoading.asStateFlow() + + fun checkAllStatuses(iconPacks: List) { + if (!hasCheckedStatus) { + iconPacks.forEach { pack -> checkStatus(pack.id) } + hasCheckedStatus = true + } + } + + fun checkStatus(packId: String) { + viewModelScope.launch(Dispatchers.IO) { + val isEnabled = + OverlayUtils.isOverlayEnabled("IconifyComponent${categories[0]}$packId.overlay") + _iconPackStates.update { it + (packId to isEnabled) } + } + } + + fun togglePack(packId: String) { + viewModelScope.launch(Dispatchers.IO) { + val currentState = _iconPackStates.value[packId] ?: false + val currentlyEnabledPack = _iconPackStates.value + .entries + .firstOrNull { it.value && it.key != packId } + ?.key + + _isLoading.value = true + delay(500) + + if (currentState) { + OverlayUtils.disableOverlays( + *categories.map { category -> "IconifyComponent$category$packId.overlay" } + .toTypedArray() + ) + } else { + OverlayUtils.enableOverlaysExclusiveInCategory( + *categories.map { category -> "IconifyComponent$category$packId.overlay" } + .toTypedArray() + ) + } + + delay(1500) + _isLoading.value = false + systemActionRepository.shouldRestartSystemUI() + + val toggledState = + OverlayUtils.isOverlayEnabled("IconifyComponent${categories[0]}$packId.overlay") + val previousState = currentlyEnabledPack?.let { + OverlayUtils.isOverlayEnabled("IconifyComponent${categories[0]}$it.overlay") + } + + _iconPackStates.update { map -> + val previousMap = currentlyEnabledPack?.let { + mapOf(it to (previousState ?: false)) + } ?: emptyMap() + map + (packId to toggledState) + previousMap + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/components/IconShapeCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/components/IconShapeCard.kt new file mode 100644 index 000000000..f5892679b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/components/IconShapeCard.kt @@ -0,0 +1,222 @@ +package com.drdisagree.iconify.features.home.iconshape.components + +import androidx.compose.foundation.background +import androidx.compose.foundation.basicMarquee +import androidx.compose.foundation.clickable +import androidx.compose.foundation.indication +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentSize +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.ripple +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.paint +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.ColorFilter +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.layout.onGloballyPositioned +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.others.TooltipArrow +import com.drdisagree.iconify.core.ui.utils.CARD_CORNER_LARGE +import com.drdisagree.iconify.core.ui.utils.rememberXmlPainter +import com.drdisagree.iconify.data.models.IconShapePreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.data.states.asString + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun IconShapeCard( + iconShape: IconShapePreview, + onClick: () -> Unit +) { + val interactionSource = remember { MutableInteractionSource() } + + Card( + shape = RoundedCornerShape(CARD_CORNER_LARGE), + colors = CardDefaults.cardColors(containerColor = Color.Transparent) + ) { + Column( + modifier = Modifier + .padding(8.dp) + .width(78.dp) + .clickable( + onClick = onClick, + interactionSource = interactionSource, + indication = null + ), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center + ) { + Box( + modifier = Modifier + .size(48.dp) + .paint( + painter = rememberXmlPainter(iconShape.shape), + contentScale = ContentScale.FillBounds, + colorFilter = ColorFilter.tint( + if (iconShape.isApplied) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.onSurface.secondaryText() + } + ) + ), + contentAlignment = Alignment.Center + ) { + Box( + modifier = Modifier + .size(44.dp) + .paint( + painter = rememberXmlPainter(iconShape.shape), + contentScale = ContentScale.FillBounds, + colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.surface) + ) + ) + } + + val containerColor = if (iconShape.isApplied) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.surfaceContainerHigh + } + var contentHeightPx by remember { mutableIntStateOf(0) } + val density = LocalDensity.current + + Column( + modifier = Modifier + .padding(top = 4.dp) + .wrapContentSize(), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center + ) { + TooltipArrow( + backgroundColor = containerColor, + interactionSource = interactionSource + ) + Box( + modifier = Modifier + .wrapContentSize() + .clip(MaterialTheme.shapes.large) + .background(containerColor) + .indication( + interactionSource = interactionSource, + indication = ripple() + ) + .padding(vertical = 4.dp) + .onGloballyPositioned { coordinates -> + contentHeightPx = coordinates.size.height + }, + contentAlignment = Alignment.Center + ) { + Text( + text = iconShape.title.asString(), + style = MaterialTheme.typography.labelLarge, + maxLines = 1, + textAlign = TextAlign.Center, + modifier = Modifier + .basicMarquee(iterations = Int.MAX_VALUE) + .padding(horizontal = 8.dp), + color = if (iconShape.isApplied) { + MaterialTheme.colorScheme.onPrimary + } else { + MaterialTheme.colorScheme.onSurface + }, + ) + Box( + modifier = Modifier + .width(8.dp) + .height(with(density) { contentHeightPx.toDp() }) + .background( + Brush.horizontalGradient( + colors = listOf( + containerColor, + containerColor.copy(alpha = 0.7f), + containerColor.copy(alpha = 0f) + ) + ) + ) + .align(Alignment.CenterStart) + ) + Box( + modifier = Modifier + .width(8.dp) + .height(with(density) { contentHeightPx.toDp() }) + .background( + Brush.horizontalGradient( + colors = listOf( + containerColor.copy(alpha = 0f), + containerColor.copy(alpha = 0.7f), + containerColor + ) + ) + ) + .align(Alignment.CenterEnd) + ) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun IconShapeCardPreview() { + val iconShapes = listOf( + IconShapePreview( + id = "1", + title = UiText.Text("Round"), + shape = R.drawable.icon_shape_round, + isApplied = true + ), + IconShapePreview( + id = "2", + title = UiText.Text("Pebble"), + shape = R.drawable.icon_shape_pebble + ), + IconShapePreview( + id = "3", + title = UiText.Text("Hexagon"), + shape = R.drawable.icon_shape_rounded_hexagon + ) + ) + + LazyColumn( + verticalArrangement = Arrangement.spacedBy(8.dp), + horizontalAlignment = Alignment.CenterHorizontally, + contentPadding = PaddingValues(16.dp) + ) { + items(iconShapes) { iconShape -> + IconShapeCard( + iconShape = iconShape, + onClick = {} + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/screens/IconShapeScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/screens/IconShapeScreen.kt new file mode 100644 index 000000000..386005d8f --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/screens/IconShapeScreen.kt @@ -0,0 +1,211 @@ +package com.drdisagree.iconify.features.home.iconshape.screens + +import android.widget.Toast +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Devices +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.dialogs.LoadingDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.models.IconShapePreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.features.home.iconshape.components.IconShapeCard +import com.drdisagree.iconify.features.home.iconshape.viewmodels.IconShapeViewModel + +private val iconShapeList = listOf( + Pair( + R.string.icon_mask_style_round, + R.drawable.icon_shape_round + ), + Pair( + R.string.icon_mask_style_pebble, + R.drawable.icon_shape_pebble + ), + Pair( + R.string.icon_mask_style_hexagon, + R.drawable.icon_shape_rounded_hexagon + ), + Pair( + R.string.icon_mask_style_samsung, + R.drawable.icon_shape_samsung + ), + Pair( + R.string.icon_mask_style_scroll, + R.drawable.icon_shape_scroll + ), + Pair( + R.string.icon_mask_style_teardrop, + R.drawable.icon_shape_teardrops + ), + Pair( + R.string.icon_mask_style_square, + R.drawable.icon_shape_square + ), + Pair( + R.string.icon_mask_style_rounded_rectangle, + R.drawable.icon_shape_rounded_rectangle + ), + Pair( + R.string.icon_mask_style_ios, + R.drawable.icon_shape_ios + ), + Pair( + R.string.icon_mask_style_cloudy, + R.drawable.icon_shape_cloudy + ), + Pair( + R.string.icon_mask_style_cylinder, + R.drawable.icon_shape_cylinder + ), + Pair( + R.string.icon_mask_style_flower, + R.drawable.icon_shape_flower + ), + Pair( + R.string.icon_mask_style_heart, + R.drawable.icon_shape_heart + ), + Pair( + R.string.icon_mask_style_leaf, + R.drawable.icon_shape_leaf + ), + Pair( + R.string.icon_mask_style_stretched, + R.drawable.icon_shape_stretched + ), + Pair( + R.string.icon_mask_style_tapered_rectangle, + R.drawable.icon_shape_tapered_rectangle + ), + Pair( + R.string.icon_mask_style_vessel, + R.drawable.icon_shape_vessel + ), + Pair( + R.string.icon_mask_style_rice_rohie_meow, + R.drawable.icon_shape_rohie_meow + ), +).mapIndexed { index, (name, icons) -> + IconShapePreview( + id = (index + 1).toString(), + title = UiText.Res(name), + shape = icons + ) +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun IconShapeScreen(iconShapeViewModel: IconShapeViewModel = hiltViewModel()) { + val context = LocalContext.current + val scrollState = rememberScrollState() + val iconShapes by rememberSaveable { mutableStateOf(iconShapeList) } + val toastFrameStyle by iconShapeViewModel.iconShapeStyle.collectAsStateWithLifecycle() + val isApplying by iconShapeViewModel.isLoading.collectAsStateWithLifecycle() + + LaunchedEffect(iconShapes) { + iconShapeViewModel.refreshState() + } + + if (isApplying) { + LoadingDialog() + } + + LaunchedEffect(Unit) { + iconShapeViewModel.uiEvent.collect { event -> + when (event) { + ToastUiEvent.Applied -> Toast.makeText( + context, + R.string.toast_applied, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Disabled -> Toast.makeText( + context, + R.string.toast_disabled, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Error -> Toast.makeText( + context, + R.string.toast_error, + Toast.LENGTH_SHORT + ).show() + } + } + } + + AppScaffold( + title = stringResource(R.string.activity_title_icon_shape), + showBackIcon = true, + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + start = 16.dp, + end = 16.dp, + top = 16.dp + ) + + Column( + modifier = Modifier + .fillMaxSize() + .verticalScroll(scrollState) + .padding(padding) + ) { + FlowRow( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally), + verticalArrangement = Arrangement.spacedBy(16.dp), + ) { + iconShapes.forEach { iconShape -> + val isApplied = toastFrameStyle == iconShape.id + + IconShapeCard( + iconShape = iconShape.copy(isApplied = isApplied), + onClick = { + iconShapeViewModel.togglePack(iconShape.id) + } + ) + } + } + } + } +} + +@Preview(showBackground = true, name = "Phone", device = Devices.PHONE) +@Composable +fun IconShapeScreenPhonePreview() { + PreviewComposable { + IconShapeScreen() + } +} + +@Preview(showBackground = true, name = "Tablet", device = Devices.TABLET) +@Composable +fun IconShapeScreenTabletPreview() { + PreviewComposable { + IconShapeScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/viewmodels/IconShapeViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/viewmodels/IconShapeViewModel.kt new file mode 100644 index 000000000..907e25a4d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/iconshape/viewmodels/IconShapeViewModel.kt @@ -0,0 +1,91 @@ +package com.drdisagree.iconify.features.home.iconshape.viewmodels + +import android.util.Log +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.core.utils.overlay.compilers.OnDemandCompiler +import com.drdisagree.iconify.data.common.Const.FRAMEWORK_PACKAGE +import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.keys.CustomizationKey +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.io.IOException +import javax.inject.Inject + +@HiltViewModel +class IconShapeViewModel @Inject constructor() : ViewModel() { + + private val tag = "IconShapeViewModel" + + private val category = "SIS" + private val prefKey = CustomizationKey.ICON_SHAPE_STYLE + private val prefDefaultValue = prefKey.default as String + + private val _iconShapeStyle = MutableStateFlow(prefDefaultValue) + val iconShapeStyle: StateFlow = _iconShapeStyle.asStateFlow() + + private val _isLoading = MutableStateFlow(false) + val isLoading: StateFlow = _isLoading.asStateFlow() + + private val _uiEvent = MutableSharedFlow() + val uiEvent = _uiEvent.asSharedFlow() + + fun refreshState() { + _iconShapeStyle.value = RPrefs.getString(prefKey)!! + } + + fun togglePack(packId: String) { + viewModelScope.launch(Dispatchers.IO) { + if (_isLoading.value) return@launch + + _isLoading.value = true + + if (_iconShapeStyle.value == packId) { + delay(500) + OverlayUtils.disableOverlay("IconifyComponent$category.overlay") + + delay(1000) + RPrefs.putString(prefKey, prefDefaultValue) + _iconShapeStyle.value = prefDefaultValue + _isLoading.value = false + _uiEvent.emit(ToastUiEvent.Disabled) + return@launch + } + + val hasError = withContext(Dispatchers.IO) { + try { + OnDemandCompiler.buildOverlay( + overlayName = category, + style = packId, + targetPackage = FRAMEWORK_PACKAGE, + force = true + ) + } catch (e: IOException) { + Log.e(tag, e.toString()) + true + } + } + + delay(1000) + _isLoading.value = false + + if (!hasError) { + RPrefs.putString(prefKey, packId) + _iconShapeStyle.value = packId + _uiEvent.emit(ToastUiEvent.Applied) + } else { + _uiEvent.emit(ToastUiEvent.Error) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeBannerCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeBannerCard.kt new file mode 100644 index 000000000..49abef7ac --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeBannerCard.kt @@ -0,0 +1,190 @@ +package com.drdisagree.iconify.features.home.main.components + +import androidx.compose.animation.core.Spring +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.core.spring +import androidx.compose.foundation.Image +import androidx.compose.foundation.gestures.detectTapGestures +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.PressInteraction +import androidx.compose.foundation.interaction.collectIsPressedAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableFloatStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.TransformOrigin +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.input.pointer.pointerInput +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontStyle +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.ShakeConfig +import com.drdisagree.iconify.core.ui.components.extensions.rememberShakeController +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.extensions.shake +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.ui.components.texts.AutoResizeableText + +@Composable +fun HomeBannerCard(modifier: Modifier = Modifier) { + val shape = MaterialTheme.shapes.large + val shakeController = rememberShakeController() + val interactionSource = remember { MutableInteractionSource() } + + val isPressed by interactionSource.collectIsPressedAsState() + + var touchX by remember { mutableFloatStateOf(0.5f) } + var touchY by remember { mutableFloatStateOf(0.5f) } + + val edgeThreshold = 0.3f + val nearLeft = touchX < edgeThreshold + val nearRight = touchX > 1f - edgeThreshold + val nearTop = touchY < edgeThreshold + val nearBottom = touchY > 1f - edgeThreshold + val isCorner = (nearLeft || nearRight) && (nearTop || nearBottom) + val isSide = (nearLeft || nearRight || nearTop || nearBottom) && !isCorner + val maxTilt = 6f + + val tiltX by animateFloatAsState( + targetValue = if (isPressed) -(touchY - 0.5f) * 2f * maxTilt else 0f, + animationSpec = spring( + dampingRatio = Spring.DampingRatioMediumBouncy, + stiffness = Spring.StiffnessMedium + ), + label = "tiltX" + ) + + val tiltY by animateFloatAsState( + targetValue = if (isPressed) (touchX - 0.5f) * 2f * maxTilt else 0f, + animationSpec = spring( + dampingRatio = Spring.DampingRatioMediumBouncy, + stiffness = Spring.StiffnessMedium + ), + label = "tiltY" + ) + val scaleTarget = when { + !isPressed -> 1f + isCorner -> 0.97f + isSide -> 0.98f + else -> 0.99f + } + val scale by animateFloatAsState( + targetValue = scaleTarget, + animationSpec = spring( + dampingRatio = Spring.DampingRatioMediumBouncy, + stiffness = Spring.StiffnessMedium + ), + label = "scale" + ) + + val onTapAction = withHaptic { + shakeController.shake( + ShakeConfig( + iterations = 4, + intensity = 2_000f, + rotateY = 2f, + translateX = 5f, + ) + ) + } + + Card( + modifier = modifier + .pointerInput(Unit) { + detectTapGestures( + onPress = { offset -> + // Update position + touchX = (offset.x / size.width).coerceIn(0f, 1f) + touchY = (offset.y / size.height).coerceIn(0f, 1f) + + // Emit press to interactionSource + val press = PressInteraction.Press(offset) + interactionSource.emit(press) + + val released = tryAwaitRelease() + + if (released) { + interactionSource.emit(PressInteraction.Release(press)) + } else { + interactionSource.emit(PressInteraction.Cancel(press)) + } + }, + onTap = { onTapAction() } + ) + } + .shake(shakeController) + .fillMaxWidth() + .graphicsLayer { + rotationX = tiltX + rotationY = tiltY + scaleX = scale + scaleY = scale + cameraDistance = 14f * density + + // Shift toward pressed corner instead of changing pivot + // so the held corner goes "inward" without clipping opposite side + val shiftAmount = 6f + translationX = (touchX - 0.5f) * shiftAmount + translationY = (touchY - 0.5f) * shiftAmount + + transformOrigin = TransformOrigin.Center + }, + shape = shape, + elevation = CardDefaults.cardElevation(defaultElevation = 0.dp) + ) { + Box(modifier = Modifier.fillMaxWidth()) { + Image( + painter = painterResource(id = R.drawable.img_home_card_bg), + contentDescription = null, + contentScale = ContentScale.Crop, + alignment = Alignment.TopCenter, + modifier = Modifier.matchParentSize() + ) + + Column( + modifier = Modifier + .fillMaxWidth() + .padding(36.dp), + verticalArrangement = Arrangement.Center + ) { + AutoResizeableText( + text = stringResource(id = R.string.home_card_title), + maxLines = 1, + color = Color.Black, + style = MaterialTheme.typography.titleLarge.copy(fontSize = 30.sp), + fontSize = 30.sp + ) + AutoResizeableText( + text = stringResource(id = R.string.home_card_subtitle), + maxLines = 1, + color = Color.Black.secondaryText(), + style = MaterialTheme.typography.titleSmall.copy(fontSize = 12.sp), + fontStyle = FontStyle.Italic + ) + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun HomeBannerCardPreview() { + HomeBannerCard() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeCategories.kt b/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeCategories.kt new file mode 100644 index 000000000..ba74fca1e --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeCategories.kt @@ -0,0 +1,170 @@ +package com.drdisagree.iconify.features.home.main.components + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.compositeOver +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable + +private data class CategoryItem( + val title: Int, + val subtitle: Int? = null, + val icon: Int, + val smallVariant: Boolean = false, + val route: NavRoutes.Home +) + +@Composable +fun HomeCategories(modifier: Modifier = Modifier) { + val context = LocalContext.current + val navController = LocalNavController.current + + val categories = listOf( + CategoryItem( + title = R.string.activity_title_icon_pack, + subtitle = R.string.activity_desc_icon_pack, + icon = R.drawable.ic_styles_iconpack, + route = NavRoutes.Home.IconPack + ), + CategoryItem( + title = R.string.more, + icon = R.drawable.ic_arrow_end_long, + smallVariant = true, + route = NavRoutes.Home.More + ), + CategoryItem( + title = R.string.activity_title_cellular_icons, + subtitle = R.string.activity_desc_cellular_icons, + icon = R.drawable.ic_styles_signal_icons, + route = NavRoutes.Home.CellularIcons + ), + CategoryItem( + title = R.string.activity_title_wifi_icons, + subtitle = R.string.activity_desc_wifi_icons, + icon = R.drawable.ic_styles_wifi_icons, + route = NavRoutes.Home.WifiIcons + ), + CategoryItem( + title = R.string.activity_title_settings_icons, + subtitle = R.string.activity_desc_settings_icons, + icon = R.drawable.ic_settings_icon_pack, + route = NavRoutes.Home.SettingsIcons + ), + CategoryItem( + title = R.string.activity_title_notification, + subtitle = R.string.activity_desc_notification, + icon = R.drawable.ic_styles_notification, + route = NavRoutes.Home.Notification + ), + CategoryItem( + title = R.string.activity_title_toast_frame, + subtitle = R.string.activity_desc_toast_frame, + icon = R.drawable.ic_styles_toast_frame, + route = NavRoutes.Home.ToastFrame + ), + CategoryItem( + title = R.string.activity_title_icon_shape, + subtitle = R.string.activity_desc_icon_shape, + icon = R.drawable.ic_styles_icon_shape, + route = NavRoutes.Home.IconShape + ) + ) + + Row( + modifier = modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(16.dp) + ) { + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + categories + .filterIndexed { index, _ -> index % 2 == 0 } + .forEachIndexed { rowIndex, item -> + val shouldBePrimary = rowIndex % 2 == 0 + val backgroundColor = if (shouldBePrimary) { + MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.2f) + .compositeOver(MaterialTheme.colorScheme.surfaceContainerHigh) + } else { + MaterialTheme.colorScheme.surfaceContainerHigh + } + val foregroundColor = if (shouldBePrimary) { + MaterialTheme.colorScheme.onPrimaryContainer.copy(alpha = 0.25f) + .compositeOver(MaterialTheme.colorScheme.onSurface) + } else { + MaterialTheme.colorScheme.onSurface + } + + HomeCategoryCard( + title = stringResource(item.title), + subtitle = item.subtitle?.let { stringResource(it) }, + icon = item.icon, + backgroundColor = backgroundColor, + foregroundColor = foregroundColor, + smallVariant = item.smallVariant, + onClick = { + navController.navigate(item.route) { + launchSingleTop = true + } + } + ) + } + } + + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + categories + .filterIndexed { index, _ -> index % 2 == 1 } + .forEachIndexed { rowIndex, item -> + val shouldBePrimary = rowIndex % 2 != 0 + val backgroundColor = if (shouldBePrimary) { + MaterialTheme.colorScheme.tertiaryContainer.copy(alpha = 0.2f) + .compositeOver(MaterialTheme.colorScheme.surfaceContainerHigh) + } else { + MaterialTheme.colorScheme.surfaceContainerHigh + } + val foregroundColor = if (shouldBePrimary) { + MaterialTheme.colorScheme.onTertiaryContainer.copy(alpha = 0.25f) + .compositeOver(MaterialTheme.colorScheme.onSurface) + } else { + MaterialTheme.colorScheme.onSurface + } + + HomeCategoryCard( + title = stringResource(item.title), + subtitle = item.subtitle?.let { stringResource(it) }, + icon = item.icon, + backgroundColor = backgroundColor, + foregroundColor = foregroundColor, + smallVariant = item.smallVariant, + onClick = { + navController.navigate(item.route) { + launchSingleTop = true + } + } + ) + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun HomeCategoriesPreview() { + PreviewComposable { + HomeCategories() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeCategoryCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeCategoryCard.kt new file mode 100644 index 000000000..733791552 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/main/components/HomeCategoryCard.kt @@ -0,0 +1,131 @@ +package com.drdisagree.iconify.features.home.main.components + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.ui.components.texts.AutoResizeableText + +@Composable +fun HomeCategoryCard( + modifier: Modifier = Modifier, + title: String, + subtitle: String? = null, + icon: Int, + backgroundColor: Color, + foregroundColor: Color, + smallVariant: Boolean = false, + onClick: () -> Unit +) { + Card( + modifier = modifier + .fillMaxWidth() + .then( + if (smallVariant) Modifier.wrapContentHeight() + else Modifier.height(160.dp) + ) + .clip(MaterialTheme.shapes.extraLarge) + .clickable(onClick = withHaptic { onClick() }), + shape = MaterialTheme.shapes.extraLarge, + colors = CardDefaults.cardColors(containerColor = backgroundColor) + ) { + Box( + modifier = Modifier.then( + if (smallVariant) Modifier.wrapContentHeight() + else Modifier.fillMaxSize() + ) + ) { + Icon( + painter = painterResource(icon), + contentDescription = null, + tint = foregroundColor.copy(alpha = 0.45f), + modifier = Modifier + .padding(8.dp) + .then( + if (smallVariant) { + Modifier + .size(36.dp) + .align(Alignment.CenterEnd) + } else { + Modifier + .size(68.dp) + .align(Alignment.BottomEnd) + } + ) + ) + + Column( + modifier = Modifier + .padding(16.dp) + .fillMaxWidth(), + verticalArrangement = Arrangement.Top + ) { + AutoResizeableText( + text = title, + style = MaterialTheme.typography.titleMedium, + color = foregroundColor + ) + if (!smallVariant && subtitle != null) { + Text( + text = subtitle, + style = MaterialTheme.typography.bodyMedium, + color = foregroundColor.secondaryText() + ) + } + } + } + } +} + +@Preview(showBackground = true, widthDp = 400) +@Composable +fun HomeCategoryGridPreview() { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(16.dp), + horizontalArrangement = Arrangement.spacedBy(16.dp) + ) { + HomeCategoryCard( + title = "Icon Pack", + subtitle = "Change system icon pack", + icon = R.drawable.ic_styles_iconpack, + backgroundColor = MaterialTheme.colorScheme.primaryContainer, + foregroundColor = MaterialTheme.colorScheme.onPrimaryContainer, + modifier = Modifier.weight(1f), + onClick = {} + ) + HomeCategoryCard( + title = "More", + smallVariant = true, + icon = R.drawable.ic_arrow_end_long, + backgroundColor = MaterialTheme.colorScheme.tertiaryContainer, + foregroundColor = MaterialTheme.colorScheme.onTertiaryContainer, + modifier = Modifier.weight(1f), + onClick = {} + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/main/screens/HomeScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/main/screens/HomeScreen.kt new file mode 100644 index 000000000..e7fea4ccc --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/main/screens/HomeScreen.kt @@ -0,0 +1,55 @@ +package com.drdisagree.iconify.features.home.main.screens + +import androidx.compose.foundation.layout.padding +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.utils.sharedHiltViewModel +import com.drdisagree.iconify.features.common.viewmodels.BottomNavViewModel +import com.drdisagree.iconify.features.home.main.components.HomeBannerCard +import com.drdisagree.iconify.features.home.main.components.HomeCategories +import kotlinx.coroutines.delay + +val homePreferences = preferenceScreen { + composable(key = "header_image") { + HomeBannerCard() + } + + composable(key = "home_cards") { + HomeCategories(modifier = Modifier.padding(top = 16.dp)) + } +} + +@Composable +fun HomeScreen(bottomNavViewModel: BottomNavViewModel = sharedHiltViewModel()) { + LaunchedEffect(Unit) { + delay(300) + bottomNavViewModel.showBottomBar(true) + } + + HomeScreenContent() +} + +@Composable +private fun HomeScreenContent() { + PreferenceScreen( + items = homePreferences, + title = stringResource(R.string.app_name), + subtitle = stringResource(R.string.app_motto) + ) +} + +@Preview(showBackground = true) +@Composable +fun HomeScreenPreview() { + PreviewComposable { + HomeScreenContent() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/notification/components/NotificationCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/notification/components/NotificationCard.kt new file mode 100644 index 000000000..c722d87fb --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/notification/components/NotificationCard.kt @@ -0,0 +1,238 @@ +package com.drdisagree.iconify.features.home.notification.components + +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredSize +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.paint +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.utils.rememberXmlPainter +import com.drdisagree.iconify.data.models.NotificationPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.data.states.asString + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun NotificationCard( + notification: NotificationPreview, + isSelected: Boolean, + onClick: () -> Unit, + onActionClick: (NotificationPreview) -> Unit +) { + Card( + onClick = onClick, + modifier = Modifier + .widthIn(max = 480.dp) + .fillMaxWidth(), + shape = RoundedCornerShape(24.dp), + colors = CardDefaults.cardColors(containerColor = Color.Transparent) + ) { + Column( + modifier = Modifier + .fillMaxWidth() + .paint( + painter = rememberXmlPainter(notification.notificationStyle), + contentScale = ContentScale.FillBounds + ) + .padding(20.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + verticalAlignment = Alignment.Top, + horizontalArrangement = Arrangement.SpaceBetween + ) { + Box( + modifier = Modifier + .size(38.dp) + .background( + color = MaterialTheme.colorScheme.primary, + shape = CircleShape + ), + contentAlignment = Alignment.Center + ) { + Icon( + painter = painterResource(id = R.drawable.ic_launcher_foreground), + contentDescription = "Icon", + modifier = Modifier.requiredSize(48.dp), + tint = MaterialTheme.colorScheme.onPrimary + ) + } + Column( + modifier = Modifier + .weight(1f) + .padding(horizontal = 12.dp) + ) { + AnimatedVisibility(visible = isSelected) { + Text( + text = stringResource(id = R.string.app_name), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface.secondaryText() + ) + } + Row(verticalAlignment = Alignment.CenterVertically) { + Text( + text = notification.title.asString(), + style = MaterialTheme.typography.bodyLarge, + color = if (notification.isApplied) MaterialTheme.colorScheme.primary + else MaterialTheme.colorScheme.onSurface + ) + if (notification.isApplied) { + Icon( + painter = painterResource(R.drawable.ic_tick), + contentDescription = "Tick", + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier + .padding(start = 6.dp) + .size(18.dp) + ) + } + } + AnimatedVisibility(visible = isSelected) { + Spacer(modifier = Modifier.height(4.dp)) + } + Text( + text = stringResource(R.string.notif_preview_desc), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface.secondaryText() + ) + } + Box( + modifier = Modifier + .padding(top = 2.dp) + .width(24.dp) + .height(16.dp) + .background( + color = MaterialTheme.colorScheme.surfaceContainer, + shape = CircleShape + ), + contentAlignment = Alignment.Center + ) { + androidx.compose.animation.AnimatedVisibility( + visible = isSelected, + enter = fadeIn(), + exit = fadeOut() + ) { + Icon( + painter = painterResource(id = R.drawable.ic_expand_arrow), + contentDescription = "Collapse", + modifier = Modifier + .size(14.dp) + .graphicsLayer { + rotationZ = 180f + }, + tint = MaterialTheme.colorScheme.onSurface + ) + } + androidx.compose.animation.AnimatedVisibility( + visible = !isSelected, + enter = fadeIn(), + exit = fadeOut() + ) { + Icon( + painter = painterResource(id = R.drawable.ic_expand_arrow), + contentDescription = "Expand", + modifier = Modifier.size(14.dp), + tint = MaterialTheme.colorScheme.onSurface + ) + } + } + } + + AnimatedVisibility(visible = isSelected) { + Button( + onClick = { onActionClick(notification) }, + shapes = ButtonDefaults.shapes(), + modifier = Modifier + .fillMaxWidth() + .padding(top = 16.dp), + colors = ButtonDefaults.buttonColors( + containerColor = if (notification.isApplied) + MaterialTheme.colorScheme.errorContainer + else + MaterialTheme.colorScheme.primaryContainer, + contentColor = if (notification.isApplied) + MaterialTheme.colorScheme.onErrorContainer + else + MaterialTheme.colorScheme.onPrimaryContainer + ) + ) { + Text( + stringResource( + if (notification.isApplied) R.string.btn_disable + else R.string.btn_apply + ) + ) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun NotificationCardPreview() { + val notifications = listOf( + NotificationPreview( + id = "1", + title = UiText.Text("Default"), + notificationStyle = R.drawable.notif_default, + isApplied = true + ), + NotificationPreview( + id = "2", + title = UiText.Text("Layers"), + notificationStyle = R.drawable.notif_layers + ), + NotificationPreview( + id = "3", + title = UiText.Text("Thin Outline"), + notificationStyle = R.drawable.notif_thin_outline + ) + ) + + LazyColumn { + items(notifications) { pack -> + NotificationCard( + notification = pack, + isSelected = pack.id == "1", + onClick = {}, + onActionClick = {} + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/notification/screens/NotificationScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/notification/screens/NotificationScreen.kt new file mode 100644 index 000000000..983825845 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/notification/screens/NotificationScreen.kt @@ -0,0 +1,226 @@ +package com.drdisagree.iconify.features.home.notification.screens + +import android.widget.Toast +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Devices +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.dialogs.LoadingDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.models.NotificationPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.features.home.notification.components.NotificationCard +import com.drdisagree.iconify.features.home.notification.viewmodels.NotificationViewModel + +private val notificationList = listOf( + Pair( + "Default", + R.drawable.notif_default + ), + Pair( + "Layers", + R.drawable.notif_layers + ), + Pair( + "Thin Outline", + R.drawable.notif_thin_outline + ), + Pair( + "Bottom Outline", + R.drawable.notif_bottom_outline + ), + Pair( + "Neumorph", + R.drawable.notif_neumorph + ), + Pair( + "Stack", + R.drawable.notif_stack + ), + Pair( + "Side Stack", + R.drawable.notif_side_stack + ), + Pair( + "Outline", + R.drawable.notif_outline + ), + Pair( + "Leafy Outline", + R.drawable.notif_leafy_outline + ), + Pair( + "Lighty", + R.drawable.notif_lighty + ), + Pair( + "Neumorph Outline", + R.drawable.notif_neumorph_outline + ), + Pair( + "Cyberponk", + R.drawable.notif_cyberponk + ), + Pair( + "Cyberponk v2", + R.drawable.notif_cyberponk_v2 + ), + Pair( + "Thread Line", + R.drawable.notif_thread_line + ), + Pair( + "Faded", + R.drawable.notif_faded + ), + Pair( + "Dumbbell", + R.drawable.notif_dumbbell + ), + Pair( + "Semi Transparent", + R.drawable.notif_semi_transparent + ), + Pair( + "Pitch Black", + R.drawable.notif_pitch_black + ), + Pair( + "Duoline", + R.drawable.notif_duoline + ), + Pair( + "iOS", + R.drawable.notif_ios + ), +).mapIndexed { index, (name, style) -> + NotificationPreview( + id = (index + 1).toString(), + title = UiText.Text(name), + notificationStyle = style + ) +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun NotificationScreen(notificationViewModel: NotificationViewModel = hiltViewModel()) { + val context = LocalContext.current + val scrollState = rememberScrollState() + val notifications by rememberSaveable { mutableStateOf(notificationList) } + val notificationStyle by notificationViewModel.notificationStyle.collectAsStateWithLifecycle() + var expandedPackId by rememberSaveable { mutableStateOf(null) } + val isApplying by notificationViewModel.isLoading.collectAsStateWithLifecycle() + + LaunchedEffect(notifications) { + notificationViewModel.refreshState() + } + + if (isApplying) { + LoadingDialog() + } + + LaunchedEffect(Unit) { + notificationViewModel.uiEvent.collect { event -> + when (event) { + ToastUiEvent.Applied -> Toast.makeText( + context, + R.string.toast_applied, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Disabled -> Toast.makeText( + context, + R.string.toast_disabled, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Error -> Toast.makeText( + context, + R.string.toast_error, + Toast.LENGTH_SHORT + ).show() + } + } + } + + AppScaffold( + title = stringResource(R.string.activity_title_notification), + showBackIcon = true, + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + start = 16.dp, + end = 16.dp, + top = 16.dp + ) + + Column( + modifier = Modifier + .fillMaxSize() + .verticalScroll(scrollState) + .padding(padding) + ) { + FlowRow( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally), + verticalArrangement = Arrangement.spacedBy(16.dp), + ) { + notifications.forEach { notification -> + val isApplied = notificationStyle == notification.id + + NotificationCard( + notification = notification.copy(isApplied = isApplied), + isSelected = expandedPackId == notification.id, + onClick = { + expandedPackId = + if (expandedPackId == notification.id) null else notification.id + }, + onActionClick = { + notificationViewModel.togglePack(notification.id) + } + ) + } + } + } + } +} + +@Preview(showBackground = true, name = "Phone", device = Devices.PHONE) +@Composable +fun NotificationScreenPhonePreview() { + PreviewComposable { + NotificationScreen() + } +} + +@Preview(showBackground = true, name = "Tablet", device = Devices.TABLET) +@Composable +fun NotificationScreenTabletPreview() { + PreviewComposable { + NotificationScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/notification/viewmodels/NotificationViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/home/notification/viewmodels/NotificationViewModel.kt new file mode 100644 index 000000000..407851fb7 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/notification/viewmodels/NotificationViewModel.kt @@ -0,0 +1,99 @@ +package com.drdisagree.iconify.features.home.notification.viewmodels + +import android.util.Log +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.core.utils.overlay.compilers.OnDemandCompiler +import com.drdisagree.iconify.data.common.Const.SYSTEMUI_PACKAGE +import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.keys.CustomizationKey +import com.drdisagree.iconify.data.repository.SystemActionRepository +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.io.IOException +import javax.inject.Inject + +@HiltViewModel +class NotificationViewModel @Inject constructor( + private val systemActionRepository: SystemActionRepository +) : ViewModel() { + + private val tag = "NotificationViewModel" + + private val category = "NFN" + private val prefKey = CustomizationKey.NOTIFICATION_STYLE + private val prefDefaultValue = prefKey.default as String + + private val _notificationStyle = MutableStateFlow(prefDefaultValue) + val notificationStyle: StateFlow = _notificationStyle.asStateFlow() + + private val _isLoading = MutableStateFlow(false) + val isLoading: StateFlow = _isLoading.asStateFlow() + + private val _uiEvent = MutableSharedFlow() + val uiEvent = _uiEvent.asSharedFlow() + + fun refreshState() { + _notificationStyle.value = RPrefs.getString(prefKey)!! + } + + fun togglePack(packId: String) { + viewModelScope.launch(Dispatchers.IO) { + if (_isLoading.value) return@launch + + _isLoading.value = true + + if (_notificationStyle.value == packId) { + OverlayUtils.disableOverlay("IconifyComponent$category.overlay") + + delay(1000) + RPrefs.putString(prefKey, prefDefaultValue) + _notificationStyle.value = prefDefaultValue + _isLoading.value = false + systemActionRepository.shouldRestartSystemUI() + _uiEvent.emit(ToastUiEvent.Disabled) + return@launch + } + + val hasError = withContext(Dispatchers.IO) { + try { + OnDemandCompiler.buildOverlay( + overlayName = category, + style = packId, + targetPackage = SYSTEMUI_PACKAGE, + force = true + ) + } catch (e: IOException) { + Log.e(tag, e.toString()) + true + } + } + + if (!hasError) { + OverlayUtils.enableRoundnessIfDisabled() + } + + delay(1000) + _isLoading.value = false + systemActionRepository.shouldRestartSystemUI() + + if (!hasError) { + RPrefs.putString(prefKey, packId) + _notificationStyle.value = packId + _uiEvent.emit(ToastUiEvent.Applied) + } else { + _uiEvent.emit(ToastUiEvent.Error) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/components/SettingsIconsCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/components/SettingsIconsCard.kt new file mode 100644 index 000000000..40ed4cf4c --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/components/SettingsIconsCard.kt @@ -0,0 +1,130 @@ +package com.drdisagree.iconify.features.home.settingsicons.components + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.others.IconPreviewGrid +import com.drdisagree.iconify.core.ui.utils.ItemPosition +import com.drdisagree.iconify.core.ui.utils.cardCorners +import com.drdisagree.iconify.data.models.SettingsIconsPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.data.states.asString + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun SettingsIconsCard( + modifier: Modifier = Modifier, + settingsIcon: SettingsIconsPreview, + itemPosition: ItemPosition = ItemPosition.SOLO, + isSelected: Boolean, + onClick: () -> Unit, +) { + val corners = cardCorners(itemPosition) + + Card( + onClick = onClick, + modifier = modifier.fillMaxWidth(), + shape = RoundedCornerShape( + topStart = corners.topStart, + topEnd = corners.topEnd, + bottomStart = corners.bottomStart, + bottomEnd = corners.bottomEnd + ), + colors = CardDefaults.cardColors( + containerColor = if (isSelected) MaterialTheme.colorScheme.primaryContainer + else MaterialTheme.colorScheme.surfaceContainerHigh + ) + ) { + Column(modifier = Modifier.padding(16.dp)) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Column(modifier = Modifier.weight(1f)) { + Text( + text = settingsIcon.title.asString(), + style = MaterialTheme.typography.titleMedium, + color = if (isSelected) MaterialTheme.colorScheme.onPrimaryContainer else MaterialTheme.colorScheme.onSurface + ) + Text( + text = settingsIcon.summary.asString(), + style = MaterialTheme.typography.bodyMedium, + color = (if (isSelected) MaterialTheme.colorScheme.onPrimaryContainer else MaterialTheme.colorScheme.onSurface).secondaryText() + ) + } + + IconPreviewGrid( + isApplied = isSelected, + icons = settingsIcon.icons, + shouldTint = !settingsIcon.title.asString() + .contains("bubble", ignoreCase = true) + ) + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun IconPackPreview() { + val iconPacks = listOf( + SettingsIconsPreview( + title = UiText.Text("Aurora"), + summary = UiText.Text("Dual tone linear icon pack"), + icons = listOf( + R.drawable.preview_aurora_wifi, + R.drawable.preview_aurora_signal, + R.drawable.preview_aurora_airplane, + R.drawable.preview_aurora_location + ), + ), + SettingsIconsPreview( + title = UiText.Text("Gradicon"), + summary = UiText.Text("Gradient shaded filled icon pack"), + icons = listOf( + R.drawable.preview_gradicon_wifi, + R.drawable.preview_gradicon_signal, + R.drawable.preview_gradicon_airplane, + R.drawable.preview_gradicon_location + ) + ), + SettingsIconsPreview( + title = UiText.Text("Lorn"), + summary = UiText.Text("Thick linear icon pack"), + icons = listOf( + R.drawable.preview_lorn_wifi, + R.drawable.preview_lorn_signal, + R.drawable.preview_lorn_airplane, + R.drawable.preview_lorn_location + ) + ) + ) + + LazyColumn { + itemsIndexed(iconPacks) { index, pack -> + SettingsIconsCard( + settingsIcon = pack, + isSelected = index == 0, + onClick = {}, + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/components/SettingsOptionsCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/components/SettingsOptionsCard.kt new file mode 100644 index 000000000..cb9c02137 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/components/SettingsOptionsCard.kt @@ -0,0 +1,98 @@ +package com.drdisagree.iconify.features.home.settingsicons.components + +import androidx.compose.foundation.horizontalScroll +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.ButtonGroupDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.ToggleButton +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.semantics.Role +import androidx.compose.ui.semantics.role +import androidx.compose.ui.semantics.semantics +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.core.ui.components.preferences.PreferenceContainer +import com.drdisagree.iconify.core.ui.utils.ItemPosition +import com.drdisagree.iconify.core.ui.utils.cardCorners + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun SettingsOptionsCard( + modifier: Modifier = Modifier, + itemPosition: ItemPosition = ItemPosition.SOLO, + title: String, + buttonLabels: List, + selectedIndex: Int, + onItemSelected: (Int) -> Unit, +) { + val corners = cardCorners(itemPosition) + + PreferenceContainer( + modifier = modifier, + shape = RoundedCornerShape( + topStart = corners.topStart, + topEnd = corners.topEnd, + bottomStart = corners.bottomStart, + bottomEnd = corners.bottomEnd + ), + contentPadding = PaddingValues(0.dp), + isEnabled = true, + ) { + Column(modifier = Modifier.fillMaxWidth()) { + Text( + text = title, + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier.padding( + start = 16.dp, + end = 16.dp, + top = 14.dp, + bottom = 4.dp + ) + ) + Row( + Modifier + .horizontalScroll(rememberScrollState()) + .padding(horizontal = 16.dp) + .padding(bottom = 14.dp), + horizontalArrangement = Arrangement.spacedBy(ButtonGroupDefaults.ConnectedSpaceBetween), + ) { + buttonLabels.forEachIndexed { index, label -> + ToggleButton( + checked = selectedIndex == index, + onCheckedChange = { onItemSelected(index) }, + modifier = Modifier.semantics { role = Role.RadioButton }, + shapes = when (index) { + 0 -> ButtonGroupDefaults.connectedLeadingButtonShapes() + buttonLabels.lastIndex -> ButtonGroupDefaults.connectedTrailingButtonShapes() + else -> ButtonGroupDefaults.connectedMiddleButtonShapes() + }, + ) { + Text(text = label) + } + } + } + } + } +} + +@Preview +@Composable +fun SettingsOptionsCardPreview() { + SettingsOptionsCard( + title = "Icon Shape", + buttonLabels = listOf("Squircle", "Circle", "Teardrop"), + selectedIndex = 0, + onItemSelected = {} + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/screens/SettingsIconsScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/screens/SettingsIconsScreen.kt new file mode 100644 index 000000000..cc4d6a460 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/screens/SettingsIconsScreen.kt @@ -0,0 +1,340 @@ +package com.drdisagree.iconify.features.home.settingsicons.screens + +import android.widget.Toast +import androidx.annotation.StringRes +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.dialogs.LoadingDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import com.drdisagree.iconify.core.ui.utils.CARD_ITEM_SPACING +import com.drdisagree.iconify.core.ui.utils.ItemPosition +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.models.SettingsIconsPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.features.home.settingsicons.components.SettingsIconsCard +import com.drdisagree.iconify.features.home.settingsicons.components.SettingsOptionsCard +import com.drdisagree.iconify.features.home.settingsicons.viewmodels.SettingsIconsViewModel + +private data class SettingsIconsPack( + val title: String, + @param:StringRes val summary: Int, + val icons: List, +) + +private val settingsIconsList = listOf( + SettingsIconsPack( + title = "Aurora", + summary = R.string.iconpack_aurora_desc, + icons = listOf( + R.drawable.preview_aurora_wifi, + R.drawable.preview_aurora_signal, + R.drawable.preview_aurora_airplane, + R.drawable.preview_aurora_location + ) + ), + SettingsIconsPack( + title = "Gradicon", + summary = R.string.iconpack_gradicon_desc, + icons = listOf( + R.drawable.preview_gradicon_wifi, + R.drawable.preview_gradicon_signal, + R.drawable.preview_gradicon_airplane, + R.drawable.preview_gradicon_location + ) + ), + SettingsIconsPack( + title = "Lorn", + summary = R.string.iconpack_lorn_desc, + icons = listOf( + R.drawable.preview_lorn_wifi, + R.drawable.preview_lorn_signal, + R.drawable.preview_lorn_airplane, + R.drawable.preview_lorn_location + ) + ), + SettingsIconsPack( + title = "Plumpy", + summary = R.string.iconpack_plumpy_desc, + icons = listOf( + R.drawable.preview_plumpy_wifi, + R.drawable.preview_plumpy_signal, + R.drawable.preview_plumpy_airplane, + R.drawable.preview_plumpy_location + ) + ), + SettingsIconsPack( + title = "Bubble v1", + summary = R.string.settings_iconpack_bubble_v1, + icons = listOf( + R.drawable.preview_bubble_v1_1, + R.drawable.preview_bubble_v1_2, + R.drawable.preview_bubble_v1_3, + R.drawable.preview_bubble_v1_4 + ) + ), + SettingsIconsPack( + title = "Bubble v2", + summary = R.string.settings_iconpack_bubble_v2, + icons = listOf( + R.drawable.preview_bubble_v2_1, + R.drawable.preview_bubble_v2_2, + R.drawable.preview_bubble_v2_3, + R.drawable.preview_bubble_v2_4 + ) + ), +).map { pack -> + SettingsIconsPreview( + title = UiText.Text(pack.title), + summary = UiText.Res(pack.summary), + icons = pack.icons + ) +} + +@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun SettingsIconsScreen(settingsIconsViewModel: SettingsIconsViewModel = hiltViewModel()) { + val context = LocalContext.current + val scrollState = rememberScrollState() + val settingsIcons by rememberSaveable { mutableStateOf(settingsIconsList) } + val settingsIconsStyle by settingsIconsViewModel.settingsIconsStyle.collectAsStateWithLifecycle() + val isApplying by settingsIconsViewModel.isLoading.collectAsStateWithLifecycle() + + var backgroundSelectedIndex by remember { mutableIntStateOf(-1) } + var shapeSelectedIndex by remember { mutableIntStateOf(-1) } + var sizeSelectedIndex by remember { mutableIntStateOf(-1) } + var colorSelectedIndex by remember { mutableIntStateOf(-1) } + var iconPackSelectedIndex by remember { mutableIntStateOf(-1) } + + LaunchedEffect(settingsIcons) { + settingsIconsViewModel.refreshState() + } + + if (isApplying) { + LoadingDialog() + } + + LaunchedEffect(settingsIconsStyle) { + val splitStyle = settingsIconsStyle.split(",") + + backgroundSelectedIndex = splitStyle[0].toInt() + shapeSelectedIndex = splitStyle[1].toInt() + sizeSelectedIndex = splitStyle[2].toInt() + colorSelectedIndex = splitStyle[3].toInt() + iconPackSelectedIndex = splitStyle[4].toInt() + } + + LaunchedEffect(Unit) { + settingsIconsViewModel.uiEvent.collect { event -> + when (event) { + ToastUiEvent.Applied -> Toast.makeText( + context, + R.string.toast_applied, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Disabled -> Toast.makeText( + context, + R.string.toast_disabled, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Error -> Toast.makeText( + context, + R.string.toast_error, + Toast.LENGTH_SHORT + ).show() + } + } + } + + AppScaffold( + title = stringResource(R.string.activity_title_settings_icons), + showBackIcon = true, + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + top = 16.dp, + start = 16.dp, + end = 16.dp + ) + + Column( + modifier = Modifier + .fillMaxSize() + .verticalScroll(scrollState) + .padding(padding) + ) { + SettingsOptionsCard( + modifier = Modifier.padding(bottom = CARD_ITEM_SPACING), + title = stringResource(R.string.settings_icons_background), + itemPosition = ItemPosition.FIRST, + buttonLabels = listOf( + R.string.settings_icons_minimal, + R.string.settings_icons_filled, + R.string.settings_icons_outline, + R.string.settings_icons_neumorph, + ).map { stringResource(it) }, + selectedIndex = backgroundSelectedIndex, + onItemSelected = { backgroundSelectedIndex = it } + ) + SettingsOptionsCard( + modifier = Modifier.padding(bottom = CARD_ITEM_SPACING), + title = stringResource(R.string.settings_icons_shape), + itemPosition = ItemPosition.MIDDLE, + buttonLabels = listOf( + R.string.settings_icons_circle, + R.string.settings_icons_squircle, + R.string.settings_icons_square, + ).map { stringResource(it) }, + selectedIndex = shapeSelectedIndex, + onItemSelected = { shapeSelectedIndex = it } + ) + SettingsOptionsCard( + modifier = Modifier.padding(bottom = CARD_ITEM_SPACING), + title = stringResource(R.string.settings_icons_size), + itemPosition = ItemPosition.MIDDLE, + buttonLabels = listOf( + R.string.settings_icons_size1, + R.string.settings_icons_size2, + R.string.settings_icons_size3, + R.string.settings_icons_size4, + ).map { stringResource(it) }, + selectedIndex = sizeSelectedIndex, + onItemSelected = { sizeSelectedIndex = it } + ) + SettingsOptionsCard( + title = stringResource(R.string.settins_icons_icon_color), + itemPosition = ItemPosition.LAST, + buttonLabels = listOf( + R.string.settings_icons_follow_system, + R.string.settings_icons_system_inverse, + R.string.settings_icons_monet_accent, + ).map { stringResource(it) }, + selectedIndex = colorSelectedIndex, + onItemSelected = { colorSelectedIndex = it } + ) + + Spacer(modifier = Modifier.height(16.dp)) + + val currentSelectedStyle = remember { + derivedStateOf { + "$backgroundSelectedIndex,$shapeSelectedIndex,$sizeSelectedIndex,$colorSelectedIndex,$iconPackSelectedIndex" + } + } + + val lastIndex = settingsIcons.lastIndex + settingsIcons.forEachIndexed { index, settingsIcon -> + SettingsIconsCard( + settingsIcon = settingsIcon, + isSelected = index == iconPackSelectedIndex, + onClick = { iconPackSelectedIndex = index }, + itemPosition = when (index) { + 0 -> ItemPosition.FIRST + lastIndex -> ItemPosition.LAST + else -> ItemPosition.MIDDLE + }, + modifier = Modifier.padding( + bottom = if (index == lastIndex) 0.dp else CARD_ITEM_SPACING + ) + ) + } + + val showApplyButton = remember { + derivedStateOf { + currentSelectedStyle.value != settingsIconsViewModel.prefDefaultValue + && currentSelectedStyle.value != settingsIconsStyle + && backgroundSelectedIndex != -1 + && shapeSelectedIndex != -1 + && sizeSelectedIndex != -1 + && colorSelectedIndex != -1 + && iconPackSelectedIndex != -1 + } + } + + Button( + enabled = showApplyButton.value, + onClick = { + settingsIconsViewModel.applyStyle( + backgroundStyle = backgroundSelectedIndex, + backgroundShape = shapeSelectedIndex, + iconSize = sizeSelectedIndex, + iconColor = colorSelectedIndex, + iconSet = iconPackSelectedIndex + ) + }, + shapes = ButtonDefaults.shapes(), + modifier = Modifier + .fillMaxWidth() + .padding(top = 16.dp), + colors = ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.primaryContainer, + contentColor = MaterialTheme.colorScheme.onPrimaryContainer + ) + ) { + Text(stringResource(R.string.btn_apply)) + } + + val showDisableButton = remember { + derivedStateOf { + settingsIconsStyle != settingsIconsViewModel.prefDefaultValue + } + } + + AnimatedVisibility(visible = showDisableButton.value) { + Button( + onClick = { settingsIconsViewModel.disableStyle() }, + shapes = ButtonDefaults.shapes(), + modifier = Modifier + .fillMaxWidth() + .padding(top = 8.dp), + colors = ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.errorContainer, + contentColor = MaterialTheme.colorScheme.onErrorContainer + ) + ) { + Text(stringResource(R.string.btn_disable)) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun IconShapeScreenPreview() { + PreviewComposable { + SettingsIconsScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/viewmodels/SettingsIconsViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/viewmodels/SettingsIconsViewModel.kt new file mode 100644 index 000000000..8b060c369 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/settingsicons/viewmodels/SettingsIconsViewModel.kt @@ -0,0 +1,106 @@ +package com.drdisagree.iconify.features.home.settingsicons.viewmodels + +import android.util.Log +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.core.utils.overlay.managers.SettingsIconResourceManager +import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.keys.CustomizationKey +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.io.IOException +import javax.inject.Inject + +@HiltViewModel +class SettingsIconsViewModel @Inject constructor() : ViewModel() { + + private val tag = "SettingsIconsViewModel" + + private val categories = listOf("SIP1", "SIP2", "SIP3") + private val prefKey = CustomizationKey.SETTINGS_ICONS_STYLE + val prefDefaultValue = prefKey.default as String + + private val _settingsIconsStyle = MutableStateFlow(prefDefaultValue) + val settingsIconsStyle: StateFlow = _settingsIconsStyle.asStateFlow() + + private val _isLoading = MutableStateFlow(false) + val isLoading: StateFlow = _isLoading.asStateFlow() + + private val _uiEvent = MutableSharedFlow() + val uiEvent = _uiEvent.asSharedFlow() + + fun refreshState() { + _settingsIconsStyle.value = RPrefs.getString(prefKey)!! + } + + fun applyStyle( + backgroundStyle: Int, + backgroundShape: Int, + iconSize: Int, + iconColor: Int, + iconSet: Int, + ) { + viewModelScope.launch(Dispatchers.IO) { + if (_isLoading.value) return@launch + + _isLoading.value = true + + val selectedStyle = "$backgroundStyle,$backgroundShape,$iconSize,$iconColor,$iconSet" + + val hasError = withContext(Dispatchers.IO) { + try { + SettingsIconResourceManager.buildOverlay( + backgroundStyle = backgroundStyle + 1, + backgroundShape = backgroundShape + 1, + iconSize = iconSize + 1, + iconColor = iconColor + 1, + iconSet = iconSet + 1, + force = true + ) + } catch (e: IOException) { + Log.e(tag, e.toString()) + true + } + } + + delay(1000) + _isLoading.value = false + + if (!hasError) { + RPrefs.putString(prefKey, selectedStyle) + _settingsIconsStyle.value = selectedStyle + _uiEvent.emit(ToastUiEvent.Applied) + } else { + _uiEvent.emit(ToastUiEvent.Error) + } + } + } + + fun disableStyle() { + viewModelScope.launch(Dispatchers.IO) { + if (_isLoading.value) return@launch + + _isLoading.value = true + + delay(500) + OverlayUtils.disableOverlays( + *categories.map { "IconifyComponent${it}.overlay" }.toTypedArray() + ) + delay(1000) + RPrefs.putString(prefKey, prefDefaultValue) + _settingsIconsStyle.value = prefDefaultValue + _isLoading.value = false + _uiEvent.emit(ToastUiEvent.Disabled) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/components/ToastFrameCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/components/ToastFrameCard.kt new file mode 100644 index 000000000..022ccdfb5 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/components/ToastFrameCard.kt @@ -0,0 +1,175 @@ +package com.drdisagree.iconify.features.home.toastframe.components + +import androidx.compose.foundation.background +import androidx.compose.foundation.basicMarquee +import androidx.compose.foundation.clickable +import androidx.compose.foundation.indication +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.wrapContentSize +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.ripple +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.paint +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.others.TooltipArrow +import com.drdisagree.iconify.core.ui.utils.CARD_CORNER_LARGE +import com.drdisagree.iconify.core.ui.utils.rememberXmlPainter +import com.drdisagree.iconify.data.models.ToastFramePreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.data.states.asString + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun ToastFrameCard( + toastFrame: ToastFramePreview, + onClick: () -> Unit +) { + val interactionSource = remember { MutableInteractionSource() } + + Card( + shape = RoundedCornerShape(CARD_CORNER_LARGE), + colors = CardDefaults.cardColors(containerColor = Color.Transparent) + ) { + Column( + modifier = Modifier + .padding(8.dp) + .wrapContentSize() + .clickable( + onClick = onClick, + interactionSource = interactionSource, + indication = null + ), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center + ) { + Row( + modifier = Modifier + .wrapContentSize() + .paint( + painter = rememberXmlPainter(toastFrame.toastStyle), + contentScale = ContentScale.FillBounds + ) + .padding(horizontal = 16.dp, vertical = 14.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.Center + ) { + Text( + text = stringResource(R.string.toast_message), + style = MaterialTheme.typography.titleMedium, + color = MaterialTheme.colorScheme.onSurface, + textAlign = TextAlign.Center + ) + } + + Column( + modifier = Modifier + .padding(top = 4.dp) + .wrapContentSize(), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center + ) { + TooltipArrow( + backgroundColor = if (toastFrame.isApplied) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.surfaceContainerHigh + }, + interactionSource = interactionSource + ) + Box( + modifier = Modifier + .wrapContentWidth() + .clip(MaterialTheme.shapes.large) + .background( + if (toastFrame.isApplied) { + MaterialTheme.colorScheme.primary + } else { + MaterialTheme.colorScheme.surfaceContainerHigh + } + ) + .indication( + interactionSource = interactionSource, + indication = ripple() + ) + .padding(horizontal = 12.dp, vertical = 4.dp), + contentAlignment = Alignment.Center + ) { + Text( + text = toastFrame.title.asString(), + style = MaterialTheme.typography.labelLarge, + maxLines = 1, + textAlign = TextAlign.Center, + modifier = Modifier + .wrapContentWidth() + .basicMarquee(iterations = Int.MAX_VALUE), + color = if (toastFrame.isApplied) { + MaterialTheme.colorScheme.onPrimary + } else { + MaterialTheme.colorScheme.onSurface + }, + ) + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun ToastFrameCardPreview() { + val iconPacks = listOf( + ToastFramePreview( + id = "1", + title = UiText.Text("Style 1"), + toastStyle = R.drawable.toast_frame_style_1, + isApplied = true + ), + ToastFramePreview( + id = "2", + title = UiText.Text("Style 2"), + toastStyle = R.drawable.toast_frame_style_2, + ), + ToastFramePreview( + id = "3", + title = UiText.Text("Style 3"), + toastStyle = R.drawable.toast_frame_style_3, + ) + ) + + LazyColumn( + verticalArrangement = Arrangement.spacedBy(8.dp), + horizontalAlignment = Alignment.CenterHorizontally, + contentPadding = PaddingValues(16.dp) + ) { + items(iconPacks) { toast -> + ToastFrameCard( + toastFrame = toast, + onClick = {} + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/screens/ToastFrameScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/screens/ToastFrameScreen.kt new file mode 100644 index 000000000..666588265 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/screens/ToastFrameScreen.kt @@ -0,0 +1,151 @@ +package com.drdisagree.iconify.features.home.toastframe.screens + +import android.widget.Toast +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Devices +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.dialogs.LoadingDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.models.ToastFramePreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.features.home.toastframe.components.ToastFrameCard +import com.drdisagree.iconify.features.home.toastframe.viewmodels.ToastFrameViewModel + +private val toastFrameList = listOf( + R.drawable.toast_frame_style_1, + R.drawable.toast_frame_style_2, + R.drawable.toast_frame_style_3, + R.drawable.toast_frame_style_4, + R.drawable.toast_frame_style_5, + R.drawable.toast_frame_style_6, + R.drawable.toast_frame_style_7, + R.drawable.toast_frame_style_8, + R.drawable.toast_frame_style_9, + R.drawable.toast_frame_style_10, + R.drawable.toast_frame_style_11, + R.drawable.toast_frame_style_12, +).mapIndexed { index, style -> + ToastFramePreview( + id = (index + 1).toString(), + title = UiText.Res.of(resId = R.string.style, (index + 1)), + toastStyle = style + ) +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun ToastFrameScreen(toastFrameViewModel: ToastFrameViewModel = hiltViewModel()) { + val context = LocalContext.current + val scrollState = rememberScrollState() + val toastFrames by rememberSaveable { mutableStateOf(toastFrameList) } + val toastFrameStyle by toastFrameViewModel.toastFrameStyle.collectAsStateWithLifecycle() + val isApplying by toastFrameViewModel.isLoading.collectAsStateWithLifecycle() + + LaunchedEffect(toastFrames) { + toastFrameViewModel.refreshState() + } + + if (isApplying) { + LoadingDialog() + } + + LaunchedEffect(Unit) { + toastFrameViewModel.uiEvent.collect { event -> + when (event) { + ToastUiEvent.Applied -> Toast.makeText( + context, + R.string.toast_applied, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Disabled -> Toast.makeText( + context, + R.string.toast_disabled, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Error -> Toast.makeText( + context, + R.string.toast_error, + Toast.LENGTH_SHORT + ).show() + } + } + } + + AppScaffold( + title = stringResource(R.string.activity_title_toast_frame), + showBackIcon = true, + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + start = 16.dp, + end = 16.dp, + top = 16.dp + ) + + Column( + modifier = Modifier + .fillMaxSize() + .verticalScroll(scrollState) + .padding(padding) + ) { + FlowRow( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally), + verticalArrangement = Arrangement.spacedBy(16.dp), + ) { + toastFrames.forEach { toast -> + val isApplied = toastFrameStyle == toast.id + + ToastFrameCard( + toastFrame = toast.copy(isApplied = isApplied), + onClick = { + toastFrameViewModel.togglePack(toast.id) + } + ) + } + } + } + } +} + +@Preview(showBackground = true, name = "Phone", device = Devices.PHONE) +@Composable +fun IconShapeScreenPhonePreview() { + PreviewComposable { + ToastFrameScreen() + } +} + +@Preview(showBackground = true, name = "Tablet", device = Devices.TABLET) +@Composable +fun IconShapeScreenTabletPreview() { + PreviewComposable { + ToastFrameScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/viewmodels/ToastFrameViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/viewmodels/ToastFrameViewModel.kt new file mode 100644 index 000000000..1fd09268e --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/toastframe/viewmodels/ToastFrameViewModel.kt @@ -0,0 +1,95 @@ +package com.drdisagree.iconify.features.home.toastframe.viewmodels + +import android.util.Log +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.core.utils.overlay.compilers.OnDemandCompiler +import com.drdisagree.iconify.data.common.Const.FRAMEWORK_PACKAGE +import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.keys.CustomizationKey +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.io.IOException +import javax.inject.Inject + +@HiltViewModel +class ToastFrameViewModel @Inject constructor() : ViewModel() { + + private val tag = "ToastFrameViewModel" + + private val category = "TSTFRM" + private val prefKey = CustomizationKey.TOAST_FRAME_STYLE + private val prefDefaultValue = prefKey.default as String + + private val _toastFrameStyle = MutableStateFlow(prefDefaultValue) + val toastFrameStyle: StateFlow = _toastFrameStyle.asStateFlow() + + private val _isLoading = MutableStateFlow(false) + val isLoading: StateFlow = _isLoading.asStateFlow() + + private val _uiEvent = MutableSharedFlow() + val uiEvent = _uiEvent.asSharedFlow() + + fun refreshState() { + _toastFrameStyle.value = RPrefs.getString(prefKey)!! + } + + fun togglePack(packId: String) { + viewModelScope.launch(Dispatchers.IO) { + if (_isLoading.value) return@launch + + _isLoading.value = true + + if (_toastFrameStyle.value == packId) { + delay(500) + OverlayUtils.disableOverlay("IconifyComponent$category.overlay") + + delay(1000) + RPrefs.putString(prefKey, prefDefaultValue) + _toastFrameStyle.value = prefDefaultValue + _isLoading.value = false + _uiEvent.emit(ToastUiEvent.Disabled) + return@launch + } + + val hasError = withContext(Dispatchers.IO) { + try { + OnDemandCompiler.buildOverlay( + overlayName = category, + style = packId, + targetPackage = FRAMEWORK_PACKAGE, + force = true + ) + } catch (e: IOException) { + Log.e(tag, e.toString()) + true + } + } + + if (!hasError) { + OverlayUtils.enableRoundnessIfDisabled() + } + + delay(1000) + _isLoading.value = false + + if (!hasError) { + RPrefs.putString(prefKey, packId) + _toastFrameStyle.value = packId + _uiEvent.emit(ToastUiEvent.Applied) + } else { + _uiEvent.emit(ToastUiEvent.Error) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/tweaks/screens/TweaksScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/tweaks/screens/TweaksScreen.kt new file mode 100644 index 000000000..7c7fd0586 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/tweaks/screens/TweaksScreen.kt @@ -0,0 +1,121 @@ +package com.drdisagree.iconify.features.home.tweaks.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.iconRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.showComingSoonToast + +val tweaksPreferences = preferenceScreen { + category { + action( + key = "colorEngine", + icon = iconRes(R.drawable.ic_tweaks_color), + title = stringRes(R.string.activity_title_color_engine), + summary = { _, _ -> stringRes(R.string.activity_desc_color_engine) }, + onClick = { context, _, _ -> showComingSoonToast(context) } + ) + + action( + key = "uiRoundness", + icon = iconRes(R.drawable.ic_tweaks_roundness), + title = stringRes(R.string.activity_title_ui_roundness), + summary = { _, _ -> stringRes(R.string.activity_desc_ui_roundness) }, + onClick = { context, _, _ -> showComingSoonToast(context) } + ) + + // action( + // key = "coloredBattery", + // icon = iconRes(R.drawable.ic_colored_battery), + // title = stringRes(R.string.activity_title_colored_battery), + // summary = { _, _ -> stringRes(R.string.activity_desc_colored_battery) }, + // onClick = { _, _, _ -> } + // ) + + action( + key = "qsRowColumn", + icon = iconRes(R.drawable.ic_qs_row_column), + title = stringRes(R.string.activity_title_qs_row_column), + summary = { _, _ -> stringRes(R.string.activity_desc_qs_row_column) }, + onClick = { context, _, _ -> showComingSoonToast(context) } + ) + + // action( + // key = "qsIconLabel", + // icon = iconRes(R.drawable.ic_qs_icon_and_label), + // title = stringRes(R.string.activity_title_qs_icon_label), + // summary = { _, _ -> stringRes(R.string.activity_desc_qs_icon_label) }, + // onClick = { _, _, _ -> } + // ) + + // action( + // key = "qsTileSize", + // icon = iconRes(R.drawable.ic_qs_tile_size), + // title = stringRes(R.string.activity_title_qs_tile_size), + // summary = { _, _ -> stringRes(R.string.activity_desc_qs_tile_size) }, + // onClick = { _, _, _ -> } + // ) + + action( + key = "statusBarTweaks", + icon = iconRes(R.drawable.ic_tweaks_statusbar), + title = stringRes(R.string.activity_title_statusbar), + summary = { _, _ -> stringRes(R.string.activity_desc_statusbar) }, + onClick = { context, _, _ -> showComingSoonToast(context) } + ) + + action( + key = "navBarTweaks", + icon = iconRes(R.drawable.ic_tweaks_navbar), + title = stringRes(R.string.activity_title_navigation_bar), + summary = { _, _ -> stringRes(R.string.activity_desc_navigation_bar) }, + onClick = { context, _, _ -> showComingSoonToast(context) } + ) + + // action( + // key = "mediaPlayerTweaks", + // title = stringRes(R.string.activity_title_media_player), + // icon = iconRes(R.drawable.ic_tweaks_media), + // summary = { _, _ -> stringRes(R.string.activity_desc_media_player) }, + // onClick = { _, _, _ -> } + // ) + + // action( + // key = "volumePanelTweaks", + // icon = iconRes(R.drawable.ic_tweaks_volume), + // title = stringRes(R.string.activity_title_volume_panel), + // summary = { _, _ -> stringRes(R.string.activity_desc_volume_panel) }, + // onClick = { _, _, _ -> } + // ) + + action( + key = "miscellaneousTweaks", + icon = iconRes(R.drawable.ic_tweaks_miscellaneous), + title = stringRes(R.string.activity_title_miscellaneous), + summary = { _, _ -> stringRes(R.string.activity_desc_miscellaneous) }, + onClick = { context, _, _ -> showComingSoonToast(context) } + ) + } +} + +@Composable +fun TweaksScreen() { + PreferenceScreen( + items = tweaksPreferences, + title = stringResource(R.string.navbar_tweaks), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun TweaksScreenPreview() { + PreviewComposable { + TweaksScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/components/WifiIconCard.kt b/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/components/WifiIconCard.kt new file mode 100644 index 000000000..42e876de9 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/components/WifiIconCard.kt @@ -0,0 +1,81 @@ +package com.drdisagree.iconify.features.home.wifiicons.components + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.cards.IconPreviewCard +import com.drdisagree.iconify.data.models.SignalIconPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.data.states.asString + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun WifiIconCard( + iconPack: SignalIconPreview, + onClick: () -> Unit +) { + IconPreviewCard( + title = iconPack.title.asString(), + isApplied = iconPack.isApplied, + icons = iconPack.icons, + onClick = onClick + ) +} + +@Preview(showBackground = true) +@Composable +fun WifiIconCardPreview() { + val iconPacks = listOf( + SignalIconPreview( + id = "1", + title = UiText.Text("Aurora"), + icons = listOf( + R.drawable.preview_aurora_ic_wifi_signal_1, + R.drawable.preview_aurora_ic_wifi_signal_2, + R.drawable.preview_aurora_ic_wifi_signal_3, + R.drawable.preview_aurora_ic_wifi_signal_4 + ), + isApplied = true + ), + SignalIconPreview( + id = "2", + title = UiText.Text("Bars"), + icons = listOf( + R.drawable.preview_bars_ic_wifi_signal_1, + R.drawable.preview_bars_ic_wifi_signal_2, + R.drawable.preview_bars_ic_wifi_signal_3, + R.drawable.preview_bars_ic_wifi_signal_4 + ) + ), + SignalIconPreview( + id = "3", + title = UiText.Text("Dora"), + icons = listOf( + R.drawable.preview_dora_ic_wifi_signal_1, + R.drawable.preview_dora_ic_wifi_signal_2, + R.drawable.preview_dora_ic_wifi_signal_3, + R.drawable.preview_dora_ic_wifi_signal_4 + ) + ) + ) + + LazyColumn( + verticalArrangement = Arrangement.spacedBy(8.dp), + horizontalAlignment = Alignment.CenterHorizontally, + contentPadding = PaddingValues(16.dp) + ) { + items(iconPacks) { pack -> + WifiIconCard( + iconPack = pack, + onClick = {} + ) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/screens/WifiIconScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/screens/WifiIconScreen.kt new file mode 100644 index 000000000..509fed6da --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/screens/WifiIconScreen.kt @@ -0,0 +1,283 @@ +package com.drdisagree.iconify.features.home.wifiicons.screens + +import android.widget.Toast +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Devices +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.dialogs.LoadingDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.models.SignalIconPreview +import com.drdisagree.iconify.data.states.UiText +import com.drdisagree.iconify.features.home.wifiicons.components.WifiIconCard +import com.drdisagree.iconify.features.home.wifiicons.viewmodels.WifiIconViewModel + +private val wifiIconList = listOf( + Pair( + "Aurora", + listOf( + R.drawable.preview_aurora_ic_wifi_signal_1, + R.drawable.preview_aurora_ic_wifi_signal_2, + R.drawable.preview_aurora_ic_wifi_signal_3, + R.drawable.preview_aurora_ic_wifi_signal_4 + ) + ), + Pair( + "Bars", + listOf( + R.drawable.preview_bars_ic_wifi_signal_1, + R.drawable.preview_bars_ic_wifi_signal_2, + R.drawable.preview_bars_ic_wifi_signal_3, + R.drawable.preview_bars_ic_wifi_signal_4 + ) + ), + Pair( + "Dora", + listOf( + R.drawable.preview_dora_ic_wifi_signal_1, + R.drawable.preview_dora_ic_wifi_signal_2, + R.drawable.preview_dora_ic_wifi_signal_3, + R.drawable.preview_dora_ic_wifi_signal_4 + ) + ), + Pair( + "Faint UI", + listOf( + R.drawable.preview_faint_ui_ic_wifi_signal_1, + R.drawable.preview_faint_ui_ic_wifi_signal_2, + R.drawable.preview_faint_ui_ic_wifi_signal_3, + R.drawable.preview_faint_ui_ic_wifi_signal_4 + ) + ), + Pair( + "Lorn", + listOf( + R.drawable.preview_lorn_ic_wifi_signal_1, + R.drawable.preview_lorn_ic_wifi_signal_2, + R.drawable.preview_lorn_ic_wifi_signal_3, + R.drawable.preview_lorn_ic_wifi_signal_4 + ) + ), + Pair( + "Gradicon", + listOf( + R.drawable.preview_gradicon_ic_wifi_signal_1, + R.drawable.preview_gradicon_ic_wifi_signal_2, + R.drawable.preview_gradicon_ic_wifi_signal_3, + R.drawable.preview_gradicon_ic_wifi_signal_4 + ) + ), + Pair( + "Inside", + listOf( + R.drawable.preview_inside_ic_wifi_signal_1, + R.drawable.preview_inside_ic_wifi_signal_2, + R.drawable.preview_inside_ic_wifi_signal_3, + R.drawable.preview_inside_ic_wifi_signal_4 + ) + ), + Pair( + "Nothing Dot", + listOf( + R.drawable.preview_nothing_dot_ic_wifi_signal_1, + R.drawable.preview_nothing_dot_ic_wifi_signal_2, + R.drawable.preview_nothing_dot_ic_wifi_signal_3, + R.drawable.preview_nothing_dot_ic_wifi_signal_4 + ) + ), + Pair( + "Plumpy", + listOf( + R.drawable.preview_plumpy_ic_wifi_signal_1, + R.drawable.preview_plumpy_ic_wifi_signal_2, + R.drawable.preview_plumpy_ic_wifi_signal_3, + R.drawable.preview_plumpy_ic_wifi_signal_4 + ) + ), + Pair( + "Round", + listOf( + R.drawable.preview_round_ic_wifi_signal_1, + R.drawable.preview_round_ic_wifi_signal_2, + R.drawable.preview_round_ic_wifi_signal_3, + R.drawable.preview_round_ic_wifi_signal_4 + ) + ), + Pair( + "Sneaky", + listOf( + R.drawable.preview_sneaky_ic_wifi_signal_1, + R.drawable.preview_sneaky_ic_wifi_signal_2, + R.drawable.preview_sneaky_ic_wifi_signal_3, + R.drawable.preview_sneaky_ic_wifi_signal_4 + ) + ), + Pair( + "Stroke", + listOf( + R.drawable.preview_stroke_ic_wifi_signal_1, + R.drawable.preview_stroke_ic_wifi_signal_2, + R.drawable.preview_stroke_ic_wifi_signal_3, + R.drawable.preview_stroke_ic_wifi_signal_4 + ) + ), + Pair( + "Wavy", + listOf( + R.drawable.preview_wavy_ic_wifi_signal_1, + R.drawable.preview_wavy_ic_wifi_signal_2, + R.drawable.preview_wavy_ic_wifi_signal_3, + R.drawable.preview_wavy_ic_wifi_signal_4 + ) + ), + Pair( + "Weed", + listOf( + R.drawable.preview_weed_ic_wifi_signal_1, + R.drawable.preview_weed_ic_wifi_signal_2, + R.drawable.preview_weed_ic_wifi_signal_3, + R.drawable.preview_weed_ic_wifi_signal_4 + ) + ), + Pair( + "Xperia", + listOf( + R.drawable.preview_xperia_ic_wifi_signal_1, + R.drawable.preview_xperia_ic_wifi_signal_2, + R.drawable.preview_xperia_ic_wifi_signal_3, + R.drawable.preview_xperia_ic_wifi_signal_4 + ) + ), + Pair( + "ZigZag", + listOf( + R.drawable.preview_zigzag_ic_wifi_signal_1, + R.drawable.preview_zigzag_ic_wifi_signal_2, + R.drawable.preview_zigzag_ic_wifi_signal_3, + R.drawable.preview_zigzag_ic_wifi_signal_4 + ) + ) +).mapIndexed { index, (name, icons) -> + SignalIconPreview( + id = (index + 1).toString(), + title = UiText.Text(name), + icons = icons + ) +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun WifiIconScreen(wifiIconViewModel: WifiIconViewModel = hiltViewModel()) { + val context = LocalContext.current + val scrollState = rememberScrollState() + val wifiIcons by rememberSaveable { mutableStateOf(wifiIconList) } + val wifiIconStyle by wifiIconViewModel.wifiIconStyle.collectAsStateWithLifecycle() + val isApplying by wifiIconViewModel.isLoading.collectAsStateWithLifecycle() + + LaunchedEffect(wifiIcons) { + wifiIconViewModel.refreshState() + } + + if (isApplying) { + LoadingDialog() + } + + LaunchedEffect(Unit) { + wifiIconViewModel.uiEvent.collect { event -> + when (event) { + ToastUiEvent.Applied -> Toast.makeText( + context, + R.string.toast_applied, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Disabled -> Toast.makeText( + context, + R.string.toast_disabled, + Toast.LENGTH_SHORT + ).show() + + ToastUiEvent.Error -> Toast.makeText( + context, + R.string.toast_error, + Toast.LENGTH_SHORT + ).show() + } + } + } + + AppScaffold( + title = stringResource(R.string.activity_title_wifi_icons), + showBackIcon = true, + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + start = 16.dp, + end = 16.dp, + top = 16.dp + ) + + Column( + modifier = Modifier + .fillMaxSize() + .verticalScroll(scrollState) + .padding(padding) + ) { + FlowRow( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally), + verticalArrangement = Arrangement.spacedBy(16.dp), + ) { + wifiIcons.forEach { wifiIcons -> + val isApplied = wifiIconStyle == wifiIcons.id + + WifiIconCard( + iconPack = wifiIcons.copy(isApplied = isApplied), + onClick = { + wifiIconViewModel.togglePack(wifiIcons.id) + } + ) + } + } + } + } +} + +@Preview(showBackground = true, name = "Phone", device = Devices.PHONE) +@Composable +fun WifiIconScreenPhonePreview() { + PreviewComposable { + WifiIconScreen() + } +} + +@Preview(showBackground = true, name = "Tablet", device = Devices.TABLET) +@Composable +fun WifiIconScreenTabletPreview() { + PreviewComposable { + WifiIconScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/viewmodels/WifiIconViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/viewmodels/WifiIconViewModel.kt new file mode 100644 index 000000000..4d0eca777 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/home/wifiicons/viewmodels/WifiIconViewModel.kt @@ -0,0 +1,114 @@ +package com.drdisagree.iconify.features.home.wifiicons.viewmodels + +import android.util.Log +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils +import com.drdisagree.iconify.core.utils.overlay.compilers.OnDemandCompiler +import com.drdisagree.iconify.data.common.Const.SYSTEMUI_PACKAGE +import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.data.events.ToastUiEvent +import com.drdisagree.iconify.data.keys.CustomizationKey +import com.drdisagree.iconify.data.repository.SystemActionRepository +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.io.IOException +import javax.inject.Inject + +@HiltViewModel +class WifiIconViewModel @Inject constructor( + private val systemActionRepository: SystemActionRepository +) : ViewModel() { + + private val tag = "WifiIconViewModel" + + private val category = "WIFI" + private val otherCategory = "SGIC" + private val prefKey = CustomizationKey.WIFI_ICON_STYLE + private val prefDefaultValue = prefKey.default as String + + private val _wifiIconStyle = MutableStateFlow(prefDefaultValue) + val wifiIconStyle: StateFlow = _wifiIconStyle.asStateFlow() + + private val _isLoading = MutableStateFlow(false) + val isLoading: StateFlow = _isLoading.asStateFlow() + + private val _uiEvent = MutableSharedFlow() + val uiEvent = _uiEvent.asSharedFlow() + + fun refreshState() { + _wifiIconStyle.value = RPrefs.getString(prefKey)!! + } + + fun togglePack(packId: String) { + viewModelScope.launch(Dispatchers.IO) { + if (_isLoading.value) return@launch + + _isLoading.value = true + + if (_wifiIconStyle.value == packId) { + OverlayUtils.disableOverlay("IconifyComponent$category.overlay") + + delay(1000) + RPrefs.putString(prefKey, prefDefaultValue) + _wifiIconStyle.value = prefDefaultValue + _isLoading.value = false + systemActionRepository.shouldRestartSystemUI() + _uiEvent.emit(ToastUiEvent.Disabled) + return@launch + } + + val iconPackPkgName = OverlayUtils.checkEnabledOverlay("IPSUI") + val iconPackApplied = iconPackPkgName.isNotEmpty() + + if (iconPackApplied) { + OverlayUtils.disableOverlay(iconPackPkgName) + } + + val cellularPack = "IconifyComponent$otherCategory.overlay" + val cellularPackApplied = OverlayUtils.isOverlayEnabled(cellularPack) + + if (iconPackApplied) { + OverlayUtils.enableOverlayExclusiveInCategory(iconPackPkgName, "low") + } + + val hasError = withContext(Dispatchers.IO) { + try { + OnDemandCompiler.buildOverlay( + overlayName = category, + style = packId, + targetPackage = SYSTEMUI_PACKAGE, + force = true + ) + } catch (e: IOException) { + Log.e(tag, e.toString()) + true + } + } + + if (cellularPackApplied) { + OverlayUtils.enableOverlay(cellularPack) + } + + delay(1000) + _isLoading.value = false + systemActionRepository.shouldRestartSystemUI() + + if (!hasError) { + RPrefs.putString(prefKey, packId) + _wifiIconStyle.value = packId + _uiEvent.emit(ToastUiEvent.Applied) + } else { + _uiEvent.emit(ToastUiEvent.Error) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageOne.kt b/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageOne.kt new file mode 100644 index 000000000..5f4d28171 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageOne.kt @@ -0,0 +1,177 @@ +package com.drdisagree.iconify.features.onboarding.components + +import androidx.compose.animation.core.Animatable +import androidx.compose.animation.core.FastOutSlowInEasing +import androidx.compose.animation.core.tween +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.pager.PagerState +import androidx.compose.foundation.pager.rememberPagerState +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialShapes +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.toShape +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.others.DecorativeShape +import com.drdisagree.iconify.core.ui.components.svg.DynamicColorImageVectors +import com.drdisagree.iconify.core.ui.components.svg.undrawPhoneLady +import com.drdisagree.iconify.core.ui.components.texts.AutoResizeableText +import kotlinx.coroutines.launch + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun PageOne(modifier: Modifier = Modifier, pagerState: PagerState) { + val scale = remember { Animatable(0f) } + val scaleMainShape = remember { Animatable(0.75f) } + val ovalShape = MaterialShapes.Oval.toShape() + + LaunchedEffect(pagerState.currentPage) { + if (pagerState.currentPage == 0) { + launch { + scale.animateTo( + 1f, + tween(1500, easing = FastOutSlowInEasing) + ) + } + launch { + scaleMainShape.animateTo( + 1f, + tween(1500, easing = FastOutSlowInEasing) + ) + } + } + } + + Box( + modifier = modifier.fillMaxSize(), + ) { + DecorativeShape( + size = 250, + shape = MaterialShapes.Puffy.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.25f), + scale = scale.value, + modifier = Modifier.align(Alignment.Center) + ) + + DecorativeShape( + size = 65, + shape = MaterialShapes.Puffy.toShape(), + color = MaterialTheme.colorScheme.tertiary.copy(alpha = 0.3f), + scale = scale.value, + modifier = Modifier + .align(Alignment.BottomCenter) + .offset(y = (-120).dp, x = 30.dp) + ) + + DecorativeShape( + size = 70, + shape = MaterialShapes.Arrow.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.3f), + scale = scale.value, + modifier = Modifier + .align(Alignment.BottomStart) + .offset(y = (-40).dp, x = 10.dp) + ) + + DecorativeShape( + size = 80, + shape = MaterialShapes.Cookie7Sided.toShape(), + color = MaterialTheme.colorScheme.tertiary.copy(alpha = 0.2f), + scale = scale.value, + modifier = Modifier + .align(Alignment.CenterStart) + .offset(y = (-140).dp) + ) + + DecorativeShape( + size = 140, + shape = MaterialShapes.Pill.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.2f), + scale = scale.value, + modifier = Modifier + .align(Alignment.TopCenter) + .offset(y = (-20).dp, x = (-20).dp) + ) + + DecorativeShape( + size = 100, + shape = MaterialShapes.Cookie4Sided.toShape(), + color = MaterialTheme.colorScheme.primary.copy(alpha = 0.15f), + scale = scale.value, + modifier = Modifier + .align(Alignment.CenterEnd) + .offset(y = (-145).dp, x = (-20).dp) + ) + + Box( + modifier = Modifier + .fillMaxWidth() + .align(Alignment.Center) + ) { + Image( + imageVector = DynamicColorImageVectors.undrawPhoneLady(), + contentDescription = null, + modifier = Modifier.padding(horizontal = 70.dp) + ) + } + + Box( + modifier = Modifier + .padding(top = 65.dp) + .align(Alignment.TopCenter) + .graphicsLayer { + scaleX = scaleMainShape.value + scaleY = scaleMainShape.value + shape = ovalShape + clip = true + } + .background(MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.95f)), + contentAlignment = Alignment.Center + ) { + Column( + modifier = Modifier.padding(35.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(10.dp) + ) { + AutoResizeableText( + text = stringResource(R.string.app_name), + style = MaterialTheme.typography.headlineMediumEmphasized, + color = MaterialTheme.colorScheme.onPrimaryContainer, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(horizontal = 35.dp) + ) + + AutoResizeableText( + text = stringResource(R.string.app_motto), + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onPrimaryContainer, + modifier = Modifier.padding(horizontal = 35.dp) + ) + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun PageOnePreview() { + val pagerState = rememberPagerState(pageCount = { 3 }) + PageOne(pagerState = pagerState) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageThree.kt b/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageThree.kt new file mode 100644 index 000000000..2b3570865 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageThree.kt @@ -0,0 +1,327 @@ +package com.drdisagree.iconify.features.onboarding.components + +import androidx.compose.animation.core.Animatable +import androidx.compose.animation.core.FastOutSlowInEasing +import androidx.compose.animation.core.tween +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.pager.PagerState +import androidx.compose.foundation.pager.rememberPagerState +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.CheckCircle +import androidx.compose.material.icons.rounded.CheckCircleOutline +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialShapes +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedCard +import androidx.compose.material3.Text +import androidx.compose.material3.toShape +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.platform.LocalInspectionMode +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleEventObserver +import androidx.lifecycle.compose.LocalLifecycleOwner +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.others.DecorativeShape +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.ui.components.svg.DynamicColorImageVectors +import com.drdisagree.iconify.core.ui.components.svg.undrawSelectChoice +import com.drdisagree.iconify.core.ui.components.texts.AutoResizeableText +import com.drdisagree.iconify.core.ui.permission.rememberNotificationPermissionLauncher +import com.drdisagree.iconify.core.utils.SystemUtils.hasNotificationPermission +import kotlinx.coroutines.launch + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun PageThree( + modifier: Modifier = Modifier, + pagerState: PagerState, +) { + val previewMode = LocalInspectionMode.current + + val scale = remember { Animatable(0f) } + val scaleMainShape = remember { Animatable(0.75f) } + val semiCircleShape = MaterialShapes.SemiCircle.toShape() + + var permissionCardChecked by rememberSaveable { + mutableStateOf(if (previewMode) false else hasNotificationPermission()) + } + + val requestNotificationPermission = rememberNotificationPermissionLauncher( + onGranted = { + permissionCardChecked = true + }, + onDenied = { + permissionCardChecked = false + } + ) + + if (!previewMode) { + val lifecycleOwner = LocalLifecycleOwner.current + + DisposableEffect(lifecycleOwner) { + val observer = LifecycleEventObserver { _, event -> + if (event == Lifecycle.Event.ON_RESUME) { + permissionCardChecked = hasNotificationPermission() + } + } + + lifecycleOwner.lifecycle.addObserver(observer) + + onDispose { + lifecycleOwner.lifecycle.removeObserver(observer) + } + } + } + + LaunchedEffect(pagerState.currentPage) { + if (pagerState.currentPage == 2) { + launch { + scale.animateTo( + 1f, + tween(1500, easing = FastOutSlowInEasing) + ) + } + launch { + scaleMainShape.animateTo( + 1f, + tween(1500, easing = FastOutSlowInEasing) + ) + } + } + } + + Box( + modifier = modifier.fillMaxSize() + ) { + DecorativeShape( + size = 250, + shape = MaterialShapes.Clover8Leaf.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.25f), + scale = scale.value, + modifier = Modifier.align(Alignment.Center) + ) + + DecorativeShape( + size = 65, + shape = MaterialShapes.Puffy.toShape(), + color = MaterialTheme.colorScheme.tertiary.copy(alpha = 0.3f), + scale = scale.value, + modifier = Modifier + .align(Alignment.BottomCenter) + .offset(y = (-120).dp, x = 30.dp) + ) + + DecorativeShape( + size = 70, + shape = MaterialShapes.Fan.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.3f), + scale = scale.value, + modifier = Modifier + .align(Alignment.BottomStart) + .offset(y = (-100).dp, x = 10.dp) + ) + + DecorativeShape( + size = 80, + shape = MaterialShapes.Flower.toShape(), + color = MaterialTheme.colorScheme.tertiary.copy(alpha = 0.2f), + scale = scale.value, + modifier = Modifier + .align(Alignment.CenterStart) + .offset(y = (-180).dp) + ) + + DecorativeShape( + size = 120, + shape = MaterialShapes.Arch.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.2f), + scale = scale.value, + modifier = Modifier + .align(Alignment.TopCenter) + .offset(y = (-10).dp, x = (-20).dp) + ) + + DecorativeShape( + size = 100, + shape = MaterialShapes.Ghostish.toShape(), + color = MaterialTheme.colorScheme.primary.copy(alpha = 0.15f), + scale = scale.value, + modifier = Modifier + .align(Alignment.CenterEnd) + .offset(y = (-160).dp, x = (-20).dp) + ) + + Column( + modifier = Modifier + .fillMaxWidth() + .padding(start = 20.dp, end = 20.dp, bottom = 80.dp) + .background(Color.Transparent) + .verticalScroll(rememberScrollState()), + verticalArrangement = Arrangement.spacedBy(25.dp) + ) { + Box( + modifier = Modifier + .padding(top = 65.dp, start = 20.dp, end = 20.dp) + .align(Alignment.CenterHorizontally) + .graphicsLayer { + scaleX = scaleMainShape.value + scaleY = scaleMainShape.value + shape = semiCircleShape + clip = true + } + .background(MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.95f)), + contentAlignment = Alignment.BottomCenter + ) { + AutoResizeableText( + text = stringResource(R.string.grant_permission), + style = MaterialTheme.typography.headlineMediumEmphasized, + color = MaterialTheme.colorScheme.onPrimaryContainer, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding( + top = 55.dp, + bottom = 30.dp, + start = 20.dp, + end = 20.dp + ) + ) + } + + Image( + imageVector = DynamicColorImageVectors.undrawSelectChoice(), + contentDescription = null, + modifier = Modifier.padding(horizontal = 100.dp) + ) + + AutoResizeableText( + text = stringResource(R.string.optional_permission), + style = MaterialTheme.typography.bodyMedium, + textAlign = TextAlign.Center, + modifier = Modifier.fillMaxWidth() + ) + + PermissionCard( + isChecked = permissionCardChecked, + title = stringResource(id = R.string.notification_perm_title), + description = stringResource(id = R.string.notification_perm_desc), + onClick = { + if (!permissionCardChecked) { + requestNotificationPermission() + } + }, + modifier = Modifier.padding(top = 28.dp) + ) + } + + Box( + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 80.dp) + .height(40.dp) + .align(Alignment.BottomCenter) + .background( + Brush.verticalGradient( + colors = listOf( + Color.Transparent, + MaterialTheme.colorScheme.background + ) + ) + ) + ) + } +} + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +private fun PermissionCard( + modifier: Modifier = Modifier, + isChecked: Boolean, + onClick: () -> Unit, + title: String, + description: String +) { + OutlinedCard( + modifier = modifier + .fillMaxWidth() + .padding(horizontal = 40.dp) + .clip(MaterialTheme.shapes.large) + .border(CardDefaults.outlinedCardBorder()) + .clickable(onClick = withHaptic { onClick() }), + shape = MaterialTheme.shapes.large, + colors = CardDefaults.outlinedCardColors( + containerColor = if (isChecked) MaterialTheme.colorScheme.primaryContainer else MaterialTheme.colorScheme.surfaceContainer, + contentColor = if (isChecked) MaterialTheme.colorScheme.onPrimaryContainer else MaterialTheme.colorScheme.onSurface + ) + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 20.dp, vertical = 15.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(20.dp) + ) { + Icon( + imageVector = if (isChecked) Icons.Rounded.CheckCircle else Icons.Rounded.CheckCircleOutline, + contentDescription = null, + tint = if (isChecked) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurface.copy( + alpha = 0.5f + ), + ) + Column( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(6.dp) + ) { + Text( + text = title, + style = MaterialTheme.typography.titleMediumEmphasized, + ) + Text( + text = description, + style = MaterialTheme.typography.bodyMedium, + modifier = Modifier.alpha(0.9f) + ) + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun PageThreePreview() { + val pagerState = rememberPagerState(pageCount = { 3 }) + PageThree(pagerState = pagerState) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageTwo.kt b/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageTwo.kt new file mode 100644 index 000000000..07d421073 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/onboarding/components/PageTwo.kt @@ -0,0 +1,217 @@ +package com.drdisagree.iconify.features.onboarding.components + +import androidx.compose.animation.core.Animatable +import androidx.compose.animation.core.FastOutSlowInEasing +import androidx.compose.animation.core.tween +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.LazyListState +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.pager.PagerState +import androidx.compose.foundation.pager.rememberPagerState +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialShapes +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.toShape +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.others.DecorativeShape +import com.drdisagree.iconify.core.ui.components.others.DisclaimerItemLayout +import com.drdisagree.iconify.core.ui.components.texts.AutoResizeableText +import kotlinx.coroutines.launch + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun PageTwo( + modifier: Modifier = Modifier, + lazyListState: LazyListState, + pagerState: PagerState +) { + val scale = remember { Animatable(0f) } + val scaleMainShape = remember { Animatable(0.75f) } + val clanShellShape = MaterialShapes.ClamShell.toShape() + + val disclaimerList = listOf( + stringResource(R.string.disclaimer_1_title) to stringResource(R.string.disclaimer_1_description), + stringResource(R.string.disclaimer_2_title) to stringResource(R.string.disclaimer_2_description), + stringResource(R.string.disclaimer_3_title) to stringResource(R.string.disclaimer_3_description), + stringResource(R.string.disclaimer_4_title) to stringResource(R.string.disclaimer_4_description), + stringResource(R.string.disclaimer_5_title) to stringResource(R.string.disclaimer_5_description), + ) + + LaunchedEffect(pagerState.currentPage) { + if (pagerState.currentPage == 1) { + launch { + scale.animateTo( + 1f, + tween(1500, easing = FastOutSlowInEasing) + ) + } + launch { + scaleMainShape.animateTo( + 1f, + tween(1500, easing = FastOutSlowInEasing) + ) + } + } + } + + Box( + modifier = modifier.fillMaxSize() + ) { + DecorativeShape( + size = 250, + shape = MaterialShapes.Cookie12Sided.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.25f), + scale = scale.value, + modifier = Modifier.align(Alignment.Center) + ) + + DecorativeShape( + size = 65, + shape = MaterialShapes.SoftBoom.toShape(), + color = MaterialTheme.colorScheme.tertiary.copy(alpha = 0.3f), + scale = scale.value, + modifier = Modifier + .align(Alignment.BottomCenter) + .offset(y = (-120).dp, x = 30.dp) + ) + + DecorativeShape( + size = 70, + shape = MaterialShapes.PuffyDiamond.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.3f), + scale = scale.value, + modifier = Modifier + .align(Alignment.BottomStart) + .offset(y = (-100).dp, x = 10.dp) + ) + + DecorativeShape( + size = 80, + shape = MaterialShapes.Pentagon.toShape(), + color = MaterialTheme.colorScheme.tertiary.copy(alpha = 0.2f), + scale = scale.value, + modifier = Modifier + .align(Alignment.CenterStart) + .offset(y = (-180).dp) + ) + + DecorativeShape( + size = 120, + shape = MaterialShapes.Bun.toShape(), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.2f), + scale = scale.value, + modifier = Modifier + .align(Alignment.TopCenter) + .offset(y = (-10).dp, x = (-20).dp) + ) + + DecorativeShape( + size = 100, + shape = MaterialShapes.SemiCircle.toShape(), + color = MaterialTheme.colorScheme.primary.copy(alpha = 0.15f), + scale = scale.value, + modifier = Modifier + .align(Alignment.CenterEnd) + .offset(y = (-160).dp, x = (-20).dp) + ) + + LazyColumn( + state = lazyListState, + modifier = Modifier + .fillMaxWidth() + .padding(start = 20.dp, end = 20.dp, bottom = 80.dp), + verticalArrangement = Arrangement.spacedBy(20.dp) + ) { + item { + Box( + modifier = modifier.fillMaxWidth(), + contentAlignment = Alignment.Center + ) { + Box( + modifier = Modifier + .padding(top = 65.dp, start = 20.dp, end = 20.dp) + .graphicsLayer { + scaleX = scaleMainShape.value + scaleY = scaleMainShape.value + shape = clanShellShape + clip = true + } + .background(MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.95f)), + contentAlignment = Alignment.Center + ) { + AutoResizeableText( + text = stringResource(R.string.disclaimer), + style = MaterialTheme.typography.headlineMediumEmphasized, + color = MaterialTheme.colorScheme.onPrimaryContainer, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(35.dp) + ) + } + } + } + + itemsIndexed(disclaimerList) { i, item -> + DisclaimerItemLayout( + modifier = Modifier + .fillMaxWidth() + .padding(vertical = 10.dp), + disclaimerItem = item + ) + } + + item { + Spacer( + modifier = Modifier + .fillMaxWidth() + .height(25.dp) + ) + } + } + + Box( + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 80.dp) + .height(60.dp) + .align(Alignment.BottomCenter) + .background( + Brush.verticalGradient( + colors = listOf( + Color.Transparent, + MaterialTheme.colorScheme.background + ) + ) + ) + ) + } +} + +@Preview(showBackground = true) +@Composable +fun PageTwoPreview() { + val lazyListState = rememberLazyListState() + val pagerState = rememberPagerState(pageCount = { 3 }) + PageTwo(pagerState = pagerState, lazyListState = lazyListState) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/onboarding/screens/OnboardingScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/onboarding/screens/OnboardingScreen.kt new file mode 100644 index 000000000..b5922d42d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/onboarding/screens/OnboardingScreen.kt @@ -0,0 +1,359 @@ +package com.drdisagree.iconify.features.onboarding.screens + +import android.view.WindowManager +import android.widget.Toast +import androidx.activity.compose.BackHandler +import androidx.activity.compose.LocalActivity +import androidx.compose.animation.AnimatedContent +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.animateContentSize +import androidx.compose.animation.core.Spring +import androidx.compose.animation.core.spring +import androidx.compose.animation.core.tween +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.scaleIn +import androidx.compose.animation.scaleOut +import androidx.compose.animation.togetherWith +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.lazy.rememberLazyListState +import androidx.compose.foundation.pager.HorizontalPager +import androidx.compose.foundation.pager.rememberPagerState +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.Check +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.Icon +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.navigation.NavController +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.ui.components.dialogs.ErrorDialog +import com.drdisagree.iconify.core.ui.components.dialogs.InstallationDialog +import com.drdisagree.iconify.core.ui.components.extensions.customClickable +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.utils.SystemUtils.restartDevice +import com.drdisagree.iconify.features.onboarding.components.PageOne +import com.drdisagree.iconify.features.onboarding.components.PageThree +import com.drdisagree.iconify.features.onboarding.components.PageTwo +import com.drdisagree.iconify.features.onboarding.states.InstallationEvent +import com.drdisagree.iconify.features.onboarding.states.InstallationState +import com.drdisagree.iconify.features.onboarding.viewmodels.OnboardingViewModel +import kotlinx.coroutines.launch +import java.text.NumberFormat + +@OptIn(ExperimentalMaterial3ExpressiveApi::class) +@Composable +fun OnboardingScreen( + navController: NavController = LocalNavController.current, + onboardingViewModel: OnboardingViewModel = hiltViewModel(), +) { + val context = LocalContext.current + val activity = LocalActivity.current + val configuration = LocalConfiguration.current + val locale = configuration.locales[0] + val numberFormat = remember(locale) { NumberFormat.getInstance(locale) } + + val pageCount = 3 + val disclaimerPageIndex = 1 + val lastPageIndex = pageCount - 1 + val pagerState = rememberPagerState(pageCount = { 3 }) + val lazyListState = rememberLazyListState() + val coroutineScope = rememberCoroutineScope() + val state by onboardingViewModel.state.collectAsState() + val logs = onboardingViewModel.logs + val rebootRequired = onboardingViewModel.rebootRequired + val interactionSource = remember { MutableInteractionSource() } + var installationProgressRunning by remember { mutableStateOf(false) } + var errorDialog by remember { mutableStateOf(null) } + val shouldShowRebootOption by remember(pagerState.currentPage, rebootRequired) { + derivedStateOf { pagerState.currentPage == lastPageIndex && rebootRequired } + } + + DisposableEffect(installationProgressRunning) { + if (installationProgressRunning) { + activity?.window?.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + } + + onDispose { + activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + } + } + + when (state) { + InstallationState.Installing -> { + installationProgressRunning = true + + InstallationDialog( + title = stringResource(R.string.installing), + desc = stringResource(R.string.init_module_installation), + logs = logs + ) + } + + is InstallationState.Progressing -> { + val p = state as InstallationState.Progressing + + val stepLocalized = numberFormat.format(p.step).toInt() + val stepCountLocalized = numberFormat.format(onboardingViewModel.stepCount).toInt() + + InstallationDialog( + title = stringResource( + R.string.step_number, + stepLocalized, + stepCountLocalized + ), + desc = stringResource(p.descRes), + logs = logs + ) + } + + else -> Unit + } + + LaunchedEffect(Unit) { + onboardingViewModel.state.collect { state -> + when (state) { + InstallationState.Success -> { + installationProgressRunning = false + navController.navigate(NavRoutes.Main) { + popUpTo(NavRoutes.Onboarding) { inclusive = true } + launchSingleTop = true + } + } + + InstallationState.Reboot -> { + installationProgressRunning = false + } + + else -> Unit + } + } + } + + LaunchedEffect(Unit) { + onboardingViewModel.events.collect { event -> + when (event) { + is InstallationEvent.Error -> { + installationProgressRunning = false + errorDialog = event + } + + is InstallationEvent.Toast -> { + Toast.makeText( + context, + event.messageRes, + Toast.LENGTH_SHORT + ).show() + } + } + } + } + + errorDialog?.let { event -> + ErrorDialog( + title = event.titleRes, + description = event.descRes, + onDismiss = { + errorDialog = null + onboardingViewModel.clearError() + } + ) + } + + BackHandler(enabled = pagerState.currentPage != 0 && !installationProgressRunning) { + coroutineScope.launch { + pagerState.animateScrollToPage(pagerState.currentPage - 1) + } + } + + val isDisclaimerAtBottom by remember { + derivedStateOf { + val lastVisible = lazyListState.layoutInfo.visibleItemsInfo.lastOrNull()?.index + val lastIndex = lazyListState.layoutInfo.totalItemsCount - 1 + lastVisible == lastIndex + } + } + + Scaffold { + Box( + modifier = Modifier + .fillMaxSize() + .padding(it) + ) { + HorizontalPager( + state = pagerState, + modifier = Modifier.fillMaxSize(), + userScrollEnabled = pagerState.currentPage != 1 && !shouldShowRebootOption + ) { page -> + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + when (page) { + 0 -> PageOne(pagerState = pagerState) + 1 -> PageTwo(pagerState = pagerState, lazyListState = lazyListState) + 2 -> PageThree(pagerState = pagerState) + else -> {} + } + } + } + + Row( + modifier = Modifier + .fillMaxWidth() + .align(Alignment.BottomCenter) + .padding(vertical = 24.dp) + ) { + AnimatedVisibility( + visible = pagerState.currentPage != 0, + enter = scaleIn( + animationSpec = spring( + dampingRatio = Spring.DampingRatioMediumBouncy + ), + initialScale = 0f + ) + fadeIn(animationSpec = tween(150)), + exit = scaleOut( + animationSpec = spring( + dampingRatio = Spring.DampingRatioMediumBouncy + ), + targetScale = 0f + ) + fadeOut(animationSpec = tween(150)) + ) { + TextButton( + onClick = withHaptic { + coroutineScope.launch { + if (pagerState.currentPage > 0) { + pagerState.animateScrollToPage(pagerState.currentPage - 1) + } + } + }, + shapes = ButtonDefaults.shapes(), + modifier = Modifier.padding(start = 24.dp) + ) { + Text( + text = "Back", + modifier = Modifier.padding(horizontal = 10.dp) + ) + } + } + + Spacer(modifier = Modifier.weight(1f)) + + @Composable + fun onNextClick(skip: Boolean) = withHaptic { + if (shouldShowRebootOption) { + restartDevice() + } else { + coroutineScope.launch { + if (pagerState.currentPage < lastPageIndex) { + pagerState.animateScrollToPage(pagerState.currentPage + 1) + } else { + onboardingViewModel.startInstallation(skip) + } + } + } + } + + Button( + onClick = onNextClick(false), + shapes = ButtonDefaults.shapes(), + interactionSource = interactionSource, + modifier = Modifier + .animateContentSize() + .padding(end = 24.dp) + .customClickable( + interactionSource = interactionSource, + onClick = onNextClick(false), + onLongClick = onNextClick(true), + ), + enabled = (pagerState.currentPage != disclaimerPageIndex || isDisclaimerAtBottom) && !installationProgressRunning + ) { + AnimatedContent( + targetState = pagerState.currentPage, + transitionSpec = { + fadeIn(animationSpec = tween(220, delayMillis = 90)) togetherWith + fadeOut(animationSpec = tween(90)) + } + ) { targetPage -> + val isOnDisclaimerPage = targetPage == disclaimerPageIndex + + Row( + modifier = Modifier.padding( + start = if (isOnDisclaimerPage) 8.dp else 10.dp, + end = 10.dp + ), + verticalAlignment = Alignment.CenterVertically + ) { + if (isOnDisclaimerPage) { + Icon( + imageVector = Icons.Rounded.Check, + contentDescription = null, + modifier = Modifier + .size(20.dp) + .graphicsLayer { + scaleX = 1.2f + scaleY = 1.2f + } + .padding(end = 6.dp) + ) + } + Text( + text = stringResource( + if (!shouldShowRebootOption) { + when (targetPage) { + disclaimerPageIndex -> R.string.btn_agree + lastPageIndex -> R.string.btn_lets_go + else -> R.string.btn_next + } + } else { + R.string.btn_reboot + } + ) + ) + } + } + } + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun OnboardingScreenPreview() { + PreviewComposable { + OnboardingScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/onboarding/states/OnboardingState.kt b/app/src/main/java/com/drdisagree/iconify/features/onboarding/states/OnboardingState.kt new file mode 100644 index 000000000..fee59c676 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/onboarding/states/OnboardingState.kt @@ -0,0 +1,14 @@ +package com.drdisagree.iconify.features.onboarding.states + +sealed interface InstallationState { + object Idle : InstallationState + object Installing : InstallationState + data class Progressing(val step: Int, val descRes: Int, val replace: Boolean) : InstallationState + object Reboot : InstallationState + object Success : InstallationState +} + +sealed class InstallationEvent { + data class Error(val titleRes: Int, val descRes: Int) : InstallationEvent() + data class Toast(val messageRes: Int) : InstallationEvent() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/onboarding/viewmodels/OnboardingViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/onboarding/viewmodels/OnboardingViewModel.kt new file mode 100644 index 000000000..acf531f2f --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/onboarding/viewmodels/OnboardingViewModel.kt @@ -0,0 +1,544 @@ +package com.drdisagree.iconify.features.onboarding.viewmodels + +import android.util.Log +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateListOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.BuildConfig +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.di.SharedPrefs +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.utils.AssetsUtils.copyAssets +import com.drdisagree.iconify.core.utils.FileUtils +import com.drdisagree.iconify.core.utils.Logger.writeLog +import com.drdisagree.iconify.core.utils.ModuleUtils.createModule +import com.drdisagree.iconify.core.utils.ModuleUtils.flashModule +import com.drdisagree.iconify.core.utils.ModuleUtils.handleModule +import com.drdisagree.iconify.core.utils.ModuleUtils.moduleExists +import com.drdisagree.iconify.core.utils.RootUtils.deviceProperlyRooted +import com.drdisagree.iconify.core.utils.RootUtils.isDeviceRooted +import com.drdisagree.iconify.core.utils.RootUtils.isModuleUpdatePending +import com.drdisagree.iconify.core.utils.RootUtils.requireMetamodule +import com.drdisagree.iconify.core.utils.overlay.OverlayUtils.overlayExists +import com.drdisagree.iconify.core.utils.overlay.compilers.OnboardingCompiler.apkSigner +import com.drdisagree.iconify.core.utils.overlay.compilers.OnboardingCompiler.createManifest +import com.drdisagree.iconify.core.utils.overlay.compilers.OnboardingCompiler.runAapt +import com.drdisagree.iconify.core.utils.overlay.compilers.OnboardingCompiler.zipAlign +import com.drdisagree.iconify.data.common.Dynamic.DATA_DIR +import com.drdisagree.iconify.data.common.Resources.BACKUP_DIR +import com.drdisagree.iconify.data.common.Resources.MODULE_DIR +import com.drdisagree.iconify.data.common.Resources.SIGNED_DIR +import com.drdisagree.iconify.data.common.Resources.TEMP_DIR +import com.drdisagree.iconify.data.common.Resources.TEMP_MODULE_DIR +import com.drdisagree.iconify.data.common.Resources.TEMP_MODULE_OVERLAY_DIR +import com.drdisagree.iconify.data.common.Resources.TEMP_OVERLAY_DIR +import com.drdisagree.iconify.data.common.Resources.UNSIGNED_DIR +import com.drdisagree.iconify.data.common.Resources.UNSIGNED_UNALIGNED_DIR +import com.drdisagree.iconify.data.config.Config +import com.drdisagree.iconify.data.keys.SettingsKey +import com.drdisagree.iconify.data.storage.PreferenceStorage +import com.drdisagree.iconify.features.onboarding.states.InstallationEvent +import com.drdisagree.iconify.features.onboarding.states.InstallationState +import com.drdisagree.iconify.helpers.BackupRestore.restoreFiles +import com.drdisagree.iconify.helpers.BinaryInstaller.symLinkBinaries +import com.topjohnwu.superuser.Shell +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.Job +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharedFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.suspendCancellableCoroutine +import java.io.File +import java.io.IOException +import javax.inject.Inject + +@HiltViewModel +class OnboardingViewModel @Inject constructor( + @param:SharedPrefs private val preferenceStorage: PreferenceStorage +) : ViewModel() { + + private val tag = OnboardingViewModel::class.java.simpleName + + private val prefController = PreferenceController(preferenceStorage) + + private val _state = MutableStateFlow(InstallationState.Idle) + val state: StateFlow = _state.asStateFlow() + + private val _events = MutableSharedFlow( + replay = 0, + extraBufferCapacity = 1 + ) + val events: SharedFlow = _events.asSharedFlow() + + private val _logs = mutableStateListOf() + val logs: List get() = _logs + + var rebootRequired by mutableStateOf(false) + private set + + private var hasErroredOut by mutableStateOf(false) + + private var installationJob: Job? = null + + val stepCount = 6 + + init { + viewModelScope.launch { + rebootRequired = isModuleUpdatePending() + } + } + + fun startInstallation(skipInstallation: Boolean) { + if (installationJob?.isActive == true) return + + hasErroredOut = false + _logs.clear() + + installationJob = viewModelScope.launch(Dispatchers.IO) { + awaitShell() + + if (!isDeviceRooted) { + _events.emit( + InstallationEvent.Error( + R.string.root_not_found_title, + R.string.root_not_found_desc + ) + ) + return@launch + } + + if (!deviceProperlyRooted()) { + _events.emit( + InstallationEvent.Error( + R.string.compatible_root_not_found_title, + R.string.compatible_root_not_found_desc + ) + ) + return@launch + } + + if (!skipInstallation && requireMetamodule()) { + _events.emit( + InstallationEvent.Error( + R.string.metamodule_not_found_title, + R.string.metamodule_not_found_desc + ) + ) + return@launch + } + + // if (!hasStoragePermission()) { + // _events.emit( + // InstallationEvent.Toast(R.string.need_storage_perm_title) + // ) + // return@launch + // } + + val moduleExists = moduleExists() + val overlayExists = overlayExists() + + if ((!skipInstallation && (Config.FORCE_OVERLAY_INSTALLATION || + prefController.getInt(SettingsKey.SAVED_VERSION_CODE) != BuildConfig.VERSION_CODE || + !moduleExists || + !overlayExists)) || + (skipInstallation && !moduleExists) + ) { + clearDatabase(skipInstallation, moduleExists, overlayExists) + performInstallation(skipInstallation) + } else { + prefController.setBoolean( + SettingsKey.XPOSED_ONLY_MODE, + skipInstallation && !overlayExists + ) + + if (!skipInstallation) { + _state.emit(InstallationState.Success) + } else { + _events.emit( + InstallationEvent.Toast(R.string.toast_skipped_installation) + ) + } + } + } + } + + private suspend fun awaitShell(): Boolean = suspendCancellableCoroutine { cont -> + Shell.getShell { + cont.resume(true) { _, _, _ -> } + } + } + + private suspend fun performInstallation(skip: Boolean) { + _state.emit(InstallationState.Installing) + + var step = 0 + var dir: File + + suspend fun progress( + nextStep: Boolean = false, + log: String? = null, + replace: Boolean = false + ) { + if (nextStep) ++step + if (log != null) { + if (_logs.isEmpty() || !replace) { + _logs.add(log) + } else { + _logs[_logs.lastIndex] = log + } + } + + val descRes = when (step) { + 1 -> R.string.module_installation_step1 + 2 -> R.string.module_installation_step2 + 3 -> R.string.module_installation_step3 + 4 -> R.string.module_installation_step4 + 5 -> R.string.module_installation_step5 + 6 -> R.string.module_installation_step6 + else -> R.string.loading_dialog_wait + } + + _state.emit(InstallationState.Progressing(step = step, descRes = descRes, replace)) + } + + progress(log = "I: Creating blank module template", nextStep = true) + handleModule(skip) + + progress(log = "I: Extracting binaries") + hasErroredOut = symLinkBinaries() + + if (hasErroredOut) { + progress(log = "E: Failed to extract binaries") + Log.e(tag, "Failed to extract binaries") + } + + try { + if (!hasErroredOut) { + // Clean data directory + progress(log = "I: Cleaning iconify data directory", nextStep = true) + Shell.cmd("rm -rf $DATA_DIR/Overlays").exec() + + progress(log = "I: Extracting overlays from assets") + if (skip) { + delay(100) + progress(log = "W: Skipped...") + delay(100) + } else { + // Extract overlays from assets + copyAssets("Overlays") + } + + // Create temp directory + progress(log = "I: Creating temporary directories") + FileUtils.ensureDirs( + TEMP_OVERLAY_DIR, + UNSIGNED_UNALIGNED_DIR, + UNSIGNED_DIR, + SIGNED_DIR + ) + } + } catch (e: IOException) { + hasErroredOut = true + Log.e(tag, e.toString()) + } + + progress(nextStep = true) + + if (skip) { + progress(log = "W: Skipping overlay builder...") + delay(100) + } else { + // Create AndroidManifest.xml and build Overlay using AAPT + dir = File("$DATA_DIR/Overlays") + + if (dir.listFiles() == null) hasErroredOut = true + + if (!hasErroredOut) { + for (pkg in dir.listFiles()!!) { + if (pkg.isDirectory) { + for (overlay in pkg.listFiles()!!) { + if (overlay.isDirectory) { + val overlayName = overlay.toString() + .replace("$pkg/", "") + + progress(log = "I: Building Overlay for $overlayName") + + if (createManifest( + overlayName, + pkg.toString() + .replace("$DATA_DIR/Overlays/", ""), + overlay.absolutePath + ) + ) { + hasErroredOut = true + } + + if (!hasErroredOut && runAapt( + overlay.absolutePath, + overlayName + ) + ) { + hasErroredOut = true + } + } + + if (hasErroredOut) break + } + } + + if (hasErroredOut) break + } + } + } + + progress(nextStep = true) + + if (skip) { + progress(log = "W: Skipping zipalign process...") + delay(100) + } else { + // ZipAlign the Overlay + dir = File(UNSIGNED_UNALIGNED_DIR) + + if (dir.listFiles() == null) hasErroredOut = true + + if (!hasErroredOut) { + for (overlay in dir.listFiles()!!) { + if (!overlay.isDirectory) { + val overlayName = overlay.toString() + .replace("$UNSIGNED_UNALIGNED_DIR/", "") + .replace("-unaligned", "") + + progress( + log = "I: Zip aligning Overlay " + overlayName.replace( + "-unsigned.apk", + "" + ) + ) + + if (zipAlign(overlay.absolutePath, overlayName)) { + hasErroredOut = true + } + } + + if (hasErroredOut) break + } + } + } + + progress(nextStep = true) + + if (skip) { + progress(log = "W: Skipping signing process...") + delay(100) + } else { + // Sign the Overlay + dir = File(UNSIGNED_DIR) + + if (dir.listFiles() == null) hasErroredOut = true + + if (!hasErroredOut) { + for (overlay in dir.listFiles()!!) { + if (!overlay.isDirectory) { + val overlayName = + overlay.toString() + .replace("$UNSIGNED_DIR/", "") + .replace("-unsigned", "") + + progress( + log = "I: Signing Overlay " + overlayName.replace( + ".apk", + "" + ) + ) + + var attempt = 3 + while (attempt-- != 0) { + hasErroredOut = apkSigner(overlay.absolutePath, overlayName) + + if (!hasErroredOut) { + break + } else { + delay(1000) + } + } + } + + if (hasErroredOut) break + } + } + } + + if (!hasErroredOut) { + progress(log = "I: Moving overlays to system directory", nextStep = true) + + if (skip) { + delay(100) + progress(log = "W: Skipping...") + } + } + + // Move all generated overlays to system dir and flash as module + if (!hasErroredOut) { + Shell.cmd("cp -a $SIGNED_DIR/. $TEMP_MODULE_OVERLAY_DIR").exec() + + restoreFiles() + + hasErroredOut = try { + flashModule( + createModule( + TEMP_MODULE_DIR, + "$TEMP_DIR/Iconify.zip" + ) + ) + } catch (e: Exception) { + writeLog(tag, "Failed to create/flash module zip", e) + Log.e(tag, "Failed to create/flash module zip\n$e") + + if (e.toString().contains("Function not implemented", ignoreCase = true)) { + progress(log = "E: KernelSU function not implemented") + _events.emit( + InstallationEvent.Toast(R.string.toast_downgrade_kernelsu) + ) + } else if (e.toString().contains("Reboot to apply changes", ignoreCase = true)) { + progress(log = "E: Metamodule is pending a reboot") + _events.emit( + InstallationEvent.Toast(R.string.toast_reboot_and_try_again) + ) + } + + true + } + } + + progress(log = "I: Cleaning temporary directories") + + // Clean temp directory + Shell.cmd( + "rm -rf $TEMP_DIR", + "rm -rf $DATA_DIR/Overlays" + ).exec() + + if (!hasErroredOut) { + progress(log = "I: Installation process finished") + delay(100) + progress(log = "I: You should reboot your device") + } else { + progress(log = "E: Installation process failed") + } + + delay(500) + progress(log = "") + + for (i in 3 downTo 1) { + progress(log = "Closing in $i seconds...", replace = i != 3) + delay(1000) + } + progress(log = "Done!") + delay(500) + + if (!hasErroredOut) { + if (!skip) { + if (BuildConfig.VERSION_CODE != prefController.getInt(SettingsKey.SAVED_VERSION_CODE)) { + if (prefController.getBoolean(SettingsKey.FIRST_INSTALL)) { + prefController.setBoolean(SettingsKey.FIRST_INSTALL, true) + prefController.setBoolean(SettingsKey.UPDATE_DETECTED, false) + } else { + prefController.setBoolean(SettingsKey.FIRST_INSTALL, false) + prefController.setBoolean(SettingsKey.UPDATE_DETECTED, true) + } + + prefController.setInt(SettingsKey.SAVED_VERSION_CODE, BuildConfig.VERSION_CODE) + } + + prefController.setBoolean(SettingsKey.XPOSED_ONLY_MODE, false) + + if (moduleExists() && overlayExists()) { + _events.emit( + InstallationEvent.Toast(R.string.one_time_reboot_needed) + ) + _state.emit(InstallationState.Success) + } else { + _events.emit( + InstallationEvent.Toast(R.string.need_reboot_title) + ) + rebootRequired = true + _state.emit(InstallationState.Reboot) + } + } else { + prefController.setBoolean(SettingsKey.XPOSED_ONLY_MODE, true) + + _events.emit( + InstallationEvent.Toast(R.string.one_time_reboot_needed) + ) + _state.emit(InstallationState.Success) + } + } else { + onCancelled() + + _events.emit( + InstallationEvent.Error( + R.string.installation_failed_title, + R.string.installation_failed_desc + ) + ) + } + } + + private fun clearDatabase( + skip: Boolean, + moduleExists: Boolean, + overlayExists: Boolean + ) { + if (!skip && (!moduleExists || !overlayExists)) { + prefController.reset() + CoroutineScope(Dispatchers.IO).launch { + // DynamicResourceRepository( + // DynamicResourceDatabase.getInstance().dynamicResourceDao() + // ).apply { + // deleteResources(getAllResources()) + // } + } + } else if (skip && !moduleExists) { + prefController.reset() + CoroutineScope(Dispatchers.IO).launch { + // DynamicResourceRepository( + // DynamicResourceDatabase.getInstance().dynamicResourceDao() + // ).apply { + // deleteResources(getAllResources()) + // } + } + } + } + + fun clearError() { + _state.value = InstallationState.Idle + } + + private fun onCancelled() { + prefController.setBoolean(SettingsKey.XPOSED_ONLY_MODE, false) + + Shell.cmd( + "rm -rf $DATA_DIR", + "rm -rf $TEMP_DIR", + "rm -rf $BACKUP_DIR", + "rm -rf $MODULE_DIR" + ).exec() + } + + override fun onCleared() { + installationJob?.cancel() + onCancelled() + super.onCleared() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/settings/lookandfeel/screens/LookAndFeelScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/settings/lookandfeel/screens/LookAndFeelScreen.kt new file mode 100644 index 000000000..80e8c0c7d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/settings/lookandfeel/screens/LookAndFeelScreen.kt @@ -0,0 +1,275 @@ +package com.drdisagree.iconify.features.settings.lookandfeel.screens + +import androidx.appcompat.app.AppCompatDelegate +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.BlurOn +import androidx.compose.material.icons.rounded.Contrast +import androidx.compose.material.icons.rounded.DarkMode +import androidx.compose.material.icons.rounded.FormatColorFill +import androidx.compose.material.icons.rounded.FormatSize +import androidx.compose.material.icons.rounded.NightsStay +import androidx.compose.material.icons.rounded.Palette +import androidx.compose.material.icons.rounded.PhotoSizeSelectLarge +import androidx.compose.material.icons.rounded.SpaceBar +import androidx.compose.material.icons.rounded.WaterDrop +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.preferences.PrefStringRes +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.iconRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.svg.DynamicColorImageVectors +import com.drdisagree.iconify.core.ui.components.svg.themePicker +import com.drdisagree.iconify.data.keys.SettingsKey +import com.drdisagree.iconify.data.models.allSeedColors +import com.materialkolor.Contrast +import com.materialkolor.PaletteStyle + +private data class ThemeMode( + val themeMode: Int, + val name: PrefStringRes +) + +private val themeModes = listOf( + ThemeMode( + AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM, + stringRes(R.string.settings_app_theme_system) + ), + ThemeMode( + AppCompatDelegate.MODE_NIGHT_NO, + stringRes(R.string.settings_app_theme_light) + ), + ThemeMode( + AppCompatDelegate.MODE_NIGHT_YES, + stringRes(R.string.settings_app_theme_dark) + ) +) + +private data class ContrastLevel( + val contrast: Contrast, + val name: PrefStringRes +) + +private val contrastLevels = listOf( + ContrastLevel(Contrast.Default, stringRes("Default")), + ContrastLevel(Contrast.Medium, stringRes("Medium")), + ContrastLevel(Contrast.High, stringRes("High")), + ContrastLevel(Contrast.Reduced, stringRes("Reduced")) +) + +private data class PaletteStyleOption( + val paletteStyle: PaletteStyle, + val name: PrefStringRes +) + +private val paletteStyles = listOf( + PaletteStyleOption(PaletteStyle.TonalSpot, stringRes("Tonal Spot")), + PaletteStyleOption(PaletteStyle.Neutral, stringRes("Neutral")), + PaletteStyleOption(PaletteStyle.Vibrant, stringRes("Vibrant")), + PaletteStyleOption(PaletteStyle.Expressive, stringRes("Expressive")), + PaletteStyleOption(PaletteStyle.Rainbow, stringRes("Rainbow")), + PaletteStyleOption(PaletteStyle.FruitSalad, stringRes("FruitSalad")), + PaletteStyleOption(PaletteStyle.Monochrome, stringRes("Monochrome")), + PaletteStyleOption(PaletteStyle.Fidelity, stringRes("Fidelity")), + PaletteStyleOption(PaletteStyle.Content, stringRes("Content")), +) + +val lookAndFeelPreferences = preferenceScreen { + composable(key = "header_look_and_feel") { + Box( + modifier = Modifier.fillMaxWidth(), + contentAlignment = Alignment.Center + ) { + Image( + modifier = Modifier + .fillMaxWidth(0.5f) + .padding(vertical = 16.dp), + imageVector = DynamicColorImageVectors.themePicker(), + contentDescription = null + ) + } + } + + category { + listPref( + key = SettingsKey.THEME_MODE, + icon = iconRes(Icons.Rounded.DarkMode), + title = stringRes(R.string.settings_app_theme), + entries = arrayRes(themeModes.map { it.name }), + entryValues = arrayRes(themeModes.map { it.themeMode.toString() }), + summary = { ctrl, key -> + val selected = ctrl.getString(key, SettingsKey.THEME_MODE.default as String).toInt() + themeModes.find { it.themeMode == selected }!!.name + } + ) + + listPref( + key = "theme_color", + icon = iconRes(Icons.Rounded.FormatColorFill), + title = stringRes("Theme Color"), + defaultValue = "dynamic", + entries = arrayRes(listOf(stringRes("Dynamic")) + allSeedColors.map { + stringRes(it.seedColor.name) + }.toList()), + entryValues = arrayRes(listOf("dynamic") + allSeedColors.map { + it.seedColor.name + .lowercase() + .replace(" ", "_") + }.toList()), + summary = { ctrl, key -> + val v = ctrl.getString(key, "dynamic") + stringRes(v.replaceFirstChar { it.uppercase() }) + } + ) + + listPref( + key = SettingsKey.PALETTE_STYLE, + icon = iconRes(Icons.Rounded.Palette), + title = stringRes("Palette Style"), + entries = arrayRes(paletteStyles.map { it.name }.toList()), + entryValues = arrayRes(paletteStyles.map { it.paletteStyle.name }.toList()), + summary = { ctrl, key -> + val v = ctrl.getString(key, SettingsKey.PALETTE_STYLE.default as String) + paletteStyles.find { it.paletteStyle.name == v }!!.name + }, + isVisible = { ctrl -> ctrl.getString("theme_color", "dynamic") != "dynamic" } + ) + + switch( + key = SettingsKey.AMOLED_THEME, + icon = iconRes(Icons.Rounded.NightsStay), + title = stringRes("Amoled Mode"), + summary = { _, _ -> stringRes("Black background in dark mode") }, + isVisible = { ctrl -> ctrl.getString("theme_color", "dynamic") != "dynamic" } + ) + + switch( + key = SettingsKey.EXPRESSIVE_COLORS, + icon = iconRes(Icons.Rounded.WaterDrop), + title = stringRes("Expressive Colors"), + summary = { _, _ -> stringRes("Use colors that are more chromatic") }, + isVisible = { ctrl -> + ctrl.getString("theme_color", "dynamic") != "dynamic" && + ctrl.getString(SettingsKey.PALETTE_STYLE) in listOf( + PaletteStyle.TonalSpot.name, + PaletteStyle.Neutral.name, + PaletteStyle.Vibrant.name, + PaletteStyle.Expressive.name, + ) + } + ) + + listPref( + key = SettingsKey.CONTRAST_LEVEL, + icon = iconRes(Icons.Rounded.Contrast), + title = stringRes("Contrast Level"), + entries = arrayRes(contrastLevels.map { it.name }), + entryValues = arrayRes(contrastLevels.map { it.contrast.value.toString() }), + summary = { ctrl, key -> + val selected = + ctrl.getString(key, SettingsKey.CONTRAST_LEVEL.default as String).toDouble() + contrastLevels.find { it.contrast.value == selected }!!.name + }, + isVisible = { ctrl -> ctrl.getString("theme_color", "dynamic") != "dynamic" } + ) + } + + category(title = "Additional Settings") { + switch( + key = SettingsKey.BLUR_EFFECT, + icon = iconRes(Icons.Rounded.BlurOn), + title = stringRes("Blur Effect"), + summary = { _, _ -> stringRes("Apply a blur effect to backgrounds and UI elements") }, + ) + + switch( + key = SettingsKey.FLOATING_BOTTOM_BAR, + icon = iconRes(Icons.Rounded.SpaceBar), + title = stringRes("Floating Bottom Bar"), + summary = { _, _ -> stringRes("Make the bottom bar float over content") }, + ) + + slider( + key = SettingsKey.UI_SCALE, + icon = iconRes(Icons.Rounded.PhotoSizeSelectLarge), + title = stringRes("UI Scale"), + summary = { _, _ -> stringRes("Change the size of UI elements") }, + min = 0.5f, + max = 1.2f, + steps = 6, + valueLabel = { "${"%.1f".format(it)}x" }, + showDefaultIndicator = true, + hideDefaultValue = true, + showResetButton = true, + applyOnValueChangeFinished = true, + ) + + slider( + key = SettingsKey.TEXT_SCALE, + icon = iconRes(Icons.Rounded.FormatSize), + title = stringRes("Text Scale"), + summary = { _, _ -> stringRes("Change the size of text") }, + min = 0.5f, + max = 2f, + steps = 14, + valueLabel = { "${"%.1f".format(it)}x" }, + showDefaultIndicator = true, + hideDefaultValue = true, + showResetButton = true, + applyOnValueChangeFinished = true, + ) + } +} + +@Composable +fun LookAndFeelScreen() { + val prefController = LocalPreferenceController.current + + PreferenceListener(key = "theme_color") { + val newValue = (it.newValue as PrefValue.StringValue).v + + if (newValue == "dynamic") { + prefController.setBoolean(SettingsKey.DYNAMIC_COLORS, true) + } else { + allSeedColors.find { seed -> + newValue == seed.seedColor.name + .lowercase() + .replace(" ", "_") + }?.let { seedColor -> + prefController.setString( + SettingsKey.SEED_COLOR, + seedColor.seedColor.primaryColor.toString() + ) + prefController.setBoolean(SettingsKey.DYNAMIC_COLORS, false) + } + } + } + + PreferenceScreen( + items = lookAndFeelPreferences, + title = "Look & Feel", + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun LookAndFeelScreenPreview() { + PreviewComposable { + LookAndFeelScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/settings/main/screens/SettingsScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/settings/main/screens/SettingsScreen.kt new file mode 100644 index 000000000..b1ba4d3ec --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/settings/main/screens/SettingsScreen.kt @@ -0,0 +1,249 @@ +package com.drdisagree.iconify.features.settings.main.screens + +import android.content.Intent +import android.net.Uri +import android.provider.Settings +import android.widget.Toast +import androidx.activity.compose.LocalActivity +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.drdisagree.iconify.BuildConfig +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.iconRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.dialogs.LoadingDialog +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.utils.AppUtils +import com.drdisagree.iconify.core.utils.AppUtils.openUrl +import com.drdisagree.iconify.core.utils.CacheUtils +import com.drdisagree.iconify.core.utils.SystemUtils +import com.drdisagree.iconify.core.utils.SystemUtils.disableBlur +import com.drdisagree.iconify.core.utils.SystemUtils.saveBootId +import com.drdisagree.iconify.data.common.Const.GITHUB_REPO +import com.drdisagree.iconify.data.common.Const.ICONIFY_CROWDIN +import com.drdisagree.iconify.data.common.Const.TELEGRAM_GROUP +import com.drdisagree.iconify.data.common.Resources.MODULE_DIR +import com.drdisagree.iconify.data.keys.SettingsKey +import com.topjohnwu.superuser.Shell +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext + +fun settingsPreferences( + onDisableEverything: () -> Unit = {}, +) = preferenceScreen { + category(title = "Appearance") { + action( + key = "look_and_feel", + icon = iconRes(R.drawable.ic_app_icon), + title = stringRes("Look & Feel"), + summary = { _, _ -> stringRes("Theme, contrast and colors") }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Settings.LookAndFeel) { + launchSingleTop = true + } + } + ) + + action( + key = "app_language", + icon = iconRes(R.drawable.ic_language), + title = stringRes(R.string.settings_app_language), + summary = { _, _ -> stringRes("Choose your app language") }, + onClick = { context, _, _ -> + context.startActivity( + Intent(Settings.ACTION_APP_LOCALE_SETTINGS).apply { + data = Uri.fromParts("package", context.packageName, null) + } + ) + } + ) + + switch( + key = SettingsKey.HAPTICS_AND_VIBRATION, + icon = iconRes(R.drawable.ic_vibrate), + title = stringRes(R.string.settings_vibrate_ui_card_title), + summary = { _, _ -> stringRes(R.string.settings_vibrate_ui_page_card_desc) }, + isEnabled = { ctrl -> ctrl.getBoolean("notifications_enabled", true) }, + ) + } + + category(title = stringRes(R.string.settings_section_title_miscellaneous)) { + switch( + key = SettingsKey.RESTART_SYSTEMUI_AFTER_BOOT, + icon = iconRes(R.drawable.ic_restart_systemui_after_boot), + title = stringRes(R.string.settings_restart_systemui_after_boot_title), + summary = { _, _ -> stringRes(R.string.settings_restart_systemui_after_boot_desc) }, + ) + + action( + key = "clearAppCache", + icon = iconRes(R.drawable.ic_clear_cache), + title = stringRes(R.string.settings_clear_app_cache_title), + summary = { _, _ -> stringRes(R.string.settings_clear_app_cache_desc) }, + onClick = { context, _, _ -> + CacheUtils.clearCache(context) + + Toast.makeText( + context, + context.getString(R.string.toast_clear_cache), + Toast.LENGTH_SHORT + ).show() + } + ) + + action( + key = "disableEverything", + icon = iconRes(R.drawable.ic_disable_everything), + title = stringRes(R.string.settings_disable_everything_title), + summary = { _, _ -> stringRes(R.string.settings_disable_everything_desc) }, + onClick = { _, _, _ -> onDisableEverything() } + ) + } + + category(title = stringRes(R.string.settings_section_title_about)) { + action( + key = "iconifyGitHub", + icon = iconRes(R.drawable.ic_github), + title = stringRes(R.string.settings_github_repository_title), + summary = { _, _ -> stringRes(R.string.settings_github_repository_desc) }, + onClick = { context, _, _ -> openUrl(context, GITHUB_REPO) } + ) + + action( + key = "iconifyTelegram", + icon = iconRes(R.drawable.ic_telegram), + title = stringRes(R.string.settings_telegram_group_title), + summary = { _, _ -> stringRes(R.string.settings_telegram_group_desc) }, + onClick = { context, _, _ -> openUrl(context, TELEGRAM_GROUP) } + ) + + action( + key = "iconifyTranslate", + icon = iconRes(R.drawable.ic_translate), + title = stringRes(R.string.settings_translate_title), + summary = { _, _ -> stringRes(R.string.settings_translate_desc) }, + onClick = { context, _, _ -> openUrl(context, ICONIFY_CROWDIN) } + ) + } +} + +@Composable +fun SettingsScreen() { + val context = LocalContext.current + val activity = LocalActivity.current + val prefController = LocalPreferenceController.current + val coroutineScope = rememberCoroutineScope() + var showDialog by rememberSaveable { mutableStateOf(false) } + var showLoading by rememberSaveable { mutableStateOf(false) } + + if (showLoading) { + LoadingDialog() + } + + if (showDialog) { + AlertDialog( + onDismissRequest = { showDialog = false }, + title = { + Text( + text = stringResource(R.string.import_settings_confirmation_title) + ) + }, + text = { + Text( + text = stringResource(R.string.import_settings_confirmation_desc) + ) + }, + dismissButton = { + TextButton(onClick = withHaptic { showDialog = false }) { Text("Cancel") } + }, + confirmButton = { + TextButton(onClick = withHaptic { + showDialog = false + showLoading = true + + coroutineScope.launch { + withContext(Dispatchers.IO) { + // WeatherConfig.clear(context) + + // Clear shared preferences + prefController.reset() + + // Clear dynamic resource database + // DynamicResourceRepository( + // DynamicResourceDatabase.getInstance().dynamicResourceDao() + // ).apply { + // deleteResources(getAllResources()) + // } + + saveBootId + disableBlur(false) + + prefController.setInt( + SettingsKey.SAVED_VERSION_CODE, + BuildConfig.VERSION_CODE + ) + prefController.setBoolean( + SettingsKey.ON_HOME_PAGE, + true + ) + prefController.setBoolean( + SettingsKey.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" + ).submit() + + delay(3000) + showLoading = false + + SystemUtils.restartSystemUI() + activity?.let { AppUtils.restartApplication(it) } + } + } + }) { Text("OK") } + } + ) + } + + PreferenceListener(key = SettingsKey.RESTART_SYSTEMUI_AFTER_BOOT) { + if ((it.newValue as PrefValue.BoolValue).v) { + SystemUtils.enableRestartSystemuiAfterBoot() + } else { + SystemUtils.disableRestartSystemuiAfterBoot() + } + } + + PreferenceScreen( + items = settingsPreferences(onDisableEverything = { showDialog = true }), + title = stringResource(R.string.activity_title_settings) + ) +} + +@Preview(showBackground = true) +@Composable +fun SettingsScreenPreview() { + PreviewComposable { + SettingsScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/albumart/screens/LockscreenAlbumArtScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/albumart/screens/LockscreenAlbumArtScreen.kt new file mode 100644 index 000000000..3dddde1af --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/albumart/screens/LockscreenAlbumArtScreen.kt @@ -0,0 +1,61 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.albumart.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey + +val lsAlbumArtPreferences = preferenceScreen { + category { + switch( + key = XposedKey.ALBUM_ART_ON_LOCKSCREEN, + isMasterSwitch = true, + title = stringRes(R.string.media_art_title), + ) + } + + category { + listPref( + key = XposedKey.ALBUM_ART_ON_LOCKSCREEN_FILTER, + title = stringRes(R.string.albumart_filter_title), + entries = arrayRes(R.array.lockscreen_albumart_filter_entries), + entryValues = arrayRes(R.array.lockscreen_albumart_filter_values), + isEnabled = { it.getBoolean(XposedKey.ALBUM_ART_ON_LOCKSCREEN) } + ) + + slider( + key = XposedKey.ALBUM_ART_ON_LOCKSCREEN_BLUR, + title = stringRes(R.string.media_art_blur_level_title), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}%" }, + isVisible = { pref -> + pref.getString(XposedKey.ALBUM_ART_ON_LOCKSCREEN_FILTER) in setOf("3", "4") + }, + isEnabled = { it.getBoolean(XposedKey.ALBUM_ART_ON_LOCKSCREEN) } + ) + } +} + +@Composable +fun LockscreenAlbumArtScreen() { + PreferenceScreen( + items = lsAlbumArtPreferences, + title = stringResource(R.string.activity_title_lockscreen_album_art), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun LockscreenAlbumArtScreenPreview() { + PreviewComposable { + LockscreenAlbumArtScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/components/LockscreenClockPreview.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/components/LockscreenClockPreview.kt new file mode 100644 index 000000000..27a55ccf8 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/components/LockscreenClockPreview.kt @@ -0,0 +1,78 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.clock.components + +import androidx.compose.foundation.layout.padding +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalResources +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.pagers.DevicePreviewPager +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.xposed.lockscreen.clock.viewmodels.LockscreenClockViewModel +import kotlinx.coroutines.flow.flowOf + +@Composable +fun LockscreenClockPreview( + lockscreenClockViewModel: LockscreenClockViewModel? = hiltViewModel() +) { + val resources = LocalResources.current + val prefController = LocalPreferenceController.current + val isClockEnabled by prefController.observe(XposedKey.CUSTOM_LOCKSCREEN_CLOCK.name, false) + val startPageIndex by prefController.observe(XposedKey.LSCLOCK_STYLE.name, 0) + + LaunchedEffect(Unit) { + lockscreenClockViewModel?.loadClockLayouts(resources) + lockscreenClockViewModel?.loadWallpaper() + } + + val layoutIds by (lockscreenClockViewModel?.clockLayoutIds ?: flowOf(emptyList())) + .collectAsStateWithLifecycle(initialValue = emptyList()) + val wallpaperBytes by (lockscreenClockViewModel?.wallpaperBytes ?: flowOf(null)) + .collectAsStateWithLifecycle(initialValue = null) + val wallpaperReady by (lockscreenClockViewModel?.wallpaperReady ?: flowOf(false)) + .collectAsStateWithLifecycle(initialValue = false) + + val clockNone = stringResource(R.string.clock_none) + val clockStyleName = stringResource(R.string.clock_style_name) + + val names by remember(layoutIds, clockNone, clockStyleName) { + mutableStateOf( + List(layoutIds.size) { index -> + if (index == 0) clockNone + else clockStyleName.format(index) + } + ) + } + + DevicePreviewPager( + modifier = Modifier.padding(top = 24.dp), + enabled = isClockEnabled, + startPageIndex = startPageIndex, + layoutResIds = layoutIds, + names = names, + wallpaperReady = wallpaperReady, + wallpaperBytes = wallpaperBytes, + horizontalPaddingToIgnore = 16.dp, + onSelect = { index -> + prefController.setInt(XposedKey.LSCLOCK_STYLE, index) + } + ) +} + +@Preview(showBackground = true) +@Composable +fun LockscreenClockPreviewPreview() { + PreviewComposable { + LockscreenClockPreview(null) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/screens/LockscreenClockScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/screens/LockscreenClockScreen.kt new file mode 100644 index 000000000..867738d4a --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/screens/LockscreenClockScreen.kt @@ -0,0 +1,201 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.clock.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.core.net.toUri +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.preferences.FilePickerType +import com.drdisagree.iconify.data.common.XposedConst.LSCLOCK_FONT_FILE +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.common.viewmodels.SystemActionViewModel +import com.drdisagree.iconify.features.xposed.lockscreen.clock.components.LockscreenClockPreview +import com.drdisagree.iconify.helpers.toXposedSharedPath + +val lsClockPreferences = preferenceScreen { + category { + switch( + key = XposedKey.CUSTOM_LOCKSCREEN_CLOCK, + isMasterSwitch = true, + title = stringRes(R.string.activity_title_lockscreen_clock), + ) + } + + composable(key = "clock_previews") { + LockscreenClockPreview() + } + + category { + filePicker( + key = XposedKey.LSCLOCK_FONT_FILE_URI, + title = stringRes(R.string.lockscreen_clock_font_title), + summary = { _, _ -> stringRes(R.string.lockscreen_clock_font_desc) }, + pickerType = FilePickerType.Font, + saveFileUri = true, + onFileSelected = { _, uriString -> + if (uriString.isNotEmpty()) { + uriString.toUri().toXposedSharedPath(LSCLOCK_FONT_FILE.name) + } + }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) } + ) + } + + category { + slider( + key = XposedKey.LSCLOCK_LINE_HEIGHT, + title = stringRes(R.string.lockscreen_font_line_height_title), + min = -120f, + max = 120f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) } + ) + + slider( + key = XposedKey.LSCLOCK_TEXT_SCALE, + title = stringRes(R.string.lockscreen_font_text_scaling_title), + min = 0.5f, + max = 2.5f, + steps = 19, + valueLabel = { "${"%.1f".format(it)}x" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) } + ) + + slider( + key = XposedKey.LSCLOCK_TOP_MARGIN, + title = stringRes(R.string.lockscreen_clock_top_margin_title), + min = 0f, + max = 600f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) } + ) + + slider( + key = XposedKey.LSCLOCK_BOTTOM_MARGIN, + title = stringRes(R.string.lockscreen_clock_bottom_margin_title), + min = 0f, + max = 600f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) } + ) + } + + category { + switch( + key = XposedKey.LSCLOCK_CUSTOM_COLOR, + title = stringRes(R.string.lsclock_custom_color_title), + summary = { _, _ -> stringRes(R.string.lsclock_custom_color_desc) }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) } + ) + + colorPicker( + key = XposedKey.LSCLOCK_COLOR_ACCENT_PRIMARY, + title = stringRes(R.string.accent_primary), + isEnabled = { + it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) && + it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) + }, + isVisible = { it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) } + ) + + colorPicker( + key = XposedKey.LSCLOCK_COLOR_ACCENT_SECONDARY, + title = stringRes(R.string.accent_primary), + isEnabled = { + it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) && + it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) + }, + isVisible = { it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) } + ) + + colorPicker( + key = XposedKey.LSCLOCK_COLOR_ACCENT_TERTIARY, + title = stringRes(R.string.accent_primary), + isEnabled = { + it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) && + it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) + }, + isVisible = { it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) } + ) + + colorPicker( + key = XposedKey.LSCLOCK_COLOR_TEXT_PRIMARY, + title = stringRes(R.string.accent_primary), + isEnabled = { + it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) && + it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) + }, + isVisible = { it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) } + ) + + colorPicker( + key = XposedKey.LSCLOCK_COLOR_TEXT_INVERSE, + title = stringRes(R.string.accent_primary), + isEnabled = { + it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) && + it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) + }, + isVisible = { it.getBoolean(XposedKey.LSCLOCK_CUSTOM_COLOR) } + ) + } + + category { + editText( + key = XposedKey.LSCLOCK_DEVICE_NAME, + title = stringRes(R.string.lockscreen_clock_custom_devicename), + summary = { prefs, _ -> + val currentVal = prefs.getString(XposedKey.LSCLOCK_DEVICE_NAME) + + if (currentVal.isNotEmpty()) stringRes(currentVal) + else stringRes(R.string.lockscreen_clock_custom_devicename_desc) + }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) }, + isVisible = { it.getInt(XposedKey.LSCLOCK_STYLE) in setOf(19, 32, 47) }, + ) + + editText( + key = XposedKey.LSCLOCK_USER_NAME, + title = stringRes(R.string.lockscreen_clock_custom_username), + summary = { prefs, _ -> + val currentVal = prefs.getString(XposedKey.LSCLOCK_USER_NAME) + + if (currentVal.isNotEmpty()) stringRes(currentVal) + else stringRes(R.string.lockscreen_clock_custom_username_desc) + }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_LOCKSCREEN_CLOCK) }, + isVisible = { + it.getInt(XposedKey.LSCLOCK_STYLE) in + setOf(7, 32, 35, 36, 42, 48, 50, 53) + }, + ) + } +} + +@Composable +fun LockscreenClockScreen( + systemActionViewModel: SystemActionViewModel = hiltViewModel(), +) { + PreferenceListener(key = XposedKey.CUSTOM_LOCKSCREEN_CLOCK) { + systemActionViewModel.shouldRestartSystemUI() + } + + PreferenceScreen( + items = lsClockPreferences, + title = stringResource(R.string.activity_title_lockscreen_clock), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun LockscreenClockScreenPreview() { + PreviewComposable { + LockscreenClockScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/viewmodels/LockscreenClockViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/viewmodels/LockscreenClockViewModel.kt new file mode 100644 index 000000000..061fbb8e1 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/clock/viewmodels/LockscreenClockViewModel.kt @@ -0,0 +1,65 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.clock.viewmodels + +import android.annotation.SuppressLint +import android.content.res.Resources +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.BuildConfig +import com.drdisagree.iconify.core.utils.WallpaperUtils +import com.drdisagree.iconify.data.common.Resources.LOCKSCREEN_CLOCK_LAYOUT +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import javax.inject.Inject + +@HiltViewModel +class LockscreenClockViewModel @Inject constructor() : ViewModel() { + + private val _clockLayoutIds = MutableStateFlow>(emptyList()) + val clockLayoutIds: StateFlow> = _clockLayoutIds.asStateFlow() + + private val _wallpaperBytes = MutableStateFlow(null) + val wallpaperBytes: StateFlow = _wallpaperBytes.asStateFlow() + + private val _wallpaperReady = MutableStateFlow(false) + val wallpaperReady: StateFlow = _wallpaperReady.asStateFlow() + + fun loadClockLayouts(resources: Resources) { + viewModelScope.launch(Dispatchers.IO) { + val ids = buildList { + var index = 0 + while (true) { + @SuppressLint("DiscouragedApi") + val id = resources.getIdentifier( + LOCKSCREEN_CLOCK_LAYOUT + index, + "layout", + BuildConfig.APPLICATION_ID + ) + if (id == 0) break + add(id) + index++ + } + } + _clockLayoutIds.emit(ids) + } + } + + fun loadWallpaper() { + viewModelScope.launch(Dispatchers.IO) { + if (_wallpaperBytes.value != null) { + _wallpaperReady.emit(true) + return@launch + } + + _wallpaperReady.emit(false) + + WallpaperUtils.prepareLockWallpaper()?.let { file -> + _wallpaperBytes.emit(file.readBytes()) + _wallpaperReady.emit(true) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/components/WeatherEventHandler.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/components/WeatherEventHandler.kt new file mode 100644 index 000000000..623f73ec9 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/components/WeatherEventHandler.kt @@ -0,0 +1,159 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.common.components + +import android.Manifest +import android.content.Intent +import android.net.Uri +import android.provider.Settings +import androidx.activity.compose.LocalActivity +import androidx.activity.compose.rememberLauncherForActivityResult +import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.features.xposed.lockscreen.common.events.WeatherDialog +import com.drdisagree.iconify.features.xposed.lockscreen.common.events.WeatherEvent +import com.drdisagree.iconify.features.xposed.lockscreen.common.viewmodels.WeatherViewModel +import kotlinx.coroutines.flow.collectLatest + +@Composable +fun WeatherEventHandler(weatherViewModel: WeatherViewModel) { + val context = LocalContext.current + val activity = LocalActivity.current + + val screenState by weatherViewModel.screenState.collectAsStateWithLifecycle() + + val permissionLauncher = rememberLauncherForActivityResult( + ActivityResultContracts.RequestMultiplePermissions() + ) { result -> + val fine = result.getOrDefault(Manifest.permission.ACCESS_FINE_LOCATION, false) + val coarse = result.getOrDefault(Manifest.permission.ACCESS_COARSE_LOCATION, false) + + weatherViewModel.onPermissionResult(fineGranted = fine, coarseGranted = coarse) + } + + DisposableEffect(Unit) { + weatherViewModel.attachObserver() + + onDispose { weatherViewModel.detachObserver() } + } + + LaunchedEffect(Unit) { + weatherViewModel.events.collectLatest { event -> + when (event) { + WeatherEvent.OpenLocationSettings -> { + context.startActivity( + Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS).apply { + flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP + } + ) + } + + WeatherEvent.OpenAppPermissionSettings -> { + context.startActivity( + Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply { + data = Uri.fromParts( + "package", + context.packageName, + null + ) + } + ) + } + + WeatherEvent.RequestLocationPermissions -> { + val shouldShow = activity?.let { + it.shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION) || + it.shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_COARSE_LOCATION) || + it.shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_BACKGROUND_LOCATION) + } ?: false + + if (shouldShow) { + weatherViewModel.onShouldShowPermissionRationale(true) + } else { + permissionLauncher.launch( + arrayOf( + Manifest.permission.ACCESS_FINE_LOCATION, + Manifest.permission.ACCESS_COARSE_LOCATION, + Manifest.permission.ACCESS_BACKGROUND_LOCATION + ) + ) + } + } + } + } + } + + screenState.dialog?.let { dialog -> + when (dialog) { + WeatherDialog.LocationDisabled -> { + AlertDialog( + onDismissRequest = { weatherViewModel.dismissDialog() }, + title = { Text(stringResource(R.string.weather_retrieve_location_dialog_title)) }, + text = { Text(stringResource(R.string.weather_retrieve_location_dialog_message)) }, + confirmButton = { + TextButton(onClick = { weatherViewModel.onOpenLocationSettingsConfirmed() }) { + Text(stringResource(R.string.weather_retrieve_location_dialog_enable_button)) + } + }, + dismissButton = { + TextButton(onClick = { weatherViewModel.dismissDialog() }) { + Text(stringResource(android.R.string.cancel)) + } + } + ) + } + + WeatherDialog.PermissionRationale -> { + AlertDialog( + onDismissRequest = { weatherViewModel.dismissDialog() }, + title = { Text(stringResource(R.string.weather_permission_dialog_title)) }, + text = { Text(stringResource(R.string.weather_permission_dialog_message)) }, + confirmButton = { + TextButton(onClick = { weatherViewModel.onOpenAppPermissionSettingsConfirmed() }) { + Text(stringResource(android.R.string.ok)) + } + }, + dismissButton = { + TextButton(onClick = { weatherViewModel.dismissDialog() }) { + Text(stringResource(android.R.string.cancel)) + } + } + ) + } + + WeatherDialog.OwmKey -> { + AlertDialog( + onDismissRequest = { weatherViewModel.dismissDialog() }, + title = { Text(stringResource(R.string.weather_provider_owm_key_title)) }, + text = { Text(stringResource(R.string.weather_provider_owm_key_message)) }, + confirmButton = { + TextButton(onClick = { weatherViewModel.dismissDialog() }) { + Text(stringResource(R.string.understood)) + } + } + ) + } + + WeatherDialog.YandexKey -> { + AlertDialog( + onDismissRequest = { weatherViewModel.dismissDialog() }, + title = { Text(stringResource(R.string.weather_provider_yandex_key_title)) }, + text = { Text(stringResource(R.string.weather_provider_yandex_key_message)) }, + confirmButton = { + TextButton(onClick = { weatherViewModel.dismissDialog() }) { + Text(stringResource(R.string.understood)) + } + } + ) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/components/WeatherIconPackBottomSheet.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/components/WeatherIconPackBottomSheet.kt new file mode 100644 index 000000000..838e2595f --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/components/WeatherIconPackBottomSheet.kt @@ -0,0 +1,112 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.common.components + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.Image +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.Check +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.ListItem +import androidx.compose.material3.ListItemDefaults +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.asImageBitmap +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.core.graphics.drawable.toBitmap +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.bottomsheets.CustomBottomSheet +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.features.xposed.lockscreen.common.models.WeatherIconPackItem + +@Composable +@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +fun WeatherIconPackBottomSheet( + iconPacks: List, + selectedIconPackIndex: Int, + onItemClick: (Int) -> Unit, + onDismiss: () -> Unit +) { + CustomBottomSheet( + title = stringResource(R.string.weather_icon_pack_title), + onDismissRequest = onDismiss + ) { contentPadding -> + LazyColumn( + modifier = Modifier.fillMaxWidth(), + contentPadding = contentPadding, + verticalArrangement = Arrangement.spacedBy(4.dp) + ) { + itemsIndexed(iconPacks) { index, pack -> + val isSelected = index == selectedIconPackIndex + + Surface( + modifier = Modifier + .fillMaxWidth() + .clickable { onItemClick(index) }, + shape = MaterialTheme.shapes.small, + color = MaterialTheme.colorScheme.surfaceVariant, + border = if (isSelected) { + BorderStroke( + width = 2.dp, + color = MaterialTheme.colorScheme.primary + ) + } else { + null + } + ) { + ListItem( + headlineContent = { Text(pack.label) }, + leadingContent = { + pack.drawable?.let { drawable -> + Image( + bitmap = drawable + .toBitmap(48, 48) + .asImageBitmap(), + contentDescription = null, + modifier = Modifier.size(48.dp) + ) + } + }, + trailingContent = { + if (isSelected) { + Icon( + imageVector = Icons.Rounded.Check, + contentDescription = null, + tint = MaterialTheme.colorScheme.primary + ) + } + }, + colors = ListItemDefaults.colors( + containerColor = Color.Transparent + ) + ) + } + } + } + } +} + +@Preview +@Composable +fun WeatherIconPackBottomSheetPreview() { + PreviewComposable { + WeatherIconPackBottomSheet( + iconPacks = emptyList(), + selectedIconPackIndex = 0, + onItemClick = {}, + onDismiss = {} + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/events/WeatherDialog.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/events/WeatherDialog.kt new file mode 100644 index 000000000..9300a272d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/events/WeatherDialog.kt @@ -0,0 +1,8 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.common.events + +sealed class WeatherDialog { + object LocationDisabled : WeatherDialog() + object PermissionRationale : WeatherDialog() + object OwmKey : WeatherDialog() + object YandexKey : WeatherDialog() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/events/WeatherEvent.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/events/WeatherEvent.kt new file mode 100644 index 000000000..29201dbdf --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/events/WeatherEvent.kt @@ -0,0 +1,7 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.common.events + +sealed class WeatherEvent { + object OpenLocationSettings : WeatherEvent() + object OpenAppPermissionSettings : WeatherEvent() + object RequestLocationPermissions : WeatherEvent() +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/models/WeatherIconPackItem.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/models/WeatherIconPackItem.kt new file mode 100644 index 000000000..6700431fb --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/models/WeatherIconPackItem.kt @@ -0,0 +1,9 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.common.models + +import android.graphics.drawable.Drawable + +data class WeatherIconPackItem( + val label: String, + val value: String, + val drawable: Drawable? +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/states/WeatherScreenState.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/states/WeatherScreenState.kt new file mode 100644 index 000000000..d6a82bb1a --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/states/WeatherScreenState.kt @@ -0,0 +1,11 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.common.states + +import com.drdisagree.iconify.features.xposed.lockscreen.common.events.WeatherDialog +import com.drdisagree.iconify.features.xposed.lockscreen.common.models.WeatherIconPackItem + +data class WeatherScreenState( + val dialog: WeatherDialog? = null, + val updateStatusSummary: String? = null, + val iconPacks: List = emptyList(), + val selectedIconPackIndex: Int = 0, +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/viewmodels/WeatherViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/viewmodels/WeatherViewModel.kt new file mode 100644 index 000000000..20ed10dfd --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/common/viewmodels/WeatherViewModel.kt @@ -0,0 +1,329 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.common.viewmodels + +import android.Manifest +import android.content.Context +import android.content.Intent +import android.content.pm.PackageManager +import android.graphics.drawable.Drawable +import android.location.LocationManager +import androidx.core.content.res.ResourcesCompat +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.BuildConfig +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.di.SharedPrefs +import com.drdisagree.iconify.core.preferences.PreferenceController +import com.drdisagree.iconify.core.preferences.toPrefValue +import com.drdisagree.iconify.core.utils.OmniJawsClient +import com.drdisagree.iconify.core.utils.weather.WeatherConfig +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.data.storage.PreferenceStorage +import com.drdisagree.iconify.features.xposed.lockscreen.common.events.WeatherDialog +import com.drdisagree.iconify.features.xposed.lockscreen.common.events.WeatherEvent +import com.drdisagree.iconify.features.xposed.lockscreen.common.models.WeatherIconPackItem +import com.drdisagree.iconify.features.xposed.lockscreen.common.states.WeatherScreenState +import com.drdisagree.iconify.services.schedulers.WeatherScheduler +import dagger.hilt.android.lifecycle.HiltViewModel +import dagger.hilt.android.qualifiers.ApplicationContext +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.util.Locale +import javax.inject.Inject + +@HiltViewModel +class WeatherViewModel @Inject constructor( + @param:ApplicationContext val context: Context, + val mWeatherClient: OmniJawsClient, + @param:SharedPrefs private val preferenceStorage: PreferenceStorage, +) : ViewModel() { + + private val prefController = PreferenceController(preferenceStorage) + + private val _screenState = MutableStateFlow(WeatherScreenState()) + val screenState: StateFlow = _screenState.asStateFlow() + + private val _events = MutableSharedFlow() + val events = _events.asSharedFlow() + + init { + viewModelScope.launch { + loadIconPacks() + } + } + + fun attachObserver() { + mWeatherClient.addObserver(omniJawsObserver) + handlePermissions() + } + + fun detachObserver() { + mWeatherClient.removeObserver(omniJawsObserver) + } + + private val omniJawsObserver = object : OmniJawsClient.OmniJawsObserver { + override fun weatherUpdated() { + queryAndUpdateWeather() + } + + override fun weatherError(errorReason: Int) { + val msg = when (errorReason) { + OmniJawsClient.EXTRA_ERROR_DISABLED -> { + context.getString(R.string.omnijaws_service_disabled) + } + + OmniJawsClient.EXTRA_ERROR_LOCATION -> { + context.getString(R.string.omnijaws_service_error_location) + } + + OmniJawsClient.EXTRA_ERROR_NETWORK -> { + context.getString(R.string.omnijaws_service_error_network) + } + + OmniJawsClient.EXTRA_ERROR_NO_PERMISSIONS -> { + context.getString(R.string.omnijaws_service_error_permissions) + } + + else -> { + context.getString(R.string.omnijaws_service_error_long) + } + } + _screenState.update { it.copy(updateStatusSummary = msg) } + } + } + + @Suppress("DiscouragedApi") + private suspend fun loadIconPacks() = withContext(Dispatchers.Default) { + val entries = mutableListOf() + val values = mutableListOf() + val drawables = mutableListOf() + + getAvailableWeatherIconPacks(entries, values, drawables) + + val items = entries.indices.map { i -> + WeatherIconPackItem( + label = entries[i] ?: "", + value = values[i] ?: "", + drawable = drawables[i] + ) + } + + val savedPack = WeatherConfig.getIconPack().toString() + var selectedIndex = values.indexOfFirst { it == savedPack } + if (selectedIndex == -1) { + selectedIndex = values.indexOfFirst { it == DEFAULT_WEATHER_ICON_PACKAGE } + if (selectedIndex == -1) selectedIndex = 0 + } + + withContext(Dispatchers.Main) { + _screenState.update { + it.copy( + iconPacks = items, + selectedIconPackIndex = selectedIndex + ) + } + } + } + + fun onLocationNameReceived() { + if (WeatherConfig.isEnabled() + && !prefController.getBoolean(XposedKey.WEATHER_CUSTOM_LOCATION) + ) { + checkLocationEnabled(force = true) + } + } + + fun onMainSwitchChanged(enabled: Boolean, key: XposedKey) { + WeatherConfig.setEnabled(enabled, key.name) + + if (enabled) { + handlePermissions() + enableService() + forceRefreshWeatherSettings() + } + } + + fun onWeatherProviderChanged(provider: String) { + forceRefreshWeatherSettings() + + when (provider) { + "1" if prefController.getString(XposedKey.WEATHER_OWM_KEY).isEmpty() -> { + _screenState.update { it.copy(dialog = WeatherDialog.OwmKey) } + } + + "2" if prefController.getString(XposedKey.WEATHER_YANDEX_KEY).isEmpty() -> { + _screenState.update { it.copy(dialog = WeatherDialog.YandexKey) } + } + } + } + + fun onCustomLocationChanged() { + forceRefreshWeatherSettings() + } + + fun onUpdateStatusClicked() { + forceRefreshWeatherSettings() + } + + fun onIconPackSelected(index: Int) { + val packs = _screenState.value.iconPacks + if (index !in packs.indices) return + + prefController.set(XposedKey.WEATHER_ICON_PACK, packs[index].value.toPrefValue()) + _screenState.update { it.copy(selectedIconPackIndex = index) } + + forceRefreshWeatherSettings() + } + + fun dismissDialog() { + _screenState.update { it.copy(dialog = null) } + } + + fun onOpenLocationSettingsConfirmed() { + dismissDialog() + emit(WeatherEvent.OpenLocationSettings) + } + + fun onOpenAppPermissionSettingsConfirmed() { + dismissDialog() + emit(WeatherEvent.OpenAppPermissionSettings) + } + + fun onPermissionResult(fineGranted: Boolean, coarseGranted: Boolean) { + if (fineGranted || coarseGranted) { + forceRefreshWeatherSettings() + } + } + + private fun handlePermissions() { + if (WeatherConfig.isEnabled() && + !prefController.getBoolean(XposedKey.WEATHER_CUSTOM_LOCATION) + ) { + checkLocationEnabled(force = false) + } else { + forceRefreshWeatherSettings() + } + } + + private fun hasPermissions(): Boolean = + context.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && + context.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED && + context.checkSelfPermission(Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_GRANTED + + private fun isLocationEnabled(): Boolean { + val lm = context.getSystemService(Context.LOCATION_SERVICE) as LocationManager + return lm.isLocationEnabled + } + + private fun checkLocationEnabled(force: Boolean) { + if (!isLocationEnabled()) { + _screenState.update { it.copy(dialog = WeatherDialog.LocationDisabled) } + } else { + checkLocationPermission(force) + } + } + + private fun checkLocationPermission(force: Boolean) { + if (!hasPermissions() && !prefController.getBoolean(XposedKey.WEATHER_CUSTOM_LOCATION)) { + // The composable will check shouldShowRationale and decide whether to show + // the rationale dialog or fire the system permission request directly. + // We emit the event and let the UI decide (mirrors requestLocationPermission logic). + emit(WeatherEvent.RequestLocationPermissions) + } else { + if (force) forceRefreshWeatherSettings() + queryAndUpdateWeather() + } + } + + fun onShouldShowPermissionRationale(shouldShow: Boolean) { + if (shouldShow) { + _screenState.update { it.copy(dialog = WeatherDialog.PermissionRationale) } + } + // If false the composable fires the system launcher directly (no dialog needed) + } + + private fun enableService() { + WeatherScheduler.scheduleUpdates(context) + } + + fun forceRefreshWeatherSettings() { + WeatherScheduler.scheduleUpdateNow(context) + } + + private fun queryAndUpdateWeather() { + mWeatherClient.queryWeather() + mWeatherClient.mCachedInfo?.let { info -> + _screenState.update { it.copy(updateStatusSummary = info.lastUpdateTime) } + } + } + + @Suppress("DiscouragedApi") + private fun getAvailableWeatherIconPacks( + entries: MutableList, + values: MutableList, + drawables: MutableList + ) { + val packageManager = context.packageManager + val i = Intent().apply { + action = BuildConfig.APPLICATION_ID + ".WeatherIconPack" + } + + for (r in packageManager.queryIntentActivities(i, 0)) { + val packageName = r.activityInfo.applicationInfo.packageName + val resources = context.resources + + 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 + ), + context.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 + ), + context.theme + ) + ) + } + + val label: String = r.activityInfo.loadLabel(packageManager).toString() + if (packageName == DEFAULT_WEATHER_ICON_PACKAGE) { + entries.add(0, label) + } else { + entries.add(label) + } + } + } + + private fun emit(event: WeatherEvent) { + viewModelScope.launch { _events.emit(event) } + } + + companion object { + private const val TAG = "WeatherViewModel" + private const val DEFAULT_WEATHER_ICON_PACKAGE = "${BuildConfig.APPLICATION_ID}.google" + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/depthwallpaper/components/DepthWallpaperExample.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/depthwallpaper/components/DepthWallpaperExample.kt new file mode 100644 index 000000000..7bf08a043 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/depthwallpaper/components/DepthWallpaperExample.kt @@ -0,0 +1,203 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.depthwallpaper.components + +import android.annotation.SuppressLint +import androidx.compose.animation.core.FastOutLinearInEasing +import androidx.compose.animation.core.FastOutSlowInEasing +import androidx.compose.animation.core.LinearEasing +import androidx.compose.animation.core.RepeatMode +import androidx.compose.animation.core.animateFloat +import androidx.compose.animation.core.infiniteRepeatable +import androidx.compose.animation.core.rememberInfiniteTransition +import androidx.compose.animation.core.tween +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.offset +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.widthIn +import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.painter.Painter +import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.IntOffset +import androidx.compose.ui.unit.dp +import androidx.compose.ui.zIndex +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import kotlin.math.roundToInt + +@SuppressLint("UnusedBoxWithConstraintsScope") +@Composable +fun DepthWallpaperExample( + modifier: Modifier = Modifier, + leftImage: Painter, + rightImage: Painter, + leftName: String = "Alice", + rightName: String = "Bob", + imageWidth: Dp = 130.dp, + gap: Dp = 48.dp, +) { + val density = LocalDensity.current + + val idleDurationMs = 800 + val moveDurationMs = 900 + val mergedPauseMs = 400 + val fadeOutDurationMs = 500 + + val infiniteTransition = rememberInfiniteTransition(label = "merge_loop") + + val totalCycle = idleDurationMs + moveDurationMs + mergedPauseMs + fadeOutDurationMs + + val cycleProgress by infiniteTransition.animateFloat( + initialValue = 0f, + targetValue = 1f, + animationSpec = infiniteRepeatable( + animation = tween(durationMillis = totalCycle, easing = LinearEasing), + repeatMode = RepeatMode.Restart + ), + label = "cycle_progress" + ) + + val idleFraction = idleDurationMs.toFloat() / totalCycle + val moveFraction = moveDurationMs.toFloat() / totalCycle + val pauseFraction = mergedPauseMs.toFloat() / totalCycle + + val moveProgress: Float = when { + cycleProgress < idleFraction -> 0f + cycleProgress < idleFraction + moveFraction -> + (cycleProgress - idleFraction) / moveFraction + + else -> 1f + } + + val fadeOutStart = idleFraction + moveFraction + pauseFraction + val fadeProgress: Float = when { + cycleProgress < fadeOutStart -> 0f + else -> ((cycleProgress - fadeOutStart) / (1f - fadeOutStart)).coerceIn(0f, 1f) + } + + val easedMove = FastOutSlowInEasing.transform(moveProgress) + val easedFade = FastOutLinearInEasing.transform(fadeProgress) + + BoxWithConstraints( + contentAlignment = Alignment.Center, + modifier = modifier + .fillMaxWidth() + .wrapContentHeight() + ) { + val halfImagePx = with(density) { (imageWidth / 2).toPx() } + val halfGapPx = with(density) { (gap / 2).toPx() } + + val travelPx = halfImagePx + halfGapPx + + val leftOffsetPx = (easedMove * travelPx).roundToInt() + val rightOffsetPx = (easedMove * travelPx).roundToInt() + + val nameFadeStart = 0.2f + val nameFadeEnd = 0.4f + val nameAlpha = when { + moveProgress < nameFadeStart -> 1f + moveProgress > nameFadeEnd -> 0f + else -> 1f - ((moveProgress - nameFadeStart) / (nameFadeEnd - nameFadeStart)) + }.coerceIn(0f, 1f) + + val imageAlpha = (1f - easedFade).coerceIn(0f, 1f) + + Row( + verticalAlignment = Alignment.Top, + horizontalArrangement = Arrangement.Center, + modifier = Modifier.fillMaxWidth() + ) { + ImageCard( + painter = leftImage, + name = leftName, + imageWidth = imageWidth, + imageAlpha = imageAlpha, + nameAlpha = nameAlpha * imageAlpha, + offset = IntOffset(x = leftOffsetPx, y = 0), + zIndex = 2f + ) + + Spacer(modifier = Modifier.width(gap)) + + ImageCard( + painter = rightImage, + name = rightName, + imageWidth = imageWidth, + imageAlpha = imageAlpha, + nameAlpha = nameAlpha * imageAlpha, + offset = IntOffset(x = -rightOffsetPx, y = 0), + zIndex = 1f + ) + } + } +} + +@Composable +private fun ImageCard( + painter: Painter, + name: String, + imageWidth: Dp, + imageAlpha: Float, + nameAlpha: Float, + offset: IntOffset, + zIndex: Float, +) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier + .offset { offset } + .zIndex(zIndex) + ) { + Image( + painter = painter, + contentDescription = name, + contentScale = ContentScale.FillWidth, + modifier = Modifier + .width(imageWidth) + .clip(MaterialTheme.shapes.medium) + .alpha(imageAlpha) + ) + + Spacer(modifier = Modifier.height(8.dp)) + + Text( + text = name, + color = MaterialTheme.colorScheme.onSurface.secondaryText(), + style = MaterialTheme.typography.bodyMedium, + textAlign = TextAlign.Center, + modifier = Modifier + .widthIn(max = imageWidth * 0.8f) + .alpha(nameAlpha) + ) + } +} + +@Preview(showBackground = true) +@Composable +fun DepthWallpaperExamplePreview() { + DepthWallpaperExample( + leftImage = painterResource(id = R.drawable.depth_wallpaper_example_fg), + rightImage = painterResource(id = R.drawable.depth_wallpaper_example_bg), + leftName = "Foreground", + rightName = "Background", + imageWidth = 120.dp, + ) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/depthwallpaper/screens/DepthWallpaperScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/depthwallpaper/screens/DepthWallpaperScreen.kt new file mode 100644 index 000000000..75cf9daa4 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/depthwallpaper/screens/DepthWallpaperScreen.kt @@ -0,0 +1,261 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.depthwallpaper.screens + +import android.content.Context +import android.content.Intent +import android.widget.Toast +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalInspectionMode +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.core.net.toUri +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleEventObserver +import androidx.lifecycle.compose.LocalLifecycleOwner +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.preferences.FilePickerType +import com.drdisagree.iconify.core.utils.AppUtils +import com.drdisagree.iconify.data.common.Const.AI_PLUGIN_PACKAGE +import com.drdisagree.iconify.data.common.Const.AI_PLUGIN_URL +import com.drdisagree.iconify.data.common.XposedConst.DEPTH_WALL_BG_FILE +import com.drdisagree.iconify.data.common.XposedConst.DEPTH_WALL_FG_FILE +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.xposed.lockscreen.depthwallpaper.components.DepthWallpaperExample +import com.drdisagree.iconify.helpers.toXposedSharedPath +import com.drdisagree.iconify.xposed.modules.extras.utils.BitmapSubjectSegmenter + +fun depthWallpaperPreferences( + context: Context? = null, + mlKitAvailable: Boolean? = null, + aiPluginInstalled: Boolean = false +) = preferenceScreen { + category { + switch( + key = XposedKey.LOCKSCREEN_DEPTH_WALLPAPER, + isMasterSwitch = true, + title = stringRes(R.string.enable_depth_wallpaper_title), + ) + } + + category { + composable( + key = "depth_wallpaper_example", + isVisible = { it.getBoolean(XposedKey.DEPTH_WALLPAPER_CUSTOM_IMAGE) }, + ) { + BoxWithConstraints(modifier = Modifier.fillMaxWidth()) { + val maxAvailableWidth = maxWidth + val horizontalGap = 28.dp + val centerGap = 48.dp + val availableWidth = maxAvailableWidth - (horizontalGap * 2) - centerGap + val imageWidth = (availableWidth / 2).coerceAtMost(120.dp) + + DepthWallpaperExample( + leftImage = painterResource(id = R.drawable.depth_wallpaper_example_fg), + rightImage = painterResource(id = R.drawable.depth_wallpaper_example_bg), + leftName = stringResource(R.string.background_image_title), + rightName = stringResource(R.string.foreground_image_title), + imageWidth = imageWidth, + gap = centerGap + ) + } + } + } + + category { + switch( + key = XposedKey.DEPTH_WALLPAPER_CUSTOM_IMAGE, + title = stringRes(R.string.enable_custom_depth_wallpaper_title), + summary = { _, _ -> stringRes(R.string.enable_custom_depth_wallpaper_desc) }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_DEPTH_WALLPAPER) } + ) + + listPref( + key = XposedKey.DEPTH_WALLPAPER_AI_MODE, + title = stringRes(R.string.depth_wallpaper_ai_mode), + entries = arrayRes(R.array.depth_wallpaper_mode_entries), + entryValues = arrayRes(R.array.depth_wallpaper_mode_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_DEPTH_WALLPAPER) }, + isVisible = { !it.getBoolean(XposedKey.DEPTH_WALLPAPER_CUSTOM_IMAGE) }, + ) + + action( + key = "xposed_depthwallpaper_aistatus", + title = stringRes(R.string.depth_wallpaper_ai_status), + summary = { prefs, _ -> + if (prefs.getString(XposedKey.DEPTH_WALLPAPER_AI_MODE) == "0") { + when (mlKitAvailable) { + true -> stringRes(R.string.depth_wallpaper_model_ready) + false -> stringRes(R.string.depth_wallpaper_model_not_available) + null -> stringRes(R.string.depth_wallpaper_model_checking) + } + } else { + if (aiPluginInstalled) { + stringRes(R.string.depth_wallpaper_ai_status_plugin_installed) + } else { + stringRes(R.string.depth_wallpaper_ai_status_plugin_not_installed) + } + } + }, + onClick = { _, prefs, _ -> + if (prefs.getString(XposedKey.DEPTH_WALLPAPER_AI_MODE) != "0") { + if (aiPluginInstalled) { + context?.startActivity( + context + .packageManager + .getLaunchIntentForPackage(AI_PLUGIN_PACKAGE)!! + ) + } else { + try { + context?.startActivity( + Intent( + Intent.ACTION_VIEW, + AI_PLUGIN_URL.toUri() + ) + ) + } catch (_: Exception) { + context?.let { + Toast.makeText( + it, + it.getString(R.string.toast_error), + Toast.LENGTH_SHORT + ).show() + } + } + } + } + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_DEPTH_WALLPAPER) }, + isVisible = { !it.getBoolean(XposedKey.DEPTH_WALLPAPER_CUSTOM_IMAGE) }, + ) + + filePicker( + key = XposedKey.DEPTH_WALLPAPER_BACKGROUND_IMAGE_FILE_URI, + title = stringRes(R.string.background_image_title), + summary = { _, _ -> stringRes(R.string.background_image_desc) }, + pickerType = FilePickerType.Image, + saveFileUri = true, + onFileSelected = { _, uriString -> + if (uriString.isNotEmpty()) { + uriString.toUri().toXposedSharedPath(DEPTH_WALL_BG_FILE.name) + } + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_DEPTH_WALLPAPER) }, + isVisible = { it.getBoolean(XposedKey.DEPTH_WALLPAPER_CUSTOM_IMAGE) }, + ) + + filePicker( + key = XposedKey.DEPTH_WALLPAPER_FOREGROUND_IMAGE_FILE_URI, + title = stringRes(R.string.foreground_image_title), + summary = { _, _ -> stringRes(R.string.foreground_image_desc) }, + pickerType = FilePickerType.Image, + saveFileUri = true, + onFileSelected = { _, uriString -> + if (uriString.isNotEmpty()) { + uriString.toUri().toXposedSharedPath(DEPTH_WALL_FG_FILE.name) + } + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_DEPTH_WALLPAPER) }, + isVisible = { it.getBoolean(XposedKey.DEPTH_WALLPAPER_CUSTOM_IMAGE) }, + ) + + slider( + key = XposedKey.DEPTH_WALLPAPER_FOREGROUND_IMAGE_OPACITY, + title = stringRes(R.string.foreground_image_alpha_title), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}%" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_DEPTH_WALLPAPER) } + ) + + switch( + key = XposedKey.DEPTH_WALLPAPER_SHOW_ON_AOD, + title = stringRes(R.string.depth_wallpaper_on_aod_title), + summary = { _, _ -> stringRes(R.string.depth_wallpaper_on_aod_desc) }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_DEPTH_WALLPAPER) } + ) + } + + category { + info( + key = "xposed_depth_wallpaper_info", + text = stringRes(R.string.hig_res_image_footer_info), + ) + } +} + +@Composable +fun DepthWallpaperScreen() { + val context = LocalContext.current + val previewMode = LocalInspectionMode.current + + var mlKitAvailable by remember { mutableStateOf(null) } + var aiPluginInstalled by remember { mutableStateOf(false) } + + LaunchedEffect(Unit) { + BitmapSubjectSegmenter(context) + .checkModelAvailability { response -> + mlKitAvailable = response.areModulesAvailable() + } + } + + if (!previewMode) { + val lifecycleOwner = LocalLifecycleOwner.current + + DisposableEffect(lifecycleOwner) { + val observer = LifecycleEventObserver { _, event -> + if (event == Lifecycle.Event.ON_RESUME) { + aiPluginInstalled = AppUtils.isAppInstalled(AI_PLUGIN_PACKAGE) + } + } + + lifecycleOwner.lifecycle.addObserver(observer) + + onDispose { + lifecycleOwner.lifecycle.removeObserver(observer) + } + } + } + + DepthWallpaperScreenContent( + context = context, + mlKitAvailable = mlKitAvailable, + aiPluginInstalled = aiPluginInstalled + ) +} + +@Composable +private fun DepthWallpaperScreenContent( + context: Context? = null, + mlKitAvailable: Boolean? = null, + aiPluginInstalled: Boolean = false +) { + PreferenceScreen( + items = depthWallpaperPreferences(context, mlKitAvailable, aiPluginInstalled), + title = stringResource(R.string.activity_title_depth_wallpaper), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun DepthWallpaperScreenPreview() { + PreviewComposable { + DepthWallpaperScreenContent() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/models/LocationBrowseItem.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/models/LocationBrowseItem.kt new file mode 100644 index 000000000..4a7226faf --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/models/LocationBrowseItem.kt @@ -0,0 +1,21 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.location.models + +data class LocationBrowseItem( + val cityExt: String, + private val countryId: String, + val city: String, + val lat: Double, + val lon: Double +) { + private val id: String get() = "$city,$countryId" + + override fun equals(other: Any?) = (other is LocationBrowseItem) && id == other.id + override fun hashCode(): Int { + var result = cityExt.hashCode() + result = 31 * result + countryId.hashCode() + result = 31 * result + city.hashCode() + result = 31 * result + lat.hashCode() + result = 31 * result + lon.hashCode() + return result + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/screens/LocationBrowseScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/screens/LocationBrowseScreen.kt new file mode 100644 index 000000000..68ab563cc --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/screens/LocationBrowseScreen.kt @@ -0,0 +1,192 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.location.screens + +import android.widget.Toast +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.Search +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon +import androidx.compose.material3.LinearWavyProgressIndicator +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.others.innerPaddingValues +import com.drdisagree.iconify.core.ui.components.scaffolds.AppScaffold +import com.drdisagree.iconify.features.xposed.lockscreen.location.models.LocationBrowseItem +import com.drdisagree.iconify.features.xposed.lockscreen.location.states.LocationBrowseUiState +import com.drdisagree.iconify.features.xposed.lockscreen.location.viewmodels.LocationBrowseViewModel +import com.drdisagree.iconify.features.xposed.lockscreen.common.viewmodels.WeatherViewModel + +@Composable +fun LocationBrowseScreen( + locationViewModel: LocationBrowseViewModel = hiltViewModel(), + weatherViewModel: WeatherViewModel = hiltViewModel() +) { + val context = LocalContext.current + val navController = LocalNavController.current + + val uiState by locationViewModel.uiState.collectAsStateWithLifecycle() + + val locationSavedString = stringResource(R.string.toast_selected_successfully) + + LocationBrowseScreenContent( + uiState = uiState, + onQueryChange = locationViewModel::onQueryChange, + onLocationClick = { item -> + locationViewModel.saveLocation(item) + weatherViewModel.onLocationNameReceived() + navController.popBackStack() + + Toast.makeText( + context, + locationSavedString, + Toast.LENGTH_SHORT + ).show() + } + ) +} + +@OptIn(ExperimentalMaterial3ExpressiveApi::class, ExperimentalMaterial3Api::class) +@Composable +private fun LocationBrowseScreenContent( + uiState: LocationBrowseUiState, + onQueryChange: (String) -> Unit, + onLocationClick: (LocationBrowseItem) -> Unit +) { + val scrollState = rememberScrollState() + + AppScaffold( + title = stringResource(R.string.custom_location_title), + showBackIcon = true, + ) { innerPadding, _ -> + val padding = innerPaddingValues( + innerPadding = innerPadding, + start = 16.dp, + end = 16.dp, + top = 16.dp + ) + + Column( + modifier = Modifier + .fillMaxSize() + .verticalScroll(scrollState) + .padding(padding) + .padding(bottom = 16.dp) + ) { + OutlinedTextField( + value = uiState.query, + onValueChange = onQueryChange, + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 16.dp), + singleLine = true, + leadingIcon = { + Icon( + imageVector = Icons.Rounded.Search, + contentDescription = null + ) + }, + label = { Text("Search for a location") } + ) + + if (uiState.isLoading) { + LinearWavyProgressIndicator( + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 16.dp) + ) + } + + uiState.locations.forEachIndexed { index, item -> + Column( + modifier = Modifier + .fillMaxWidth() + .clip(MaterialTheme.shapes.small) + .clickable { onLocationClick(item) } + .padding(vertical = 8.dp, horizontal = 16.dp) + ) { + Text( + text = item.city, + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onSurface + ) + Text( + text = item.cityExt, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface.secondaryText() + ) + } + + if (index < uiState.locations.lastIndex) HorizontalDivider( + modifier = Modifier.padding( + vertical = 4.dp + ) + ) + } + } + } +} + +@Preview(showBackground = true) +@Composable +fun LocationScreenPreview() { + val sampleLocations = listOf( + LocationBrowseItem( + cityExt = "NY, USA", + countryId = "US", + city = "New York", + lat = 40.7128, + lon = -74.0060 + ), + LocationBrowseItem( + cityExt = "London, UK", + countryId = "GB", + city = "London", + lat = 51.5074, + lon = -0.1278 + ), + LocationBrowseItem( + cityExt = "Tokyo, Japan", + countryId = "JP", + city = "Tokyo", + lat = 35.6895, + lon = 139.6917 + ) + ) + + val mockState = LocationBrowseUiState( + query = "Lo", + isLoading = false, + locations = sampleLocations + ) + + PreviewComposable { + LocationBrowseScreenContent( + uiState = mockState, + onQueryChange = {}, + onLocationClick = {} + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/states/LocationBrowseUiState.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/states/LocationBrowseUiState.kt new file mode 100644 index 000000000..bb583efcb --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/states/LocationBrowseUiState.kt @@ -0,0 +1,9 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.location.states + +import com.drdisagree.iconify.features.xposed.lockscreen.location.models.LocationBrowseItem + +data class LocationBrowseUiState( + val query: String = "", + val locations: List = emptyList(), + val isLoading: Boolean = false +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/viewmodels/LocationBrowseViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/viewmodels/LocationBrowseViewModel.kt new file mode 100644 index 000000000..cff4cf263 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/location/viewmodels/LocationBrowseViewModel.kt @@ -0,0 +1,117 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.location.viewmodels + +import android.content.Context +import android.net.Uri +import android.util.Log +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.drdisagree.iconify.core.utils.weather.WeatherConfig +import com.drdisagree.iconify.features.xposed.lockscreen.location.models.LocationBrowseItem +import com.drdisagree.iconify.features.xposed.lockscreen.location.states.LocationBrowseUiState +import dagger.hilt.android.lifecycle.HiltViewModel +import dagger.hilt.android.qualifiers.ApplicationContext +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.FlowPreview +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.collectLatest +import kotlinx.coroutines.flow.debounce +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.update +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import org.json.JSONObject +import java.util.Locale +import javax.inject.Inject + +@OptIn(FlowPreview::class) +@HiltViewModel +class LocationBrowseViewModel @Inject constructor( + @param:ApplicationContext val context: Context +) : ViewModel() { + + private val _uiState = MutableStateFlow(LocationBrowseUiState()) + val uiState: StateFlow = _uiState.asStateFlow() + + init { + // Debounce: react to query changes with a 750 ms delay + viewModelScope.launch { + _uiState + .map { it.query } + .distinctUntilChanged() + .debounce(DEBOUNCE_MS) + .collectLatest { query -> + if (query.isBlank()) return@collectLatest + + _uiState.update { it.copy(isLoading = true) } + + val results = fetchLocations(query) + _uiState.update { it.copy(locations = results, isLoading = false) } + } + } + } + + fun onQueryChange(newQuery: String) { + if (newQuery.isEmpty()) { + _uiState.update { LocationBrowseUiState() } + } else { + _uiState.update { it.copy(query = newQuery, isLoading = true) } + } + } + + fun saveLocation(item: LocationBrowseItem) { + WeatherConfig.apply { + setLocationId(context, item.lat.toString(), item.lon.toString()) + setLocationName(context, item.city) + } + } + + private suspend fun fetchLocations(input: String): List = + withContext(Dispatchers.IO) { + val results = mutableListOf() + + try { + val lang = Locale.getDefault().language.replaceFirst("_".toRegex(), "-") + val url = String.format(URL_PLACES, Uri.encode(input.trim()), lang) + val response = java.net.URL(url).readText() + val jsonResults = JSONObject(response).getJSONArray("geonames") + val count = jsonResults.length() + + 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.isEmpty()) "" else "$adminName, ") + country + val lat = result.getDouble("lat") + val lon = result.getDouble("lng") + + val item = LocationBrowseItem(cityExt, countryId, city, lat, lon) + if (!results.contains(item)) { + results.add(item) + if (results.size == 5) break + } + } + } catch (e: Exception) { + Log.e(TAG, "Received malformed location data input=$input", e) + } + + results + } + + companion object { + private const val TAG = "LocationViewModel" + private const val DEBOUNCE_MS = 750L + private const val URL_PLACES = + "https://secure.geonames.org/searchJSON?name_startsWith=%s&lang=%s&username=omnijaws&maxRows=20" + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/main/screens/LockscreenScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/main/screens/LockscreenScreen.kt new file mode 100644 index 000000000..fd3bf91a6 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/main/screens/LockscreenScreen.kt @@ -0,0 +1,129 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.main.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.iconRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey + +val lockscreenPreferences = preferenceScreen { + category { + action( + key = "xposedLockscreenClock", + icon = iconRes(R.drawable.ic_xposed_clock), + title = stringRes(R.string.activity_title_lockscreen_clock), + summary = { _, _ -> stringRes(R.string.activity_desc_lockscreen_clock) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.Clock) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedLockscreenWeather", + icon = iconRes(R.drawable.ic_xposed_lockscreen_weather), + title = stringRes(R.string.activity_title_lockscreen_weather), + summary = { _, _ -> stringRes(R.string.activity_desc_lockscreen_weather) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.Weather) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedLockscreenWidgets", + icon = iconRes(R.drawable.ic_xposed_lockscreen_widgets), + title = stringRes(R.string.activity_title_lockscreen_widget), + summary = { _, _ -> stringRes(R.string.activity_desc_lockscreen_widget) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.Widgets.Root) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedDepthWallpaper", + icon = iconRes(R.drawable.ic_xposed_depth_wallpaper), + title = stringRes(R.string.activity_title_depth_wallpaper), + summary = { _, _ -> stringRes(R.string.activity_desc_depth_wallpaper) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.DepthWallpaper) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedAlbumArt", + icon = iconRes(R.drawable.ic_xposed_album_art), + title = stringRes(R.string.activity_title_lockscreen_album_art), + summary = { _, _ -> stringRes(R.string.media_art_summary) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.MediaAlbumArt) { + launchSingleTop = true + } + } + ) + } + + category(title = stringRes(R.string.settings_section_title_general)) { + switch( + key = XposedKey.LOCKSCREEN_WALLPAPER_BLUR, + title = stringRes(R.string.ls_wallpaper_blur_title), + summary = { _, _ -> stringRes(R.string.ls_wallpaper_blur_desc) }, + ) + + slider( + key = XposedKey.LOCKSCREEN_WALLPAPER_BLUR_RADIUS, + title = stringRes(R.string.ls_wallpaper_blur_radius_title), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}%" }, + isVisible = { pref -> pref.getBoolean(XposedKey.LOCKSCREEN_WALLPAPER_BLUR) } + ) + + switch( + key = XposedKey.HIDE_LOCKSCREEN_LOCK_ICON, + title = stringRes(R.string.hide_ls_lock_icon_title), + summary = { _, _ -> stringRes(R.string.hide_ls_lock_icon_desc) }, + ) + + switch( + key = XposedKey.HIDE_LOCKSCREEN_CARRIER, + title = stringRes(R.string.hide_ls_carrier_title), + summary = { _, _ -> stringRes(R.string.hide_ls_carrier_desc) }, + ) + + switch( + key = XposedKey.HIDE_LOCKSCREEN_STATUSBAR, + title = stringRes(R.string.hide_ls_statusbar_title), + summary = { _, _ -> stringRes(R.string.hide_ls_statusbar_desc) }, + ) + } +} + +@Composable +fun LockscreenScreen() { + PreferenceScreen( + items = lockscreenPreferences, + title = stringResource(R.string.activity_title_lockscreen), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun LockscreenScreenPreview() { + PreviewComposable { + LockscreenScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/weather/screens/LockscreenWeatherScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/weather/screens/LockscreenWeatherScreen.kt new file mode 100644 index 000000000..23283a6b9 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/weather/screens/LockscreenWeatherScreen.kt @@ -0,0 +1,369 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.weather.screens + +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.core.net.toUri +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.preferences.FilePickerType +import com.drdisagree.iconify.data.common.XposedConst.LOCKSCREEN_WEATHER_FONT_FILE +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.common.viewmodels.SystemActionViewModel +import com.drdisagree.iconify.features.xposed.lockscreen.common.components.WeatherEventHandler +import com.drdisagree.iconify.features.xposed.lockscreen.common.components.WeatherIconPackBottomSheet +import com.drdisagree.iconify.features.xposed.lockscreen.common.viewmodels.WeatherViewModel +import com.drdisagree.iconify.helpers.maskKey +import com.drdisagree.iconify.helpers.toXposedSharedPath + +fun lsWeatherPreferences( + weatherViewModel: WeatherViewModel? = null, + updateStatusSummary: String? = null, + selectedPackLabel: String = "", + onIconPackClick: () -> Unit = {} +) = preferenceScreen { + category { + switch( + key = XposedKey.LOCKSCREEN_WEATHER, + isMasterSwitch = true, + title = stringRes(R.string.lockscreen_weather_title), + ) + } + + category { + listPref( + key = XposedKey.WEATHER_UPDATE_INTERVAL, + title = stringRes(R.string.update_interval_title), + entries = arrayRes(R.array.update_interval_entries), + entryValues = arrayRes(R.array.update_interval_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + action( + key = "weather_update_status", + title = stringRes(R.string.last_update_time), + summary = { _, _ -> + if (updateStatusSummary != null) stringRes(updateStatusSummary) + else stringRes(R.string.not_available) + }, + onClick = { _, _, _ -> weatherViewModel?.onUpdateStatusClicked() }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + } + + category { + listPref( + key = XposedKey.WEATHER_PROVIDER, + title = stringRes(R.string.weather_provider), + entries = arrayRes(R.array.weather_provider_entries), + entryValues = arrayRes(R.array.weather_provider_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + editText( + key = XposedKey.WEATHER_OWM_KEY, + title = stringRes(R.string.weather_api_key), + summary = { prefs, _ -> + val currentVal = prefs.getString(XposedKey.WEATHER_OWM_KEY) + + if (currentVal.isEmpty()) stringRes("No key provided") + else stringRes(currentVal.maskKey()) + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + isVisible = { it.getString(XposedKey.WEATHER_PROVIDER) in setOf("1") }, + ) + + editText( + key = XposedKey.WEATHER_YANDEX_KEY, + title = stringRes(R.string.yandex_api_key), + summary = { prefs, _ -> + val currentVal = prefs.getString(XposedKey.WEATHER_YANDEX_KEY) + + if (currentVal.isEmpty()) stringRes("No key provided") + else stringRes(currentVal.maskKey()) + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + isVisible = { it.getString(XposedKey.WEATHER_PROVIDER) in setOf("2") }, + ) + + twoTargetSwitch( + key = XposedKey.WEATHER_CUSTOM_LOCATION, + title = stringRes(R.string.custom_location_title), + summary = { prefs, key -> + val currentVal = prefs.getBoolean( + key, + XposedKey.WEATHER_CUSTOM_LOCATION.default as Boolean + ) + if (currentVal) stringRes(R.string.general_on) + else stringRes(R.string.general_off) + }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.Location) { + launchSingleTop = true + } + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + } + + category { + listPref( + key = XposedKey.WEATHER_UNITS, + title = stringRes(R.string.units_title), + entries = arrayRes(R.array.units_entries), + entryValues = arrayRes(R.array.units_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + switch( + key = XposedKey.WEATHER_SHOW_LOCATION, + title = stringRes(R.string.weather_show_location), + summary = { prefs, key -> + val currentVal = + prefs.getBoolean(key, XposedKey.WEATHER_SHOW_LOCATION.default as Boolean) + if (currentVal) stringRes(R.string.general_on) + else stringRes(R.string.general_off) + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + switch( + key = XposedKey.WEATHER_SHOW_CONDITION, + title = stringRes(R.string.weather_show_condition), + summary = { prefs, key -> + val currentVal = + prefs.getBoolean(key, XposedKey.WEATHER_SHOW_CONDITION.default as Boolean) + if (currentVal) stringRes(R.string.general_on) + else stringRes(R.string.general_off) + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + switch( + key = XposedKey.WEATHER_SHOW_HUMIDITY, + title = stringRes(R.string.weather_show_humidity), + summary = { prefs, key -> + val currentVal = + prefs.getBoolean(key, XposedKey.WEATHER_SHOW_HUMIDITY.default as Boolean) + if (currentVal) stringRes(R.string.general_on) + else stringRes(R.string.general_off) + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + switch( + key = XposedKey.WEATHER_SHOW_WIND, + title = stringRes(R.string.weather_show_wind), + summary = { prefs, key -> + val currentVal = + prefs.getBoolean(key, XposedKey.WEATHER_SHOW_WIND.default as Boolean) + if (currentVal) stringRes(R.string.general_on) + else stringRes(R.string.general_off) + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + } + + category { + switch( + key = XposedKey.WEATHER_TEXT_COLOR_ENABLED, + title = stringRes(R.string.weather_custom_color_switch_title), + summary = { prefs, key -> + val currentVal = prefs.getBoolean( + key, + XposedKey.WEATHER_TEXT_COLOR_ENABLED.default as Boolean + ) + if (currentVal) stringRes(R.string.general_on) + else stringRes(R.string.general_off) + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + colorPicker( + key = XposedKey.WEATHER_TEXT_COLOR, + title = stringRes(R.string.weather_custom_color_title), + summary = { _, _ -> stringRes(R.string.weather_custom_color_summary) }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + isVisible = { it.getBoolean(XposedKey.WEATHER_TEXT_COLOR_ENABLED) } + ) + + action( + key = XposedKey.WEATHER_ICON_PACK, + title = stringRes(R.string.weather_icon_pack_title), + summary = { _, _ -> stringRes(selectedPackLabel) }, + onClick = { _, _, _ -> onIconPackClick() }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + listPref( + key = XposedKey.WEATHER_STYLE, + title = stringRes(R.string.lockscreen_weather_selection_title), + entries = arrayRes(R.array.lockscreen_weather_bg_entries), + entryValues = arrayRes(R.array.lockscreen_weather_bg_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + filePicker( + key = XposedKey.WEATHER_CUSTOM_FONT_FILE_URI, + title = stringRes(R.string.choose_weather_font), + pickerType = FilePickerType.Font, + saveFileUri = true, + onFileSelected = { _, uriString -> + if (uriString.isNotEmpty()) { + uriString.toUri().toXposedSharedPath(LOCKSCREEN_WEATHER_FONT_FILE.name) + } + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) } + ) + } + + category { + switch( + key = XposedKey.WEATHER_CENTER_VIEW, + title = stringRes(R.string.weather_center_view_title), + summary = { _, _ -> stringRes(R.string.weather_center_view_summary) }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) }, + ) + + slider( + key = XposedKey.WEATHER_TEXT_SIZE, + title = stringRes(R.string.weather_text_size), + min = 13f, + max = 24f, + steps = 10, + valueLabel = { "${it.toInt()}px" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) } + ) + + slider( + key = XposedKey.WEATHER_ICON_SIZE, + title = stringRes(R.string.weather_image_size), + min = 13f, + max = 24f, + steps = 10, + valueLabel = { "${it.toInt()}px" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) } + ) + + slider( + key = XposedKey.WEATHER_CUSTOM_MARGINS_SIDE, + title = stringRes(R.string.weather_margin_side), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) } + ) + + slider( + key = XposedKey.WEATHER_CUSTOM_MARGINS_TOP, + title = stringRes(R.string.weather_margin_top), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) } + ) + + slider( + key = XposedKey.WEATHER_CUSTOM_MARGINS_BOTTOM, + title = stringRes(R.string.weather_margin_bottom), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WEATHER) } + ) + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun LockscreenWeatherScreen( + weatherViewModel: WeatherViewModel = hiltViewModel(), + systemActionViewModel: SystemActionViewModel = hiltViewModel(), +) { + val screenState by weatherViewModel.screenState.collectAsStateWithLifecycle() + + PreferenceListener { event -> + when (event.key) { + XposedKey.LOCKSCREEN_WEATHER.name -> { + val isEnabled = (event.newValue as PrefValue.BoolValue).v + weatherViewModel.onMainSwitchChanged(isEnabled, XposedKey.LOCKSCREEN_WEATHER) + systemActionViewModel.shouldRestartSystemUI() + } + + XposedKey.WEATHER_CUSTOM_LOCATION.name -> { + weatherViewModel.onCustomLocationChanged() + } + + XposedKey.WEATHER_PROVIDER.name -> { + val provider = (event.newValue as PrefValue.StringValue).v + weatherViewModel.onWeatherProviderChanged(provider) + } + } + } + + WeatherEventHandler(weatherViewModel = weatherViewModel) + + var showIconPackSheet by rememberSaveable { mutableStateOf(false) } + + if (showIconPackSheet) { + WeatherIconPackBottomSheet( + iconPacks = screenState.iconPacks, + selectedIconPackIndex = screenState.selectedIconPackIndex, + onItemClick = { weatherViewModel.onIconPackSelected(it) }, + onDismiss = { showIconPackSheet = false } + ) + } + + val selectedPackLabel = screenState.iconPacks + .getOrNull(screenState.selectedIconPackIndex) + ?.label + ?: stringResource(R.string.not_available) + + LockscreenWeatherScreenContent( + weatherViewModel = weatherViewModel, + updateStatusSummary = screenState.updateStatusSummary, + selectedPackLabel = selectedPackLabel, + onIconPackClick = { showIconPackSheet = true }, + ) +} + +@Composable +private fun LockscreenWeatherScreenContent( + weatherViewModel: WeatherViewModel? = null, + updateStatusSummary: String? = null, + selectedPackLabel: String = "", + onIconPackClick: () -> Unit = {} +) { + PreferenceScreen( + items = lsWeatherPreferences( + weatherViewModel = weatherViewModel, + updateStatusSummary = updateStatusSummary, + selectedPackLabel = selectedPackLabel, + onIconPackClick = onIconPackClick + ), + title = stringResource(R.string.activity_title_lockscreen_weather), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun LockscreenWeatherScreenPreview() { + PreviewComposable { + LockscreenWeatherScreenContent() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/widgets/main/screens/LockscreenWidgetsScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/widgets/main/screens/LockscreenWidgetsScreen.kt new file mode 100644 index 000000000..1b1d46be7 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/widgets/main/screens/LockscreenWidgetsScreen.kt @@ -0,0 +1,383 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.widgets.main.screens + +import android.text.TextUtils +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.utils.weather.WeatherConfig +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.common.viewmodels.SystemActionViewModel +import com.drdisagree.iconify.features.xposed.lockscreen.common.viewmodels.WeatherViewModel +import com.drdisagree.iconify.services.schedulers.WeatherScheduler +import java.util.stream.Collectors + +fun lsWidgetsPreferences(isWeatherSettingsVisible: Boolean = false) = preferenceScreen { + category { + switch( + key = XposedKey.LOCKSCREEN_WIDGETS, + isMasterSwitch = true, + title = stringRes(R.string.lockscreen_widgets_enabled_title), + ) + } + + category(title = stringRes(R.string.lockscreen_display_widgets_title)) { + switch( + key = XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET, + title = stringRes(R.string.lockscreen_display_widgets_title), + summary = { _, _ -> stringRes(R.string.lockscreen_display_widgets_summary) }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) } + ) + + listPref( + key = XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET_STYLE, + title = stringRes(R.string.lockscreen_device_widget_style_title), + entries = arrayRes(R.array.lockscreen_device_widget_entries), + entryValues = arrayRes(R.array.lockscreen_device_widget_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET) }, + ) + + switch( + key = XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET_CUSTOM_COLORS, + title = stringRes(R.string.widgets_custom_color), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_LINEAR_PROGRESS_COLOR, + title = stringRes(R.string.linear_progress_color), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { + it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET_CUSTOM_COLORS) && + it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET) + } + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_CIRCULAR_PROGRESS_COLOR, + title = stringRes(R.string.circular_progress_color), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { + it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET_CUSTOM_COLORS) && + it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET) + } + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_TEXT_COLOR, + title = stringRes(R.string.text_color), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { + it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET_CUSTOM_COLORS) && + it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET) + } + ) + + editText( + key = XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_DEVICE_NAME, + title = stringRes(R.string.custom_device_name), + summary = { prefs, _ -> + val currentVal = prefs.getString(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_DEVICE_NAME) + + if (currentVal.isNotEmpty()) stringRes(currentVal) + else stringRes(R.string.custom_device_name_summary) + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_DEVICE_INFO_WIDGET) }, + ) + } + + category(title = stringRes(R.string.large_widgets_category_title)) { + listPref( + key = XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET1, + title = stringRes(R.string.main_custom_widget_1), + entries = arrayRes(R.array.lockscreen_widgets_entries), + entryValues = arrayRes(R.array.lockscreen_widgets_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + ) + + listPref( + key = XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET2, + title = stringRes(R.string.main_custom_widget_2), + entries = arrayRes(R.array.lockscreen_widgets_entries), + entryValues = arrayRes(R.array.lockscreen_widgets_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + ) + } + + category(title = stringRes(R.string.mini_widgets_category_title)) { + listPref( + key = XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET1, + title = stringRes(R.string.custom_widget_1), + entries = arrayRes(R.array.lockscreen_widgets_entries), + entryValues = arrayRes(R.array.lockscreen_widgets_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + ) + + listPref( + key = XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET2, + title = stringRes(R.string.custom_widget_2), + entries = arrayRes(R.array.lockscreen_widgets_entries), + entryValues = arrayRes(R.array.lockscreen_widgets_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + ) + + listPref( + key = XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET3, + title = stringRes(R.string.custom_widget_3), + entries = arrayRes(R.array.lockscreen_widgets_entries), + entryValues = arrayRes(R.array.lockscreen_widgets_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + ) + + listPref( + key = XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET4, + title = stringRes(R.string.custom_widget_4), + entries = arrayRes(R.array.lockscreen_widgets_entries), + entryValues = arrayRes(R.array.lockscreen_widgets_values), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + ) + } + + category(title = stringRes(R.string.widgets_custom_color)) { + switch( + key = XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS, + title = stringRes(R.string.widgets_custom_color_title), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET_ACTIVE_COLOR, + title = stringRes(R.string.big_widget_active), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET_INACTIVE_COLOR, + title = stringRes(R.string.big_widget_inactive), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET_ICON_ACTIVE_COLOR, + title = stringRes(R.string.big_widget_icon_active), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET_ICON_INACTIVE_COLOR, + title = stringRes(R.string.big_widget_icon_inactive), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET_ACTIVE_COLOR, + title = stringRes(R.string.mini_widget_active), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET_INACTIVE_COLOR, + title = stringRes(R.string.mini_widget_inactive), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET_ICON_ACTIVE_COLOR, + title = stringRes(R.string.mini_widget_icon_active), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS) }, + ) + + colorPicker( + key = XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET_ICON_INACTIVE_COLOR, + title = stringRes(R.string.mini_widget_icon_inactive), + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS_CUSTOM_WIDGET_COLORS) }, + ) + } + + category(title = stringRes(R.string.activity_title_miscellaneous)) { + action( + key = "xposed_lockscreen_widget_weather_settings", + title = stringRes(R.string.weather_settings), + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.Widgets.Weather) { + launchSingleTop = true + } + }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) }, + isVisible = { isWeatherSettingsVisible } + ) + + slider( + key = XposedKey.LOCKSCREEN_WIDGETS_TOP_MARGIN, + title = stringRes(R.string.lockscreen_clock_top_margin_title), + min = -100f, + max = 400f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) } + ) + + slider( + key = XposedKey.LOCKSCREEN_WIDGETS_BOTTOM_MARGIN, + title = stringRes(R.string.lockscreen_clock_bottom_margin_title), + min = -100f, + max = 400f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) } + ) + + slider( + key = XposedKey.LOCKSCREEN_WIDGETS_CORNER_RADIUS, + title = stringRes(R.string.lockscreen_widgets_roundness), + min = 0f, + max = 140f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) } + ) + + slider( + key = XposedKey.LOCKSCREEN_WIDGETS_VIEW_SCALE, + title = stringRes(R.string.lockscreen_widgets_scale), + min = 0.5f, + max = 1.5f, + steps = 9, + valueLabel = { "${it.toInt()}x" }, + isEnabled = { it.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) } + ) + } + + category { + info( + key = "xposed_lockscreen_widget_info", + text = stringRes(R.string.custom_tiles_footer_info) + ) + } +} + +@Composable +fun LockscreenWidgetsScreen( + weatherViewModel: WeatherViewModel = hiltViewModel(), + systemActionViewModel: SystemActionViewModel? = hiltViewModel(), +) { + val context = LocalContext.current + val prefController = LocalPreferenceController.current + + var isWeatherSettingsVisible by rememberSaveable { mutableStateOf(false) } + + fun List.replaceEmptyWithNone(): MutableList { + return stream() + .map { s: String? -> if (TextUtils.isEmpty(s)) "none" else s } + .collect(Collectors.toList()) + } + + fun getMainWidgetsList() = listOf( + prefController.getString(XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET1), + prefController.getString(XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET2) + ).replaceEmptyWithNone() + + fun getExtraWidgetsList() = listOf( + prefController.getString(XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET1), + prefController.getString(XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET2), + prefController.getString(XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET3), + prefController.getString(XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET4) + ).replaceEmptyWithNone() + + fun isWeatherTileEnabled(): Boolean { + return (getMainWidgetsList() + getExtraWidgetsList()).any { it.contains("weather") } + } + + LaunchedEffect(Unit) { + val wasWeatherEnabled = WeatherConfig.isEnabled() + val mWeatherClient = weatherViewModel.mWeatherClient + val widgetsEnabled = prefController.getBoolean(XposedKey.LOCKSCREEN_WIDGETS) + isWeatherSettingsVisible = isWeatherTileEnabled() + val weatherEnabled = widgetsEnabled && isWeatherSettingsVisible + + if (weatherEnabled && wasWeatherEnabled && mWeatherClient.mCachedInfo != null) { + if (System.currentTimeMillis() - mWeatherClient.mCachedInfo!!.timeStamp > 3600000) { + WeatherScheduler.scheduleUpdateNow(context) + } + } else if (weatherEnabled) { + WeatherScheduler.scheduleUpdates(context) + WeatherScheduler.scheduleUpdateNow(context) + } + } + + PreferenceListener { event -> + when (event.key) { + XposedKey.LOCKSCREEN_WIDGETS.name -> { + val isEnabled = (event.newValue as PrefValue.BoolValue).v + weatherViewModel.onMainSwitchChanged(isEnabled, XposedKey.LOCKSCREEN_WIDGETS) + systemActionViewModel?.shouldRestartSystemUI() + } + + XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET1.name, + XposedKey.LOCKSCREEN_WIDGETS_LARGE_WIDGET2.name -> { + prefController.setString( + XposedKey.LOCKSCREEN_WIDGETS_MAIN, + TextUtils.join(",", getMainWidgetsList()) + ) + } + + XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET1.name, + XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET2.name, + XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET3.name, + XposedKey.LOCKSCREEN_WIDGETS_MINI_WIDGET4.name -> { + prefController.setString( + XposedKey.LOCKSCREEN_WIDGETS_EXTRAS, + TextUtils.join(",", getExtraWidgetsList()) + ) + } + + XposedKey.LOCKSCREEN_WIDGETS_MAIN.name, + XposedKey.LOCKSCREEN_WIDGETS_EXTRAS.name -> { + isWeatherSettingsVisible = isWeatherTileEnabled() + } + } + } + + LockscreenWidgetsScreenContent(isWeatherSettingsVisible = isWeatherSettingsVisible) +} + +@Composable +private fun LockscreenWidgetsScreenContent(isWeatherSettingsVisible: Boolean = false) { + PreferenceScreen( + items = lsWidgetsPreferences(isWeatherSettingsVisible), + title = stringResource(R.string.activity_title_lockscreen_widget), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun LockscreenWidgetsScreenPreview() { + PreviewComposable { + LockscreenWidgetsScreenContent() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/widgets/weather/screens/LockscreenWidgetsWeatherScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/widgets/weather/screens/LockscreenWidgetsWeatherScreen.kt new file mode 100644 index 000000000..637c60411 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/lockscreen/widgets/weather/screens/LockscreenWidgetsWeatherScreen.kt @@ -0,0 +1,190 @@ +package com.drdisagree.iconify.features.xposed.lockscreen.widgets.weather.screens + +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.xposed.lockscreen.common.components.WeatherEventHandler +import com.drdisagree.iconify.features.xposed.lockscreen.common.components.WeatherIconPackBottomSheet +import com.drdisagree.iconify.features.xposed.lockscreen.common.viewmodels.WeatherViewModel +import com.drdisagree.iconify.helpers.maskKey + +fun lsWidgetsWeatherPreferences( + weatherViewModel: WeatherViewModel?, + updateStatusSummary: String?, + selectedPackLabel: String, + onIconPackClick: () -> Unit +) = preferenceScreen { + category { + listPref( + key = XposedKey.WEATHER_UPDATE_INTERVAL, + title = stringRes(R.string.update_interval_title), + entries = arrayRes(R.array.update_interval_entries), + entryValues = arrayRes(R.array.update_interval_values), + ) + + action( + key = "weather_update_status", + title = stringRes(R.string.last_update_time), + summary = { _, _ -> + if (updateStatusSummary != null) stringRes(updateStatusSummary) + else stringRes(R.string.not_available) + }, + onClick = { _, _, _ -> weatherViewModel?.onUpdateStatusClicked() }, + ) + + listPref( + key = XposedKey.WEATHER_PROVIDER, + title = stringRes(R.string.weather_provider), + entries = arrayRes(R.array.weather_provider_entries), + entryValues = arrayRes(R.array.weather_provider_values), + ) + + editText( + key = XposedKey.WEATHER_OWM_KEY, + title = stringRes(R.string.weather_api_key), + summary = { prefs, _ -> + val currentVal = prefs.getString(XposedKey.WEATHER_OWM_KEY) + + if (currentVal.isEmpty()) stringRes("No key provided") + else stringRes(currentVal.maskKey()) + }, + isVisible = { it.getString(XposedKey.WEATHER_PROVIDER) in setOf("1") }, + ) + + editText( + key = XposedKey.WEATHER_YANDEX_KEY, + title = stringRes(R.string.yandex_api_key), + summary = { prefs, _ -> + val currentVal = prefs.getString(XposedKey.WEATHER_YANDEX_KEY) + + if (currentVal.isEmpty()) stringRes("No key provided") + else stringRes(currentVal.maskKey()) + }, + isVisible = { it.getString(XposedKey.WEATHER_PROVIDER) in setOf("2") }, + ) + + listPref( + key = XposedKey.WEATHER_UNITS, + title = stringRes(R.string.units_title), + entries = arrayRes(R.array.units_entries), + entryValues = arrayRes(R.array.units_values), + ) + + twoTargetSwitch( + key = XposedKey.WEATHER_CUSTOM_LOCATION, + title = stringRes(R.string.custom_location_title), + summary = { prefs, key -> + val currentVal = prefs.getBoolean( + key, + XposedKey.WEATHER_CUSTOM_LOCATION.default as Boolean + ) + if (currentVal) stringRes(R.string.general_on) + else stringRes(R.string.general_off) + }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.Location) { + launchSingleTop = true + } + }, + ) + + action( + key = XposedKey.WEATHER_ICON_PACK, + title = stringRes(R.string.weather_icon_pack_title), + summary = { _, _ -> stringRes(selectedPackLabel) }, + onClick = { _, _, _ -> onIconPackClick() }, + ) + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun LockscreenWidgetsWeatherScreen(weatherViewModel: WeatherViewModel = hiltViewModel()) { + val screenState by weatherViewModel.screenState.collectAsStateWithLifecycle() + + PreferenceListener { event -> + when (event.key) { + XposedKey.WEATHER_CUSTOM_LOCATION.name -> { + weatherViewModel.onCustomLocationChanged() + } + + XposedKey.WEATHER_PROVIDER.name -> { + val provider = (event.newValue as PrefValue.StringValue).v + weatherViewModel.onWeatherProviderChanged(provider) + } + } + } + + WeatherEventHandler(weatherViewModel = weatherViewModel) + + var showIconPackSheet by rememberSaveable { mutableStateOf(false) } + + if (showIconPackSheet) { + WeatherIconPackBottomSheet( + iconPacks = screenState.iconPacks, + selectedIconPackIndex = screenState.selectedIconPackIndex, + onItemClick = { weatherViewModel.onIconPackSelected(it) }, + onDismiss = { showIconPackSheet = false } + ) + } + + val selectedPackLabel = screenState.iconPacks + .getOrNull(screenState.selectedIconPackIndex) + ?.label + ?: stringResource(R.string.not_available) + + LockscreenWidgetsWeatherScreenContent( + weatherViewModel = weatherViewModel, + updateStatusSummary = screenState.updateStatusSummary, + selectedPackLabel = selectedPackLabel, + onIconPackClick = { showIconPackSheet = true }, + ) +} + +@Composable +private fun LockscreenWidgetsWeatherScreenContent( + weatherViewModel: WeatherViewModel?, + updateStatusSummary: String?, + selectedPackLabel: String, + onIconPackClick: () -> Unit +) { + PreferenceScreen( + items = lsWidgetsWeatherPreferences( + weatherViewModel = weatherViewModel, + updateStatusSummary = updateStatusSummary, + selectedPackLabel = selectedPackLabel, + onIconPackClick = onIconPackClick + ), + title = stringResource(R.string.activity_title_xposed_weather_settings), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun LockscreenWidgetsWeatherScreenPreview() { + PreviewComposable { + LockscreenWidgetsWeatherScreenContent( + null, + null, + "" + ) {} + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/main/components/HookCheckCard.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/main/components/HookCheckCard.kt new file mode 100644 index 000000000..644c1bcbd --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/main/components/HookCheckCard.kt @@ -0,0 +1,213 @@ +package com.drdisagree.iconify.features.xposed.main.components + +import android.content.ComponentName +import android.content.Intent +import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.EnterTransition +import androidx.compose.animation.ExitTransition +import androidx.compose.animation.expandVertically +import androidx.compose.animation.fadeIn +import androidx.compose.animation.fadeOut +import androidx.compose.animation.shrinkVertically +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.defaultMinSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.ripple +import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalInspectionMode +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleEventObserver +import androidx.lifecycle.compose.LocalLifecycleOwner +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.extensions.secondaryText +import com.drdisagree.iconify.core.ui.components.others.withHaptic +import com.drdisagree.iconify.core.ui.utils.CARD_CORNER_LARGE +import com.drdisagree.iconify.data.common.Preferences +import com.drdisagree.iconify.features.xposed.main.viewmodels.HookCheckViewModel +import kotlinx.coroutines.delay + +@Composable +fun HookCheckCard( + modifier: Modifier = Modifier, + viewModel: HookCheckViewModel = hiltViewModel(), +) { + val context = LocalContext.current + val previewMode = LocalInspectionMode.current + val uiState by viewModel.uiState.collectAsStateWithLifecycle() + + var showDialog by rememberSaveable { mutableStateOf(false) } + + if (showDialog) { + AlertDialog( + onDismissRequest = { showDialog = false }, + title = { + Text(text = stringResource(R.string.attention)) + }, + text = { + val message = if (!uiState.hasBootlooped) { + buildString { + if (Preferences.isXposedOnlyMode) { + append(stringResource(R.string.xposed_only_desc)) + append("\n\n") + } + append(stringResource(R.string.lsposed_warn)) + } + } else { + stringResource(R.string.lsposed_bootloop_warn) + } + Text(text = message) + }, + confirmButton = { + TextButton(onClick = withHaptic { showDialog = false }) { + Text(stringResource(R.string.understood)) + } + } + ) + } + + var showCard by rememberSaveable { mutableStateOf(false) } + var hasChanged by rememberSaveable { mutableStateOf(false) } + + val targetVisible by remember(uiState.isHooked, uiState.hasBootlooped) { + derivedStateOf { !uiState.isHooked || uiState.hasBootlooped } + } + + LaunchedEffect(targetVisible) { + delay(800) + showCard = targetVisible + } + + LaunchedEffect(showCard) { + if (showCard != targetVisible) { + hasChanged = true + } + } + + if (!previewMode) { + val lifecycleOwner = LocalLifecycleOwner.current + + DisposableEffect(lifecycleOwner) { + val observer = LifecycleEventObserver { _, event -> + if (event == Lifecycle.Event.ON_RESUME) { + viewModel.initializeHookCheck() + } + } + + lifecycleOwner.lifecycle.addObserver(observer) + + onDispose { + lifecycleOwner.lifecycle.removeObserver(observer) + } + } + } + + AnimatedVisibility( + visible = showCard, + enter = if (hasChanged) fadeIn() + expandVertically() else EnterTransition.None, + exit = if (hasChanged) fadeOut() + shrinkVertically() else ExitTransition.None, + ) { + val interactionSource = remember { MutableInteractionSource() } + val containerColor = MaterialTheme.colorScheme.error + val shape = RoundedCornerShape(CARD_CORNER_LARGE) + + Row( + modifier = modifier + .fillMaxWidth() + .clip(shape) + .background(containerColor, shape) + .clickable( + interactionSource = interactionSource, + indication = ripple(), + onClick = withHaptic { + // Launch LSPosed Manager + try { + context.startActivity( + Intent(Intent.ACTION_MAIN).apply { + component = ComponentName( + "org.lsposed.manager", + "org.lsposed.manager.ui.activity.MainActivity" + ) + addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + } + ) + } catch (_: Exception) { + } + } + ) + .padding(horizontal = 16.dp, vertical = 14.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(16.dp) + ) { + Icon( + painter = painterResource(R.drawable.ic_xposed_disabled), + contentDescription = null, + tint = MaterialTheme.colorScheme.onError, + modifier = Modifier.size(24.dp), + ) + Column(modifier = Modifier.weight(1f)) { + Text( + text = stringResource( + if (uiState.hasBootlooped) R.string.xposed_module_bootlooped_title + else R.string.xposed_module_disabled_title + ), + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onError, + ) + Spacer(Modifier.height(2.dp)) + Text( + text = stringResource( + if (uiState.hasBootlooped) R.string.xposed_module_bootlooped_desc + else R.string.xposed_module_disabled_desc + ), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onError.secondaryText(), + ) + } + TextButton( + colors = ButtonDefaults.textButtonColors( + containerColor = MaterialTheme.colorScheme.errorContainer, + contentColor = MaterialTheme.colorScheme.onErrorContainer, + ), + contentPadding = PaddingValues(horizontal = 12.dp, vertical = 6.dp), + modifier = Modifier.defaultMinSize(minWidth = 1.dp, minHeight = 1.dp), + onClick = withHaptic { showDialog = true } + ) { + Text(text = stringResource(R.string.more)) + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/main/screens/XposedScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/main/screens/XposedScreen.kt new file mode 100644 index 000000000..20432e0d9 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/main/screens/XposedScreen.kt @@ -0,0 +1,120 @@ +package com.drdisagree.iconify.features.xposed.main.screens + +import androidx.activity.compose.LocalActivity +import androidx.compose.foundation.layout.padding +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalInspectionMode +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.iconRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.utils.AppUtils.launchAppThrowError +import com.drdisagree.iconify.core.utils.AppUtils.openUrl +import com.drdisagree.iconify.data.common.Const.PL_ENHANCED_PACKAGE +import com.drdisagree.iconify.data.common.Const.PL_ENHANCED_URL +import com.drdisagree.iconify.features.xposed.main.components.HookCheckCard + +fun xposedPreferences( + onLauncherClick: () -> Unit = {} +) = preferenceScreen { + composable(key = "xposedHookCheck") { + val previewMode = LocalInspectionMode.current + + if (!previewMode) { + HookCheckCard(modifier = Modifier.padding(bottom = 16.dp)) + } + } + + category { + action( + key = "xposedBackgroundChip", + icon = iconRes(R.drawable.ic_tweaks_statusbar), + title = stringRes(R.string.activity_title_statusbar), + summary = { _, _ -> stringRes(R.string.activity_desc_statusbar) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Statusbar.Root) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedQuickSettings", + icon = iconRes(R.drawable.ic_xposed_quick_settings), + title = stringRes(R.string.activity_title_quick_settings), + summary = { _, _ -> stringRes(R.string.activity_desc_quick_settings) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.QuickSettings.Root) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedLockscreen", + icon = iconRes(R.drawable.ic_xposed_lockscreen), + title = stringRes(R.string.activity_title_lockscreen), + summary = { _, _ -> stringRes(R.string.activity_desc_lockscreen) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Lockscreen.Root) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedVolumePanel", + icon = iconRes(R.drawable.ic_tweaks_volume), + title = stringRes(R.string.activity_title_volume_panel), + summary = { _, _ -> stringRes(R.string.activity_desc_volume_panel) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.VolumePanel) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedLauncher", + icon = iconRes(R.drawable.ic_launcher), + title = stringRes(R.string.activity_title_xposed_launcher), + summary = { _, _ -> stringRes(R.string.activity_desc_xposed_launcher) }, + onClick = { _, _, _ -> onLauncherClick() } + ) + } +} + +@Composable +fun XposedScreen() { + val context = LocalContext.current + val activity = LocalActivity.current + + PreferenceScreen( + items = xposedPreferences( + onLauncherClick = { + try { + launchAppThrowError(activity!!, PL_ENHANCED_PACKAGE) + } catch (_: Exception) { + openUrl(context, PL_ENHANCED_URL) + } + } + ), + title = stringResource(R.string.navbar_xposed) + ) +} + +@Preview(showBackground = true) +@Composable +fun XposedScreenPreview() { + PreviewComposable { + XposedScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/main/states/HookCheckUiState.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/main/states/HookCheckUiState.kt new file mode 100644 index 000000000..9d3ac5a0d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/main/states/HookCheckUiState.kt @@ -0,0 +1,7 @@ +package com.drdisagree.iconify.features.xposed.main.states + +data class HookCheckUiState( + val isHooked: Boolean = false, + val hasBootlooped: Boolean = false, + val hookCheckCompleted: Boolean = false +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/main/viewmodels/HookCheckViewModel.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/main/viewmodels/HookCheckViewModel.kt new file mode 100644 index 000000000..ef798dd3b --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/main/viewmodels/HookCheckViewModel.kt @@ -0,0 +1,148 @@ +package com.drdisagree.iconify.features.xposed.main.viewmodels + +import android.annotation.SuppressLint +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.os.CountDownTimer +import android.os.Handler +import android.os.Looper +import androidx.lifecycle.ViewModel +import com.drdisagree.iconify.R +import com.drdisagree.iconify.data.common.Const.ACTION_HOOK_CHECK_REQUEST +import com.drdisagree.iconify.data.common.Const.ACTION_HOOK_CHECK_RESULT +import com.drdisagree.iconify.data.common.Preferences.XPOSED_HOOK_CHECK +import com.drdisagree.iconify.data.config.RPrefs +import com.drdisagree.iconify.features.xposed.main.states.HookCheckUiState +import com.drdisagree.iconify.xposed.utils.BootLoopProtector.PACKAGE_STRIKE_KEY_KEY +import dagger.hilt.android.lifecycle.HiltViewModel +import dagger.hilt.android.qualifiers.ApplicationContext +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.update +import javax.inject.Inject + +@HiltViewModel +class HookCheckViewModel @Inject constructor( + @param:ApplicationContext val context: Context +) : ViewModel() { + + private val _uiState = MutableStateFlow(HookCheckUiState()) + val uiState: StateFlow = _uiState.asStateFlow() + + private val handler = Handler(Looper.getMainLooper()) + private val delayedHandler = Handler(Looper.getMainLooper()) + private var isHookSuccessful = false + + private val hookPackages: Array = + context.resources.getStringArray(R.array.module_scope) + + private val intentFilterHookedSystemUI = IntentFilter().apply { + addAction(ACTION_HOOK_CHECK_RESULT) + } + + private val delayedHookCheck = Runnable { + if (!_uiState.value.isHooked) { + RPrefs.putBoolean(XPOSED_HOOK_CHECK, false) + + var bootlooped = false + for (packageName in hookPackages) { + val strikeKey = "$PACKAGE_STRIKE_KEY_KEY$packageName" + if (RPrefs.getInt(strikeKey, 0) >= 3) { + bootlooped = true + break + } + } + + _uiState.update { + it.copy( + isHooked = false, + hasBootlooped = bootlooped, + hookCheckCompleted = true + ) + } + } + } + + private val checkSystemUIHooked = Runnable { + checkXposedHooked() + } + + private val receiverHookedSystemUI = object : BroadcastReceiver() { + override fun onReceive(context: Context, intent: Intent) { + if (intent.action == ACTION_HOOK_CHECK_RESULT) { + isHookSuccessful = true + + try { + delayedHandler.removeCallbacks(delayedHookCheck) + } catch (_: Exception) { + } + + RPrefs.putBoolean(XPOSED_HOOK_CHECK, true) + _uiState.update { it.copy(isHooked = true, hookCheckCompleted = true) } + } + } + } + + @SuppressLint("UnspecifiedRegisterReceiverFlag") + fun initializeHookCheck() { + val lastKnownHooked = RPrefs.getBoolean(XPOSED_HOOK_CHECK, false) + _uiState.update { + it.copy( + isHooked = lastKnownHooked, + hookCheckCompleted = false + ) + } + + delayedHandler.postDelayed(delayedHookCheck, 1000) + + context.registerReceiver( + receiverHookedSystemUI, + intentFilterHookedSystemUI, + Context.RECEIVER_EXPORTED + ) + + handler.post(checkSystemUIHooked) + } + + 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 (_: Exception) { + } + + RPrefs.putBoolean(XPOSED_HOOK_CHECK, false) + _uiState.update { it.copy(isHooked = false, hookCheckCompleted = true) } + } + } + }.start() + + Thread { + try { + context.sendBroadcast(Intent().setAction(ACTION_HOOK_CHECK_REQUEST)) + } catch (_: Exception) { + } + }.start() + } + + override fun onCleared() { + super.onCleared() + try { + handler.removeCallbacks(checkSystemUIHooked) + delayedHandler.removeCallbacks(delayedHookCheck) + context.unregisterReceiver(receiverHookedSystemUI) + } catch (_: Exception) { + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/headerimage/screens/HeaderImageScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/headerimage/screens/HeaderImageScreen.kt new file mode 100644 index 000000000..8268412bf --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/headerimage/screens/HeaderImageScreen.kt @@ -0,0 +1,105 @@ +package com.drdisagree.iconify.features.xposed.quicksettings.headerimage.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.core.net.toUri +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.preferences.FilePickerType +import com.drdisagree.iconify.data.common.XposedConst.HEADER_IMAGE_FILE +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.helpers.toXposedSharedPath + +val headerImagePreferences = preferenceScreen { + category { + switch( + key = XposedKey.CUSTOM_HEADER_IMAGE, + isMasterSwitch = true, + title = stringRes(R.string.activity_title_header_image), + ) + } + + category { + filePicker( + key = XposedKey.HEADER_IMAGE_FILE_URI, + title = stringRes(R.string.header_image_title), + pickerType = FilePickerType.Image, + saveFileUri = true, + onFileSelected = { _, uriString -> + if (uriString.isNotEmpty()) { + uriString.toUri().toXposedSharedPath(HEADER_IMAGE_FILE.name) + } + }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_HEADER_IMAGE) } + ) + + slider( + key = XposedKey.HEADER_IMAGE_HEIGHT, + title = stringRes(R.string.header_image_height_title), + min = 40f, + max = 400f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_HEADER_IMAGE) } + ) + + slider( + key = XposedKey.HEADER_IMAGE_OPACITY, + title = stringRes(R.string.header_image_opacity), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}%" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_HEADER_IMAGE) } + ) + + slider( + key = XposedKey.HEADER_IMAGE_BOTTOM_FADE_AMOUNT, + title = stringRes(R.string.header_image_bottom_fade), + min = 0f, + max = 120f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_HEADER_IMAGE) } + ) + + switch( + key = XposedKey.HEADER_IMAGE_ZOOM_TO_FIT, + title = stringRes(R.string.header_image_zoom_to_fit_title), + summary = { _, _ -> stringRes(R.string.header_image_zoom_to_fit_desc) }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_HEADER_IMAGE) } + ) + + switch( + key = XposedKey.HEADER_IMAGE_HIDE_IN_LANDSCAPE, + title = stringRes(R.string.header_image_hide_in_landscape_title), + summary = { _, _ -> stringRes(R.string.header_image_hide_in_landscape_desc) }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_HEADER_IMAGE) } + ) + } + + category { + info( + key = "header_image_info", + text = stringRes(R.string.hig_res_image_footer_info), + ) + } +} + +@Composable +fun HeaderImageScreen() { + PreferenceScreen( + items = headerImagePreferences, + title = stringResource(R.string.activity_title_header_image), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun HeaderImageScreenPreview() { + PreviewComposable { + HeaderImageScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/main/screens/QuickSettingsScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/main/screens/QuickSettingsScreen.kt new file mode 100644 index 000000000..6a2fdae00 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/main/screens/QuickSettingsScreen.kt @@ -0,0 +1,210 @@ +package com.drdisagree.iconify.features.xposed.quicksettings.main.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.iconRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.common.viewmodels.SystemActionViewModel + +val quickSettingsPreferences = preferenceScreen { + category { + action( + key = "xposedTransparencyBlur", + icon = iconRes(R.drawable.ic_xposed_transparency_blur), + title = stringRes(R.string.activity_title_transparency_blur), + summary = { _, _ -> stringRes(R.string.activity_desc_transparency_blur) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.QuickSettings.Transparency) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedHeaderImage", + icon = iconRes(R.drawable.ic_xposed_header_image), + title = stringRes(R.string.activity_title_header_image), + summary = { _, _ -> stringRes(R.string.activity_desc_header_image) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.QuickSettings.HeaderImage) { + launchSingleTop = true + } + } + ) + + action( + key = "xposedThemes", + icon = iconRes(R.drawable.ic_xposed_themes), + title = stringRes(R.string.activity_title_themes), + summary = { _, _ -> stringRes(R.string.activity_desc_themes) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.QuickSettings.Themes) { + launchSingleTop = true + } + } + ) + } + + category(title = stringRes(R.string.section_title_qs_margin)) { + twoTargetSwitch( + key = XposedKey.CUSTOM_QS_MARGINS, + title = stringRes(R.string.custom_qs_margin_title), + summary = { _, _ -> stringRes(R.string.custom_qs_margin_desc) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.QuickSettings.Margins) { + launchSingleTop = true + } + } + ) + } + + category(title = stringRes(R.string.section_title_notifications)) { + switch( + key = XposedKey.COLORED_NOTIFICATION_ICON_SWITCH, + title = stringRes(R.string.colored_qs_notification_title), + summary = { _, _ -> stringRes(R.string.colored_qs_notification_desc) }, + ) + + switch( + key = XposedKey.COLORED_NOTIFICATION_VIEW_SWITCH, + title = stringRes(R.string.colorize_notification_view_title), + summary = { _, _ -> stringRes(R.string.colorize_notification_view_desc) }, + ) + + switch( + key = XposedKey.COLORED_NOTIFICATION_ALTERNATIVE_SWITCH, + title = stringRes(R.string.colorize_notification_alternative_color_generation_title), + summary = { _, _ -> stringRes(R.string.colorize_notification_alternative_color_generation_desc) }, + isVisible = { pref -> pref.getBoolean(XposedKey.COLORED_NOTIFICATION_VIEW_SWITCH) } + ) + } + + category(title = stringRes(R.string.section_headsup_title)) { + switch( + key = XposedKey.NOTIFICATION_HEADS_UP_BLUR, + title = stringRes(R.string.notification_headsup_blur_title), + summary = { _, _ -> stringRes(R.string.notification_headsup_blur_desc) }, + ) + + slider( + key = XposedKey.NOTIFICATION_HEADS_UP_BLUR_RADIUS, + title = stringRes(R.string.notification_headsup_blur_intensity_title), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}%" }, + isVisible = { pref -> pref.getBoolean(XposedKey.NOTIFICATION_HEADS_UP_BLUR) } + ) + + slider( + key = XposedKey.NOTIFICATION_HEADS_UP_TRANSPARENCY, + title = stringRes(R.string.notification_headsup_blur_transparency_title), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}%" }, + isVisible = { pref -> pref.getBoolean(XposedKey.NOTIFICATION_HEADS_UP_BLUR) } + ) + } + + category(title = stringRes(R.string.section_title_media_player)) { + switch( + key = XposedKey.COMPACT_MEDIA_PLAYER, + title = stringRes(R.string.compact_media_player_title), + summary = { _, _ -> stringRes(R.string.compact_media_player_desc) }, + ) + + switch( + key = XposedKey.BLUR_MEDIA_PLAYER_ARTWORK, + title = stringRes(R.string.media_player_artwork_blur_title), + summary = { _, _ -> stringRes(R.string.media_player_artwork_blur_desc) }, + ) + + slider( + key = XposedKey.BLUR_MEDIA_PLAYER_ARTWORK_RADIUS, + title = stringRes(R.string.media_player_artwork_blur_radius_title), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}%" }, + isVisible = { pref -> pref.getBoolean(XposedKey.BLUR_MEDIA_PLAYER_ARTWORK) } + ) + } + + category(title = stringRes(R.string.section_title_qs_elements)) { + switch( + key = XposedKey.HIDE_QS_SILENT_TEXT, + title = stringRes(R.string.hide_qs_silent_text_title), + summary = { _, _ -> stringRes(R.string.hide_qs_silent_text_desc) }, + ) + + switch( + key = XposedKey.HIDE_QS_FOOTER_BUTTONS, + title = stringRes(R.string.hide_qs_footer_buttons_title), + summary = { _, _ -> stringRes(R.string.hide_qs_footer_buttons_desc) }, + ) + + switch( + key = XposedKey.QS_PANEL_HIDE_CARRIER, + title = stringRes(R.string.hide_carrier_group_title), + summary = { _, _ -> stringRes(R.string.hide_carrier_group_desc) }, + ) + + switch( + key = XposedKey.HIDE_STATUS_ICONS, + title = stringRes(R.string.hide_status_icons_title), + summary = { _, _ -> stringRes(R.string.hide_status_icons_desc) }, + ) + } + + category(title = stringRes(R.string.section_title_others)) { + switch( + key = XposedKey.FIX_QS_TILE_COLOR, + title = stringRes(R.string.fix_qs_tile_color_title), + summary = { _, _ -> stringRes(R.string.fix_qs_tile_color_desc) }, + ) + + switch( + key = XposedKey.FIX_NOTIFICATION_COLOR, + title = stringRes(R.string.fix_notification_color_title), + summary = { _, _ -> stringRes(R.string.fix_notification_color_desc) }, + ) + + switch( + key = XposedKey.FIX_NOTIFICATION_FOOTER_BUTTON_COLOR, + title = stringRes(R.string.fix_notification_footer_button_color_title), + summary = { _, _ -> stringRes(R.string.fix_notification_footer_button_color_desc) }, + ) + } +} + +@Composable +fun QuickSettingsScreen( + systemActionViewModel: SystemActionViewModel? = hiltViewModel(), +) { + PreferenceListener(key = null) { event -> + when (event.key) { + XposedKey.CUSTOM_QS_MARGINS.name -> systemActionViewModel?.shouldRestartSystemUI() + } + } + + PreferenceScreen( + items = quickSettingsPreferences, + title = stringResource(R.string.activity_title_quick_settings), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun SettingsScreenPreview() { + PreviewComposable { + QuickSettingsScreen(null) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/margins/screens/QsMarginsScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/margins/screens/QsMarginsScreen.kt new file mode 100644 index 000000000..c6dd080fa --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/margins/screens/QsMarginsScreen.kt @@ -0,0 +1,100 @@ +package com.drdisagree.iconify.features.xposed.quicksettings.margins.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.common.viewmodels.SystemActionViewModel + +val qsMarginsPreferences = preferenceScreen { + category(title = stringRes(R.string.section_title_transparency)) { + switch( + key = XposedKey.CUSTOM_QS_MARGINS, + isMasterSwitch = true, + title = stringRes(R.string.custom_qs_margin_title), + ) + } + + category(title = stringRes(R.string.section_title_portrait)) { + slider( + key = XposedKey.QQS_TOP_MARGIN_PORTRAIT, + title = stringRes(R.string.qqs_panel_top_margin_title), + min = 20f, + max = 300f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_MARGINS) } + ) + + slider( + key = XposedKey.QS_TOP_MARGIN_PORTRAIT, + title = stringRes(R.string.qs_panel_top_margin_title), + min = 20f, + max = 300f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_MARGINS) } + ) + } + + category(title = stringRes(R.string.section_title_landscape)) { + slider( + key = XposedKey.QQS_TOP_MARGIN_LANDSCAPE, + title = stringRes(R.string.qqs_panel_top_margin_title), + min = 0f, + max = 300f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_MARGINS) } + ) + + slider( + key = XposedKey.QS_TOP_MARGIN_LANDSCAPE, + title = stringRes(R.string.qs_panel_top_margin_title), + min = 0f, + max = 300f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_MARGINS) } + ) + } + + category { + info( + key = "qs_margins_info", + text = stringRes(R.string.qs_panel_top_margin_info), + ) + } +} + +@Composable +fun QsMarginsScreen( + systemActionViewModel: SystemActionViewModel? = hiltViewModel(), +) { + PreferenceListener(key = null) { event -> + when (event.key) { + XposedKey.CUSTOM_QS_MARGINS.name, + XposedKey.QQS_TOP_MARGIN_PORTRAIT.name, + XposedKey.QS_TOP_MARGIN_PORTRAIT.name, + XposedKey.QQS_TOP_MARGIN_LANDSCAPE.name, + XposedKey.QS_TOP_MARGIN_LANDSCAPE.name -> systemActionViewModel?.shouldRestartSystemUI() + } + } + + PreferenceScreen( + items = qsMarginsPreferences, + title = stringResource(R.string.activity_title_qs_panel_margin), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun QsMarginsScreenPreview() { + PreviewComposable { + QsMarginsScreen(null) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/themes/screens/QsThemesScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/themes/screens/QsThemesScreen.kt new file mode 100644 index 000000000..1014436a5 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/themes/screens/QsThemesScreen.kt @@ -0,0 +1,163 @@ +package com.drdisagree.iconify.features.xposed.quicksettings.themes.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.common.viewmodels.SystemActionViewModel + +val qsThemesPreferences = preferenceScreen { + category { + switch( + key = XposedKey.CUSTOM_QS_THEME, + isMasterSwitch = true, + title = stringRes("Quick settings theme"), + ) + } + + category(title = "Active Tile Colors") { + colorPicker( + key = XposedKey.ACTIVE_QS_TILE_BACKGROUND_COLOR, + title = stringRes("Tile background color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.ACTIVE_QS_TILE_ICON_COLOR, + title = stringRes("Icon color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.ACTIVE_QS_TILE_ICON_BACKGROUND_COLOR, + title = stringRes("Icon background color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.ACTIVE_QS_TILE_LABEL_COLOR, + title = stringRes("Label color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.ACTIVE_QS_TILE_SECONDARY_LABEL_COLOR, + title = stringRes("Secondary label color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + } + + category(title = "Inactive Tile Colors") { + colorPicker( + key = XposedKey.INACTIVE_QS_TILE_BACKGROUND_COLOR, + title = stringRes("Tile background color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.INACTIVE_QS_TILE_ICON_COLOR, + title = stringRes("Icon color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.INACTIVE_QS_TILE_ICON_BACKGROUND_COLOR, + title = stringRes("Icon background color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.INACTIVE_QS_TILE_LABEL_COLOR, + title = stringRes("Label color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.INACTIVE_QS_TILE_SECONDARY_LABEL_COLOR, + title = stringRes("Secondary label color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + } + + category(title = "Disabled Tile Colors") { + colorPicker( + key = XposedKey.UNAVAILABLE_QS_TILE_BACKGROUND_COLOR, + title = stringRes("Tile background color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.UNAVAILABLE_QS_TILE_ICON_COLOR, + title = stringRes("Icon color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.UNAVAILABLE_QS_TILE_ICON_BACKGROUND_COLOR, + title = stringRes("Icon background color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.UNAVAILABLE_QS_TILE_LABEL_COLOR, + title = stringRes("Label color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + + colorPicker( + key = XposedKey.UNAVAILABLE_QS_TILE_SECONDARY_LABEL_COLOR, + title = stringRes("Secondary label color"), + isEnabled = { it.getBoolean(XposedKey.CUSTOM_QS_THEME) } + ) + } +} + +@Composable +fun QsThemesScreen( + systemActionViewModel: SystemActionViewModel? = hiltViewModel(), +) { + PreferenceListener(key = null) { event -> + when (event.key) { + XposedKey.CUSTOM_QS_THEME.name, + XposedKey.ACTIVE_QS_TILE_BACKGROUND_COLOR.name, + XposedKey.ACTIVE_QS_TILE_ICON_COLOR.name, + XposedKey.ACTIVE_QS_TILE_ICON_BACKGROUND_COLOR.name, + XposedKey.ACTIVE_QS_TILE_LABEL_COLOR.name, + XposedKey.ACTIVE_QS_TILE_SECONDARY_LABEL_COLOR.name, + XposedKey.INACTIVE_QS_TILE_BACKGROUND_COLOR.name, + XposedKey.INACTIVE_QS_TILE_ICON_COLOR.name, + XposedKey.INACTIVE_QS_TILE_ICON_BACKGROUND_COLOR.name, + XposedKey.INACTIVE_QS_TILE_LABEL_COLOR.name, + XposedKey.INACTIVE_QS_TILE_SECONDARY_LABEL_COLOR.name, + XposedKey.UNAVAILABLE_QS_TILE_BACKGROUND_COLOR.name, + XposedKey.UNAVAILABLE_QS_TILE_ICON_COLOR.name, + XposedKey.UNAVAILABLE_QS_TILE_ICON_BACKGROUND_COLOR.name, + XposedKey.UNAVAILABLE_QS_TILE_LABEL_COLOR.name, + XposedKey.UNAVAILABLE_QS_TILE_SECONDARY_LABEL_COLOR.name, + -> { + systemActionViewModel?.shouldRestartSystemUI() + } + } + } + + PreferenceScreen( + items = qsThemesPreferences, + title = stringResource(R.string.activity_title_themes), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun QsThemesScreenPreview() { + PreviewComposable { + QsThemesScreen(null) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/transparency/screens/QsTransparencyScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/transparency/screens/QsTransparencyScreen.kt new file mode 100644 index 000000000..234742e29 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/quicksettings/transparency/screens/QsTransparencyScreen.kt @@ -0,0 +1,141 @@ +package com.drdisagree.iconify.features.xposed.quicksettings.transparency.screens + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.preferences.PrefValue +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.utils.SystemUtils +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.common.viewmodels.SystemActionViewModel +import kotlinx.coroutines.launch + +val qsTransparencyPreferences = preferenceScreen { + category(title = stringRes(R.string.section_title_transparency)) { + switch( + key = XposedKey.QUICK_SETTINGS_TRANSPARENCY, + title = stringRes(R.string.transparent_qs_panel_title), + summary = { _, _ -> stringRes(R.string.transparent_qs_panel_desc) }, + ) + + switch( + key = XposedKey.NOTIFICATION_TRANSPARENCY, + title = stringRes(R.string.transparent_notif_shade_title), + summary = { _, _ -> stringRes(R.string.transparent_notif_shade_desc) }, + ) + + switch( + key = XposedKey.LOCKSCREEN_SHADE, + title = stringRes(R.string.keep_lockscreen_shade_title), + summary = { _, _ -> stringRes(R.string.keep_lockscreen_shade_desc) }, + isVisible = { pref -> + pref.getBoolean(XposedKey.QUICK_SETTINGS_TRANSPARENCY) || + pref.getBoolean(XposedKey.NOTIFICATION_TRANSPARENCY) + } + ) + + slider( + key = XposedKey.QUICK_SETTINGS_ALPHA_LEVEL, + title = stringRes(R.string.qs_background_opacity_title), + min = 0f, + max = 100f, + valueLabel = { "${it.toInt()}%" }, + isVisible = { pref -> + pref.getBoolean(XposedKey.QUICK_SETTINGS_TRANSPARENCY) || + pref.getBoolean(XposedKey.NOTIFICATION_TRANSPARENCY) + } + ) + } + + category(title = stringRes(R.string.section_title_blur)) { + switch( + key = XposedKey.QUICK_SETTINGS_BLUR, + title = stringRes(R.string.window_level_blur_title), + summary = { _, _ -> stringRes(R.string.window_level_blur_desc) }, + ) + + switch( + key = XposedKey.QUICK_SETTINGS_AGGRESSIVE_BLUR, + title = stringRes(R.string.aggressive_blur_title), + summary = { _, _ -> stringRes(R.string.aggressive_blur_desc) }, + isVisible = { pref -> pref.getBoolean(XposedKey.QUICK_SETTINGS_BLUR) }, + ) + + slider( + key = XposedKey.QUICK_SETTINGS_BLUR_RADIUS, + title = stringRes(R.string.blur_intensity_title), + min = 0f, + max = 15f, + steps = 14, + valueLabel = { "${it.toInt()}px" }, + isVisible = { pref -> pref.getBoolean(XposedKey.QUICK_SETTINGS_BLUR) }, + ) + } +} + +@Composable +fun QsTransparencyScreen( + systemActionViewModel: SystemActionViewModel? = hiltViewModel(), +) { + val scope = rememberCoroutineScope() + val prefController = LocalPreferenceController.current + + PreferenceListener(key = null) { event -> + when (event.key) { + XposedKey.QUICK_SETTINGS_BLUR.name -> { + val isEnabled = (event.newValue as PrefValue.BoolValue).v + + scope.launch { + if (isEnabled) { + SystemUtils.enableBlur(force = false) + } else { + prefController.set(XposedKey.QUICK_SETTINGS_AGGRESSIVE_BLUR) + SystemUtils.disableBlur(force = false) + } + + systemActionViewModel?.shouldRebootDevice() + } + } + + XposedKey.QUICK_SETTINGS_AGGRESSIVE_BLUR.name -> { + val isEnabled = (event.newValue as PrefValue.BoolValue).v + + scope.launch { + if (isEnabled) { + SystemUtils.enableBlur(force = true) + } else { + SystemUtils.disableBlur(force = true) + } + + systemActionViewModel?.shouldRebootDevice() + } + } + + XposedKey.QUICK_SETTINGS_BLUR_RADIUS.name -> { + systemActionViewModel?.shouldRestartSystemUI() + } + } + } + + PreferenceScreen( + items = qsTransparencyPreferences, + title = stringResource(R.string.activity_title_transparency_blur), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun QsTransparencyScreenPreview() { + PreviewComposable { + QsTransparencyScreen(null) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/clockchip/screens/ClockChipScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/clockchip/screens/ClockChipScreen.kt new file mode 100644 index 000000000..6ed385f80 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/clockchip/screens/ClockChipScreen.kt @@ -0,0 +1,243 @@ +package com.drdisagree.iconify.features.xposed.statusbar.clockchip.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey + +val clockChipPreferences = preferenceScreen { + category { + switch( + key = XposedKey.STATUSBAR_CLOCK_CHIP, + isMasterSwitch = true, + title = stringRes(R.string.sb_clock_background_chip_title), + ) + } + + category(title = stringRes(R.string.section_title_text)) { + listPref( + key = XposedKey.STATUSBAR_CLOCK_CHIP_TEXT_COLOR_OPTION, + title = stringRes(R.string.statusbar_clock_text_color_title), + entries = arrayRes(R.array.statusbar_clock_text_color_entries), + entryValues = arrayRes(R.array.statusbar_clock_text_color_values), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + ) + + colorPicker( + key = XposedKey.STATUSBAR_CLOCK_CHIP_TEXT_COLOR_CODE, + title = stringRes(R.string.clock_text_color_picker_title), + summary = { _, _ -> stringRes(R.string.clock_text_color_picker_desc) }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { it.getString(XposedKey.STATUSBAR_CLOCK_CHIP_TEXT_COLOR_OPTION) == "2" } + ) + } + + category(title = stringRes(R.string.section_title_background)) { + listPref( + key = XposedKey.STATUSBAR_CLOCK_CHIP_FILL_COLOR_OPTION, + title = stringRes(R.string.statusbar_clock_fill_color_title), + entries = arrayRes(R.array.statusbar_clock_fill_color_entries), + entryValues = arrayRes(R.array.statusbar_clock_fill_color_values), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + ) + + listPref( + key = XposedKey.STATUSBAR_CLOCK_CHIP_FILL_COLOR_GRADIENT_DIRECTION, + title = stringRes(R.string.gradient_direction), + entries = arrayRes(R.array.gradient_direction_entries), + entryValues = arrayRes(R.array.gradient_direction_values), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { it.getString(XposedKey.STATUSBAR_CLOCK_CHIP_FILL_COLOR_OPTION) == "2" } + ) + + colorPicker( + key = XposedKey.STATUSBAR_CLOCK_CHIP_FILL_COLOR_GRADIENT_COLOR1, + title = stringRes(R.string.fill_start_color), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { it.getString(XposedKey.STATUSBAR_CLOCK_CHIP_TEXT_COLOR_OPTION) == "2" } + ) + + colorPicker( + key = XposedKey.STATUSBAR_CLOCK_CHIP_FILL_COLOR_GRADIENT_COLOR2, + title = stringRes(R.string.fill_end_color), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { it.getString(XposedKey.STATUSBAR_CLOCK_CHIP_TEXT_COLOR_OPTION) == "2" } + ) + } + + category(title = stringRes(R.string.section_title_border)) { + switch( + key = XposedKey.STATUSBAR_CLOCK_CHIP_BORDER, + title = stringRes(R.string.enable_border), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + + listPref( + key = XposedKey.STATUSBAR_CLOCK_CHIP_BORDER_COLOR_OPTION, + title = stringRes(R.string.border_color_title), + entries = arrayRes(R.array.statusbar_clock_border_color_entries), + entryValues = arrayRes(R.array.statusbar_clock_border_color_values), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP_BORDER) } + ) + + colorPicker( + key = XposedKey.STATUSBAR_CLOCK_CHIP_BORDER_COLOR_CODE, + title = stringRes(R.string.border_color_custom_title), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { + it.getString(XposedKey.STATUSBAR_CLOCK_CHIP_BORDER_COLOR_OPTION) == "1" && + it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP_BORDER) + } + ) + + switch( + key = XposedKey.STATUSBAR_CLOCK_CHIP_DASHED_BORDER, + title = stringRes(R.string.dashed_border), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP_BORDER) } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_DASHED_BORDER_WIDTH, + title = stringRes(R.string.dash_width), + min = 0f, + max = 12f, + steps = 11, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { + it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP_DASHED_BORDER) && + it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP_BORDER) + } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_DASHED_BORDER_GAP, + title = stringRes(R.string.dash_gap), + min = 0f, + max = 12f, + steps = 11, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { + it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP_DASHED_BORDER) && + it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP_BORDER) + } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_DASHED_BORDER_THICKNESS, + title = stringRes(R.string.border_thickness), + min = 0f, + max = 12f, + steps = 11, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) }, + isVisible = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP_BORDER) } + ) + } + + category(title = stringRes(R.string.section_title_padding)) { + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_PADDING_LEFT, + title = stringRes(R.string.padding_left), + min = 0f, + max = 12f, + steps = 11, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_PADDING_RIGHT, + title = stringRes(R.string.padding_right), + min = 0f, + max = 12f, + steps = 11, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_PADDING_TOP, + title = stringRes(R.string.padding_top), + min = 0f, + max = 12f, + steps = 11, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_PADDING_BOTTOM, + title = stringRes(R.string.padding_bottom), + min = 0f, + max = 12f, + steps = 11, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + } + + category(title = stringRes(R.string.section_title_corner_radius)) { + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_RADIUS_TOP_LEFT, + title = stringRes(R.string.top_left_radius), + min = 0f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_RADIUS_TOP_RIGHT, + title = stringRes(R.string.top_right_radius), + min = 0f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_RADIUS_BOTTOM_LEFT, + title = stringRes(R.string.bottom_left_radius), + min = 0f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_CHIP_RADIUS_BOTTOM_RIGHT, + title = stringRes(R.string.bottom_right_radius), + min = 0f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_CLOCK_CHIP) } + ) + } +} + +@Composable +fun ClockChipScreen() { + PreferenceScreen( + items = clockChipPreferences, + title = stringResource(R.string.activity_title_background_chip), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun ClockChipScreenPreview() { + PreviewComposable { + ClockChipScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/dualstatusbar/screens/DualStatusbarScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/dualstatusbar/screens/DualStatusbarScreen.kt new file mode 100644 index 000000000..9c61599b4 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/dualstatusbar/screens/DualStatusbarScreen.kt @@ -0,0 +1,161 @@ +package com.drdisagree.iconify.features.xposed.statusbar.dualstatusbar.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey + +val dualStatusbarPreferences = preferenceScreen { + category { + switch( + key = XposedKey.DUAL_STATUSBAR, + isMasterSwitch = true, + title = stringRes(R.string.dsb_title), + ) + } + + category { + switch( + key = XposedKey.DUAL_STATUSBAR_PORTRAIT_ONLY, + title = stringRes(R.string.dsb_portrait_only_title), + summary = { _, _ -> stringRes("Display dual rows in portrait mode only") }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + switch( + key = XposedKey.DUAL_STATUSBAR_START_SIDE_SINGLE_ROW, + title = stringRes(R.string.dsb_single_line_start_side_title), + summary = { _, _ -> stringRes(R.string.dsb_single_line_start_side_desc) }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + switch( + key = XposedKey.DUAL_STATUSBAR_END_SIDE_SINGLE_ROW, + title = stringRes(R.string.dsb_single_line_end_side_title), + summary = { _, _ -> stringRes(R.string.dsb_single_line_end_side_desc) }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + switch( + key = XposedKey.DUAL_STATUSBAR_SWAP_START_SIDE, + title = stringRes(R.string.dsb_swap_start_side_title), + summary = { _, _ -> stringRes(R.string.dsb_swap_start_side_desc) }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + switch( + key = XposedKey.DUAL_STATUSBAR_SWAP_END_SIDE, + title = stringRes(R.string.dsb_swap_end_side_title), + summary = { _, _ -> stringRes(R.string.dsb_swap_end_side_desc) }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + } + + category { + slider( + key = XposedKey.DUAL_STATUSBAR_HEIGHT, + title = stringRes(R.string.dsb_statusbar_height_title), + min = -1f, + max = 80f, + valueLabel = { "${it.toInt()}dp" }, + showDefaultIndicator = true, + hideDefaultValue = true, + showResetButton = true, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + slider( + key = XposedKey.DUAL_STATUSBAR_START_PADDING, + title = stringRes(R.string.dsb_start_padding_title), + min = -1f, + max = 140f, + valueLabel = { "${it.toInt()}dp" }, + showDefaultIndicator = true, + hideDefaultValue = true, + showResetButton = true, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + slider( + key = XposedKey.DUAL_STATUSBAR_END_PADDING, + title = stringRes(R.string.dsb_end_padding_title), + min = -1f, + max = 140f, + valueLabel = { "${it.toInt()}dp" }, + showDefaultIndicator = true, + hideDefaultValue = true, + showResetButton = true, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + slider( + key = XposedKey.DUAL_STATUSBAR_TOP_PADDING, + title = stringRes(R.string.dsb_top_padding_title), + min = -1f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + showDefaultIndicator = true, + hideDefaultValue = true, + showResetButton = true, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + slider( + key = XposedKey.DUAL_STATUSBAR_START_TOP_MARGIN, + title = stringRes(R.string.dsb_start_top_margin_title), + min = 0f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + slider( + key = XposedKey.DUAL_STATUSBAR_START_BOTTOM_MARGIN, + title = stringRes(R.string.dsb_start_bottom_margin_title), + min = 0f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + slider( + key = XposedKey.DUAL_STATUSBAR_END_TOP_MARGIN, + title = stringRes(R.string.dsb_end_top_margin_title), + min = 0f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + + slider( + key = XposedKey.DUAL_STATUSBAR_END_BOTTOM_MARGIN, + title = stringRes(R.string.dsb_end_bottom_margin_title), + min = 0f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.DUAL_STATUSBAR) } + ) + } +} + +@Composable +fun DualStatusbarScreen() { + PreferenceScreen( + items = dualStatusbarPreferences, + title = stringResource(R.string.activity_title_dual_statusbar), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun DualStatusbarScreenPreview() { + PreviewComposable { + DualStatusbarScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/components/StatusbarLogoBottomSheet.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/components/StatusbarLogoBottomSheet.kt new file mode 100644 index 000000000..b1984fead --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/components/StatusbarLogoBottomSheet.kt @@ -0,0 +1,118 @@ +package com.drdisagree.iconify.features.xposed.statusbar.logo.components + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.Image +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.Check +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.ListItem +import androidx.compose.material3.ListItemDefaults +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.SheetState +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.rememberModalBottomSheetState +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.asImageBitmap +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import androidx.core.graphics.drawable.toBitmap +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.ui.components.bottomsheets.CustomBottomSheet +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.features.xposed.statusbar.logo.models.StatusbarLogoItem + +@Composable +@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +fun StatusbarLogoBottomSheet( + sheetState: SheetState, + iconPacks: List, + selectedItemIndex: Int, + onItemClick: (Int) -> Unit, + onDismiss: () -> Unit +) { + CustomBottomSheet( + sheetState = sheetState, + title = stringResource(R.string.status_bar_logo_style_title), + onDismissRequest = onDismiss + ) { contentPadding -> + LazyColumn( + modifier = Modifier.fillMaxWidth(), + contentPadding = contentPadding, + verticalArrangement = Arrangement.spacedBy(4.dp) + ) { + itemsIndexed(iconPacks) { index, pack -> + val isSelected = index == selectedItemIndex + + Surface( + modifier = Modifier + .fillMaxWidth() + .clickable { onItemClick(index) }, + shape = MaterialTheme.shapes.small, + color = MaterialTheme.colorScheme.surfaceVariant, + border = if (isSelected) { + BorderStroke( + width = 2.dp, + color = MaterialTheme.colorScheme.primary + ) + } else { + null + } + ) { + ListItem( + headlineContent = { Text(pack.label) }, + leadingContent = { + pack.drawable?.let { drawable -> + Image( + bitmap = drawable + .toBitmap(48, 48) + .asImageBitmap(), + contentDescription = null, + modifier = Modifier.size(48.dp) + ) + } + }, + trailingContent = { + if (isSelected) { + Icon( + imageVector = Icons.Rounded.Check, + contentDescription = null, + tint = MaterialTheme.colorScheme.primary + ) + } + }, + colors = ListItemDefaults.colors( + containerColor = Color.Transparent + ) + ) + } + } + } + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Preview +@Composable +fun StatusbarLogoBottomSheetPreview() { + PreviewComposable { + StatusbarLogoBottomSheet( + sheetState = rememberModalBottomSheetState(), + iconPacks = emptyList(), + selectedItemIndex = 0, + onItemClick = {}, + onDismiss = {} + ) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/components/StatusbarLogoItems.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/components/StatusbarLogoItems.kt new file mode 100644 index 000000000..9503495a7 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/components/StatusbarLogoItems.kt @@ -0,0 +1,142 @@ +package com.drdisagree.iconify.features.xposed.statusbar.logo.components + +import android.content.ContentUris +import android.content.Context +import android.graphics.ImageDecoder +import android.graphics.drawable.Drawable +import android.provider.MediaStore +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.ui.graphics.toArgb +import androidx.compose.ui.res.stringArrayResource +import androidx.core.content.ContextCompat +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.data.common.XposedConst.STATUSBAR_LOGO_FILE +import com.drdisagree.iconify.data.common.XposedConst.XPOSED_RESOURCE_FOLDER_NAME +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.xposed.statusbar.logo.models.StatusbarLogoItem +import com.drdisagree.iconify.xposed.modules.extras.utils.ViewHelper.toCircularDrawable +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext +import java.io.FileNotFoundException + +@Composable +fun rememberStatusbarLogoItems(context: Context, reloadKey: Int): List { + val prefController = LocalPreferenceController.current + + val customImageUri by prefController.observe( + XposedKey.STATUSBAR_LOGO_FILE_URI.name, + XposedKey.STATUSBAR_LOGO_FILE_URI.default as String + ) + val showCustomImage by remember { derivedStateOf { customImageUri.isNotEmpty() } } + + val labels = stringArrayResource(R.array.status_bar_logo_style_entries) + val values = stringArrayResource(R.array.status_bar_logo_style_values) + val logoColor = MaterialTheme.colorScheme.onSurface.toArgb() + + val logoItems = remember { mutableStateOf>(emptyList()) } + + LaunchedEffect(reloadKey) { + val drawables = loadStatusbarLogoDrawables(context, logoColor, showCustomImage) + logoItems.value = labels.mapIndexed { index, label -> + StatusbarLogoItem( + label = label, + value = values.getOrNull(index) ?: index.toString(), + drawable = drawables.getOrNull(index) + ) + } + } + + return logoItems.value +} + +private suspend fun loadStatusbarLogoDrawables( + context: Context, + logoColor: Int, + showCustomImage: Boolean +): List = + withContext(Dispatchers.IO) { + val predefinedLogos = arrayOf( + R.drawable.ic_android_logo, + R.drawable.ic_adidas, + R.drawable.ic_alien, + R.drawable.ic_apple_logo, + R.drawable.ic_avengers, + R.drawable.ic_batman, + R.drawable.ic_batman_tdk, + R.drawable.ic_beats, + R.drawable.ic_biohazard, + R.drawable.ic_blackberry, + R.drawable.ic_cannabis, + R.drawable.ic_emoticon_cool, + R.drawable.ic_emoticon_devil, + R.drawable.ic_fire, + R.drawable.ic_heart, + R.drawable.ic_nike, + R.drawable.ic_pac_man, + R.drawable.ic_puma, + R.drawable.ic_rog, + R.drawable.ic_spiderman, + R.drawable.ic_superman, + R.drawable.ic_windows, + R.drawable.ic_xbox, + R.drawable.ic_ghost, + R.drawable.ic_ninja, + R.drawable.ic_robot, + R.drawable.ic_ironman, + R.drawable.ic_captain_america, + R.drawable.ic_flash, + R.drawable.ic_tux_logo, + R.drawable.ic_ubuntu_logo, + R.drawable.ic_mint_logo, + R.drawable.ic_amogus + ) + + val logoDrawables = predefinedLogos.mapNotNull { drawableRes -> + ContextCompat.getDrawable(context, drawableRes)?.apply { setTint(logoColor) } + }.toMutableList() + + val customDrawable = try { + if (!showCustomImage) throw IllegalStateException("Custom image URI is empty") + getCustomLogoFromMediaStore(context).apply { setTint(logoColor) } + } catch (_: Throwable) { + ContextCompat.getDrawable(context, R.drawable.ic_upload_file) + ?.apply { setTint(logoColor) } + } + + customDrawable?.let { logoDrawables.add(it) } + + logoDrawables + } + +private fun getCustomLogoFromMediaStore(context: Context): Drawable { + val resolver = context.contentResolver + val collection = MediaStore.Downloads.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY) + + val projection = arrayOf(MediaStore.Downloads._ID) + val selection = + "${MediaStore.Downloads.DISPLAY_NAME} = ? AND ${MediaStore.Downloads.RELATIVE_PATH} LIKE ?" + val selectionArgs = + arrayOf(STATUSBAR_LOGO_FILE.name, "Download/$XPOSED_RESOURCE_FOLDER_NAME%") + + val cursor = resolver.query(collection, projection, selection, selectionArgs, null) + ?: throw IllegalStateException("MediaStore query failed") + + cursor.use { + if (!it.moveToFirst()) { + throw FileNotFoundException("Custom status bar logo not found in MediaStore") + } + + val id = it.getLong(it.getColumnIndexOrThrow(MediaStore.Downloads._ID)) + val uri = ContentUris.withAppendedId(collection, id) + + val source = ImageDecoder.createSource(resolver, uri) + return ImageDecoder.decodeDrawable(source).toCircularDrawable(context) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/models/StatusbarLogoItem.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/models/StatusbarLogoItem.kt new file mode 100644 index 000000000..6e57671c2 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/models/StatusbarLogoItem.kt @@ -0,0 +1,9 @@ +package com.drdisagree.iconify.features.xposed.statusbar.logo.models + +import android.graphics.drawable.Drawable + +data class StatusbarLogoItem( + val label: String, + val value: String, + val drawable: Drawable? +) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/screens/StatusbarLogoScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/screens/StatusbarLogoScreen.kt new file mode 100644 index 000000000..5b33d37e8 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/logo/screens/StatusbarLogoScreen.kt @@ -0,0 +1,158 @@ +package com.drdisagree.iconify.features.xposed.statusbar.logo.screens + +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.rememberModalBottomSheetState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableIntStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.core.net.toUri +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.preferences.PreferenceListener +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.core.ui.components.preferences.FilePickerType +import com.drdisagree.iconify.data.common.XposedConst.STATUSBAR_LOGO_FILE +import com.drdisagree.iconify.data.keys.XposedKey +import com.drdisagree.iconify.features.xposed.statusbar.logo.components.StatusbarLogoBottomSheet +import com.drdisagree.iconify.features.xposed.statusbar.logo.components.rememberStatusbarLogoItems +import com.drdisagree.iconify.helpers.toXposedSharedPath +import kotlinx.coroutines.launch + +fun statusbarLogoPreferences( + selectedLogoLabel: String = "", + onLogoStyleClick: () -> Unit = {} +) = preferenceScreen { + category { + switch( + key = XposedKey.STATUSBAR_LOGO, + isMasterSwitch = true, + title = stringRes(R.string.status_bar_logo_enable_title), + ) + } + + category { + listPref( + key = XposedKey.STATUSBAR_LOGO_POSITION, + title = stringRes(R.string.status_bar_logo_position_title), + entries = arrayRes(R.array.status_bar_logo_position_entries), + entryValues = arrayRes(R.array.status_bar_logo_position_values), + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_LOGO) }, + ) + + action( + key = "statusbar_logo_style", + title = stringRes(R.string.status_bar_logo_style_title), + summary = { _, _ -> stringRes(selectedLogoLabel) }, + onClick = { _, _, _ -> onLogoStyleClick() }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_LOGO) }, + ) + + filePicker( + key = XposedKey.STATUSBAR_LOGO_FILE_URI, + title = stringRes(R.string.status_bar_logo_chooser_title), + summary = { _, _ -> stringRes(R.string.status_bar_logo_chooser_desc) }, + pickerType = FilePickerType.Image, + saveFileUri = true, + onFileSelected = { _, uriString -> + if (uriString.isNotEmpty()) { + uriString.toUri().toXposedSharedPath(STATUSBAR_LOGO_FILE.name) + } + }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_LOGO) }, + isVisible = { it.getString(XposedKey.STATUSBAR_LOGO_STYLE) in setOf("33") }, + ) + + slider( + key = XposedKey.STATUSBAR_LOGO_SIZE, + title = stringRes(R.string.status_bar_logo_size_title), + min = 12f, + max = 40f, + valueLabel = { "${it.toInt()}dp" }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_LOGO) } + ) + + switch( + key = XposedKey.STATUSBAR_LOGO_TINT, + title = stringRes(R.string.status_bar_logo_tint_title), + summary = { _, _ -> stringRes(R.string.status_bar_logo_tint_desc) }, + isEnabled = { it.getBoolean(XposedKey.STATUSBAR_LOGO) }, + isVisible = { it.getString(XposedKey.STATUSBAR_LOGO_STYLE) in setOf("33") }, + ) + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun StatusbarLogoScreen() { + val context = LocalContext.current + val prefController = LocalPreferenceController.current + + var reloadKey by rememberSaveable { mutableIntStateOf(0) } + val logoItems = rememberStatusbarLogoItems(context, reloadKey) + var showLogoStyleSheet by rememberSaveable { mutableStateOf(false) } + val selectedItemValue by prefController.observe( + XposedKey.STATUSBAR_LOGO_STYLE.name, + XposedKey.STATUSBAR_LOGO_STYLE.default as String + ) + val selectedItemIndex = remember(selectedItemValue, logoItems) { + logoItems.indexOfFirst { it.value == selectedItemValue }.takeIf { it >= 0 } ?: 0 + } + + val sheetState = rememberModalBottomSheetState() + val scope = rememberCoroutineScope() + + if (showLogoStyleSheet) { + StatusbarLogoBottomSheet( + sheetState = sheetState, + iconPacks = logoItems, + selectedItemIndex = selectedItemIndex, + onItemClick = { index -> + prefController.setString( + XposedKey.STATUSBAR_LOGO_STYLE.name, + index.toString() + ) + + if (index == logoItems.lastIndex) { + scope.launch { + sheetState.hide() + } + } + }, + onDismiss = { showLogoStyleSheet = false } + ) + } + + PreferenceListener(key = XposedKey.STATUSBAR_LOGO_FILE_URI) { + reloadKey++ + } + + PreferenceScreen( + items = statusbarLogoPreferences( + selectedLogoLabel = logoItems.getOrNull(selectedItemIndex)?.label + ?: stringResource(R.string.not_available), + onLogoStyleClick = { showLogoStyleSheet = true } + ), + title = stringResource(R.string.status_bar_logo_title), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun StatusbarLogoScreenPreview() { + PreviewComposable { + StatusbarLogoScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/main/screens/StatusbarScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/main/screens/StatusbarScreen.kt new file mode 100644 index 000000000..83b16e92a --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/statusbar/main/screens/StatusbarScreen.kt @@ -0,0 +1,148 @@ +package com.drdisagree.iconify.features.xposed.statusbar.main.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.navigation.NavRoutes +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.arrayRes +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey + +val statusbarPreferences = preferenceScreen { + category(title = stringRes(R.string.section_title_clock)) { + twoTargetSwitch( + key = XposedKey.STATUSBAR_CLOCK_CHIP, + title = stringRes(R.string.activity_title_background_chip), + summary = { _, _ -> stringRes(R.string.activity_desc_background_chip) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Statusbar.ClockChip) { + launchSingleTop = true + } + } + ) + + listPref( + key = XposedKey.STATUSBAR_CLOCK_POSITION, + title = stringRes(R.string.sb_clock_position_title), + entries = arrayRes(R.array.status_bar_clock_position_entries), + entryValues = arrayRes(R.array.status_bar_clock_position_values), + ) + + switch( + key = XposedKey.STATUSBAR_CLOCK_CLICKABLE, + title = stringRes(R.string.statusbar_clock_clickable_title), + summary = { _, _ -> stringRes(R.string.statusbar_clock_clickable_desc) }, + ) + + switch( + key = XposedKey.STATUSBAR_CLOCK_TEXT_SIZE_SWITCH, + title = stringRes(R.string.sb_clock_size_switch_title), + summary = { _, _ -> stringRes(R.string.sb_clock_size_switch_desc) }, + ) + + slider( + key = XposedKey.STATUSBAR_CLOCK_TEXT_SIZE, + title = stringRes(R.string.sb_clock_size), + min = 10f, + max = 24f, + steps = 13, + valueLabel = { "${it.toInt()}px" }, + isVisible = { pref -> pref.getBoolean(XposedKey.STATUSBAR_CLOCK_TEXT_SIZE_SWITCH) } + ) + + switch( + key = XposedKey.HIDE_BATTERY_VIEW, + title = stringRes(R.string.hide_battery_title), + summary = { _, _-> stringRes("Hide battery icon from statusbar") }, + ) + } + + category(title = stringRes(R.string.section_title_icons)) { + twoTargetSwitch( + key = XposedKey.STATUSBAR_LOGO, + title = stringRes(R.string.status_bar_logo_title), + summary = { _, _ -> stringRes(R.string.status_bar_logo_desc) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Statusbar.Logo) { + launchSingleTop = true + } + } + ) + + switch( + key = XposedKey.COLORED_STATUSBAR_ICON, + title = stringRes(R.string.colored_statusbar_icon_title), + summary = { _, _ -> stringRes(R.string.colored_statusbar_icon_desc) }, + ) + + switch( + key = XposedKey.STATUSBAR_SWAP_WIFI_CELLULAR, + title = stringRes(R.string.sb_swap_wifi_cellular_title), + summary = { _, _ -> stringRes(R.string.sb_swap_wifi_cellular_desc) }, + ) + + switch( + key = XposedKey.STATUSBAR_SWAP_CELLULAR_NETWORK_TYPE, + title = stringRes(R.string.sb_swap_cellular_network_type_title), + summary = { _, _ -> stringRes(R.string.sb_swap_cellular_network_type_desc) }, + ) + + switch( + key = XposedKey.SHOW_4G_INSTEAD_OF_LTE, + title = stringRes(R.string.sb_show_4g_icon_title), + summary = { _, _ -> stringRes(R.string.sb_show_4g_icon_desc) }, + ) + + slider( + key = XposedKey.NOTIFICATION_ICONS_LIMIT, + title = stringRes(R.string.sb_max_notification_icons_title), + min = 0f, + max = 15f, + steps = 14, + valueLabel = { "${it.toInt()}" }, + showDefaultIndicator = true, + hideDefaultValue = true, + showResetButton = true + ) + } + + category(title = stringRes(R.string.section_title_misc)) { + twoTargetSwitch( + key = XposedKey.DUAL_STATUSBAR, + title = stringRes(R.string.dual_status_bar_title), + summary = { _, _ -> stringRes(R.string.dual_status_bar_desc) }, + onClick = { _, _, nav -> + nav.navigate(NavRoutes.Xposed.Statusbar.DualStatusbar) { + launchSingleTop = true + } + } + ) + + switch( + key = XposedKey.ONGOING_ACTION_CHIP_SWITCH, + title = stringRes(R.string.ongoing_action_chip_title), + summary = { _, _ -> stringRes(R.string.ongoing_action_chip_desc) }, + ) + } +} + +@Composable +fun StatusbarScreen() { + PreferenceScreen( + items = statusbarPreferences, + title = stringResource(R.string.activity_title_statusbar), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun StatusbarScreenPreview() { + PreviewComposable { + StatusbarScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/features/xposed/volumepanel/screens/VolumePanelScreen.kt b/app/src/main/java/com/drdisagree/iconify/features/xposed/volumepanel/screens/VolumePanelScreen.kt new file mode 100644 index 000000000..05e843ef2 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/features/xposed/volumepanel/screens/VolumePanelScreen.kt @@ -0,0 +1,44 @@ +package com.drdisagree.iconify.features.xposed.volumepanel.screens + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import com.drdisagree.iconify.R +import com.drdisagree.iconify.core.preferences.PreferenceScreen +import com.drdisagree.iconify.core.preferences.preferenceScreen +import com.drdisagree.iconify.core.preferences.stringRes +import com.drdisagree.iconify.core.ui.components.others.PreviewComposable +import com.drdisagree.iconify.data.keys.XposedKey + +val volumePanelPreferences = preferenceScreen { + category { + switch( + key = XposedKey.VOLUME_PANEL_PERCENTAGE, + title = stringRes(R.string.volume_percentage_title), + summary = { _, _ -> stringRes(R.string.volume_percentage_desc) }, + ) + + switch( + key = XposedKey.VOLUME_PANEL_SAFETY_WARNING, + title = stringRes(R.string.safety_warning_title), + summary = { _, _ -> stringRes(R.string.safety_warning_desc) }, + ) + } +} + +@Composable +fun VolumePanelScreen() { + PreferenceScreen( + items = volumePanelPreferences, + title = stringResource(R.string.activity_title_volume_panel), + showBackIcon = true + ) +} + +@Preview(showBackground = true) +@Composable +fun VolumePanelScreenPreview() { + PreviewComposable { + VolumePanelScreen() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/helpers/BackupRestore.kt b/app/src/main/java/com/drdisagree/iconify/helpers/BackupRestore.kt new file mode 100644 index 000000000..411d2f836 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/helpers/BackupRestore.kt @@ -0,0 +1,122 @@ +package com.drdisagree.iconify.helpers + +import com.drdisagree.iconify.core.utils.FileUtils +import com.drdisagree.iconify.core.utils.RootUtils +import com.drdisagree.iconify.data.common.Resources.BACKUP_DIR +import com.drdisagree.iconify.data.common.Resources.MODULE_DIR +import com.drdisagree.iconify.data.common.Resources.OVERLAY_DIR +import com.drdisagree.iconify.data.common.Resources.TEMP_MODULE_DIR +import com.drdisagree.iconify.data.common.Resources.TEMP_MODULE_OVERLAY_DIR +import com.topjohnwu.superuser.Shell + +object BackupRestore { + + private val ICONIFY_COMPONENTS = listOf( + "CR1", "CR2", // Corner radius + "Dynamic1", "Dynamic2", "Dynamic3", "Dynamic4", "Dynamic5", // Dynamically generated + "NFN", // Notification + "SGIC", // Signal icon + "SIP1", "SIP2", "SIP3", // Settings icon pack + "SIS", // System icon shape + "TSTFRM", // Toast frame + "WIFI" // WiFi icon + ) + + fun backupFiles() { + Shell.cmd("rm -rf $BACKUP_DIR").exec() + FileUtils.ensureDirs(BACKUP_DIR) + + val files = mutableListOf( + "$MODULE_DIR/system.prop", + "$MODULE_DIR/post-exec.sh" + ) + + files += ICONIFY_COMPONENTS.map { "$OVERLAY_DIR/IconifyComponent$it.apk" } + + backupFiles(*files.toTypedArray()) + } + + fun restoreFiles() { + val files = mutableListOf( + "system.prop" to TEMP_MODULE_DIR, + "post-exec.sh" to TEMP_MODULE_DIR + ) + + files += ICONIFY_COMPONENTS.map { "IconifyComponent$it.apk" to TEMP_MODULE_OVERLAY_DIR } + + restoreFiles(*files.toTypedArray()) + + restoreBlurSettings() + + // Remove backup directory + Shell.cmd("rm -rf $BACKUP_DIR").exec() + } + + private fun backupExists(fileName: String): Boolean { + return RootUtils.fileExists("$BACKUP_DIR/$fileName") + } + + @Suppress("SameParameterValue") + private fun backupFiles(vararg sources: String) { + for (file in sources) { + backupFile(file) + } + } + + private fun backupFile(source: String) { + if (RootUtils.fileExists(source)) Shell.cmd("cp -rf $source $BACKUP_DIR/") + .exec() + } + + @Suppress("SameParameterValue") + private fun restoreFiles(vararg files: Pair) { + for ((fileName, dest) in files) { + restoreFile(fileName, dest) + } + } + + private fun restoreFile(fileName: String, dest: String) { + if (backupExists(fileName)) { + Shell.cmd("rm -rf $dest/$fileName").exec() + Shell.cmd("cp -rf $BACKUP_DIR/$fileName $dest/").exec() + } + } + + private fun restoreBlurSettings() { + if (isBlurEnabled) { + enableBlur() + } + } + + private val isBlurEnabled: Boolean + get() { + val outs = Shell.cmd( + "if grep -q \"ro.surface_flinger.supports_background_blur=1\" $TEMP_MODULE_DIR/system.prop; then echo yes; else echo no; fi" + ).exec().out + return outs[0] == "yes" + } + + private fun disableBlur() { + Shell.cmd( + "mv $TEMP_MODULE_DIR/system.prop $TEMP_MODULE_DIR/system.txt; grep -v \"ro.surface_flinger.supports_background_blur\" $TEMP_MODULE_DIR/system.txt > $TEMP_MODULE_DIR/system.txt.tmp; rm -rf $TEMP_MODULE_DIR/system.prop; mv $TEMP_MODULE_DIR/system.txt.tmp $TEMP_MODULE_DIR/system.prop; rm -rf $TEMP_MODULE_DIR/system.txt; rm -rf $TEMP_MODULE_DIR/system.txt.tmp" + ).exec() + Shell.cmd( + "grep -v \"ro.surface_flinger.supports_background_blur\" $TEMP_MODULE_DIR/service.sh > $TEMP_MODULE_DIR/service.sh.tmp && mv $TEMP_MODULE_DIR/service.sh.tmp $TEMP_MODULE_DIR/service.sh" + ).exec() + } + + private fun enableBlur() { + disableBlur() + + val blurCmd1 = "ro.surface_flinger.supports_background_blur=1" + val blurCmd2 = + "resetprop ro.surface_flinger.supports_background_blur 1 && killall surfaceflinger" + + Shell.cmd( + "echo \"$blurCmd1\" >> $TEMP_MODULE_DIR/system.prop" + ).exec() + Shell.cmd( + "sed '/*}/a $blurCmd2' $TEMP_MODULE_DIR/service.sh > $TEMP_MODULE_DIR/service.sh.tmp && mv $TEMP_MODULE_DIR/service.sh.tmp $TEMP_MODULE_DIR/service.sh" + ).exec() + } +} diff --git a/app/src/main/java/com/drdisagree/iconify/helpers/BinaryInstaller.kt b/app/src/main/java/com/drdisagree/iconify/helpers/BinaryInstaller.kt new file mode 100644 index 000000000..34ef95c65 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/helpers/BinaryInstaller.kt @@ -0,0 +1,118 @@ +package com.drdisagree.iconify.helpers + +import android.annotation.SuppressLint +import android.util.Log +import com.drdisagree.iconify.data.common.Dynamic.AAPT2 +import com.drdisagree.iconify.data.common.Dynamic.BIN_DIR +import com.drdisagree.iconify.data.common.Dynamic.DATA_DIR +import com.drdisagree.iconify.data.common.Dynamic.ZIPALIGN +import com.drdisagree.iconify.core.utils.AbiUtils +import com.drdisagree.iconify.core.utils.AssetsUtils +import com.topjohnwu.superuser.Shell +import java.io.BufferedOutputStream +import java.io.File +import java.io.FileOutputStream +import java.util.zip.ZipInputStream + +object BinaryInstaller { + + private val TAG = BinaryInstaller::class.java.simpleName + + fun symLinkBinaries(): Boolean { + if (AAPT2.exists() && ZIPALIGN.exists()) { + val aapt2Valid = Shell.cmd("${AAPT2.absolutePath} version") + .exec() + .isSuccess + val zipalignValid = Shell.cmd("${ZIPALIGN.absolutePath} --version 2>&1; echo $?") + .exec() + .isSuccess + + if (aapt2Valid && zipalignValid) { + Log.d(TAG, "Binaries already installed and functional, skipping.") + return false + } + + Log.d(TAG, "Binaries exist but are not functional, reinstalling...") + } + + return extractTools() + } + + @SuppressLint("SetWorldReadable") + private fun extractTools(): Boolean { + Log.d(TAG, "Extracting tools...") + + val abi = AbiUtils.getSupportedAbi() ?: run { + Log.e(TAG, "No supported ABI found, skipping extraction.") + return true + } + + var hasErroredOut = false + + try { + // Copy Tools folder (containing jniLibs.zip) from assets to DATA_DIR/Tools/ + AssetsUtils.copyAssets("Tools") + + val zipFile = File("$DATA_DIR/Tools", "jniLibs.zip") + + if (!zipFile.exists()) { + Log.e(TAG, "jniLibs.zip not found at ${zipFile.absolutePath}") + return true + } + + // Extract only the matching ABI libs directly into DATA_DIR/bin + val binDir = File(BIN_DIR) + if (binDir.exists()) { + if (!binDir.canWrite()) { + Shell.cmd("rm -rf ${binDir.absolutePath}").exec() + } else { + binDir.deleteRecursively() + } + } + binDir.mkdirs() + Shell.cmd("ls -ld ${binDir.absolutePath}").exec() + + ZipInputStream(zipFile.inputStream().buffered()).use { zis -> + var entry = zis.nextEntry + + while (entry != null) { + if (!entry.isDirectory && entry.name.startsWith("$abi/")) { + val libName = entry.name.substringAfterLast("/") + + if (libName.isNotBlank()) { + File(BIN_DIR, libName).apply { + parentFile?.mkdirs() + Log.d(TAG, "Extracting $libName to $absolutePath") + + BufferedOutputStream(FileOutputStream(this)).use { bos -> + zis.copyTo(bos) + } + setExecutable(true, false) + setReadable(true, false) + + if (!exists()) { + Log.e(TAG, "Failed to extract $libName") + hasErroredOut = true + } else { + Shell.cmd("chmod 755 $absolutePath").exec() + } + } + } + } + + zis.closeEntry() + entry = zis.nextEntry + } + } + + Log.d(TAG, "Extraction complete for ABI: $abi") + } catch (e: Exception) { + Log.e(TAG, "Failed to extract tools.\n$e") + hasErroredOut = true + } finally { + AssetsUtils.cleanAssetsDir("Tools") + } + + return hasErroredOut + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/helpers/Extensions.kt b/app/src/main/java/com/drdisagree/iconify/helpers/Extensions.kt new file mode 100644 index 000000000..587d92083 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/helpers/Extensions.kt @@ -0,0 +1,120 @@ +package com.drdisagree.iconify.helpers + +import android.annotation.SuppressLint +import android.content.ContentUris +import android.content.ContentValues +import android.net.Uri +import android.provider.MediaStore +import android.provider.OpenableColumns +import android.util.Log +import androidx.compose.ui.graphics.Color +import com.drdisagree.iconify.app.Iconify.Companion.appContext +import com.drdisagree.iconify.data.common.XposedConst.XPOSED_RESOURCE_FOLDER_NAME + +fun String.replaceAll(vararg replacements: Pair): String { + var result = this + for ((old, new) in replacements) { + result = result.replace(old, new.toString()) + } + return result +} + +fun Color.Companion.fromHex(hex: String): Color { + val clean = hex.removePrefix("#") + + val argb = when (clean.length) { + 3 -> { // RGB (12-bit) + val r = clean[0].digitToInt(16) * 17 + val g = clean[1].digitToInt(16) * 17 + val b = clean[2].digitToInt(16) * 17 + (0xFF shl 24) or (r shl 16) or (g shl 8) or b + } + + 6 -> { // RRGGBB + (0xFF shl 24) or clean.toLong(16).toInt() + } + + 8 -> { // AARRGGBB + clean.toLong(16).toInt() + } + + else -> error("Invalid hex color: $hex") + } + + return Color(argb) +} + +fun Color.Companion.fromHexSafe(hex: String): Color? = runCatching { + fromHex(hex) +}.getOrNull() + +@SuppressLint("SetWorldReadable") +fun Uri.toXposedSharedPath(customFileName: String? = null): String? { + val context = appContext + val resolver = context.contentResolver + + return try { + val fileName = + customFileName ?: resolver.query(this, null, null, null, null)?.use { cursor -> + val col = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME) + if (col != -1 && cursor.moveToFirst()) cursor.getString(col) else null + } ?: lastPathSegment ?: "unknown_file" + + val relativePath = "Download/$XPOSED_RESOURCE_FOLDER_NAME" + + val collection = MediaStore.Downloads.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY) + val projection = arrayOf(MediaStore.Downloads._ID) + val selection = + "${MediaStore.Downloads.DISPLAY_NAME} = ? AND ${MediaStore.Downloads.RELATIVE_PATH} LIKE ?" + val selectionArgs = arrayOf(fileName, "Download/$XPOSED_RESOURCE_FOLDER_NAME%") + + resolver.query(collection, projection, selection, selectionArgs, null)?.use { cursor -> + while (cursor.moveToNext()) { + val id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Downloads._ID)) + val existingUri = ContentUris.withAppendedId(collection, id) + try { + resolver.delete(existingUri, null, null) + } catch (e: Exception) { + Log.e("FilePicker", "Could not delete existing file: $existingUri", e) + } + } + } + + val values = ContentValues().apply { + put(MediaStore.Downloads.DISPLAY_NAME, fileName) + put(MediaStore.Downloads.RELATIVE_PATH, relativePath) + put(MediaStore.Downloads.IS_PENDING, 1) + } + + val itemUri = resolver.insert(collection, values) ?: return null + + resolver.openOutputStream(itemUri, "wt")?.use { output -> + resolver.openInputStream(this)?.use { input -> + input.copyTo(output) + } + } + + values.clear() + values.put(MediaStore.Downloads.IS_PENDING, 0) + resolver.update(itemUri, values, null, null) + + resolver.query(itemUri, arrayOf(MediaStore.Downloads.DATA), null, null, null) + ?.use { cursor -> + if (cursor.moveToFirst()) cursor.getString(0) else null + } + } catch (e: Exception) { + Log.e("FilePicker", "toXposedSharedPath failed", e) + null + } +} + +fun String?.maskKey(): String { + if (isNullOrEmpty()) return "" + if (length <= 8) return "*".repeat(length) + + val start = take(4) + val end = takeLast(4) + val stars = "*".repeat(length - 8) + + return "$start$stars$end" +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/utils/helper/LocaleHelper.kt b/app/src/main/java/com/drdisagree/iconify/helpers/LocaleHelper.kt similarity index 92% rename from app/src/main/java/com/drdisagree/iconify/utils/helper/LocaleHelper.kt rename to app/src/main/java/com/drdisagree/iconify/helpers/LocaleHelper.kt index 2f9240fc2..83cf7523a 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/helper/LocaleHelper.kt +++ b/app/src/main/java/com/drdisagree/iconify/helpers/LocaleHelper.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.helper +package com.drdisagree.iconify.helpers import android.content.Context import android.os.LocaleList @@ -14,7 +14,7 @@ object LocaleHelper { var localeCode = getString(APP_LANGUAGE) if (localeCode.isNullOrEmpty()) { - val locales = context.resources.configuration.getLocales() + val locales = context.resources.configuration.locales val localeCodes = listOf(*context.resources.getStringArray(R.array.locale_code)) for (i in 0 until locales.size()) { diff --git a/app/src/main/java/com/drdisagree/iconify/utils/helper/TypedValueUtils.kt b/app/src/main/java/com/drdisagree/iconify/helpers/TypedValueUtils.kt similarity index 96% rename from app/src/main/java/com/drdisagree/iconify/utils/helper/TypedValueUtils.kt rename to app/src/main/java/com/drdisagree/iconify/helpers/TypedValueUtils.kt index 0e1af90df..213861b5f 100644 --- a/app/src/main/java/com/drdisagree/iconify/utils/helper/TypedValueUtils.kt +++ b/app/src/main/java/com/drdisagree/iconify/helpers/TypedValueUtils.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.utils.helper +package com.drdisagree.iconify.helpers import android.util.TypedValue import androidx.annotation.IntRange diff --git a/app/src/main/java/com/drdisagree/iconify/receivers/BootReceiver.kt b/app/src/main/java/com/drdisagree/iconify/receivers/BootReceiver.kt deleted file mode 100644 index e58071797..000000000 --- a/app/src/main/java/com/drdisagree/iconify/receivers/BootReceiver.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.drdisagree.iconify.receivers - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.util.Log -import com.drdisagree.iconify.services.UpdateScheduler -import com.drdisagree.iconify.services.WeatherScheduler - -class BootReceiver : BroadcastReceiver() { - - private val tag = this::class.java.simpleName - - override fun onReceive(context: Context, intent: Intent) { - if (intent.action == Intent.ACTION_BOOT_COMPLETED) { - Log.i(tag, "Broadcast received: " + intent.action) - - // Schedule Updates - WeatherScheduler.scheduleUpdates(context) - WeatherScheduler.scheduleUpdateNow(context) - UpdateScheduler.scheduleUpdates(context) - } - } -} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/services/BaseRootProviderProxy.kt b/app/src/main/java/com/drdisagree/iconify/services/BaseRootProviderProxy.kt deleted file mode 100644 index 4a536493b..000000000 --- a/app/src/main/java/com/drdisagree/iconify/services/BaseRootProviderProxy.kt +++ /dev/null @@ -1,124 +0,0 @@ -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.topjohnwu.superuser.Shell - -abstract class BaseRootProviderProxy : Service() { - - override fun onBind(intent: Intent): IBinder { - return createProxy() - } - - protected abstract fun createProxy(): BaseRootProviderProxyIPC - - abstract inner class BaseRootProviderProxyIPC(context: Context) : IRootProviderProxy.Stub() { - - init { - try { - @Suppress("DEPRECATION") - Shell.setDefaultBuilder( - Shell.Builder.create() - .setFlags(Shell.FLAG_MOUNT_MASTER) - .setFlags(Shell.FLAG_REDIRECT_STDERR) - .setTimeout(20) - ) - } catch (_: Throwable) { - } - - rootGranted = Shell.getShell().isRoot - - rootAllowedPacks = listOf( - *context.resources.getStringArray(R.array.root_requirement) - ) - } - - abstract fun extractWallpaperSubject( - input: Bitmap, - callback: IExtractSubjectCallback, - resultPath: String - ) - - @Throws(RemoteException::class) - override fun runCommand(command: String): Array { - ensureEnvironment() - - try { - val result = Shell.cmd(command).exec().out - return result.toTypedArray() - } catch (_: 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() - - extractWallpaperSubject(input, callback, resultPath) - } - - @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 - ${BaseRootProviderProxy::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/TileNotchBarKiller.kt b/app/src/main/java/com/drdisagree/iconify/services/TileNotchBarKiller.kt deleted file mode 100644 index 635a8a2ee..000000000 --- a/app/src/main/java/com/drdisagree/iconify/services/TileNotchBarKiller.kt +++ /dev/null @@ -1,87 +0,0 @@ -package com.drdisagree.iconify.services - -import android.service.quicksettings.Tile -import android.service.quicksettings.TileService -import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.common.Const.FRAMEWORK_PACKAGE -import com.drdisagree.iconify.data.common.Preferences.NOTCH_BAR_KILLER_SWITCH -import com.drdisagree.iconify.data.config.RPrefs.getBoolean -import com.drdisagree.iconify.data.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 -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch - -class TileNotchBarKiller : TileService() { - - private var isNotchBarKillerEnabled = getBoolean(NOTCH_BAR_KILLER_SWITCH, false) - - override fun onStartListening() { - super.onStartListening() - - val tile = qsTile - tile.state = if (isNotchBarKillerEnabled) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE - tile.updateTile() - } - - override fun onClick() { - super.onClick() - - if (!SystemUtils.hasStoragePermission()) { - val tile = qsTile - tile.subtitle = resources.getString(R.string.need_storage_perm_title) - tile.updateTile() - return - } - - isNotchBarKillerEnabled = !isNotchBarKillerEnabled - - putBoolean(NOTCH_BAR_KILLER_SWITCH, isNotchBarKillerEnabled) - - val tile = qsTile - tile.state = if (isNotchBarKillerEnabled) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE - tile.label = resources.getString(R.string.notch_bar_killer_title) - tile.subtitle = - if (isNotchBarKillerEnabled) resources.getString(R.string.general_on) else resources.getString( - R.string.general_off - ) - tile.updateTile() - - val resources = listOf( - ResourceEntry( - FRAMEWORK_PACKAGE, - "bool", - "config_fillMainBuiltInDisplayCutout", - "false" - ), - ResourceEntry( - FRAMEWORK_PACKAGE, - "bool", - "config_maskMainBuiltInDisplayCutout", - "true" - ), - ResourceEntry( - FRAMEWORK_PACKAGE, - "string", - "config_mainBuiltInDisplayCutout", - "M 0,0 L 0, 0 C 0,0 0,0 0,0" - ), - ResourceEntry( - FRAMEWORK_PACKAGE, - "string", - "config_mainBuiltInDisplayCutoutRectApproximation", - "@string/config_mainBuiltInDisplayCutout" - ) - ) - - CoroutineScope(Dispatchers.IO).launch { - if (isNotchBarKillerEnabled) { - ResourceManager.buildOverlayWithResource(*resources.toTypedArray()) - } else { - ResourceManager.removeResourceFromOverlay(*resources.toTypedArray()) - } - } - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/services/TilePitchBlack.kt b/app/src/main/java/com/drdisagree/iconify/services/TilePitchBlack.kt deleted file mode 100644 index d5a94b9e8..000000000 --- a/app/src/main/java/com/drdisagree/iconify/services/TilePitchBlack.kt +++ /dev/null @@ -1,52 +0,0 @@ -package com.drdisagree.iconify.services - -import android.service.quicksettings.Tile -import android.service.quicksettings.TileService -import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.config.RPrefs.getBoolean -import com.drdisagree.iconify.utils.overlay.OverlayUtils - -class TilePitchBlack : TileService() { - - private var isPitchBlackEnabled = getBoolean("IconifyComponentQSPBD.overlay") || - getBoolean("IconifyComponentQSPBA.overlay") - - override fun onStartListening() { - super.onStartListening() - val tile = qsTile - tile.state = - if (isPitchBlackEnabled) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE - tile.updateTile() - } - - override fun onClick() { - super.onClick() - - isPitchBlackEnabled = if (getBoolean("IconifyComponentQSPBD.overlay")) { - OverlayUtils.changeOverlayState( - "IconifyComponentQSPBD.overlay", - false, - "IconifyComponentQSPBA.overlay", - true - ) - true - } else if (getBoolean("IconifyComponentQSPBA.overlay")) { - OverlayUtils.disableOverlay("IconifyComponentQSPBA.overlay") - false - } else { - OverlayUtils.enableOverlay("IconifyComponentQSPBD.overlay") - true - } - - val tile = qsTile - tile.state = if (isPitchBlackEnabled) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE - tile.label = resources.getString(R.string.tile_pitch_black) - tile.subtitle = - if (getBoolean("IconifyComponentQSPBD.overlay")) resources.getString(R.string.tile_pitch_black_dark) else if (getBoolean( - "IconifyComponentQSPBA.overlay" - ) - ) resources.getString(R.string.tile_pitch_black_amoled) else resources.getString(R.string.general_off) - - tile.updateTile() - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/services/TileRestartSystemUI.kt b/app/src/main/java/com/drdisagree/iconify/services/TileRestartSystemUI.kt deleted file mode 100644 index 1669a4c12..000000000 --- a/app/src/main/java/com/drdisagree/iconify/services/TileRestartSystemUI.kt +++ /dev/null @@ -1,59 +0,0 @@ -package com.drdisagree.iconify.services - -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.SystemUtils -import com.drdisagree.iconify.utils.overlay.OverlayUtils - -class TileRestartSystemUI : TileService() { - - override fun onStartListening() { - super.onStartListening() - - val tile = qsTile - tile.state = Tile.STATE_INACTIVE - updateTileIcon(tile) - tile.updateTile() - } - - override fun onStopListening() { - val tile = qsTile - tile.state = Tile.STATE_INACTIVE - updateTileIcon(tile) - tile.updateTile() - - super.onStopListening() - } - - override fun onClick() { - super.onClick() - - SystemUtils.restartSystemUI() - val tile = qsTile - tile.state = Tile.STATE_INACTIVE - tile.label = resources.getString(R.string.restart_sysui_title) - tile.subtitle = "" - - updateTileIcon(tile) - - tile.updateTile() - } - - private fun updateTileIcon(tile: Tile) { - var iconResId = R.drawable.ic_tile_restart_systemui - - if (OverlayUtils.isOverlayEnabled("IconifyComponentIPAS1.overlay")) { - iconResId = R.drawable.ic_tile_restart_systemui_aurora - } else if (OverlayUtils.isOverlayEnabled("IconifyComponentIPAS2.overlay")) { - iconResId = R.drawable.ic_tile_restart_systemui_gradicon - } else if (OverlayUtils.isOverlayEnabled("IconifyComponentIPAS3.overlay")) { - iconResId = R.drawable.ic_tile_restart_systemui_lorn - } else if (OverlayUtils.isOverlayEnabled("IconifyComponentIPAS4.overlay")) { - iconResId = R.drawable.ic_tile_restart_systemui_plumpy - } - - tile.icon = Icon.createWithResource(this, iconResId) - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/services/providers/AppProviders.kt b/app/src/main/java/com/drdisagree/iconify/services/providers/AppProviders.kt new file mode 100644 index 000000000..69a8fbd1d --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/services/providers/AppProviders.kt @@ -0,0 +1,150 @@ +package com.drdisagree.iconify.services.providers + +import android.app.Activity +import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi +import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.LocalView +import androidx.compose.ui.unit.Density +import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel +import androidx.navigation.compose.rememberNavController +import com.drdisagree.iconify.core.common.LocalDarkMode +import com.drdisagree.iconify.core.common.LocalHazeState +import com.drdisagree.iconify.core.common.LocalLayerBackdrop +import com.drdisagree.iconify.core.common.LocalNavController +import com.drdisagree.iconify.core.common.LocalSettings +import com.drdisagree.iconify.core.common.LocalStrongHaptic +import com.drdisagree.iconify.core.common.LocalWeakHaptic +import com.drdisagree.iconify.core.common.LocalWindowSizeClass +import com.drdisagree.iconify.core.ui.theme.getColorScheme +import com.drdisagree.iconify.core.ui.theme.getIsDarkTheme +import com.drdisagree.iconify.core.utils.HapticUtils.strongHaptic +import com.drdisagree.iconify.core.utils.HapticUtils.weakHaptic +import com.drdisagree.iconify.data.keys.SettingsKey +import com.drdisagree.iconify.data.states.SettingsState +import com.drdisagree.iconify.features.common.viewmodels.SettingsViewModel +import com.kyant.backdrop.backdrops.rememberLayerBackdrop +import com.materialkolor.PaletteStyle +import dev.chrisbanes.haze.HazeState + +@OptIn(ExperimentalMaterial3WindowSizeClassApi::class) +@Composable +fun AppProviders( + activity: Activity, + settingsViewModel: SettingsViewModel = hiltViewModel(), + content: @Composable () -> Unit +) { + val view = LocalView.current + val baseDensity = LocalDensity.current + + val navController = rememberNavController() + val windowSizeClass = calculateWindowSizeClass(activity) + + val themeMode by settingsViewModel.stringState(SettingsKey.THEME_MODE) + val isHapticEnabled by settingsViewModel.booleanState(SettingsKey.HAPTICS_AND_VIBRATION) + val seedColor by settingsViewModel.stringState(SettingsKey.SEED_COLOR) + val isDynamicColor by settingsViewModel.booleanState(SettingsKey.DYNAMIC_COLORS) + val paletteStyle by settingsViewModel.stringState(SettingsKey.PALETTE_STYLE) + val isExpressive by settingsViewModel.booleanState(SettingsKey.EXPRESSIVE_COLORS) + val isAmoledTheme by settingsViewModel.booleanState(SettingsKey.AMOLED_THEME) + val contrastLevel by settingsViewModel.stringState(SettingsKey.CONTRAST_LEVEL) + val floatingBottomBar by settingsViewModel.booleanState(SettingsKey.FLOATING_BOTTOM_BAR) + val blurEffect by settingsViewModel.booleanState(SettingsKey.BLUR_EFFECT) + val savedVersionCode by settingsViewModel.intState(SettingsKey.SAVED_VERSION_CODE) + val uiScale by settingsViewModel.floatState(SettingsKey.UI_SCALE) + val textScale by settingsViewModel.floatState(SettingsKey.TEXT_SCALE) + + val state by remember { + derivedStateOf { + SettingsState( + themeMode = themeMode.toInt(), + isExpressive = isExpressive, + isAmoledTheme = isAmoledTheme, + seedColor = seedColor.toLong(), + paletteStyle = PaletteStyle.valueOf(paletteStyle), + isDynamicColor = isDynamicColor, + contrastLevel = contrastLevel.toDouble(), + isHapticEnabled = isHapticEnabled, + floatingBottomBar = floatingBottomBar, + blurEffect = blurEffect, + savedVersionCode = savedVersionCode, + isLoaded = true, + ) + } + } + + val isDarkTheme = getIsDarkTheme(settingsState = state) + val colorScheme = getColorScheme(settingsState = state) + + val hazeState = remember { HazeState() } + val backdropColor = colorScheme.surface + val backdrop = rememberLayerBackdrop { + drawRect(backdropColor) + drawContent() + } + + val scaledDensity = remember(uiScale, textScale, baseDensity) { + Density( + density = baseDensity.density * uiScale, + fontScale = baseDensity.fontScale * uiScale * textScale + ) + } + + val weakHaptic = remember(isHapticEnabled, view) { + { + if (isHapticEnabled) { + view.weakHaptic() + } + } + } + + val strongHaptic = remember(isHapticEnabled, view) { + { + if (isHapticEnabled) { + view.strongHaptic() + } + } + } + + ProvideSharedPreferencesController { + CompositionLocalProvider( + LocalHazeState provides hazeState, + LocalLayerBackdrop provides backdrop, + LocalNavController provides navController, + LocalSettings provides state, + LocalWeakHaptic provides weakHaptic, + LocalStrongHaptic provides strongHaptic, + LocalDarkMode provides isDarkTheme, + LocalWindowSizeClass provides windowSizeClass, + LocalDensity provides scaledDensity, + ) { + content() + } + } +} + +@Composable +private fun SettingsViewModel.booleanState(key: SettingsKey): androidx.compose.runtime.State { + return getBooleanFlow(key).collectAsState(initial = key.default as Boolean) +} + +@Composable +private fun SettingsViewModel.intState(key: SettingsKey): androidx.compose.runtime.State { + return getIntFlow(key).collectAsState(initial = key.default as Int) +} + +@Composable +private fun SettingsViewModel.floatState(key: SettingsKey): androidx.compose.runtime.State { + return getFloatFlow(key).collectAsState(initial = key.default as Float) +} + +@Composable +private fun SettingsViewModel.stringState(key: SettingsKey): androidx.compose.runtime.State { + return getStringFlow(key).collectAsState(initial = key.default as String) +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/services/providers/PreferenceProvider.kt b/app/src/main/java/com/drdisagree/iconify/services/providers/PreferenceProvider.kt new file mode 100644 index 000000000..7b2aedcaa --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/services/providers/PreferenceProvider.kt @@ -0,0 +1,73 @@ +package com.drdisagree.iconify.services.providers + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.remember +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalInspectionMode +import com.drdisagree.iconify.core.common.LocalPreferenceController +import com.drdisagree.iconify.core.di.PreferenceEntryPoint +import com.drdisagree.iconify.core.ui.components.others.FakeSharedPrefsStorage +import com.drdisagree.iconify.core.preferences.PreferenceController +import dagger.hilt.android.EntryPointAccessors + +@Composable +fun ProvideSharedPreferencesController(content: @Composable () -> Unit) { + val previewMode = LocalInspectionMode.current + + val prefController = if (previewMode) { + remember { PreferenceController(FakeSharedPrefsStorage()) } + } else { + val context = LocalContext.current.applicationContext + + val preferenceStorage = remember { + EntryPointAccessors.fromApplication( + context, + PreferenceEntryPoint::class.java + ).sharedPrefsStorage() + } + + remember(preferenceStorage) { + PreferenceController(preferenceStorage) + } + } + + DisposableEffect(prefController) { + onDispose { prefController.dispose() } + } + + ProvidePreferenceController(prefController, content) +} + +@Composable +fun ProvideDataStoreController(content: @Composable () -> Unit) { + val context = LocalContext.current + + val preferenceStorage = remember { + EntryPointAccessors.fromApplication( + context.applicationContext, + PreferenceEntryPoint::class.java + ).dataStoreStorage() + } + + val prefController = remember(preferenceStorage) { + PreferenceController(preferenceStorage) + } + + DisposableEffect(prefController) { + onDispose { prefController.dispose() } + } + + ProvidePreferenceController(prefController, content) +} + +@Composable +private fun ProvidePreferenceController( + prefController: PreferenceController, + content: @Composable () -> Unit, +) { + CompositionLocalProvider(LocalPreferenceController provides prefController) { + content() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/data/provider/RemotePrefProvider.kt b/app/src/main/java/com/drdisagree/iconify/services/providers/RemotePrefProvider.kt similarity index 59% rename from app/src/main/java/com/drdisagree/iconify/data/provider/RemotePrefProvider.kt rename to app/src/main/java/com/drdisagree/iconify/services/providers/RemotePrefProvider.kt index f26863fba..9558d8f4f 100644 --- a/app/src/main/java/com/drdisagree/iconify/data/provider/RemotePrefProvider.kt +++ b/app/src/main/java/com/drdisagree/iconify/services/providers/RemotePrefProvider.kt @@ -1,11 +1,11 @@ -package com.drdisagree.iconify.data.provider +package com.drdisagree.iconify.services.providers import com.crossbowffs.remotepreferences.RemotePreferenceFile import com.crossbowffs.remotepreferences.RemotePreferenceProvider import com.drdisagree.iconify.BuildConfig -import com.drdisagree.iconify.data.common.Resources +import com.drdisagree.iconify.data.common.XposedConst.PREF_FILE_NAME class RemotePrefProvider : RemotePreferenceProvider( BuildConfig.APPLICATION_ID, - arrayOf(RemotePreferenceFile(Resources.SHARED_XPREFERENCES, true)) + arrayOf(RemotePreferenceFile(PREF_FILE_NAME, true)) ) \ No newline at end of file diff --git a/app/src/main/java/com/drdisagree/iconify/services/providers/RootProviderProxy.kt b/app/src/main/java/com/drdisagree/iconify/services/providers/RootProviderProxy.kt new file mode 100644 index 000000000..01c444766 --- /dev/null +++ b/app/src/main/java/com/drdisagree/iconify/services/providers/RootProviderProxy.kt @@ -0,0 +1,198 @@ +package com.drdisagree.iconify.services.providers + +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.R +import com.drdisagree.iconify.core.utils.FileUtils +import com.drdisagree.iconify.data.common.XposedConst.DEPTH_WALL_FG_FILE +import com.drdisagree.iconify.xposed.modules.extras.utils.BitmapSubjectSegmenter +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) + } + + inner class RootProviderProxyIPC(context: Context) : IRootProviderProxy.Stub() { + + init { + try { + Shell.setDefaultBuilder( + Shell.Builder.create() + .setFlags(Shell.FLAG_MOUNT_MASTER) + .setTimeout(20) + ) + } catch (_: Throwable) { + } + + rootGranted = Shell.getShell().isRoot + + rootAllowedPacks = listOf( + *context.resources.getStringArray(R.array.root_requirement) + ) + } + + fun extractWallpaperSubject( + input: Bitmap, + callback: IExtractSubjectCallback, + resultPath: String + ) { + val tag = BitmapSubjectSegmenter::class.java.simpleName + + try { + val bitmapSubjectSegmenter = BitmapSubjectSegmenter(applicationContext) + + bitmapSubjectSegmenter.segmentSubject( + input, + object : BitmapSubjectSegmenter.SegmentResultListener { + override fun onStart() { + callback.onStart(getString(R.string.depth_wallpaper_subject_extraction_started)) + } + + override fun onSuccess(result: Bitmap?) { + try { + val fgFile = DEPTH_WALL_FG_FILE + val tempFile = File.createTempFile( + fgFile.nameWithoutExtension, + ".${fgFile.extension}" + ) + + val outputStream = FileOutputStream(tempFile) + result!!.compress(Bitmap.CompressFormat.PNG, 100, outputStream) + + outputStream.close() + result.recycle() + + val isSuccess = FileUtils.moveToIconifyDir( + tempFile, + 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, "$tag - 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()) { + getString(R.string.depth_wallpaper_subject_extraction_failed) + } else { + getString(R.string.depth_wallpaper_missing_ai_model) + } + ) + } + } + } + ) + } catch (throwable: Throwable) { + Log.e(TAG, "$tag - segmentSubject: $throwable") + + callback.onResult( + false, + getString(R.string.depth_wallpaper_subject_extraction_failed) + ) + } + } + + @Throws(RemoteException::class) + override fun runCommand(command: String): Array { + ensureEnvironment() + + try { + val result = Shell.cmd(command).exec().out + return result.toTypedArray() + } catch (_: 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() + + extractWallpaperSubject(input, callback, resultPath) + } + + @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/UpdateScheduler.kt b/app/src/main/java/com/drdisagree/iconify/services/schedulers/UpdateScheduler.kt similarity index 90% rename from app/src/main/java/com/drdisagree/iconify/services/UpdateScheduler.kt rename to app/src/main/java/com/drdisagree/iconify/services/schedulers/UpdateScheduler.kt index b6d787ac0..7a976ddf6 100644 --- a/app/src/main/java/com/drdisagree/iconify/services/UpdateScheduler.kt +++ b/app/src/main/java/com/drdisagree/iconify/services/schedulers/UpdateScheduler.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.services +package com.drdisagree.iconify.services.schedulers import android.content.Context import android.util.Log @@ -12,11 +12,12 @@ import com.drdisagree.iconify.data.common.Preferences.AUTO_UPDATE import com.drdisagree.iconify.data.common.Preferences.UPDATE_CHECK_TIME import com.drdisagree.iconify.data.config.RPrefs.getBoolean import com.drdisagree.iconify.data.config.RPrefs.getLong +import com.drdisagree.iconify.services.workers.UpdateWorker import java.util.concurrent.TimeUnit object UpdateScheduler { - private val TAG = UpdateScheduler::class.java.getSimpleName() + private val TAG = UpdateScheduler::class.java.simpleName private val UPDATE_WORK_NAME = BuildConfig.APPLICATION_ID .replace(".debug", "") .replace(".foss", "") + ".services.UpdateScheduler" diff --git a/app/src/main/java/com/drdisagree/iconify/services/WeatherScheduler.kt b/app/src/main/java/com/drdisagree/iconify/services/schedulers/WeatherScheduler.kt similarity index 87% rename from app/src/main/java/com/drdisagree/iconify/services/WeatherScheduler.kt rename to app/src/main/java/com/drdisagree/iconify/services/schedulers/WeatherScheduler.kt index 87f84d2a9..ca4f6d50c 100644 --- a/app/src/main/java/com/drdisagree/iconify/services/WeatherScheduler.kt +++ b/app/src/main/java/com/drdisagree/iconify/services/schedulers/WeatherScheduler.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.services +package com.drdisagree.iconify.services.schedulers import android.content.Context import android.util.Log @@ -9,11 +9,12 @@ 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 com.drdisagree.iconify.core.utils.weather.WeatherConfig +import com.drdisagree.iconify.core.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}: " @@ -26,7 +27,7 @@ object WeatherScheduler { val workManager = WorkManager.getInstance(context) - val weatherEnabled: Boolean = WeatherConfig.isEnabled(context) + val weatherEnabled: Boolean = WeatherConfig.isEnabled() Log.d(TAG, "Weather enabled: $weatherEnabled") @@ -34,7 +35,7 @@ object WeatherScheduler { Log.d(TAG, "Scheduling updates") val builder: PeriodicWorkRequest.Builder = PeriodicWorkRequest.Builder( WeatherWork::class.java, - WeatherConfig.getUpdateInterval(context).toLong(), TimeUnit.HOURS + WeatherConfig.getUpdateInterval().toLong(), TimeUnit.HOURS ) .setBackoffCriteria(BackoffPolicy.LINEAR, 1, TimeUnit.HOURS) diff --git a/app/src/main/java/com/drdisagree/iconify/services/UpdateWorker.kt b/app/src/main/java/com/drdisagree/iconify/services/workers/UpdateWorker.kt similarity index 92% rename from app/src/main/java/com/drdisagree/iconify/services/UpdateWorker.kt rename to app/src/main/java/com/drdisagree/iconify/services/workers/UpdateWorker.kt index a55449b46..1aa916496 100644 --- a/app/src/main/java/com/drdisagree/iconify/services/UpdateWorker.kt +++ b/app/src/main/java/com/drdisagree/iconify/services/workers/UpdateWorker.kt @@ -1,4 +1,4 @@ -package com.drdisagree.iconify.services +package com.drdisagree.iconify.services.workers import android.app.NotificationChannel import android.app.NotificationManager @@ -13,12 +13,11 @@ import androidx.work.CoroutineWorker import androidx.work.WorkerParameters import com.drdisagree.iconify.BuildConfig import com.drdisagree.iconify.R +import com.drdisagree.iconify.app.MainActivity import com.drdisagree.iconify.data.common.Const.LATEST_VERSION_URL import com.drdisagree.iconify.data.common.Preferences.UPDATE_OVER_WIFI -import com.drdisagree.iconify.data.common.Preferences.VER_CODE import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.ui.activities.MainActivity -import com.drdisagree.iconify.ui.fragments.settings.AppUpdates +import com.drdisagree.iconify.data.keys.SettingsKey import com.topjohnwu.superuser.Shell import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -30,7 +29,7 @@ import java.net.URL class UpdateWorker(context: Context, params: WorkerParameters) : CoroutineWorker(context, params) { - private val tag =this::class.java.simpleName + private val tag = this::class.java.simpleName override suspend fun doWork(): Result { val isGoodNetwork = isGoodNetworkAvailable() @@ -41,7 +40,8 @@ class UpdateWorker(context: Context, params: WorkerParameters) : CoroutineWorker if (jsonStr != null) { try { val latestVersion = JSONObject(jsonStr) - val latestVersionCode = latestVersion.getInt(VER_CODE) + val latestVersionCode = + latestVersion.getInt(SettingsKey.SAVED_VERSION_CODE.name) if (latestVersionCode > BuildConfig.VERSION_CODE) { showUpdateNotification() @@ -106,7 +106,8 @@ class UpdateWorker(context: Context, params: WorkerParameters) : CoroutineWorker .exec() val notificationIntent = Intent(applicationContext, MainActivity::class.java).apply { - putExtra(AppUpdates.KEY_NEW_UPDATE, true) + // TODO: Add in-app updater + // putExtra(AppUpdates.KEY_NEW_UPDATE, true) flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK } 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 deleted file mode 100644 index ffefe07a8..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/activities/MainActivity.kt +++ /dev/null @@ -1,553 +0,0 @@ -package com.drdisagree.iconify.ui.activities - -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 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.data.common.Dynamic -import com.drdisagree.iconify.data.common.Preferences -import com.drdisagree.iconify.data.common.Preferences.ON_HOME_PAGE -import com.drdisagree.iconify.data.common.Resources.searchConfiguration -import com.drdisagree.iconify.data.common.Resources.searchableFragments -import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.data.events.ColorDismissedEvent -import com.drdisagree.iconify.data.events.ColorSelectedEvent -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.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.WeatherSettings -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.FragmentGroup -import com.drdisagree.iconify.ui.utils.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 kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch -import org.greenrobot.eventbus.EventBus -import java.util.UUID - -class MainActivity : BaseActivity(), - PreferenceFragmentCompat.OnPreferenceStartFragmentCallback, - SearchPreferenceResultListener, - ColorPickerDialogListener { - - lateinit var binding: ActivityMainBinding - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - binding = ActivityMainBinding.inflate(layoutInflater) - setContentView(binding.getRoot()) - - colorPickerDialog = ColorPickerDialog.newBuilder() - - setupNavigation() - setupSearchConfiguration() - RPrefs.putBoolean(ON_HOME_PAGE, true) - - if (savedInstanceState == null) { - replaceFragment( - supportFragmentManager, - if (!Preferences.isXposedOnlyMode) Home() else Xposed() - ) - } - - if (intent != null && intent.getBooleanExtra("openWeatherSettings", false)) { - replaceFragment(supportFragmentManager, Xposed()) - replaceFragment(supportFragmentManager, WeatherSettings()) - } - - initData() - - setupFloatingActionButtons() - } - - private fun initData() { - CoroutineScope(Dispatchers.IO).launch { - // Clear lottie cache - LottieCompositionFactory.clearCache(this@MainActivity) - - // Get list of enabled overlays - val enabledOverlays = OverlayUtils.enabledOverlayList - enabledOverlays.forEach { overlay -> - RPrefs.putBoolean(overlay, true) - } - - val fabricatedEnabledOverlays = FabricatedUtils.enabledOverlayList - fabricatedEnabledOverlays.forEach { overlay -> - if (!RPrefs.getBoolean("fabricated$overlay", false)) { - RPrefs.putBoolean("fabricated$overlay", true) - } - } - } - } - - private fun setupFloatingActionButtons() { - binding.hideAll.hide() - binding.restartSystemui.hide() - binding.restartDevice.hide() - binding.pendingActions.shrink() - - 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() - }, 500) - } - } - - private fun setupNavigation() { - if (Preferences.isXposedOnlyMode) { - binding.bottomNavigationView.menu.clear() - binding.bottomNavigationView.inflateMenu(R.menu.bottom_nav_menu_xposed_only) - } - - supportFragmentManager.addOnBackStackChangedListener { - val fragment = getTopFragment() - val xposedOnlyMode = Preferences.isXposedOnlyMode - - val homeIndex = 0 - val tweaksIndex = 1 - val xposedIndex = if (!xposedOnlyMode) 2 else 0 - val settingsIndex = if (!xposedOnlyMode) 3 else 1 - - when { - isInGroup(fragment, FragmentGroup.HOME) && !xposedOnlyMode -> { - binding.bottomNavigationView.menu.getItem(homeIndex).setChecked(true) - } - - isInGroup(fragment, FragmentGroup.TWEAKS) && !xposedOnlyMode -> { - binding.bottomNavigationView.menu.getItem(tweaksIndex).setChecked(true) - } - - isInGroup(fragment, FragmentGroup.XPOSED) -> { - binding.bottomNavigationView.menu.getItem(xposedIndex).setChecked(true) - } - - isInGroup(fragment, FragmentGroup.SETTINGS) -> { - binding.bottomNavigationView.menu.getItem(settingsIndex).setChecked(true) - } - } - } - - 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 - } - - R.id.xposed -> { - if (fragmentTag != Xposed::class.java.simpleName) { - replaceFragment(supportFragmentManager, Xposed()) - binding.bottomNavigationView.weakVibrate() - } - return@setOnItemSelectedListener true - } - - R.id.settings -> { - if (fragmentTag != Settings::class.java.simpleName) { - replaceFragment(supportFragmentManager, Settings()) - binding.bottomNavigationView.weakVibrate() - } - return@setOnItemSelectedListener true - } - - else -> { - return@setOnItemSelectedListener false - } - } - } - } - - 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 - } - - 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 - } - - 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( - dialogId: Int, - defaultColor: Int, - showPresets: Boolean, - showAlphaSlider: Boolean, - showColorShades: Boolean - ) { - colorPickerDialog - .setColor(defaultColor) - .setDialogType(ColorPickerDialog.TYPE_CUSTOM) - .setAllowCustom(false) - .setAllowPresets(showPresets) - .setDialogId(dialogId) - .setShowAlphaSlider(showAlphaSlider) - .setShowColorShades(showColorShades) - - colorPickerDialog.show(this) - } - - override fun onColorSelected(dialogId: Int, color: Int) { - EventBus.getDefault().post(ColorSelectedEvent(dialogId, color)) - } - - override fun onDialogDismissed(dialogId: Int) { - EventBus.getDefault().post(ColorDismissedEvent(dialogId)) - } - - @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 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) - } - - Xposed::class.java.simpleName -> { - fragmentManager.popBackStack(null, POP_BACK_STACK_INCLUSIVE) - if (!Preferences.isXposedOnlyMode) { - addToBackStack(fragmentTag) - } - } - - Tweaks::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/activities/OnboardingActivity.kt b/app/src/main/java/com/drdisagree/iconify/ui/activities/OnboardingActivity.kt deleted file mode 100644 index 23e09e864..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/activities/OnboardingActivity.kt +++ /dev/null @@ -1,43 +0,0 @@ -package com.drdisagree.iconify.ui.activities - -import android.os.Bundle -import android.view.WindowManager -import androidx.activity.OnBackPressedCallback -import androidx.appcompat.app.AppCompatActivity -import com.drdisagree.iconify.databinding.ActivityOnboardingBinding -import com.drdisagree.iconify.ui.views.OnboardingView -import kotlin.system.exitProcess - -class OnboardingActivity : AppCompatActivity() { - - private lateinit var binding: ActivityOnboardingBinding - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - binding = ActivityOnboardingBinding.inflate(layoutInflater) - setContentView(binding.getRoot()) - - onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) { - override fun handleOnBackPressed() { - try { - OnboardingView.navigateToPrevSlide() - } catch (ignored: Exception) { - finish() - exitProcess(0) - } - } - }) - } - - public override fun onResume() { - super.onResume() - - window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) - } - - public override fun onPause() { - super.onPause() - - window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/ui/activities/WeatherActivity.kt b/app/src/main/java/com/drdisagree/iconify/ui/activities/WeatherActivity.kt deleted file mode 100644 index 01968a753..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/activities/WeatherActivity.kt +++ /dev/null @@ -1,245 +0,0 @@ -package com.drdisagree.iconify.ui.activities - -import android.annotation.SuppressLint -import android.content.ContentValues -import android.graphics.Color -import android.os.Bundle -import android.text.format.DateFormat -import android.view.View -import androidx.activity.OnBackPressedCallback -import androidx.recyclerview.widget.LinearLayoutManager -import com.drdisagree.iconify.Iconify.Companion.appContextLocale -import com.drdisagree.iconify.R -import com.drdisagree.iconify.databinding.ActivityWeatherBinding -import com.drdisagree.iconify.ui.adapters.ForecastDayAdapter -import com.drdisagree.iconify.ui.adapters.ForecastHourAdapter -import com.drdisagree.iconify.ui.base.BaseActivity -import com.drdisagree.iconify.utils.OmniJawsClient -import com.drdisagree.iconify.utils.weather.WeatherContentProvider -import java.text.SimpleDateFormat -import java.util.Calendar -import java.util.Locale - -class WeatherActivity : BaseActivity(), OmniJawsClient.OmniJawsObserver { - - private lateinit var mWeatherClient: OmniJawsClient - private lateinit var binding: ActivityWeatherBinding - private var mForecastDayAdapter: ForecastDayAdapter? = null - private var mForecastHourAdapter: ForecastHourAdapter? = null - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - - setShowWhenLocked(true) - setTurnScreenOn(true) - - binding = ActivityWeatherBinding.inflate(layoutInflater) - setContentView(binding.getRoot()) - - mWeatherClient = OmniJawsClient(this) - mForecastDayAdapter = ForecastDayAdapter(mWeatherClient) - mForecastHourAdapter = ForecastHourAdapter(mWeatherClient) - updateHourColor() - - onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) { - override fun handleOnBackPressed() { - finishAffinity() - } - }) - - binding.settings.setOnClickListener { startActivity(mWeatherClient.getSettingsIntent()) } - binding.refresh.setOnClickListener { forceRefresh() } - - binding.hourlyForecastRecycler.setAdapter(mForecastHourAdapter) - binding.hourlyForecastRecycler.setLayoutManager( - LinearLayoutManager( - this, - LinearLayoutManager.HORIZONTAL, - false - ) - ) - binding.dailyForecastRecycler.setAdapter(mForecastDayAdapter) - binding.dailyForecastRecycler.setLayoutManager( - LinearLayoutManager( - this, - LinearLayoutManager.VERTICAL, - false - ) - ) - - startProgress() - - queryAndUpdateWeather() - } - - @SuppressLint("SetTextI18n") - private fun updateViews() { - // Title - - binding.currentLocation.text = mWeatherClient.mCachedInfo!!.city - - // Current Condition - binding.currentTemperature.text = mWeatherClient.mCachedInfo!!.temp - binding.currentTemperatureUnit.text = mWeatherClient.mCachedInfo!!.tempUnits - binding.currentCondition.text = getWeatherCondition() - binding.currentConditionIcon.setImageDrawable( - mWeatherClient.getWeatherConditionImage( - mWeatherClient.mCachedInfo!!.conditionCode - ) - ) - - // Wind and Humidity - binding.currentWind.text = - mWeatherClient.mCachedInfo!!.windSpeed + " " + mWeatherClient.mCachedInfo!!.windUnits - binding.currentWindDirection.text = mWeatherClient.mCachedInfo!!.pinWheel - binding.currentHumidity.text = mWeatherClient.mCachedInfo!!.humidity - - // Provider Info - binding.currentProvider.text = mWeatherClient.mCachedInfo!!.provider - val format = if (DateFormat.is24HourFormat(this)) "HH:mm" else "hh:mm a" - val sdf = SimpleDateFormat(format, Locale.getDefault()) - binding.lastUpdate.text = sdf.format(mWeatherClient.mCachedInfo!!.timeStamp) - } - - private fun getWeatherCondition(): String { - val formattedConditionLowercase = mWeatherClient.mCachedInfo!!.condition!!.lowercase() - - val formattedCondition = when { - formattedConditionLowercase.contains("clouds") -> { - appContextLocale.getString(R.string.weather_condition_clouds) - } - - formattedConditionLowercase.contains("rain") -> { - appContextLocale.getString(R.string.weather_condition_rain) - } - - formattedConditionLowercase.contains("clear") -> { - appContextLocale.getString(R.string.weather_condition_clear) - } - - formattedConditionLowercase.contains("storm") -> { - appContextLocale.getString(R.string.weather_condition_storm) - } - - formattedConditionLowercase.contains("snow") -> { - appContextLocale.getString(R.string.weather_condition_snow) - } - - formattedConditionLowercase.contains("wind") -> { - appContextLocale.getString(R.string.weather_condition_wind) - } - - formattedConditionLowercase.contains("mist") -> { - appContextLocale.getString(R.string.weather_condition_mist) - } - - else -> { - mWeatherClient.mCachedInfo!!.condition.toString() - } - } - return formattedCondition - } - - public override fun onResume() { - super.onResume() - mWeatherClient.addObserver(this) - queryAndUpdateWeather() - } - - public override fun onPause() { - super.onPause() - mWeatherClient.removeObserver(this) - } - - override fun weatherUpdated() { - queryAndUpdateWeather() - } - - override fun weatherError(errorReason: Int) { - } - - private fun queryAndUpdateWeather() { - stopProgress() - mWeatherClient.queryWeather() - if (mWeatherClient.mCachedInfo!!.hourlyForecasts!!.size >= 2) { - mForecastHourAdapter!!.updateList(mWeatherClient.mCachedInfo!!.hourlyForecasts) - binding.hourlyForecastCard.visibility = View.VISIBLE - binding.hourlyForecastRecycler.scrollToPosition(0) - } else { - binding.hourlyForecastCard.visibility = View.GONE - } - if (mWeatherClient.mCachedInfo!!.dailyForecasts!!.isNotEmpty()) { - mForecastDayAdapter!!.updateList(mWeatherClient.mCachedInfo!!.dailyForecasts) - binding.dailyForecastCard.visibility = View.VISIBLE - } else { - binding.dailyForecastCard.visibility = View.GONE - } - updateViews() - } - - private fun forceRefresh() { - if (mWeatherClient.isOmniJawsEnabled) { - startProgress() - val values = ContentValues() - values.put(WeatherContentProvider.COLUMN_FORCE_REFRESH, true) - this.contentResolver.update( - OmniJawsClient.CONTROL_URI, - values, "", null - ) - - //WeatherUpdateService.scheduleUpdateNow(getContext()); - } - } - - private fun startProgress() { - binding.progress.visibility = View.VISIBLE - binding.weatherLayout.visibility = View.GONE - } - - private fun stopProgress() { - binding.progress.visibility = View.GONE - binding.weatherLayout.visibility = View.VISIBLE - } - - private val currentHourColor: Int - get() { - val hourOfDay = Calendar.getInstance()[Calendar.HOUR_OF_DAY] - return Color.parseColor(BACKGROUND_SPECTRUM[hourOfDay]) - } - - private val currentCardColor: Int - get() { - val hourOfDay = Calendar.getInstance()[Calendar.HOUR_OF_DAY] - return Color.parseColor(BACKGROUND_CARD_SPECTRUM[hourOfDay]) - } - - @Suppress("deprecation") - private fun updateHourColor() { - window.decorView.setBackgroundColor(currentHourColor) - window.navigationBarColor = currentHourColor - window.statusBarColor = currentHourColor - binding.hourlyForecastCard.setCardBackgroundColor(currentCardColor) - binding.hourlyForecastCard.strokeColor = currentCardColor - binding.dailyForecastCard.setCardBackgroundColor(currentCardColor) - binding.dailyForecastCard.strokeColor = currentCardColor - } - - companion object { - private const val TAG = "WeatherActivity" - private const val DEBUG = false - - /** The background colors of the app, it changes thru out the day to mimic the sky. */ - val BACKGROUND_SPECTRUM: Array = arrayOf( - "#212121", "#27232e", "#2d253a", - "#332847", "#382a53", "#3e2c5f", "#442e6c", "#393a7a", "#2e4687", "#235395", "#185fa2", - "#0d6baf", "#0277bd", "#0d6cb1", "#1861a6", "#23569b", "#2d4a8f", "#383f84", "#433478", - "#3d3169", "#382e5b", "#322b4d", "#2c273e", "#272430" - ) - val BACKGROUND_CARD_SPECTRUM: Array = arrayOf( - "#171717", "#1b1820", "#201a29", - "#241c32", "#271d3a", "#2b1f42", "#30204c", "#282955", "#20315e", "#183a68", "#114271", - "#094b7a", "#015384", "#094c7c", "#114474", "#183c6c", "#203464", "#272c5c", "#2f2454", - "#2b224a", "#272040", "#231e36", "#1f1b2b", "#1b1922" - ) - } -} 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 deleted file mode 100644 index ae420a600..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ClockPreviewAdapter.kt +++ /dev/null @@ -1,183 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.annotation.SuppressLint -import android.app.WallpaperManager -import android.content.Context -import android.graphics.Bitmap -import android.view.Gravity -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.view.ViewStub -import android.widget.ImageView -import android.widget.LinearLayout -import android.widget.TextView -import androidx.recyclerview.widget.LinearLayoutManager -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.common.Preferences.LSCLOCK_SWITCH -import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.data.models.ClockModel -import com.drdisagree.iconify.ui.utils.ViewBindingHelpers.setBitmapWithAnimation -import com.drdisagree.iconify.utils.WallpaperUtils -import com.google.android.material.button.MaterialButton -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch -import kotlinx.coroutines.withContext - -@Suppress("deprecation") -class ClockPreviewAdapter( - private val context: Context, - private val itemList: ArrayList, - prefSwitch: String?, - prefStyle: String, - private val mOnStyleSelected: OnStyleSelected? = null -) : RecyclerView.Adapter() { - - private val prefStyle: String - private var linearLayoutManager: LinearLayoutManager? = null - - init { - Companion.prefSwitch = prefSwitch - this.prefStyle = prefStyle - loadWallpaper(this) - } - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { - val view = LayoutInflater.from(context).inflate( - if (prefSwitch == LSCLOCK_SWITCH) { - R.layout.view_clock_preview_lockscreen - } else { - R.layout.view_clock_preview_header - }, - parent, - false - ) - return ViewHolder(view) - } - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - val model = itemList[position] - holder.bind(model, position) - } - - override fun getItemCount(): Int { - return itemList.size - } - - inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { - - 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) - } - - clockContainer.removeAllViews() - - val viewStub = ViewStub(context) - val params = LinearLayout.LayoutParams( - LinearLayout.LayoutParams.MATCH_PARENT, - LinearLayout.LayoutParams.WRAP_CONTENT - ) - - params.gravity = Gravity.CENTER_VERTICAL - viewStub.setLayoutParams(params) - viewStub.layoutResource = model.layout - - clockContainer.addView(viewStub) - - if (viewStub.parent != null) { - viewStub.inflate() - } - - val isSelected = adapterPosition == getBindingAdapterPosition() - button.setEnabled(!isSelected) - checkIcon.setVisibility(if (isSelected) View.VISIBLE else View.GONE) - - wallpaperBitmap?.let { - wallpaperView.setBitmapWithAnimation(it) - } - } - } - - private fun refreshLayout(holder: ViewHolder) { - val firstVisible = linearLayoutManager!!.findFirstVisibleItemPosition() - 1 - val lastVisible = linearLayoutManager!!.findLastVisibleItemPosition() + 1 - - for (i in firstVisible..lastVisible) { - val view = linearLayoutManager!!.findViewByPosition(i) ?: continue - val child = view.findViewById(R.id.clock_preview_child) ?: continue - val isSelected = view === holder.container - - child.findViewById(R.id.btn_select_style).setEnabled(!isSelected) - child.findViewById(R.id.icon_selected).visibility = - if (!isSelected) View.GONE else View.VISIBLE - } - } - - override fun onViewAttachedToWindow(holder: ViewHolder) { - super.onViewAttachedToWindow(holder) - - if (RPrefs.getInt(prefStyle, 0) != holder.getBindingAdapterPosition()) { - holder.checkIcon.setVisibility(View.GONE) - holder.button.setEnabled(true) - } else { - holder.checkIcon.setVisibility(View.VISIBLE) - holder.button.setEnabled(false) - } - } - - override fun onAttachedToRecyclerView(recyclerView: RecyclerView) { - super.onAttachedToRecyclerView(recyclerView) - - linearLayoutManager = recyclerView.layoutManager as LinearLayoutManager? - } - - @SuppressLint("NotifyDataSetChanged") - fun loadWallpaper(adapter: ClockPreviewAdapter) { - CoroutineScope(Dispatchers.Main).launch { - val bitmap = withContext(Dispatchers.IO) { - WallpaperUtils.getCompressedWallpaper( - adapter.context, - 80, - if (prefSwitch == LSCLOCK_SWITCH) { - WallpaperManager.FLAG_LOCK - } else { - WallpaperManager.FLAG_SYSTEM - } - ) - } - - if (bitmap != null && prefSwitch == LSCLOCK_SWITCH) { - wallpaperBitmap = bitmap - adapter.notifyDataSetChanged() - } - } - } - - 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/ForecastDayAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ForecastDayAdapter.kt deleted file mode 100644 index 153316e4c..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ForecastDayAdapter.kt +++ /dev/null @@ -1,102 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.annotation.SuppressLint -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.Iconify.Companion.appContextLocale -import com.drdisagree.iconify.R -import com.drdisagree.iconify.databinding.ViewListForecastDayItemBinding -import com.drdisagree.iconify.utils.OmniJawsClient -import java.text.SimpleDateFormat -import java.util.Calendar -import java.util.Locale - -class ForecastDayAdapter(weatherClient: OmniJawsClient) : - RecyclerView.Adapter() { - - private val mList: MutableList = - ArrayList() - private val mWeatherClient: OmniJawsClient = weatherClient - - init { - mWeatherClient.queryWeather() - } - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { - val binding: ViewListForecastDayItemBinding = ViewListForecastDayItemBinding.inflate( - LayoutInflater.from(parent.context), - parent, - false - ) - return ViewHolder(binding, mWeatherClient) - } - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - val forecast: OmniJawsClient.DayForecast = mList[position] - holder.bind(forecast) - } - - override fun getItemCount(): Int { - return mList.size - } - - @SuppressLint("NotifyDataSetChanged") - fun updateList(list: List?) { - mList.clear() - mList.addAll(list!!) - notifyDataSetChanged() - } - - class ViewHolder internal constructor( - private val binding: ViewListForecastDayItemBinding, - weatherClient: OmniJawsClient - ) : - RecyclerView.ViewHolder(binding.getRoot()) { - private val mWeatherClient: OmniJawsClient = weatherClient - - @SuppressLint("SetTextI18n") - fun bind(forecast: OmniJawsClient.DayForecast) { - binding.forecastTime.text = formatDate(forecast.date!!) - binding.forecastIcon.setImageDrawable(mWeatherClient.getWeatherConditionImage(forecast.conditionCode)) - binding.forecastTemperature.text = (forecast.low + "° / " + forecast.high) + "°" - } - - private fun formatDate(inputDate: String): String? { - val inputFormat = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()) - val dayMonthFormat = SimpleDateFormat("dd MMM", Locale.getDefault()) - - try { - val date = inputFormat.parse(inputDate) - val inputCalendar = Calendar.getInstance() - if (date != null) { - inputCalendar.time = date - } - - val today = Calendar.getInstance() - val tomorrow = Calendar.getInstance() - tomorrow.add(Calendar.DAY_OF_YEAR, 1) - - val formattedDate = date?.let { dayMonthFormat.format(it) } - - if (isSameDay(inputCalendar, today)) { - return formattedDate + " " + appContextLocale.getString(R.string.omnijaws_today) - } else if (isSameDay(inputCalendar, tomorrow)) { - return formattedDate + " " + appContextLocale.getString(R.string.omnijaws_tomorrow) - } else { - val dayOfWeekFormat = SimpleDateFormat("EEE", Locale.getDefault()) - val dayOfWeek = date?.let { dayOfWeekFormat.format(it) } - return "$formattedDate $dayOfWeek" - } - } catch (e: Exception) { - e.printStackTrace() - return null - } - } - - private fun isSameDay(cal1: Calendar, cal2: Calendar): Boolean { - return cal1[Calendar.YEAR] == cal2[Calendar.YEAR] && - cal1[Calendar.DAY_OF_YEAR] == cal2[Calendar.DAY_OF_YEAR] - } - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ForecastHourAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/ForecastHourAdapter.kt deleted file mode 100644 index f995fb772..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ForecastHourAdapter.kt +++ /dev/null @@ -1,73 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.annotation.SuppressLint -import android.util.Log -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.databinding.ViewListForecastHourItemBinding -import com.drdisagree.iconify.utils.OmniJawsClient -import java.text.SimpleDateFormat -import java.util.Locale - -class ForecastHourAdapter(client: OmniJawsClient) : - RecyclerView.Adapter() { - - private val mList: MutableList = - ArrayList() - private val mWeatherClient: OmniJawsClient = client - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { - val binding: ViewListForecastHourItemBinding = ViewListForecastHourItemBinding.inflate( - LayoutInflater.from(parent.context), - parent, - false - ) - return ViewHolder(binding, mWeatherClient) - } - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - val forecast: OmniJawsClient.HourForecast = mList[position] - holder.bind(forecast) - } - - override fun getItemCount(): Int { - return mList.size - } - - fun updateList(list: List?) { - mList.clear() - mList.addAll(list!!) - notifyDataSetChanged() - } - - class ViewHolder internal constructor( - binding: ViewListForecastHourItemBinding, - weatherClient: OmniJawsClient - ) : - RecyclerView.ViewHolder(binding.getRoot()) { - private val binding: ViewListForecastHourItemBinding = binding - private val mWeatherClient: OmniJawsClient = weatherClient - - @SuppressLint("SetTextI18n") - fun bind(forecast: OmniJawsClient.HourForecast) { - binding.forecastTime.text = formatHour(forecast.time!!) - binding.forecastIcon.setImageDrawable(mWeatherClient.getWeatherConditionImage(forecast.conditionCode)) - binding.forecastTemperature.text = forecast.temperature + "°" - } - - private fun formatHour(inputDate: String): String? { - val inputFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm", Locale.getDefault()) - val dayMonthFormat = SimpleDateFormat("HH:mm", Locale.getDefault()) - - try { - val date = inputFormat.parse(inputDate) - - return date?.let { dayMonthFormat.format(it) } - } catch (e: Exception) { - Log.e("ForecastHourAdapter", "Error parsing hours", e) - return 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 deleted file mode 100644 index 76a78cb27..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconPackAdapter.kt +++ /dev/null @@ -1,320 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.app.Activity -import android.content.Context -import android.os.Handler -import android.os.Looper -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.Button -import android.widget.ImageView -import android.widget.LinearLayout -import android.widget.TextView -import android.widget.Toast -import androidx.core.content.ContextCompat -import androidx.recyclerview.widget.LinearLayoutManager -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.Iconify.Companion.appContext -import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.config.RPrefs.getBoolean -import com.drdisagree.iconify.ui.dialogs.LoadingDialog -import com.drdisagree.iconify.data.models.IconPackModel - -class IconPackAdapter( - var context: Context, - private var itemList: ArrayList, - 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( - 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 - ) - return ViewHolder(view) - } - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - holder.styleName.text = itemList[position].name - 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) - } - - override fun getItemCount(): Int { - return itemList.size - } - - override fun onViewAttachedToWindow(holder: ViewHolder) { - super.onViewAttachedToWindow(holder) - - itemSelected(holder.container, getBoolean(iconPackKeys[holder.getBindingAdapterPosition()])) - refreshButton(holder) - } - - override fun onAttachedToRecyclerView(recyclerView: RecyclerView) { - super.onAttachedToRecyclerView(recyclerView) - - linearLayoutManager = recyclerView.layoutManager as LinearLayoutManager? - } - - // Function for onClick events - private fun enableOnClickListener(holder: ViewHolder) { - // Set onClick operation for each item - holder.container.setOnClickListener { - selectedItem = - if (selectedItem == holder.getBindingAdapterPosition()) -1 else holder.getBindingAdapterPosition() - - refreshLayout(holder) - - if (!getBoolean(iconPackKeys[holder.getBindingAdapterPosition()])) { - holder.btnDisable.visibility = View.GONE - - if (holder.btnEnable.visibility == View.VISIBLE) { - holder.btnEnable.visibility = - View.GONE - } else { - holder.btnEnable.visibility = View.VISIBLE - } - } else { - holder.btnEnable.visibility = View.GONE - - if (holder.btnDisable.visibility == View.VISIBLE) { - holder.btnDisable.visibility = - View.GONE - } else { - holder.btnDisable.visibility = View.VISIBLE - } - } - } - - // Set onClick operation for Enable button - holder.btnEnable.setOnClickListener { - // Show loading dialog - loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait)) - - Thread { - if (onButtonClick != null) { - onButtonClick!!.onEnableClick( - holder.bindingAdapterPosition, - itemList[holder.bindingAdapterPosition] - ) - } - - (context as Activity).runOnUiThread { - Handler(Looper.getMainLooper()).postDelayed({ - // Hide loading dialog - loadingDialog.hide() - - // Change button visibility - holder.btnEnable.visibility = View.GONE - holder.btnDisable.visibility = View.VISIBLE - - refreshBackground(holder) - - Toast.makeText( - appContext, - context.resources.getString(R.string.toast_applied), - Toast.LENGTH_SHORT - ).show() - }, 3000) - } - }.start() - } - - // Set onClick operation for Disable button - holder.btnDisable.setOnClickListener { - // Show loading dialog - loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait)) - - Thread { - if (onButtonClick != null) { - onButtonClick!!.onDisableClick( - holder.bindingAdapterPosition, - itemList[holder.bindingAdapterPosition] - ) - } - - (context as Activity).runOnUiThread { - Handler(Looper.getMainLooper()).postDelayed({ - // Hide loading dialog - loadingDialog.hide() - - // Change button visibility - holder.btnDisable.visibility = View.GONE - holder.btnEnable.visibility = View.VISIBLE - - refreshBackground(holder) - - Toast.makeText( - appContext, - context.resources.getString(R.string.toast_disabled), - Toast.LENGTH_SHORT - ).show() - }, 3000) - } - }.start() - } - } - - // Function to check for layout changes - private fun refreshLayout(holder: ViewHolder) { - val firstVisible = linearLayoutManager!!.findFirstVisibleItemPosition() - val lastVisible = linearLayoutManager!!.findLastVisibleItemPosition() - - for (i in firstVisible..lastVisible) { - val view = linearLayoutManager!!.findViewByPosition(i) - - if (view != null) { - val child = view.findViewById(R.id.icon_pack_child) - - if (view !== holder.container && child != null) { - child.findViewById(R.id.enable_iconpack).visibility = View.GONE - child.findViewById(R.id.disable_iconpack).visibility = View.GONE - } - } - } - } - - // Function to check for applied options - private fun refreshBackground(holder: ViewHolder) { - val firstVisible = linearLayoutManager!!.findFirstVisibleItemPosition() - val lastVisible = linearLayoutManager!!.findLastVisibleItemPosition() - - for (i in firstVisible..lastVisible) { - val view = linearLayoutManager!!.findViewByPosition(i) - - if (view != null) { - val child = view.findViewById(R.id.icon_pack_child) - - if (child != null) { - itemSelected( - child, - i == holder.getAbsoluteAdapterPosition() && - getBoolean(iconPackKeys[i - (holder.getAbsoluteAdapterPosition() - holder.getBindingAdapterPosition())]) - ) - } - } - } - } - - private fun refreshButton(holder: ViewHolder) { - if (holder.getBindingAdapterPosition() != selectedItem) { - holder.btnEnable.visibility = View.GONE - holder.btnDisable.visibility = View.GONE - } else { - if (getBoolean(iconPackKeys[selectedItem])) { - holder.btnEnable.visibility = View.GONE - holder.btnDisable.visibility = View.VISIBLE - } else { - holder.btnEnable.visibility = View.VISIBLE - holder.btnDisable.visibility = View.GONE - } - } - } - - private fun itemSelected(parent: View, state: Boolean) { - if (state) { - parent.background = ContextCompat.getDrawable(context, R.drawable.container_selected) - (parent.findViewById(R.id.iconpack_title) as TextView).setTextColor( - ContextCompat.getColor( - context, R.color.colorAccent - ) - ) - (parent.findViewById(R.id.iconpack_desc) as TextView).setTextColor( - ContextCompat.getColor( - context, R.color.colorAccent - ) - ) - parent.findViewById(R.id.icon_selected).visibility = View.VISIBLE - parent.findViewById(R.id.iconpack_desc).setAlpha(0.8f) - } else { - parent.background = - ContextCompat.getDrawable(context, R.drawable.item_background_material) - (parent.findViewById(R.id.iconpack_title) as TextView).setTextColor( - ContextCompat.getColor( - context, R.color.text_color_primary - ) - ) - (parent.findViewById(R.id.iconpack_desc) as TextView).setTextColor( - ContextCompat.getColor( - context, R.color.text_color_secondary - ) - ) - parent.findViewById(R.id.icon_selected).visibility = View.INVISIBLE - parent.findViewById(R.id.iconpack_desc).setAlpha(1f) - } - } - - class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { - - 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 deleted file mode 100644 index cb09e0d02..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconShapeAdapter.kt +++ /dev/null @@ -1,99 +0,0 @@ -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.data.common.Preferences.SELECTED_ICON_SHAPE -import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.databinding.ViewIconShapeBinding -import com.drdisagree.iconify.data.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 deleted file mode 100644 index 405db66a0..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/IconsAdapter.kt +++ /dev/null @@ -1,178 +0,0 @@ -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.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 - - /** - * Sets drawables for the icons - * @param drawables The drawables of the icons - */ - fun setDrawables(drawables: Array?) { - mEntryDrawables = drawables - } - - /** - * Set icons from Resources - * This should be used when the icons are from resources - * @param resIds The resource ids of the icons - */ - fun setResIds(resIds: IntArray?) { - mEntryResIds = resIds - } - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { - 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) { - 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]) - } else if (mEntryResIds != null) { - holder.binding.batteryIcon.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 = mValue.toInt() - mValue = position.toString() - - notifyItemChanged(previousPosition) - notifyItemChanged(position) - - onItemClickListener.onItemClick(v, position) - } - } - - 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 - } - - fun setCurrentValue(currentValue: String) { - mValue = currentValue - } - - class IconsViewHolder internal constructor(val binding: ViewListIconItemBinding) : - RecyclerView.ViewHolder( - binding.getRoot() - ) - - class WeatherIconsViewHolder internal constructor(val binding: ViewListOptionWeatherIconsBinding) : - RecyclerView.ViewHolder( - binding.getRoot() - ) - - /** - * Interface for the click on the item - */ - interface OnItemClickListener { - fun onItemClick(view: View, position: Int) - } -} \ No newline at end of file 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 deleted file mode 100644 index 53aaf9ed9..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/InfoAdapter.kt +++ /dev/null @@ -1,103 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.annotation.SuppressLint -import android.content.Context -import android.graphics.BlendMode -import android.graphics.BlendModeColorFilter -import android.util.TypedValue -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.ImageView -import android.widget.RelativeLayout -import android.widget.TextView -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.models.InfoModel -import com.drdisagree.iconify.ui.utils.ViewBindingHelpers.setRoundImageUrl - -class InfoAdapter( - var context: Context, - private var itemList: ArrayList -) : RecyclerView.Adapter() { - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { - return when (viewType) { - TYPE_HEADER -> { - HeaderViewHolder( - LayoutInflater.from( - context - ).inflate(R.layout.view_list_info_header, parent, false) - ) - } - - TYPE_ITEM -> { - ItemViewHolder( - LayoutInflater.from( - context - ).inflate(R.layout.view_list_info_item, parent, false) - ) - } - - else -> throw RuntimeException("There is no type that matches the type $viewType. + make sure you are using types correctly.") - } - } - - @SuppressLint("DiscouragedApi") - override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { - if (holder is HeaderViewHolder) { - holder.header.text = itemList[position].title - - if (itemList[position].title == "") { - holder.itemView.visibility = View.GONE - holder.itemView.setLayoutParams(RecyclerView.LayoutParams(0, 0)) - } - } else if (holder is ItemViewHolder) { - holder.title.text = itemList[position].title - holder.desc.text = itemList[position].desc - holder.container.setOnClickListener(itemList[position].onClickListener) - - val typedValue = TypedValue() - context.theme.resolveAttribute( - com.google.android.material.R.attr.colorOnSurface, - typedValue, - true - ) - val colorOnSurface = typedValue.data - - if (itemList[position].icon is Int) { - holder.icon.colorFilter = BlendModeColorFilter(colorOnSurface, BlendMode.SRC_IN) - holder.icon.setImageResource(itemList[position].icon as Int) - } else if (itemList[position].icon is String) { - holder.icon.clearColorFilter() - holder.icon.setRoundImageUrl(itemList[position].icon as String) - } - } - } - - override fun getItemCount(): Int { - return itemList.size - } - - override fun getItemViewType(position: Int): Int { - return if (position == 0) TYPE_HEADER else TYPE_ITEM - } - - internal class HeaderViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { - - var header: TextView = itemView.findViewById(R.id.list_info_header) - } - - internal class ItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { - - 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 { - private const val TYPE_HEADER = 0 - private const val TYPE_ITEM = 1 - } -} \ No newline at end of file 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 deleted file mode 100644 index eb77e99bc..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ListPreferenceAdapter.kt +++ /dev/null @@ -1,179 +0,0 @@ -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.data.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 var mEntryIcons: IntArray? - private var 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.inflate( - LayoutInflater.from(parent.context), - parent, - false - ) - val batteryIconOptionsBinding = 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) { - mEntryDrawables?.let { - holder.binding.batteryIcon.setImageDrawable( - it[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 - } - - fun updateDrawables(newDrawables: Array) { - mEntryDrawables = newDrawables - } - - fun updateIcons(newIcons: IntArray) { - mEntryIcons = newIcons - } - - 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 deleted file mode 100644 index 1fc328c1f..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/MenuAdapter.kt +++ /dev/null @@ -1,40 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.content.Context -import android.view.View -import android.view.ViewGroup -import androidx.fragment.app.FragmentManager -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.ui.activities.MainActivity.Companion.replaceFragment -import com.drdisagree.iconify.data.models.MenuModel -import com.drdisagree.iconify.ui.widgets.MenuWidget - -class MenuAdapter( - private var fragmentManager: FragmentManager, - var context: Context, - private var itemList: ArrayList -) : RecyclerView.Adapter() { - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { - return ViewHolder(MenuWidget(context)) - } - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - val menu = holder.itemView as MenuWidget - - menu.setTitle(itemList[position].title) - menu.setSummary(itemList[position].desc) - menu.setIcon(itemList[position].icon) - menu.setEndArrowVisibility(View.VISIBLE) - - menu.setOnClickListener { - replaceFragment(fragmentManager, itemList[position].fragment) - } - } - - override fun getItemCount(): Int { - return itemList.size - } - - class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) -} 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 deleted file mode 100644 index a1a6a78f8..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/NotificationAdapter.kt +++ /dev/null @@ -1,353 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.app.Activity -import android.content.Context -import android.os.Handler -import android.os.Looper -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.Button -import android.widget.ImageView -import android.widget.LinearLayout -import android.widget.TextView -import android.widget.Toast -import androidx.core.content.ContextCompat -import androidx.recyclerview.widget.LinearLayoutManager -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.Iconify.Companion.appContext -import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.config.RPrefs.getBoolean -import com.drdisagree.iconify.data.models.NotificationModel -import com.drdisagree.iconify.ui.dialogs.LoadingDialog -import com.drdisagree.iconify.ui.utils.ViewBindingHelpers.setDrawable -import com.drdisagree.iconify.utils.overlay.manager.NotificationManager - -class NotificationAdapter( - var context: Context, - private var itemList: ArrayList, - var loadingDialog: LoadingDialog -) : RecyclerView.Adapter() { - - private var notificationKeys = ArrayList() - private var linearLayoutManager: LinearLayoutManager? = null - private var selectedItem = -1 - - init { - // Preference key - for (i in 1..itemList.size) notificationKeys.add("IconifyComponentNFN$i.overlay") - } - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { - val view = LayoutInflater.from(context) - .inflate(R.layout.view_list_option_notification, parent, false) - return ViewHolder(view) - } - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - holder.container.setDrawable( - ContextCompat.getDrawable(context, itemList[position].background) - ) - - holder.styleName.text = itemList[position].name - holder.icCollapseExpand.setForeground( - ContextCompat.getDrawable( - context, - R.drawable.ic_expand_arrow - ) - ) - - if (getBoolean(notificationKeys[position])) { - holder.styleName.setTextColor( - context.resources.getColor( - R.color.colorAccent, - context.theme - ) - ) - holder.container.findViewById(R.id.icon_selected).visibility = View.VISIBLE - } else { - holder.styleName.setTextColor( - context.resources.getColor( - R.color.textColorPrimary, - context.theme - ) - ) - holder.container.findViewById(R.id.icon_selected).visibility = View.INVISIBLE - } - - refreshButton(holder) - enableOnClickListener(holder) - } - - override fun getItemCount(): Int { - return itemList.size - } - - override fun onViewAttachedToWindow(holder: ViewHolder) { - super.onViewAttachedToWindow(holder) - - if (getBoolean(notificationKeys[holder.getBindingAdapterPosition()])) { - holder.styleName.setTextColor( - context.resources.getColor( - R.color.colorAccent, - context.theme - ) - ) - holder.container.findViewById(R.id.icon_selected).visibility = - View.VISIBLE - } else { - holder.styleName.setTextColor( - context.resources.getColor( - R.color.textColorPrimary, - context.theme - ) - ) - holder.container.findViewById(R.id.icon_selected).visibility = View.INVISIBLE - } - - refreshButton(holder) - } - - override fun onAttachedToRecyclerView(recyclerView: RecyclerView) { - super.onAttachedToRecyclerView(recyclerView) - linearLayoutManager = recyclerView.layoutManager as LinearLayoutManager? - } - - // Function for onClick events - private fun enableOnClickListener(holder: ViewHolder) { - // Set onClick operation for each item - holder.container.setOnClickListener { - selectedItem = - if (selectedItem == holder.getBindingAdapterPosition()) { - -1 - } else { - holder.getBindingAdapterPosition() - } - - refreshLayout(holder) - - if (!getBoolean(notificationKeys[holder.getBindingAdapterPosition()])) { - holder.btnDisable.visibility = View.GONE - - if (holder.btnEnable.visibility == View.VISIBLE) { - holder.btnEnable.visibility = View.GONE - holder.icCollapseExpand.setForeground( - ContextCompat.getDrawable( - context, - R.drawable.ic_expand_arrow - ) - ) - } else { - holder.btnEnable.visibility = View.VISIBLE - holder.icCollapseExpand.setForeground( - ContextCompat.getDrawable( - context, - R.drawable.ic_collapse_arrow - ) - ) - } - } else { - holder.btnEnable.visibility = View.GONE - - if (holder.btnDisable.visibility == View.VISIBLE) { - holder.btnDisable.visibility = View.GONE - holder.icCollapseExpand.setForeground( - ContextCompat.getDrawable( - context, - R.drawable.ic_expand_arrow - ) - ) - } else { - holder.btnDisable.visibility = View.VISIBLE - holder.icCollapseExpand.setForeground( - ContextCompat.getDrawable( - context, - R.drawable.ic_collapse_arrow - ) - ) - } - } - } - - // Set onClick operation for Enable button - holder.btnEnable.setOnClickListener { - // Show loading dialog - loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait)) - - Thread { - NotificationManager.enableOverlay(holder.getBindingAdapterPosition() + 1) - - (context as Activity).runOnUiThread { - Handler(Looper.getMainLooper()).postDelayed({ - // Hide loading dialog - loadingDialog.hide() - - holder.styleName.setTextColor( - context.resources.getColor( - R.color.colorAccent, - context.theme - ) - ) - holder.container.findViewById(R.id.icon_selected).visibility = - View.VISIBLE - - // Change button visibility - holder.btnEnable.visibility = View.GONE - holder.btnDisable.visibility = View.VISIBLE - - refreshName(holder) - - Toast.makeText( - appContext, - context.resources.getString(R.string.toast_applied), - Toast.LENGTH_SHORT - ).show() - }, 1000) - } - }.start() - } - - // Set onClick operation for Disable button - holder.btnDisable.setOnClickListener { - // Show loading dialog - loadingDialog.show(context.resources.getString(R.string.loading_dialog_wait)) - - Thread { - NotificationManager.disableOverlay(holder.getBindingAdapterPosition() + 1) - - (context as Activity).runOnUiThread { - Handler(Looper.getMainLooper()).postDelayed({ - // Hide loading dialog - loadingDialog.hide() - - holder.styleName.setTextColor( - context.resources.getColor( - R.color.textColorPrimary, - context.theme - ) - ) - holder.container.findViewById(R.id.icon_selected).visibility = - View.INVISIBLE - - // Change button visibility - holder.btnDisable.visibility = View.GONE - holder.btnEnable.visibility = View.VISIBLE - - refreshName(holder) - - Toast.makeText( - appContext, - context.resources.getString(R.string.toast_disabled), - Toast.LENGTH_SHORT - ).show() - }, 1000) - } - }.start() - } - } - - // Function to check for layout changes - private fun refreshLayout(holder: ViewHolder) { - val firstVisible = linearLayoutManager!!.findFirstVisibleItemPosition() - val lastVisible = linearLayoutManager!!.findLastVisibleItemPosition() - - for (i in firstVisible..lastVisible) { - val view = linearLayoutManager!!.findViewByPosition(i) - - if (view != null) { - val child = view.findViewById(R.id.notification_child) - - if (view !== holder.container && child != null) { - child.findViewById(R.id.enable_notif).visibility = View.GONE - child.findViewById(R.id.disable_notif).visibility = View.GONE - child.findViewById(R.id.notif_arrow).setForeground( - ContextCompat.getDrawable( - context, R.drawable.ic_expand_arrow - ) - ) - } - } - } - } - - // Function to check for applied options - private fun refreshName(holder: ViewHolder) { - val firstVisible = linearLayoutManager!!.findFirstVisibleItemPosition() - val lastVisible = linearLayoutManager!!.findLastVisibleItemPosition() - - for (i in firstVisible..lastVisible) { - val view = linearLayoutManager!!.findViewByPosition(i) - - if (view != null) { - val child = view.findViewById(R.id.notification_child) - - if (child != null) { - val title = child.findViewById(R.id.notif_title) - val selected = child.findViewById(R.id.icon_selected) - - if (i == holder.getAbsoluteAdapterPosition() && - getBoolean(notificationKeys[i - (holder.getAbsoluteAdapterPosition() - holder.getBindingAdapterPosition())]) - ) { - title.setTextColor( - context.resources.getColor( - R.color.colorAccent, - context.theme - ) - ) - selected.setVisibility(View.VISIBLE) - } else { - title.setTextColor( - context.resources.getColor( - R.color.textColorPrimary, - context.theme - ) - ) - selected.setVisibility(View.INVISIBLE) - } - } - } - } - } - - private fun refreshButton(holder: ViewHolder) { - if (holder.getBindingAdapterPosition() != selectedItem) { - holder.btnEnable.visibility = View.GONE - holder.btnDisable.visibility = View.GONE - holder.icCollapseExpand.setForeground( - ContextCompat.getDrawable( - context, - R.drawable.ic_expand_arrow - ) - ) - } else { - if (getBoolean(notificationKeys[selectedItem])) { - holder.btnEnable.visibility = View.GONE - holder.btnDisable.visibility = View.VISIBLE - holder.icCollapseExpand.setForeground( - ContextCompat.getDrawable( - context, - R.drawable.ic_expand_arrow - ) - ) - } else { - holder.btnEnable.visibility = View.VISIBLE - holder.btnDisable.visibility = View.GONE - holder.icCollapseExpand.setForeground( - ContextCompat.getDrawable( - context, - R.drawable.ic_collapse_arrow - ) - ) - } - } - } - - class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { - - var container: LinearLayout = itemView.findViewById(R.id.notification_child) - var styleName: TextView = itemView.findViewById(R.id.notif_title) - var icCollapseExpand: ImageView = itemView.findViewById(R.id.notif_arrow) - var btnEnable: Button = itemView.findViewById(R.id.enable_notif) - var btnDisable: Button = itemView.findViewById(R.id.disable_notif) - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/OnboardingAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/OnboardingAdapter.kt deleted file mode 100644 index ae689f0cc..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/OnboardingAdapter.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.view.LayoutInflater -import android.view.ViewGroup -import android.widget.ImageView -import android.widget.TextView -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.databinding.ViewOnboardingPageItemBinding -import com.drdisagree.iconify.ui.adapters.OnboardingAdapter.PagerViewHolder -import com.drdisagree.iconify.data.entity.OnboardingPage - -class OnboardingAdapter : RecyclerView.Adapter() { - - private val onBoardingPageList: Array = OnboardingPage.entries.toTypedArray() - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PagerViewHolder { - val inflater = LayoutInflater.from(parent.context) - val binding = ViewOnboardingPageItemBinding.inflate(inflater, parent, false) - return PagerViewHolder(binding) - } - - override fun onBindViewHolder(holder: PagerViewHolder, position: Int) { - holder.bind(onBoardingPageList[position]) - } - - override fun getItemCount(): Int { - return onBoardingPageList.size - } - - class PagerViewHolder( - private val binding: ViewOnboardingPageItemBinding - ) : RecyclerView.ViewHolder( - binding.getRoot() - ) { - - private val titleTv: TextView - private val subTitleTv: TextView - private val descTV: TextView - private val img: ImageView - - init { - titleTv = binding.titleTv - subTitleTv = binding.subTitleTv - descTV = binding.descTV - img = binding.img - } - - fun bind(onBoardingPage: OnboardingPage) { - val context = binding.getRoot().context - val res = context.resources - titleTv.text = res.getString(onBoardingPage.titleResource) - subTitleTv.text = res.getString(onBoardingPage.subTitleResource) - descTV.text = res.getString(onBoardingPage.descriptionResource) - img.setImageResource(onBoardingPage.logoResource) - } - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/ui/adapters/SectionTitleAdapter.kt b/app/src/main/java/com/drdisagree/iconify/ui/adapters/SectionTitleAdapter.kt deleted file mode 100644 index fd835a97c..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/SectionTitleAdapter.kt +++ /dev/null @@ -1,37 +0,0 @@ -package com.drdisagree.iconify.ui.adapters - -import android.content.Context -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import androidx.recyclerview.widget.RecyclerView -import com.drdisagree.iconify.R -import com.google.android.material.textview.MaterialTextView - -class SectionTitleAdapter( - var context: Context, - var layout: Int, - text: Int -) : RecyclerView.Adapter() { - - var text: String - - init { - this.text = context.getString(text) - } - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { - val view = LayoutInflater.from(context).inflate(layout, parent, false) - (view.findViewById(R.id.section_title) as MaterialTextView).text = text - return ViewHolder(view) - } - - override fun onBindViewHolder(holder: ViewHolder, position: Int) { - } - - override fun getItemCount(): Int { - return 1 - } - - class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) -} 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 deleted file mode 100644 index 22d0ec753..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/adapters/ToastAdapter.kt +++ /dev/null @@ -1,89 +0,0 @@ -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.data.common.Preferences.SELECTED_TOAST_FRAME -import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.databinding.ViewToastFrameBinding -import com.drdisagree.iconify.data.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/BaseActivity.kt b/app/src/main/java/com/drdisagree/iconify/ui/base/BaseActivity.kt deleted file mode 100644 index f97e77f42..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/base/BaseActivity.kt +++ /dev/null @@ -1,73 +0,0 @@ -package com.drdisagree.iconify.ui.base - -import android.content.Context -import android.content.res.Configuration -import android.os.Bundle -import android.view.View -import android.view.ViewGroup -import android.view.ViewGroup.MarginLayoutParams -import androidx.appcompat.app.AppCompatActivity -import androidx.appcompat.app.AppCompatDelegate -import androidx.core.view.ViewCompat -import androidx.core.view.WindowCompat -import androidx.core.view.WindowInsetsCompat -import com.drdisagree.iconify.R -import com.drdisagree.iconify.ui.utils.ThemeHelper -import com.drdisagree.iconify.utils.helper.LocaleHelper -import com.google.android.material.appbar.AppBarLayout -import com.google.android.material.shape.MaterialShapeDrawable - -open class BaseActivity : AppCompatActivity() { - - override fun attachBaseContext(newBase: Context) { - super.attachBaseContext(LocaleHelper.setLocale(newBase)) - } - - override fun onCreate(savedInstanceState: Bundle?) { - AppCompatDelegate.setDefaultNightMode(ThemeHelper.theme) - super.onCreate(savedInstanceState) - setupEdgeToEdge() - } - - private fun setupEdgeToEdge() { - try { - (findViewById(R.id.appBarLayout) as AppBarLayout).statusBarForeground = - MaterialShapeDrawable.createWithElevationOverlay( - applicationContext - ) - } catch (ignored: Exception) { - } - - val window = window - WindowCompat.setDecorFitsSystemWindows(window, false) - - if (getResources().configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) { - val viewGroup = getWindow().decorView.findViewById(android.R.id.content) - - ViewCompat.setOnApplyWindowInsetsListener(viewGroup) { v: View, windowInsets: WindowInsetsCompat -> - val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) - val params = v.layoutParams as MarginLayoutParams - - v.setPadding( - params.leftMargin + insets.left, - 0, - params.rightMargin + insets.right, - 0 - ) - - params.topMargin = 0 - params.bottomMargin = 0 - - v.setLayoutParams(params) - - windowInsets - } - } - } - - @Suppress("deprecation") - override fun onSupportNavigateUp(): Boolean { - onBackPressed() - return true - } -} \ 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 deleted file mode 100644 index 360ee145c..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/base/BaseFragment.kt +++ /dev/null @@ -1,146 +0,0 @@ -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.Menu -import android.view.MenuInflater -import android.view.MenuItem -import android.view.View -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.data.common.Dynamic -import com.drdisagree.iconify.data.common.Resources.searchConfiguration -import com.drdisagree.iconify.data.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 - -abstract class BaseFragment : Fragment() { - - private lateinit var _loadingDialog: LoadingDialog - val loadingDialog: LoadingDialog get() = _loadingDialog - - private var startExportActivityIntent = registerForActivityResult( - ActivityResultContracts.StartActivityForResult() - ) { result: ActivityResult -> - handleExportResult( - result = result, - context = requireContext() - ) - } - - 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)) - _loadingDialog = LoadingDialog(requireActivity()) - - if (activity != null) { - val window = requireActivity().window - WindowCompat.setDecorFitsSystemWindows(window, false) - } - } - - 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) - } - - open fun onSearchResultClicked(result: SearchPreferenceResult) { - for (searchableFragment in searchableFragments) { - if (searchableFragment.xml == result.resourceFile) { - replaceFragment(parentFragmentManager, searchableFragment.fragment) - @Suppress("CAST_NEVER_SUCCEEDS") - SearchPreferenceResult.highlight(parentFragmentManager as ControlledPreferenceFragmentCompat, result.key); - break - } - } - } - - override fun onDestroy() { - if (::_loadingDialog.isInitialized) { - _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 deleted file mode 100644 index dce36c041..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/base/ControlledPreferenceFragmentCompat.kt +++ /dev/null @@ -1,276 +0,0 @@ -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.data.common.Dynamic -import com.drdisagree.iconify.data.common.Resources.SHARED_XPREFERENCES -import com.drdisagree.iconify.data.common.Resources.searchConfiguration -import com.drdisagree.iconify.data.common.Resources.searchableFragments -import com.drdisagree.iconify.data.config.PrefsHelper -import com.drdisagree.iconify.data.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.fragments.xposed.LockscreenClockParent -import com.drdisagree.iconify.ui.fragments.xposed.VolumePanelParent -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 lateinit var _loadingDialog: LoadingDialog - val loadingDialog: LoadingDialog get() = _loadingDialog - - 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() - ) - } - - 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)) - _loadingDialog = LoadingDialog(requireActivity()) - - 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) - - 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) - val fragment = searchableFragment.fragment - val resultFragment: ControlledPreferenceFragmentCompat? - - when (fragment) { - is LockscreenClockParent -> { - resultFragment = LockscreenClockParent.getPreferenceFragment() - fragment.scrollToPreference() - } - - is VolumePanelParent -> { - resultFragment = VolumePanelParent.getPreferenceFragment() - fragment.scrollToPreference() - } - - else -> { - resultFragment = fragment as ControlledPreferenceFragmentCompat - } - } - - SearchPreferenceResult.highlight(resultFragment, result.key) - break - } - } - } - } - - override fun onResume() { - super.onResume() - updateScreen(null) - } - - override fun onDestroy() { - if (::_loadingDialog.isInitialized) { - _loadingDialog.dismiss() - } - - 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 deleted file mode 100644 index 1d7676534..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/base/WeatherPreferenceFragment.kt +++ /dev/null @@ -1,391 +0,0 @@ -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.Iconify.Companion.appContextLocale -import com.drdisagree.iconify.R -import com.drdisagree.iconify.data.common.Preferences.PREF_KEY_UPDATE_STATUS -import com.drdisagree.iconify.data.common.Preferences.WEATHER_CUSTOM_LOCATION -import com.drdisagree.iconify.data.common.Preferences.WEATHER_ICON_PACK -import com.drdisagree.iconify.data.common.Preferences.WEATHER_OWM_KEY -import com.drdisagree.iconify.data.common.Preferences.WEATHER_PROVIDER -import com.drdisagree.iconify.data.common.Preferences.WEATHER_YANDEX_KEY -import com.drdisagree.iconify.data.config.RPrefs -import com.drdisagree.iconify.data.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) - } - - 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() - } - - private fun showYandexKeyDialog() { - MaterialAlertDialogBuilder(requireContext()) - .setTitle(appContextLocale.getString(R.string.weather_provider_yandex_key_title)) - .setMessage(appContextLocale.getString(R.string.weather_provider_yandex_key_message)) - .setCancelable(false) - .setPositiveButton(appContextLocale.getString(R.string.understood), null) - .create() - .show() - } - - 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() - if (RPrefs.getString(WEATHER_PROVIDER) == "1" && RPrefs.getString(WEATHER_OWM_KEY) - .isNullOrEmpty() - ) { - showOwnKeyDialog() - } else if (RPrefs.getString(WEATHER_PROVIDER) == "2" && RPrefs.getString( - WEATHER_YANDEX_KEY - ) - .isNullOrEmpty()) { - showYandexKeyDialog() - } - } - } - - @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() - mWeatherClient?.mCachedInfo?.let { - requireActivity().runOnUiThread { - mUpdateStatus?.setSummary(it.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/FadeTransition.kt b/app/src/main/java/com/drdisagree/iconify/ui/core/FadeTransition.kt deleted file mode 100644 index 9444e367a..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/core/FadeTransition.kt +++ /dev/null @@ -1,58 +0,0 @@ -package com.drdisagree.iconify.ui.core - -import android.animation.Animator -import android.animation.ObjectAnimator -import android.content.Context -import android.transition.Transition -import android.transition.TransitionValues -import android.util.AttributeSet -import android.view.View -import android.view.ViewGroup -import com.drdisagree.iconify.R - -@Suppress("unused") -class FadeTransition : Transition { - - private var startAlpha = 0.0f - private var endAlpha = 1.0f - - constructor(startAlpha: Float, endAlpha: Float) { - this.startAlpha = startAlpha - this.endAlpha = endAlpha - } - - constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) { - val a = context.obtainStyledAttributes(attrs, R.styleable.FadeTransition) - startAlpha = a.getFloat(R.styleable.FadeTransition_startAlpha, startAlpha) - endAlpha = a.getFloat(R.styleable.FadeTransition_endAlpha, endAlpha) - a.recycle() - } - - private fun captureValues(transitionValues: TransitionValues) { - transitionValues.values[PROP_NAME_ALPHA] = transitionValues.view.alpha - } - - override fun captureStartValues(transitionValues: TransitionValues) { - captureValues(transitionValues) - } - - override fun captureEndValues(transitionValues: TransitionValues) { - captureValues(transitionValues) - } - - override fun createAnimator( - sceneRoot: ViewGroup, - startValues: TransitionValues?, - endValues: TransitionValues? - ): Animator? { - val view = endValues?.view - if (startAlpha != endAlpha) { - view?.setAlpha(endAlpha) - } - return ObjectAnimator.ofFloat(view, View.ALPHA, startAlpha, endAlpha) - } - - companion object { - private const val PROP_NAME_ALPHA = "android:custom:alpha" - } -} diff --git a/app/src/main/java/com/drdisagree/iconify/ui/core/PopTransition.kt b/app/src/main/java/com/drdisagree/iconify/ui/core/PopTransition.kt deleted file mode 100644 index 7e9a304eb..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/core/PopTransition.kt +++ /dev/null @@ -1,64 +0,0 @@ -package com.drdisagree.iconify.ui.core - -import android.animation.Animator -import android.animation.AnimatorListenerAdapter -import android.animation.ObjectAnimator -import android.animation.PropertyValuesHolder -import android.content.Context -import android.transition.TransitionValues -import android.transition.Visibility -import android.util.AttributeSet -import android.view.View -import android.view.ViewGroup -import com.drdisagree.iconify.R - -@Suppress("unused") -class PopTransition(context: Context, attrs: AttributeSet?) : Visibility(context, attrs) { - - private var startScale = 0.0f - private var endScale = 1.0f - - init { - val a = context.obtainStyledAttributes(attrs, R.styleable.PopTransition) - startScale = a.getFloat(R.styleable.PopTransition_startScale, startScale) - endScale = a.getFloat(R.styleable.PopTransition_endScale, endScale) - a.recycle() - } - - override fun onAppear( - sceneRoot: ViewGroup, - view: View, - startValues: TransitionValues, - endValues: TransitionValues - ): Animator { - view.scaleX = startScale - view.scaleY = startScale - return ObjectAnimator.ofPropertyValuesHolder( - view, - PropertyValuesHolder.ofFloat(View.SCALE_X, endScale), - PropertyValuesHolder.ofFloat(View.SCALE_Y, endScale) - ) - } - - override fun onDisappear( - sceneRoot: ViewGroup, - view: View, - startValues: TransitionValues, - endValues: TransitionValues - ): Animator { - val animator = ObjectAnimator.ofPropertyValuesHolder( - view, - PropertyValuesHolder.ofFloat(View.SCALE_X, endScale), - PropertyValuesHolder.ofFloat(View.SCALE_Y, endScale) - ) - animator.addListener(object : AnimatorListenerAdapter() { - override fun onAnimationEnd(animation: Animator) { - // Reset View X & Y to allow shared element to return with proper start dimension - view.scaleX = startScale - view.scaleY = startScale - view.postInvalidateOnAnimation() - } - }) - return animator - } -} 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 deleted file mode 100644 index 88364a2aa..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/core/Transform.kt +++ /dev/null @@ -1,43 +0,0 @@ -package com.drdisagree.iconify.ui.core - -import android.content.res.Configuration -import android.view.View -import android.widget.ImageView -import androidx.viewpager2.widget.CompositePageTransformer -import androidx.viewpager2.widget.MarginPageTransformer -import com.drdisagree.iconify.R -import kotlin.math.abs - -@Suppress("unused") -object Transform { - - val pageCompositePageTransformer: CompositePageTransformer - get() { - val pageTransformer = CompositePageTransformer() - pageTransformer.addTransformer(MarginPageTransformer(40)) - pageTransformer.addTransformer { page: View, position: Float -> - val r = (1 - abs(position.toDouble())).toFloat() - page.scaleY = 0.85f + r * 0.15f - setParallaxTransformation(page, position) - } - return pageTransformer - } - - fun setParallaxTransformation(page: View, position: Float) { - val parallaxView = page.findViewById(R.id.img) - val isLandscape = - page.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE - if (position < -1) { - // This page is way off-screen to the left. - page.setAlpha(1f) - } else if (position <= 1) { - // [-1,1] - parallaxView.translationX = - -position * ((if (isLandscape) page.height else page.width) / 2f) // Half the normal speed - } else { - // (1,+Infinity] - // This page is way off-screen to the right. - page.setAlpha(1f) - } - } -} \ No newline at end of file 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 deleted file mode 100644 index 903d07f53..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/dialogs/EditTextDialog.kt +++ /dev/null @@ -1,99 +0,0 @@ -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/dialogs/ErrorDialog.kt b/app/src/main/java/com/drdisagree/iconify/ui/dialogs/ErrorDialog.kt deleted file mode 100644 index 8075f6099..000000000 --- a/app/src/main/java/com/drdisagree/iconify/ui/dialogs/ErrorDialog.kt +++ /dev/null @@ -1,73 +0,0 @@ -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.text.Html -import android.view.WindowManager -import android.widget.Button -import android.widget.TextView -import androidx.appcompat.app.AppCompatActivity -import com.drdisagree.iconify.R - -class ErrorDialog(var context: Context) : AppCompatActivity() { - - var dialog: Dialog? = null - - fun show(title: Any?, description: Any?) { - if (dialog != null) dialog!!.dismiss() - - dialog = Dialog(context) - dialog!!.setContentView(R.layout.view_error_dialog) - dialog!!.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) - dialog!!.setCancelable(true) - dialog!!.setOnCancelListener(null) - dialog!!.setCanceledOnTouchOutside(true) - - val text = dialog!!.findViewById(R.id.title) - if (title is Int) { - text.text = Html.fromHtml( - context.resources.getText((title as Int?)!!) as String, - Html.FROM_HTML_MODE_COMPACT - ) - } else if (title is String) { - text.text = Html.fromHtml(title as String?, Html.FROM_HTML_MODE_COMPACT) - } - - val desc = dialog!!.findViewById(R.id.description) - if (description is Int) { - desc.text = Html.fromHtml( - context.resources.getText((description as Int?)!!) as String, - Html.FROM_HTML_MODE_COMPACT - ) - } else if (description is String) { - desc.text = Html.fromHtml(description as String?, Html.FROM_HTML_MODE_COMPACT) - } - - val close = dialog!!.findViewById