├── .gitattributes ├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle.kts ├── proguard-rules.pro └── src │ ├── .gitignore │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── xposed_init │ ├── kotlin │ └── com │ │ └── rcmiku │ │ └── media │ │ └── control │ │ └── tweak │ │ ├── MainHook.kt │ │ ├── drawable │ │ └── SquigglyProgress.kt │ │ └── utils │ │ ├── AppUtils.kt │ │ ├── ColorUtil.kt │ │ ├── MathUtil.kt │ │ └── MeshUtil.kt │ └── res │ ├── drawable │ └── ic_thumb.xml │ └── values │ └── array.xml ├── build.gradle.kts ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle.kts /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.toptal.com/developers/gitignore/api/java,linux,macos,gradle,kotlin,android,windows,jetbrains,androidstudio,visualstudiocode 2 | # Edit at https://www.toptal.com/developers/gitignore?templates=java,linux,macos,gradle,kotlin,android,windows,jetbrains,androidstudio,visualstudiocode 3 | 4 | ### Android ### 5 | # Gradle files 6 | .gradle/ 7 | build/ 8 | 9 | # Local configuration file (sdk path, etc) 10 | local.properties 11 | 12 | # Log/OS Files 13 | *.log 14 | 15 | # Android Studio generated files and folders 16 | captures/ 17 | .externalNativeBuild/ 18 | .cxx/ 19 | *.apk 20 | output.json 21 | 22 | # IntelliJ 23 | *.iml 24 | .idea/ 25 | misc.xml 26 | deploymentTargetDropDown.xml 27 | render.experimental.xml 28 | 29 | # Keystore files 30 | *.jks 31 | *.keystore 32 | 33 | # Google Services (e.g. APIs or Firebase) 34 | google-services.json 35 | 36 | # Android Profiling 37 | *.hprof 38 | 39 | ### Android Patch ### 40 | gen-external-apklibs 41 | 42 | # Replacement of .externalNativeBuild directories introduced 43 | # with Android Studio 3.5. 44 | 45 | ### Java ### 46 | # Compiled class file 47 | *.class 48 | 49 | # Log file 50 | 51 | # BlueJ files 52 | *.ctxt 53 | 54 | # Mobile Tools for Java (J2ME) 55 | .mtj.tmp/ 56 | 57 | # Package Files # 58 | *.jar 59 | *.war 60 | *.nar 61 | *.ear 62 | *.zip 63 | *.tar.gz 64 | *.rar 65 | 66 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 67 | hs_err_pid* 68 | replay_pid* 69 | 70 | ### JetBrains ### 71 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 72 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 73 | 74 | # User-specific stuff 75 | .idea/**/workspace.xml 76 | .idea/**/tasks.xml 77 | .idea/**/usage.statistics.xml 78 | .idea/**/dictionaries 79 | .idea/**/shelf 80 | 81 | # AWS User-specific 82 | .idea/**/aws.xml 83 | 84 | # Generated files 85 | .idea/**/contentModel.xml 86 | 87 | # Sensitive or high-churn files 88 | .idea/**/dataSources/ 89 | .idea/**/dataSources.ids 90 | .idea/**/dataSources.local.xml 91 | .idea/**/sqlDataSources.xml 92 | .idea/**/dynamic.xml 93 | .idea/**/uiDesigner.xml 94 | .idea/**/dbnavigator.xml 95 | 96 | # Gradle 97 | .idea/**/gradle.xml 98 | .idea/**/libraries 99 | 100 | # Gradle and Maven with auto-import 101 | # When using Gradle or Maven with auto-import, you should exclude module files, 102 | # since they will be recreated, and may cause churn. Uncomment if using 103 | # auto-import. 104 | # .idea/artifacts 105 | # .idea/compiler.xml 106 | # .idea/jarRepositories.xml 107 | # .idea/modules.xml 108 | # .idea/*.iml 109 | # .idea/modules 110 | # *.iml 111 | # *.ipr 112 | 113 | # CMake 114 | cmake-build-*/ 115 | 116 | # Mongo Explorer plugin 117 | .idea/**/mongoSettings.xml 118 | 119 | # File-based project format 120 | *.iws 121 | 122 | # IntelliJ 123 | out/ 124 | 125 | # mpeltonen/sbt-idea plugin 126 | .idea_modules/ 127 | 128 | # JIRA plugin 129 | atlassian-ide-plugin.xml 130 | 131 | # Cursive Clojure plugin 132 | .idea/replstate.xml 133 | 134 | # SonarLint plugin 135 | .idea/sonarlint/ 136 | 137 | # Crashlytics plugin (for Android Studio and IntelliJ) 138 | com_crashlytics_export_strings.xml 139 | crashlytics.properties 140 | crashlytics-build.properties 141 | fabric.properties 142 | 143 | # Editor-based Rest Client 144 | .idea/httpRequests 145 | 146 | # Android studio 3.1+ serialized cache file 147 | .idea/caches/build_file_checksums.ser 148 | 149 | ### JetBrains Patch ### 150 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 151 | 152 | # *.iml 153 | # modules.xml 154 | # .idea/misc.xml 155 | # *.ipr 156 | 157 | # Sonarlint plugin 158 | # https://plugins.jetbrains.com/plugin/7973-sonarlint 159 | .idea/**/sonarlint/ 160 | 161 | # SonarQube Plugin 162 | # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin 163 | .idea/**/sonarIssues.xml 164 | 165 | # Markdown Navigator plugin 166 | # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced 167 | .idea/**/markdown-navigator.xml 168 | .idea/**/markdown-navigator-enh.xml 169 | .idea/**/markdown-navigator/ 170 | 171 | # Cache file creation bug 172 | # See https://youtrack.jetbrains.com/issue/JBR-2257 173 | .idea/$CACHE_FILE$ 174 | 175 | # CodeStream plugin 176 | # https://plugins.jetbrains.com/plugin/12206-codestream 177 | .idea/codestream.xml 178 | 179 | # Azure Toolkit for IntelliJ plugin 180 | # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij 181 | .idea/**/azureSettings.xml 182 | 183 | ### Kotlin ### 184 | # Compiled class file 185 | 186 | # Log file 187 | 188 | # BlueJ files 189 | 190 | # Mobile Tools for Java (J2ME) 191 | 192 | # Package Files # 193 | 194 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 195 | 196 | ### Linux ### 197 | *~ 198 | 199 | # temporary files which can be created if a process still has a handle open of a deleted file 200 | .fuse_hidden* 201 | 202 | # KDE directory preferences 203 | .directory 204 | 205 | # Linux trash folder which might appear on any partition or disk 206 | .Trash-* 207 | 208 | # .nfs files are created when an open file is removed but is still being accessed 209 | .nfs* 210 | 211 | ### macOS ### 212 | # General 213 | .DS_Store 214 | .AppleDouble 215 | .LSOverride 216 | 217 | # Icon must end with two \r 218 | Icon 219 | 220 | 221 | # Thumbnails 222 | ._* 223 | 224 | # Files that might appear in the root of a volume 225 | .DocumentRevisions-V100 226 | .fseventsd 227 | .Spotlight-V100 228 | .TemporaryItems 229 | .Trashes 230 | .VolumeIcon.icns 231 | .com.apple.timemachine.donotpresent 232 | 233 | # Directories potentially created on remote AFP share 234 | .AppleDB 235 | .AppleDesktop 236 | Network Trash Folder 237 | Temporary Items 238 | .apdisk 239 | 240 | ### macOS Patch ### 241 | # iCloud generated files 242 | *.icloud 243 | 244 | ### VisualStudioCode ### 245 | .vscode/* 246 | !.vscode/settings.json 247 | !.vscode/tasks.json 248 | !.vscode/launch.json 249 | !.vscode/extensions.json 250 | !.vscode/*.code-snippets 251 | 252 | # Local History for Visual Studio Code 253 | .history/ 254 | 255 | # Built Visual Studio Code Extensions 256 | *.vsix 257 | 258 | ### VisualStudioCode Patch ### 259 | # Ignore all local history of files 260 | .history 261 | .ionide 262 | 263 | ### Windows ### 264 | # Windows thumbnail cache files 265 | Thumbs.db 266 | Thumbs.db:encryptable 267 | ehthumbs.db 268 | ehthumbs_vista.db 269 | 270 | # Dump file 271 | *.stackdump 272 | 273 | # Folder config file 274 | [Dd]esktop.ini 275 | 276 | # Recycle Bin used on file shares 277 | $RECYCLE.BIN/ 278 | 279 | # Windows Installer files 280 | *.cab 281 | *.msi 282 | *.msix 283 | *.msm 284 | *.msp 285 | 286 | # Windows shortcuts 287 | *.lnk 288 | 289 | ### Gradle ### 290 | .gradle 291 | **/build/ 292 | !src/**/build/ 293 | 294 | # Ignore Gradle GUI config 295 | gradle-app.setting 296 | 297 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 298 | !gradle-wrapper.jar 299 | 300 | # Avoid ignore Gradle wrappper properties 301 | !gradle-wrapper.properties 302 | 303 | # Cache of project 304 | .gradletasknamecache 305 | 306 | # Eclipse Gradle plugin generated files 307 | # Eclipse Core 308 | .project 309 | # JDT-specific (Eclipse Java Development Tools) 310 | .classpath 311 | 312 | ### Gradle Patch ### 313 | # Java heap dump 314 | 315 | ### AndroidStudio ### 316 | # Covers files to be ignored for android development using Android Studio. 317 | 318 | # Built application files 319 | *.ap_ 320 | *.aab 321 | 322 | # Files for the ART/Dalvik VM 323 | *.dex 324 | 325 | # Java class files 326 | 327 | # Generated files 328 | bin/ 329 | gen/ 330 | 331 | # Gradle files 332 | 333 | # Signing files 334 | .signing/ 335 | 336 | # Local configuration file (sdk path, etc) 337 | 338 | # Proguard folder generated by Eclipse 339 | proguard/ 340 | 341 | # Log Files 342 | 343 | # Android Studio 344 | /*/build/ 345 | /*/local.properties 346 | /*/out 347 | /*/*/build 348 | /*/*/production 349 | .navigation/ 350 | *.ipr 351 | *.swp 352 | 353 | # Keystore files 354 | 355 | # Google Services (e.g. APIs or Firebase) 356 | # google-services.json 357 | 358 | # Android Patch 359 | 360 | # External native build folder generated in Android Studio 2.2 and later 361 | .externalNativeBuild 362 | 363 | # NDK 364 | obj/ 365 | 366 | # IntelliJ IDEA 367 | /out/ 368 | 369 | # User-specific configurations 370 | .idea/caches/ 371 | .idea/libraries/ 372 | .idea/shelf/ 373 | .idea/workspace.xml 374 | .idea/tasks.xml 375 | .idea/.name 376 | .idea/compiler.xml 377 | .idea/copyright/profiles_settings.xml 378 | .idea/encodings.xml 379 | .idea/misc.xml 380 | .idea/modules.xml 381 | .idea/scopes/scope_settings.xml 382 | .idea/dictionaries 383 | .idea/vcs.xml 384 | .idea/jsLibraryMappings.xml 385 | .idea/datasources.xml 386 | .idea/dataSources.ids 387 | .idea/sqlDataSources.xml 388 | .idea/dynamic.xml 389 | .idea/uiDesigner.xml 390 | .idea/assetWizardSettings.xml 391 | .idea/gradle.xml 392 | .idea/jarRepositories.xml 393 | .idea/navEditor.xml 394 | 395 | # Legacy Eclipse project files 396 | .cproject 397 | .settings/ 398 | 399 | # Mobile Tools for Java (J2ME) 400 | 401 | # Package Files # 402 | 403 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) 404 | 405 | ## Plugin-specific files: 406 | 407 | # mpeltonen/sbt-idea plugin 408 | 409 | # JIRA plugin 410 | 411 | # Mongo Explorer plugin 412 | .idea/mongoSettings.xml 413 | 414 | # Crashlytics plugin (for Android Studio and IntelliJ) 415 | 416 | ### AndroidStudio Patch ### 417 | 418 | !/gradle/wrapper/gradle-wrapper.jar 419 | 420 | # End of https://www.toptal.com/developers/gitignore/api/java,linux,macos,gradle,kotlin,android,windows,jetbrains,androidstudio,visualstudiocode -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Media Control Tweak 2 | 3 | ## Credits 4 | 5 | - [EzXHelper](https://github.com/KyuubiRan/EzXHelper) 6 | - [HyperCeiler](https://github.com/ReChronoRain/HyperCeiler) 7 | - [MediaControlOpt](https://github.com/YuKongA/MediaControlOpt) 8 | - [SquigglyProgress](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/main/packages/SystemUI/src/com/android/systemui/media/controls/ui/drawable/SquigglyProgress.kt) -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /release -------------------------------------------------------------------------------- /app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | @file:Suppress("UnstableApiUsage") 2 | 3 | import com.android.build.gradle.internal.api.BaseVariantOutputImpl 4 | 5 | plugins { 6 | alias(libs.plugins.android.application) 7 | alias(libs.plugins.kotlin.android) 8 | } 9 | 10 | android { 11 | namespace = "com.rcmiku.media.control.tweak" 12 | compileSdk = 35 13 | defaultConfig { 14 | applicationId = namespace 15 | minSdk = 34 16 | targetSdk = 35 17 | versionCode = 1400 18 | versionName = "1.4.0" 19 | } 20 | signingConfigs { 21 | register("release") { 22 | enableV1Signing = true 23 | enableV2Signing = true 24 | enableV3Signing = true 25 | enableV4Signing = true 26 | } 27 | } 28 | buildTypes { 29 | release { 30 | isMinifyEnabled = true 31 | proguardFiles( 32 | getDefaultProguardFile("proguard-android-optimize.txt"), 33 | "proguard-rules.pro" 34 | ) 35 | signingConfig = signingConfigs.findByName("release") 36 | } 37 | debug { 38 | versionNameSuffix = "-debug" 39 | applicationIdSuffix = ".debug" 40 | } 41 | } 42 | compileOptions { 43 | sourceCompatibility = JavaVersion.VERSION_21 44 | targetCompatibility = JavaVersion.VERSION_21 45 | } 46 | kotlinOptions { 47 | jvmTarget = "21" 48 | } 49 | buildToolsVersion = "35.0.0" 50 | dependenciesInfo { 51 | includeInBundle = false 52 | includeInApk = false 53 | } 54 | packaging { 55 | resources.excludes += "**" 56 | applicationVariants.all { 57 | outputs.all { 58 | (this as BaseVariantOutputImpl).outputFileName = 59 | "media-control-tweak-$versionName.apk" 60 | } 61 | } 62 | } 63 | } 64 | 65 | dependencies { 66 | compileOnly(libs.xposed) 67 | implementation(libs.ezXHelper) 68 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class com.rcmiku.media.control.tweak.MainHook { 2 | (); 3 | } -------------------------------------------------------------------------------- /app/src/.gitignore: -------------------------------------------------------------------------------- 1 | /androidTest 2 | /test -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 11 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | com.rcmiku.media.control.tweak.MainHook -------------------------------------------------------------------------------- /app/src/main/kotlin/com/rcmiku/media/control/tweak/MainHook.kt: -------------------------------------------------------------------------------- 1 | package com.rcmiku.media.control.tweak 2 | 3 | import android.app.AndroidAppHelper 4 | import android.graphics.ColorMatrix 5 | import android.graphics.ColorMatrixColorFilter 6 | import android.graphics.Outline 7 | import android.graphics.Paint 8 | import android.graphics.RenderEffect 9 | import android.graphics.Shader 10 | import android.graphics.drawable.BitmapDrawable 11 | import android.graphics.drawable.Icon 12 | import android.media.session.PlaybackState.CustomAction 13 | import android.os.Build 14 | import android.os.Handler 15 | import android.os.Looper 16 | import android.view.View 17 | import android.view.ViewOutlineProvider 18 | import android.widget.ImageView 19 | import android.widget.SeekBar 20 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull 21 | import com.github.kyuubiran.ezxhelper.EzXHelper 22 | import com.github.kyuubiran.ezxhelper.EzXHelper.moduleRes 23 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createAfterHook 24 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createBeforeHook 25 | import com.github.kyuubiran.ezxhelper.Log 26 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper 27 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 28 | import com.rcmiku.media.control.tweak.drawable.SquigglyProgress 29 | import com.rcmiku.media.control.tweak.utils.AppUtils.blur 30 | import com.rcmiku.media.control.tweak.utils.AppUtils.dp 31 | import com.rcmiku.media.control.tweak.utils.AppUtils.drawableToBitmap 32 | import com.rcmiku.media.control.tweak.utils.AppUtils.handleImageEffect 33 | import com.rcmiku.media.control.tweak.utils.AppUtils.mesh 34 | import com.rcmiku.media.control.tweak.utils.AppUtils.scale 35 | import com.rcmiku.media.control.tweak.utils.AppUtils.zoom 36 | import com.rcmiku.media.control.tweak.utils.MeshUtil 37 | import de.robv.android.xposed.IXposedHookLoadPackage 38 | import de.robv.android.xposed.IXposedHookZygoteInit 39 | import de.robv.android.xposed.callbacks.XC_LoadPackage 40 | import java.util.concurrent.Executors 41 | 42 | class MainHook : IXposedHookZygoteInit, IXposedHookLoadPackage { 43 | 44 | private var packageName: String? = null 45 | private var mMediaViewHolder: Any? = null 46 | private var artwork: Icon? = null 47 | private val blur = RenderEffect.createBlurEffect( 48 | 100f, 49 | 100f, 50 | Shader.TileMode.CLAMP 51 | ) 52 | private var scale = 0.8f 53 | private val colorFilter = ColorMatrixColorFilter(ColorMatrix().apply { 54 | setScale(scale, scale, scale, 1f) 55 | }) 56 | 57 | override fun initZygote(startupParam: IXposedHookZygoteInit.StartupParam) { 58 | EzXHelper.initZygote(startupParam) 59 | } 60 | 61 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 62 | EzXHelper.initHandleLoadPackage(lpparam) 63 | EzXHelper.setLogTag("MediaControlTweak") 64 | when (lpparam.packageName) { 65 | "com.android.systemui" -> { 66 | 67 | val mediaDataManager = 68 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 69 | loadClassOrNull("com.android.systemui.media.controls.domain.pipeline.LegacyMediaDataManagerImpl") 70 | else 71 | loadClassOrNull("com.android.systemui.media.controls.pipeline.MediaDataManager") 72 | 73 | val customAction = 74 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 75 | loadClassOrNull("com.android.systemui.media.controls.domain.pipeline.LegacyMediaDataManagerImpl\$createActionsFromState\$customActions\$1") 76 | else 77 | loadClassOrNull("com.android.systemui.media.controls.pipeline.MediaDataManager\$createActionsFromState\$customActions\$1") 78 | 79 | val notificationSettingsManager = 80 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 81 | loadClassOrNull("com.miui.systemui.notification.NotificationSettingsManager") 82 | else 83 | loadClassOrNull("com.android.systemui.statusbar.notification.NotificationSettingsManager") 84 | 85 | val miuiMediaControlPanel = 86 | loadClassOrNull("com.android.systemui.statusbar.notification.mediacontrol.MiuiMediaControlPanel") 87 | 88 | val mediaViewHolder = 89 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 90 | loadClassOrNull("com.android.systemui.media.controls.ui.view.MediaViewHolder") 91 | else 92 | loadClassOrNull("com.android.systemui.media.controls.models.player.MediaViewHolder") 93 | 94 | val seekBarObserver = 95 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 96 | loadClassOrNull("com.android.systemui.media.controls.ui.binder.SeekBarObserver") 97 | else 98 | loadClassOrNull("com.android.systemui.media.controls.models.player.SeekBarObserver") 99 | 100 | val playerTwoCircleView = 101 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 102 | loadClassOrNull("com.miui.systemui.notification.media.PlayerTwoCircleView") 103 | else 104 | loadClassOrNull("com.android.systemui.statusbar.notification.mediacontrol.PlayerTwoCircleView") 105 | 106 | mediaDataManager?.methodFinder()?.filterByName( 107 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 108 | "createActionsFromState$1" 109 | else 110 | "createActionsFromState" 111 | )?.firstOrNull() 112 | ?.createBeforeHook { 113 | packageName = it.args[0] as String 114 | } 115 | 116 | seekBarObserver?.methodFinder()?.filterByName("onChanged")?.firstOrNull() 117 | ?.createAfterHook { 118 | mMediaViewHolder?.let { holder -> 119 | val seekBar = 120 | holder.objectHelper().getObjectOrNullAs("seekBar") 121 | if (seekBar != null) { 122 | val playing = 123 | it.args[0].objectHelper().getObjectOrNull("playing") as Boolean 124 | val scrubbing = 125 | it.args[0].objectHelper() 126 | .getObjectOrNull("scrubbing") as Boolean 127 | val seekAvailable = 128 | it.args[0].objectHelper() 129 | .getObjectOrNull("seekAvailable") as Boolean 130 | val squigglyProgress = seekBar.progressDrawable as? SquigglyProgress 131 | squigglyProgress?.apply { 132 | animate = playing && !scrubbing 133 | transitionEnabled = !seekAvailable 134 | } 135 | } 136 | } 137 | } 138 | 139 | mediaViewHolder?.constructors?.firstOrNull()?.createAfterHook { 140 | val seekBar = 141 | it.thisObject.objectHelper() 142 | .getObjectOrNullAs("seekBar") 143 | val mediaBg = 144 | it.thisObject.objectHelper() 145 | .getObjectOrNullAs("mediaBg") 146 | seekBar?.setPadding(5.dp, 0.dp, 5.dp, 0.dp) 147 | val thumb = moduleRes.getDrawable(R.drawable.ic_thumb, moduleRes.newTheme()) 148 | val context = AndroidAppHelper.currentApplication().applicationContext 149 | val drawableToBitmap = drawableToBitmap(thumb) 150 | seekBar?.thumb = BitmapDrawable( 151 | context.resources, drawableToBitmap.scale(4.dp, 16.dp) 152 | ) 153 | seekBar?.progressDrawable = SquigglyProgress().apply { 154 | waveLength = 155 | 20.dp.toFloat() 156 | lineAmplitude = 157 | 2.dp.toFloat() 158 | phaseSpeed = 159 | 8.dp.toFloat() 160 | strokeWidth = 161 | 2.dp.toFloat() 162 | animate = false 163 | transitionEnabled = false 164 | } 165 | mediaBg?.colorFilter = colorFilter 166 | mediaBg?.setRenderEffect(blur) 167 | } 168 | 169 | notificationSettingsManager?.constructors?.firstOrNull()?.createAfterHook { 170 | it.thisObject.objectHelper() 171 | .setObject("mMediaAppWhiteList", ArrayList()) 172 | it.thisObject.objectHelper() 173 | .setObject("mHiddenCustomActionsList", ArrayList()) 174 | } 175 | 176 | miuiMediaControlPanel?.methodFinder()?.filterByName("bindPlayer")?.firstOrNull() 177 | ?.createAfterHook { 178 | mMediaViewHolder = it.thisObject.objectHelper() 179 | .getObjectOrNullUntilSuperclass("mMediaViewHolder") 180 | ?: return@createAfterHook 181 | val appIcon = 182 | mMediaViewHolder!!.objectHelper() 183 | .getObjectOrNullAs("appIcon") 184 | val context = 185 | AndroidAppHelper.currentApplication().applicationContext 186 | val packageName = 187 | it.args[0].objectHelper().getObjectOrNull("packageName") as String 188 | val icon = 189 | packageName.let { pkg -> context.packageManager.getApplicationIcon(pkg) } 190 | appIcon?.setImageDrawable(icon) 191 | artwork = 192 | it.args[0].objectHelper().getObjectOrNullAs("artwork") 193 | } 194 | 195 | customAction?.methodFinder()?.filterByName("invoke")?.firstOrNull() 196 | ?.createAfterHook { 197 | val mCustomAction = it.args[0] as CustomAction 198 | val mediaAction = it.result 199 | val context = AndroidAppHelper.currentApplication().applicationContext 200 | if (packageName != null) { 201 | val actionIcon = 202 | Icon.createWithResource(packageName, mCustomAction.icon) 203 | var loadDrawable = actionIcon.loadDrawable(context) 204 | var resizeHeight = loadDrawable?.intrinsicHeight 205 | var resizeWidth = loadDrawable?.intrinsicWidth 206 | if (packageName == "com.apple.android.music" && (40.dp < resizeHeight!! && 40.dp < resizeWidth!!)) { 207 | resizeHeight = 24.dp 208 | resizeWidth = 24.dp 209 | } 210 | if (40.dp > resizeHeight!! && 40.dp > resizeWidth!!) { 211 | val bitmap = drawableToBitmap(loadDrawable!!) 212 | loadDrawable = BitmapDrawable( 213 | context.resources, bitmap.scale(resizeHeight, resizeWidth) 214 | ) 215 | mediaAction.objectHelper().setObject("icon", loadDrawable) 216 | } 217 | } 218 | } 219 | 220 | playerTwoCircleView?.methodFinder()?.filterByName("onDraw")?.firstOrNull() 221 | ?.createBeforeHook { 222 | val mPaint1 = 223 | it.thisObject.objectHelper().getObjectOrNullAs("mPaint1") 224 | val mPaint2 = 225 | it.thisObject.objectHelper().getObjectOrNullAs("mPaint2") 226 | if (mPaint1?.alpha == 0) return@createBeforeHook 227 | mPaint1?.alpha = 0 228 | mPaint2?.alpha = 0 229 | it.thisObject.objectHelper().setObject("mRadius", 0f) 230 | } 231 | 232 | playerTwoCircleView?.methodFinder()?.filterByName("setBackground") 233 | ?.firstOrNull() 234 | ?.createBeforeHook { 235 | if (mMediaViewHolder != null) { 236 | val view = (it.thisObject as ImageView) 237 | val context = 238 | AndroidAppHelper.currentApplication().applicationContext 239 | val loadDrawable = artwork?.loadDrawable(context) 240 | if (loadDrawable != null) { 241 | 242 | val albumView = mMediaViewHolder!!.objectHelper() 243 | .getObjectOrNullAs("albumView") 244 | albumView?.outlineProvider = object : ViewOutlineProvider() { 245 | override fun getOutline(view: View, outline: Outline) { 246 | val clip = 1 247 | outline.setRoundRect( 248 | clip, 249 | clip, 250 | view.width - clip, 251 | view.height - clip, 252 | 8.dp.toFloat() 253 | ) 254 | view.clipToOutline = true 255 | } 256 | } 257 | Executors.newSingleThreadExecutor().execute { 258 | val bitmap = drawableToBitmap(loadDrawable) 259 | val processedBitmap = runCatching { 260 | bitmap.zoom().blur(16f).handleImageEffect(2f) 261 | .mesh(MeshUtil.getRandomVertices()) 262 | }.onFailure { exception -> 263 | Log.ex(exception) 264 | }.getOrNull() 265 | 266 | Handler(Looper.getMainLooper()).post { 267 | view.setImageBitmap(processedBitmap) 268 | } 269 | } 270 | } 271 | } 272 | } 273 | } 274 | 275 | else -> return 276 | } 277 | } 278 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/com/rcmiku/media/control/tweak/drawable/SquigglyProgress.kt: -------------------------------------------------------------------------------- 1 | package com.rcmiku.media.control.tweak.drawable 2 | 3 | /* 4 | * Copyright (C) 2022 The Android Open Source Project 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | import android.animation.Animator 19 | import android.animation.AnimatorListenerAdapter 20 | import android.animation.ValueAnimator 21 | import android.content.res.ColorStateList 22 | import android.graphics.Canvas 23 | import android.graphics.ColorFilter 24 | import android.graphics.Paint 25 | import android.graphics.Path 26 | import android.graphics.PixelFormat 27 | import android.graphics.drawable.Drawable 28 | import android.os.SystemClock 29 | import android.view.animation.PathInterpolator 30 | import com.rcmiku.media.control.tweak.utils.ColorUtil 31 | import com.rcmiku.media.control.tweak.utils.MathUtil.lerp 32 | import com.rcmiku.media.control.tweak.utils.MathUtil.lerpInv 33 | import com.rcmiku.media.control.tweak.utils.MathUtil.lerpInvSat 34 | import kotlin.math.PI 35 | import kotlin.math.abs 36 | import kotlin.math.cos 37 | 38 | private const val TWO_PI = (PI * 2f).toFloat() 39 | 40 | private const val DISABLED_ALPHA = 77 41 | 42 | class SquigglyProgress : Drawable() { 43 | 44 | private val wavePaint = Paint() 45 | private val linePaint = Paint() 46 | private val path = Path() 47 | private var heightFraction = 0f 48 | private var heightAnimator: ValueAnimator? = null 49 | private var phaseOffset = 0f 50 | private var lastFrameTime = -1L 51 | 52 | /* distance over which amplitude drops to zero, measured in wavelengths */ 53 | private val transitionPeriods = 1.5f 54 | 55 | /* wave endpoint as percentage of bar when play position is zero */ 56 | private val minWaveEndpoint = 0.2f 57 | 58 | /* wave endpoint as percentage of bar when play position matches wave endpoint */ 59 | private val matchedWaveEndpoint = 0.6f 60 | 61 | // Horizontal length of the sine wave 62 | var waveLength = 0f 63 | 64 | // Height of each peak of the sine wave 65 | var lineAmplitude = 0f 66 | 67 | // Line speed in px per second 68 | var phaseSpeed = 0f 69 | 70 | // Progress stroke width, both for wave and solid line 71 | var strokeWidth = 0f 72 | set(value) { 73 | if (field == value) { 74 | return 75 | } 76 | field = value 77 | wavePaint.strokeWidth = value 78 | linePaint.strokeWidth = value 79 | } 80 | 81 | // Enables a transition region where the amplitude 82 | // of the wave is reduced linearly across it. 83 | var transitionEnabled = true 84 | set(value) { 85 | field = value 86 | invalidateSelf() 87 | } 88 | 89 | 90 | init { 91 | wavePaint.strokeCap = Paint.Cap.ROUND 92 | linePaint.strokeCap = Paint.Cap.ROUND 93 | linePaint.style = Paint.Style.STROKE 94 | wavePaint.style = Paint.Style.STROKE 95 | linePaint.alpha = DISABLED_ALPHA 96 | } 97 | 98 | var animate: Boolean = false 99 | set(value) { 100 | if (field == value) { 101 | return 102 | } 103 | field = value 104 | if (field) { 105 | lastFrameTime = SystemClock.uptimeMillis() 106 | } 107 | heightAnimator?.cancel() 108 | heightAnimator = 109 | ValueAnimator.ofFloat(heightFraction, if (animate) 1f else 0f).apply { 110 | if (animate) { 111 | startDelay = 60 112 | duration = 800 113 | interpolator = PathInterpolator(0.05f, 0.7f, 0.1f, 1f) 114 | } else { 115 | duration = 550 116 | interpolator = PathInterpolator(0f, 0f, 0f, 1f) 117 | } 118 | addUpdateListener { 119 | heightFraction = it.animatedValue as Float 120 | invalidateSelf() 121 | } 122 | addListener( 123 | object : AnimatorListenerAdapter() { 124 | override fun onAnimationEnd(animation: Animator) { 125 | heightAnimator = null 126 | } 127 | } 128 | ) 129 | start() 130 | } 131 | } 132 | 133 | override fun draw(canvas: Canvas) { 134 | if (animate) { 135 | val now = SystemClock.uptimeMillis() 136 | val deltaTime = (now - lastFrameTime) / 1000f 137 | lastFrameTime = now 138 | 139 | phaseOffset = (phaseOffset + deltaTime * phaseSpeed) % waveLength 140 | invalidateSelf() 141 | } 142 | 143 | val progress = level / 10_000f 144 | val totalWidth = bounds.width().toFloat() 145 | val totalProgressPx = totalWidth * progress 146 | val waveProgressPx = 147 | totalWidth * 148 | (if (!transitionEnabled || progress > matchedWaveEndpoint) progress 149 | else 150 | lerp( 151 | minWaveEndpoint, 152 | matchedWaveEndpoint, 153 | lerpInv(0f, matchedWaveEndpoint, progress) 154 | )) 155 | 156 | // Build Wiggly Path 157 | val waveStart = -phaseOffset - waveLength / 2f 158 | val waveEnd = if (transitionEnabled) totalWidth else waveProgressPx 159 | 160 | // helper function, computes amplitude for wave segment 161 | val computeAmplitude: (Float, Float) -> Float = { x, sign -> 162 | if (transitionEnabled) { 163 | val length = transitionPeriods * waveLength 164 | val coeff = 165 | lerpInvSat(waveProgressPx + length / 2f, waveProgressPx - length / 2f, x) 166 | sign * heightFraction * lineAmplitude * coeff 167 | } else { 168 | sign * heightFraction * lineAmplitude 169 | } 170 | } 171 | // Reset path object to the start 172 | path.rewind() 173 | path.moveTo(waveStart, 0f) 174 | 175 | // Build the wave, incrementing by half the wavelength each time 176 | var currentX = waveStart 177 | var waveSign = 1f 178 | var currentAmp = computeAmplitude(currentX, waveSign) 179 | val dist = waveLength / 2f 180 | while (currentX < waveEnd) { 181 | waveSign = -waveSign 182 | val nextX = currentX + dist 183 | val midX = currentX + dist / 2 184 | val nextAmp = computeAmplitude(nextX, waveSign) 185 | path.cubicTo(midX, currentAmp, midX, nextAmp, nextX, nextAmp) 186 | currentAmp = nextAmp 187 | currentX = nextX 188 | } 189 | 190 | // translate to the start position of the progress bar for all draw commands 191 | val clipTop = lineAmplitude + strokeWidth 192 | canvas.save() 193 | canvas.translate(bounds.left.toFloat(), bounds.centerY().toFloat()) 194 | 195 | // Draw path up to progress position 196 | canvas.save() 197 | canvas.clipRect(0f, -1f * clipTop, totalProgressPx, clipTop) 198 | canvas.drawPath(path, wavePaint) 199 | canvas.restore() 200 | 201 | if (transitionEnabled) { 202 | // If there's a smooth transition, we draw the rest of the 203 | // path in a different color (using different clip params) 204 | canvas.save() 205 | canvas.clipRect(totalProgressPx, -1f * clipTop, totalWidth, clipTop) 206 | canvas.drawPath(path, linePaint) 207 | canvas.restore() 208 | } else { 209 | // No transition, just draw a flat line to the end of the region. 210 | // The discontinuity is hidden by the progress bar thumb shape. 211 | canvas.drawLine(totalProgressPx, 0f, totalWidth, 0f, linePaint) 212 | } 213 | 214 | // Draw round line cap at the beginning of the wave 215 | val startAmp = cos(abs(waveStart) / waveLength * TWO_PI) 216 | canvas.drawPoint(0f, startAmp * lineAmplitude * heightFraction, wavePaint) 217 | if (transitionEnabled) canvas.drawPoint(waveEnd, 0f, wavePaint) 218 | canvas.restore() 219 | } 220 | 221 | 222 | override fun setColorFilter(colorFilter: ColorFilter?) { 223 | wavePaint.colorFilter = colorFilter 224 | linePaint.colorFilter = colorFilter 225 | } 226 | 227 | override fun setAlpha(alpha: Int) { 228 | updateColors(wavePaint.color, alpha) 229 | } 230 | 231 | override fun getAlpha(): Int { 232 | return wavePaint.alpha 233 | } 234 | 235 | override fun setTint(tintColor: Int) { 236 | updateColors(tintColor, alpha) 237 | } 238 | 239 | override fun onLevelChange(level: Int): Boolean { 240 | return animate 241 | } 242 | 243 | override fun setTintList(tint: ColorStateList?) { 244 | if (tint == null) { 245 | return 246 | } 247 | updateColors(tint.defaultColor, alpha) 248 | } 249 | 250 | @Deprecated( 251 | "Deprecated in Java", 252 | ReplaceWith("PixelFormat.TRANSLUCENT", "android.graphics.PixelFormat") 253 | ) 254 | override fun getOpacity(): Int { 255 | return PixelFormat.TRANSLUCENT 256 | } 257 | 258 | private fun updateColors(tintColor: Int, alpha: Int) { 259 | wavePaint.color = ColorUtil.setAlphaComponent(tintColor, alpha) 260 | linePaint.color = 261 | ColorUtil.setAlphaComponent(tintColor, (DISABLED_ALPHA * (alpha / 255f)).toInt()) 262 | } 263 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/com/rcmiku/media/control/tweak/utils/AppUtils.kt: -------------------------------------------------------------------------------- 1 | package com.rcmiku.media.control.tweak.utils 2 | 3 | import android.content.res.Resources.getSystem 4 | import android.graphics.Bitmap 5 | import android.graphics.Canvas 6 | import android.graphics.ColorMatrix 7 | import android.graphics.ColorMatrixColorFilter 8 | import android.graphics.HardwareRenderer 9 | import android.graphics.Paint 10 | import android.graphics.PixelFormat 11 | import android.graphics.RenderEffect 12 | import android.graphics.RenderNode 13 | import android.graphics.Shader 14 | import android.graphics.drawable.BitmapDrawable 15 | import android.graphics.drawable.Drawable 16 | import android.hardware.HardwareBuffer 17 | import android.media.ImageReader 18 | import android.util.TypedValue 19 | 20 | object AppUtils { 21 | 22 | val Int.dp: Int 23 | get() = TypedValue.applyDimension( 24 | TypedValue.COMPLEX_UNIT_DIP, 25 | this.toFloat(), 26 | getSystem().displayMetrics 27 | ).toInt() 28 | 29 | fun Bitmap.scale(width: Int, height: Int): Bitmap { 30 | return Bitmap.createScaledBitmap(this, width, height, true) 31 | } 32 | 33 | fun Bitmap.mesh(floats: FloatArray): Bitmap { 34 | val meshArray = FloatArray(72) 35 | val width = width.toFloat() 36 | val height = height.toFloat() 37 | val rows = MeshUtil.MESH_ROWS 38 | val cols = MeshUtil.MESH_COLS 39 | val bitmap = Bitmap.createBitmap(this) 40 | 41 | for (row in 0..rows) { 42 | for (col in 0..cols) { 43 | val index = row * 12 + col * 2 44 | meshArray[index] = floats[index] * width 45 | meshArray[index + 1] = floats[index + 1] * height 46 | } 47 | } 48 | 49 | Canvas(bitmap).drawBitmapMesh(bitmap, rows, cols, meshArray, 0, null, 0, null) 50 | return bitmap 51 | } 52 | 53 | fun Bitmap.blur(radius: Float): Bitmap { 54 | val imageReader = ImageReader.newInstance( 55 | this.width, this.height, 56 | PixelFormat.RGBA_8888, 1, 57 | HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE or HardwareBuffer.USAGE_GPU_COLOR_OUTPUT 58 | ) 59 | val renderNode = RenderNode("BlurEffect").apply { 60 | setPosition(0, 0, imageReader.width, imageReader.height) 61 | setRenderEffect( 62 | RenderEffect.createBlurEffect( 63 | radius, radius, Shader.TileMode.MIRROR 64 | ) 65 | ) 66 | } 67 | val hardwareRenderer = HardwareRenderer().apply { 68 | setSurface(imageReader.surface) 69 | setContentRoot(renderNode) 70 | } 71 | renderNode.beginRecording().apply { 72 | drawBitmap(this@blur, 0f, 0f, null) 73 | } 74 | renderNode.endRecording() 75 | hardwareRenderer.createRenderRequest() 76 | .setWaitForPresent(true) 77 | .syncAndDraw() 78 | 79 | return runCatching { 80 | imageReader.acquireNextImage().use { image -> 81 | image.hardwareBuffer?.use { hardwareBuffer -> 82 | Bitmap.wrapHardwareBuffer(hardwareBuffer, null) 83 | ?.copy(Bitmap.Config.ARGB_8888, true) 84 | ?: throw RuntimeException("Bitmap is null") 85 | } ?: throw RuntimeException("HardwareBuffer is null") 86 | } 87 | }.onFailure { e -> 88 | throw RuntimeException("Failed to blur bitmap", e) 89 | }.also { 90 | renderNode.discardDisplayList() 91 | hardwareRenderer.destroy() 92 | }.getOrThrow() 93 | } 94 | 95 | fun Bitmap.zoom(scaleFactor: Int = 8): Bitmap { 96 | return Bitmap.createScaledBitmap( 97 | this, 98 | this.width / scaleFactor, 99 | this.height / scaleFactor, 100 | true 101 | ) 102 | } 103 | 104 | fun Bitmap.handleImageEffect(saturation: Float): Bitmap { 105 | val colorMatrix = ColorMatrix().apply { 106 | setSaturation(saturation) 107 | } 108 | val paint = Paint().apply { 109 | colorFilter = ColorMatrixColorFilter(colorMatrix) 110 | } 111 | val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) 112 | Canvas(bitmap).drawBitmap(this, 0F, 0F, paint) 113 | return bitmap 114 | } 115 | 116 | fun drawableToBitmap(drawable: Drawable): Bitmap { 117 | if (drawable is BitmapDrawable) { 118 | drawable.bitmap?.let { 119 | return it 120 | } 121 | } 122 | 123 | val width = if (drawable.intrinsicWidth > 0) drawable.intrinsicWidth else 1 124 | val height = if (drawable.intrinsicHeight > 0) drawable.intrinsicHeight else 1 125 | val bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) 126 | val canvas = Canvas(bitmap) 127 | 128 | drawable.setBounds(0, 0, canvas.width, canvas.height) 129 | drawable.draw(canvas) 130 | 131 | return bitmap 132 | } 133 | 134 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/com/rcmiku/media/control/tweak/utils/ColorUtil.kt: -------------------------------------------------------------------------------- 1 | package com.rcmiku.media.control.tweak.utils 2 | 3 | object ColorUtil { 4 | 5 | fun setAlphaComponent( 6 | color: Int, 7 | alpha: Int 8 | ): Int { 9 | require(alpha in 0..255) { "alpha must be between 0 and 255." } 10 | return (color and 0x00ffffff) or (alpha shl 24) 11 | } 12 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/com/rcmiku/media/control/tweak/utils/MathUtil.kt: -------------------------------------------------------------------------------- 1 | package com.rcmiku.media.control.tweak.utils 2 | 3 | object MathUtil { 4 | 5 | fun lerp(start: Float, stop: Float, fraction: Float): Float { 6 | return (1 - fraction) * start + fraction * stop 7 | } 8 | 9 | fun lerpInv(a: Float, b: Float, value: Float): Float { 10 | return if (a != b) (value - a) / (b - a) else 0f 11 | } 12 | 13 | private fun saturate(value: Float): Float { 14 | return value.coerceIn(0f, 1f) 15 | } 16 | 17 | fun lerpInvSat(a: Float, b: Float, value: Float): Float { 18 | return saturate(lerpInv(a, b, value)) 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/com/rcmiku/media/control/tweak/utils/MeshUtil.kt: -------------------------------------------------------------------------------- 1 | package com.rcmiku.media.control.tweak.utils 2 | 3 | import kotlin.random.Random 4 | 5 | enum class MeshUtil(val vertices: FloatArray) { 6 | 7 | M1( 8 | floatArrayOf( 9 | 0.0f, 10 | 0.0f, 11 | 0.2f, 12 | 0.0f, 13 | 0.4f, 14 | 0.0f, 15 | 0.6f, 16 | 0.0f, 17 | 0.8f, 18 | 0.0f, 19 | 1.0f, 20 | 0.0f, 21 | 0.0f, 22 | 0.2f, 23 | 0.3265f, 24 | 0.3839f, 25 | 0.4f, 26 | 0.2f, 27 | 0.462f, 28 | 0.3424f, 29 | 0.683f, 30 | 0.2797f, 31 | 1.0f, 32 | 0.2f, 33 | 0.0f, 34 | 0.4f, 35 | 0.2f, 36 | 0.4f, 37 | 0.4f, 38 | 0.4f, 39 | 0.6f, 40 | 0.4903f, 41 | 0.6574f, 42 | 0.4903f, 43 | 1.1357f, 44 | 0.4f, 45 | -0.1173f, 46 | 0.4597f, 47 | 0.3771f, 48 | 0.4384f, 49 | 0.6415f, 50 | 0.5947f, 51 | 0.8254f, 52 | 0.6935f, 53 | 0.9334f, 54 | 0.5862f, 55 | 1.0f, 56 | 0.6f, 57 | -0.0437f, 58 | 0.6533f, 59 | 0.2f, 60 | 0.6618f, 61 | 0.683f, 62 | 0.7362f, 63 | 0.8139f, 64 | 0.833f, 65 | 0.9104f, 66 | 0.8085f, 67 | 1.0f, 68 | 0.8f, 69 | 0.0f, 70 | 1.0f, 71 | 0.2f, 72 | 1.0f, 73 | 0.4f, 74 | 1.0f, 75 | 0.6f, 76 | 1.0f, 77 | 0.8f, 78 | 1.0f, 79 | 1.0f, 80 | 1.0f 81 | ) 82 | ), 83 | M2( 84 | floatArrayOf( 85 | 0.0f, 86 | 0.0f, 87 | 0.2f, 88 | 0.0f, 89 | 0.4f, 90 | 0.0f, 91 | 0.7465f, 92 | -0.0935f, 93 | 0.9702f, 94 | -0.0872f, 95 | 1.5935f, 96 | -0.0308f, 97 | -0.1675f, 98 | 0.2878f, 99 | 0.7185f, 100 | 0.3087f, 101 | 0.5952f, 102 | 0.0728f, 103 | 0.7823f, 104 | 0.0815f, 105 | 0.9318f, 106 | 0.301f, 107 | 1.1369f, 108 | 0.3756f, 109 | 0.0f, 110 | 0.4f, 111 | 0.3295f, 112 | 0.4607f, 113 | 0.7823f, 114 | 0.3087f, 115 | 0.7465f, 116 | 0.365f, 117 | 0.9514f, 118 | 0.4305f, 119 | 1.1514f, 120 | 0.4424f, 121 | 0.0f, 122 | 0.6f, 123 | 0.2f, 124 | 0.6f, 125 | 0.3295f, 126 | 0.4424f, 127 | 0.5703f, 128 | 0.5f, 129 | 0.7887f, 130 | 0.4847f, 131 | 1.0f, 132 | 0.6f, 133 | 0.0f, 134 | 0.8f, 135 | 0.2414f, 136 | 0.7926f, 137 | 0.0418f, 138 | 0.7303f, 139 | 0.5952f, 140 | 0.4688f, 141 | 0.9433f, 142 | 0.6929f, 143 | 1.0f, 144 | 0.8f, 145 | 0.0f, 146 | 1.0f, 147 | 0.2f, 148 | 1.0f, 149 | 0.4f, 150 | 1.0f, 151 | 0.6f, 152 | 1.0f, 153 | 0.8f, 154 | 1.0f, 155 | 1.0f, 156 | 1.0f 157 | ) 158 | ), 159 | M3( 160 | floatArrayOf( 161 | -0.1739f, 162 | -0.0461f, 163 | 0.0712f, 164 | -0.0699f, 165 | 0.4773f, 166 | -0.0551f, 167 | 0.5871f, 168 | -0.0342f, 169 | 0.8f, 170 | 0.0f, 171 | 1.0f, 172 | 0.0f, 173 | -0.1192f, 174 | 0.0943f, 175 | 0.1034f, 176 | 0.0661f, 177 | 0.3712f, 178 | 0.1801f, 179 | 0.6161f, 180 | 0.2997f, 181 | 0.8f, 182 | 0.2f, 183 | 1.0f, 184 | 0.2f, 185 | -0.2158f, 186 | 0.2997f, 187 | 0.1034f, 188 | 0.1515f, 189 | 0.3712f, 190 | 0.2244f, 191 | 0.6676f, 192 | 0.3435f, 193 | 0.8f, 194 | 0.3911f, 195 | 1.2928f, 196 | 0.4824f, 197 | 0.0f, 198 | 0.6f, 199 | 0.4225f, 200 | 0.5539f, 201 | 0.8283f, 202 | 0.5345f, 203 | 0.6676f, 204 | 0.4601f, 205 | 0.9739f, 206 | 0.4542f, 207 | 1.4767f, 208 | 0.5345f, 209 | 0.0f, 210 | 0.8f, 211 | 0.2f, 212 | 0.8f, 213 | 0.6512f, 214 | 0.8179f, 215 | 0.6f, 216 | 0.8f, 217 | 1.2928f, 218 | 0.7271f, 219 | 1.6892f, 220 | 0.9235f, 221 | 0.0f, 222 | 1.0f, 223 | 0.2f, 224 | 1.0f, 225 | 0.4f, 226 | 1.0f, 227 | 0.6f, 228 | 1.0f, 229 | 0.8f, 230 | 1.0f, 231 | 1.0f, 232 | 1.0f 233 | ) 234 | ), 235 | M4( 236 | floatArrayOf( 237 | 0.0f, 238 | 0.0f, 239 | 0.2f, 240 | 0.0f, 241 | 0.4f, 242 | 0.0f, 243 | 0.6f, 244 | 0.0f, 245 | 0.8f, 246 | 0.0f, 247 | 1.0f, 248 | 0.0f, 249 | 0.0f, 250 | 0.2f, 251 | -0.0933f, 252 | 0.4f, 253 | 0.4f, 254 | 0.2f, 255 | 0.6f, 256 | 0.2f, 257 | 0.3653f, 258 | 0.1335f, 259 | 1.0f, 260 | 0.2f, 261 | 0.0f, 262 | 0.4f, 263 | 0.4232f, 264 | 0.359f, 265 | 0.3429f, 266 | 0.5349f, 267 | 0.6f, 268 | 0.4f, 269 | 0.832f, 270 | 0.4148f, 271 | 1.0f, 272 | 0.4f, 273 | 0.0f, 274 | 0.6f, 275 | 0.2f, 276 | 0.6f, 277 | 0.2293f, 278 | 0.7775f, 279 | 0.7829f, 280 | 0.5595f, 281 | 0.6514f, 282 | 0.7302f, 283 | 1.0f, 284 | 0.6f, 285 | 0.0f, 286 | 0.8f, 287 | 0.2f, 288 | 0.8f, 289 | 0.28f, 290 | 0.9195f, 291 | 0.4773f, 292 | 0.8f, 293 | 0.8f, 294 | 0.8f, 295 | 1.0f, 296 | 0.8f, 297 | 0.0f, 298 | 1.0f, 299 | 0.6514f, 300 | 1.1073f, 301 | 0.4f, 302 | 1.0f, 303 | 1.0f, 304 | 1.0317f, 305 | 1.0f, 306 | 1.1302f, 307 | 1.0f, 308 | 1.0f 309 | ) 310 | ), 311 | M5( 312 | floatArrayOf( 313 | -0.2351f, 314 | -0.0967f, 315 | 0.2135f, 316 | -0.1414f, 317 | 0.9221f, 318 | -0.0908f, 319 | 0.9221f, 320 | -0.0685f, 321 | 1.3027f, 322 | 0.0253f, 323 | 1.2351f, 324 | 0.1786f, 325 | -0.3768f, 326 | 0.1851f, 327 | 0.2f, 328 | 0.2f, 329 | 0.6615f, 330 | 0.3146f, 331 | 0.9543f, 332 | 0.0f, 333 | 0.6969f, 334 | 0.1911f, 335 | 1.0f, 336 | 0.2f, 337 | 0.0f, 338 | 0.4f, 339 | 0.2f, 340 | 0.4f, 341 | 0.0776f, 342 | 0.2318f, 343 | 0.6f, 344 | 0.4f, 345 | 0.6615f, 346 | 0.3851f, 347 | 1.0f, 348 | 0.4f, 349 | 0.0f, 350 | 0.6f, 351 | 0.1291f, 352 | 0.6f, 353 | 0.4f, 354 | 0.6f, 355 | 0.4f, 356 | 0.4304f, 357 | 0.4264f, 358 | 0.5792f, 359 | 1.2029f, 360 | 0.8188f, 361 | -0.1192f, 362 | 1.0f, 363 | 0.6f, 364 | 0.8f, 365 | 0.4264f, 366 | 0.8104f, 367 | 0.6f, 368 | 0.8f, 369 | 0.8f, 370 | 0.8f, 371 | 1.0f, 372 | 0.8f, 373 | 0.0f, 374 | 1.0f, 375 | 0.0776f, 376 | 1.0283f, 377 | 0.4f, 378 | 1.0f, 379 | 0.6f, 380 | 1.0f, 381 | 0.8f, 382 | 1.0f, 383 | 1.1868f, 384 | 1.0283f 385 | ) 386 | ); 387 | 388 | companion object { 389 | const val MESH_COLS = 5 390 | const val MESH_ROWS = 5 391 | 392 | fun getRandomVertices(): FloatArray { 393 | val values = entries.toTypedArray() 394 | val randomIndex = Random.nextInt(values.size) 395 | return values[randomIndex].vertices 396 | } 397 | } 398 | } 399 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_thumb.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/array.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.android.systemui 5 | 6 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.android.application) apply false 3 | alias(libs.plugins.kotlin.android) apply false 4 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 2 | android.useAndroidX=true 3 | kotlin.code.style=official 4 | android.nonTransitiveRClass=true 5 | android.useMinimalKeepRules=true 6 | org.gradle.parallel=true 7 | org.gradle.configureondemand=true 8 | org.gradle.caching=true -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | agp = "8.8.0" 3 | ezXHelper = "2.2.0" 4 | kotlin = "2.1.0" 5 | xposed = "82" 6 | 7 | [libraries] 8 | ezXHelper = { module = "com.github.kyuubiran:EzXHelper", version.ref = "ezXHelper" } 9 | xposed = { module = "de.robv.android.xposed:api", version.ref = "xposed" } 10 | 11 | [plugins] 12 | android-application = { id = "com.android.application", version.ref = "agp" } 13 | kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rcmiku/MediaControlTweak/ba39b431b4a4f1ea029303670c500cd992ff895f/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | # 20 | 21 | ############################################################################## 22 | # 23 | # Gradle start up script for POSIX generated by Gradle. 24 | # 25 | # Important for running: 26 | # 27 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 28 | # noncompliant, but you have some other compliant shell such as ksh or 29 | # bash, then to run this script, type that shell name before the whole 30 | # command line, like: 31 | # 32 | # ksh Gradle 33 | # 34 | # Busybox and similar reduced shells will NOT work, because this script 35 | # requires all of these POSIX shell features: 36 | # * functions; 37 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 38 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 39 | # * compound commands having a testable exit status, especially «case»; 40 | # * various built-in commands including «command», «set», and «ulimit». 41 | # 42 | # Important for patching: 43 | # 44 | # (2) This script targets any POSIX shell, so it avoids extensions provided 45 | # by Bash, Ksh, etc; in particular arrays are avoided. 46 | # 47 | # The "traditional" practice of packing multiple parameters into a 48 | # space-separated string is a well documented source of bugs and security 49 | # problems, so this is (mostly) avoided, by progressively accumulating 50 | # options in "$@", and eventually passing that to Java. 51 | # 52 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 53 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 54 | # see the in-line comments for details. 55 | # 56 | # There are tweaks for specific operating systems such as AIX, CygWin, 57 | # Darwin, MinGW, and NonStop. 58 | # 59 | # (3) This script is generated from the Groovy template 60 | # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 61 | # within the Gradle project. 62 | # 63 | # You can find Gradle at https://github.com/gradle/gradle/. 64 | # 65 | ############################################################################## 66 | 67 | # Attempt to set APP_HOME 68 | 69 | # Resolve links: $0 may be a link 70 | app_path=$0 71 | 72 | # Need this for daisy-chained symlinks. 73 | while 74 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 75 | [ -h "$app_path" ] 76 | do 77 | ls=$( ls -ld "$app_path" ) 78 | link=${ls#*' -> '} 79 | case $link in #( 80 | /*) app_path=$link ;; #( 81 | *) app_path=$APP_HOME$link ;; 82 | esac 83 | done 84 | 85 | # This is normally unused 86 | # shellcheck disable=SC2034 87 | APP_BASE_NAME=${0##*/} 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s 90 | ' "$PWD" ) || exit 91 | 92 | # Use the maximum available, or set MAX_FD != -1 to use that value. 93 | MAX_FD=maximum 94 | 95 | warn () { 96 | echo "$*" 97 | } >&2 98 | 99 | die () { 100 | echo 101 | echo "$*" 102 | echo 103 | exit 1 104 | } >&2 105 | 106 | # OS specific support (must be 'true' or 'false'). 107 | cygwin=false 108 | msys=false 109 | darwin=false 110 | nonstop=false 111 | case "$( uname )" in #( 112 | CYGWIN* ) cygwin=true ;; #( 113 | Darwin* ) darwin=true ;; #( 114 | MSYS* | MINGW* ) msys=true ;; #( 115 | NONSTOP* ) nonstop=true ;; 116 | esac 117 | 118 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 119 | 120 | 121 | # Determine the Java command to use to start the JVM. 122 | if [ -n "$JAVA_HOME" ] ; then 123 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 124 | # IBM's JDK on AIX uses strange locations for the executables 125 | JAVACMD=$JAVA_HOME/jre/sh/java 126 | else 127 | JAVACMD=$JAVA_HOME/bin/java 128 | fi 129 | if [ ! -x "$JAVACMD" ] ; then 130 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 131 | 132 | Please set the JAVA_HOME variable in your environment to match the 133 | location of your Java installation." 134 | fi 135 | else 136 | JAVACMD=java 137 | if ! command -v java >/dev/null 2>&1 138 | then 139 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 140 | 141 | Please set the JAVA_HOME variable in your environment to match the 142 | location of your Java installation." 143 | fi 144 | fi 145 | 146 | # Increase the maximum file descriptors if we can. 147 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 148 | case $MAX_FD in #( 149 | max*) 150 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 151 | # shellcheck disable=SC2039,SC3045 152 | MAX_FD=$( ulimit -H -n ) || 153 | warn "Could not query maximum file descriptor limit" 154 | esac 155 | case $MAX_FD in #( 156 | '' | soft) :;; #( 157 | *) 158 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 159 | # shellcheck disable=SC2039,SC3045 160 | ulimit -n "$MAX_FD" || 161 | warn "Could not set maximum file descriptor limit to $MAX_FD" 162 | esac 163 | fi 164 | 165 | # Collect all arguments for the java command, stacking in reverse order: 166 | # * args from the command line 167 | # * the main class name 168 | # * -classpath 169 | # * -D...appname settings 170 | # * --module-path (only if needed) 171 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 172 | 173 | # For Cygwin or MSYS, switch paths to Windows format before running java 174 | if "$cygwin" || "$msys" ; then 175 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 176 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 177 | 178 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 179 | 180 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 181 | for arg do 182 | if 183 | case $arg in #( 184 | -*) false ;; # don't mess with options #( 185 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 186 | [ -e "$t" ] ;; #( 187 | *) false ;; 188 | esac 189 | then 190 | arg=$( cygpath --path --ignore --mixed "$arg" ) 191 | fi 192 | # Roll the args list around exactly as many times as the number of 193 | # args, so each arg winds up back in the position where it started, but 194 | # possibly modified. 195 | # 196 | # NB: a `for` loop captures its iteration list before it begins, so 197 | # changing the positional parameters here affects neither the number of 198 | # iterations, nor the values presented in `arg`. 199 | shift # remove old arg 200 | set -- "$@" "$arg" # push replacement arg 201 | done 202 | fi 203 | 204 | 205 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 206 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 207 | 208 | # Collect all arguments for the java command: 209 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 210 | # and any embedded shellness will be escaped. 211 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 212 | # treated as '${Hostname}' itself on the command line. 213 | 214 | set -- \ 215 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 216 | -classpath "$CLASSPATH" \ 217 | org.gradle.wrapper.GradleWrapperMain \ 218 | "$@" 219 | 220 | # Stop when "xargs" is not available. 221 | if ! command -v xargs >/dev/null 2>&1 222 | then 223 | die "xargs is not available" 224 | fi 225 | 226 | # Use "xargs" to parse quoted args. 227 | # 228 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 229 | # 230 | # In Bash we could simply go: 231 | # 232 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 233 | # set -- "${ARGS[@]}" "$@" 234 | # 235 | # but POSIX shell has neither arrays nor command substitution, so instead we 236 | # post-process each arg (as a line of input to sed) to backslash-escape any 237 | # character that might be a shell metacharacter, then use eval to reverse 238 | # that process (while maintaining the separation between arguments), and wrap 239 | # the whole thing up as a single "set" statement. 240 | # 241 | # This will of course break if any of these variables contains a newline or 242 | # an unmatched quote. 243 | # 244 | 245 | eval "set -- $( 246 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 247 | xargs -n1 | 248 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 249 | tr '\n' ' ' 250 | )" '"$@"' 251 | 252 | exec "$JAVACMD" "$@" 253 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | @file:Suppress("UnstableApiUsage") 2 | 3 | pluginManagement { 4 | repositories { 5 | google { 6 | content { 7 | includeGroupByRegex("com\\.android.*") 8 | includeGroupByRegex("com\\.google.*") 9 | includeGroupByRegex("androidx.*") 10 | } 11 | } 12 | mavenCentral() 13 | gradlePluginPortal() 14 | maven("https://api.xposed.info/") 15 | } 16 | } 17 | 18 | dependencyResolutionManagement { 19 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 20 | repositories { 21 | google() 22 | mavenCentral() 23 | maven("https://api.xposed.info/") 24 | } 25 | } 26 | 27 | rootProject.name = "media-control-tweak" 28 | include(":app") --------------------------------------------------------------------------------