diff --git a/README.md b/README.md index f8df491..ae8a0bf 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,11 @@ _After_ USB debug mode bypass for Japan Post Bank app. ``` -- Remove Lock Screen Album Art (Android 10 only) -![](images/album_art_removed.jpg) \ No newline at end of file +- Remove Lock Screen Album Art (OxygenOS 10) +![](images/album_art_removed.jpg) +- Remove Lock Screen Album Art (OxygenOS 11) +``` +OnePlus added the shyt functionality back to the OxygenOS 11? +Don't worry, I got your back! +``` +![](images/album_art_removed_a11.jpg) \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 5a93435..c8647d5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "io.github.jeffshee.nekumorimod" minSdkVersion 16 targetSdkVersion 30 - versionCode 2 - versionName "1.1" + versionCode 3 + versionName "1.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -26,7 +26,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.appcompat:appcompat:1.3.0' compileOnly 'de.robv.android.xposed:api:82:sources' compileOnly 'de.robv.android.xposed:api:82' testImplementation 'junit:junit:4.12' diff --git a/app/src/main/java/io/github/jeffshee/nekumorimod/XposedMod.java b/app/src/main/java/io/github/jeffshee/nekumorimod/XposedMod.java index f8879b4..3930953 100644 --- a/app/src/main/java/io/github/jeffshee/nekumorimod/XposedMod.java +++ b/app/src/main/java/io/github/jeffshee/nekumorimod/XposedMod.java @@ -74,11 +74,14 @@ public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable { break; case SYSYEM_UI: /* - Disable lock screen album art (Android 10 only) + Disable lock screen album art (Android 10, 11 only) */ if (android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.Q) { XposedBridge.log("(NekumoriMOD) " + lpparam.packageName); disableLockScreenAlbumArt(lpparam.classLoader); + } else if (android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.R) { + XposedBridge.log("(NekumoriMOD) " + lpparam.packageName); + disableLockScreenAlbumArtA11(lpparam.classLoader); } break; } @@ -144,4 +147,13 @@ protected Object replaceHookedMethod(MethodHookParam param) throws Throwable { }); } + private void disableLockScreenAlbumArtA11(ClassLoader classLoader) { + /* + Google finally removed this shyt from Android 11, but why it's still enabled in OxygenOS 11? + */ + Class findClass = XposedHelpers.findClass("com.android.systemui.statusbar.phone.StatusBar", classLoader); + XposedHelpers.setStaticObjectField(findClass, "SHOW_LOCKSCREEN_MEDIA_ARTWORK", false); + XposedBridge.log("(NekumoriMOD) " + "disableLockScreenAlbumArtA11"); + } + } \ No newline at end of file diff --git a/images/album_art_removed.jpg b/images/album_art_removed.jpg index f7c8177..da1d6dd 100644 Binary files a/images/album_art_removed.jpg and b/images/album_art_removed.jpg differ diff --git a/images/album_art_removed_a11.jpg b/images/album_art_removed_a11.jpg new file mode 100644 index 0000000..c0aae7a Binary files /dev/null and b/images/album_art_removed_a11.jpg differ