From 2ec9c69c9f0f6a2a968fca2ba5727aa55ffd70dd Mon Sep 17 00:00:00 2001 From: MonwF Date: Mon, 11 Jul 2022 14:39:55 +0800 Subject: [PATCH] set target api 31 --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 3 +-- .../java/name/mikanoshi/customiuizer/mods/System.java | 9 ++++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3de5f3d4..9e70289a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -33,7 +33,7 @@ android { applicationId "name.monwf.customiuizer" minSdkVersion 30 //noinspection OldTargetApi,ExpiredTargetSdkVersion - targetSdkVersion 30 + targetSdkVersion 31 versionCode 13 versionName "3.2.1.2207011" resConfigs 'ru-rRU', 'zh-rCN' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7120fd18..364ded77 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -42,8 +42,7 @@ android:name=".MainApplication" android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true" - tools:ignore="GoogleAppIndexingWarning" - tools:targetApi="q"> + tools:ignore="GoogleAppIndexingWarning"> diff --git a/app/src/main/java/name/mikanoshi/customiuizer/mods/System.java b/app/src/main/java/name/mikanoshi/customiuizer/mods/System.java index 8b1f9f51..596a78ce 100644 --- a/app/src/main/java/name/mikanoshi/customiuizer/mods/System.java +++ b/app/src/main/java/name/mikanoshi/customiuizer/mods/System.java @@ -3495,7 +3495,7 @@ private static void updateAudioVisualizerState(Context context) { audioViz.updateViewState(isPlaying, isKeyguardShowing, isNotificationPanelExpanded); } public static void AudioVisualizerHook(LoadPackageParam lpparam) { - Helpers.findAndHookMethod("com.android.systemui.statusbar.phone.StatusBar", lpparam.classLoader, "makeStatusBarView", new MethodHook() { + Helpers.hookAllMethods("com.android.systemui.statusbar.phone.StatusBar", lpparam.classLoader, "makeStatusBarView", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { ViewGroup mNotificationPanel = (ViewGroup)XposedHelpers.getObjectField(param.thisObject, "mNotificationPanel"); @@ -5167,7 +5167,7 @@ protected void after(MethodHookParam param) throws Throwable { if (Helpers.is12()) Helpers.findAndHookConstructor("com.android.systemui.miui.controlcenter.QCToggleSliderView", lpparam.classLoader, Context.class, AttributeSet.class, int.class, hook); - Helpers.findAndHookMethod("com.android.systemui.statusbar.phone.StatusBar", lpparam.classLoader, "makeStatusBarView", new MethodHook() { + Helpers.hookAllMethods("com.android.systemui.statusbar.phone.StatusBar", lpparam.classLoader, "makeStatusBarView", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { LuxListener mLuxListener = new LuxListener(); @@ -5913,7 +5913,7 @@ protected void after(MethodHookParam param) throws Throwable { private static long currentTouchTime = 0; public static void StatusBarGesturesHook(LoadPackageParam lpparam) { - Helpers.findAndHookMethod("com.android.systemui.statusbar.phone.StatusBar", lpparam.classLoader, "makeStatusBarView", new MethodHook() { + Helpers.hookAllMethods("com.android.systemui.statusbar.phone.StatusBar", lpparam.classLoader, "makeStatusBarView", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { Context mContext = (Context)XposedHelpers.getObjectField(param.thisObject, "mContext"); @@ -6041,8 +6041,7 @@ protected void before(final MethodHookParam param) throws Throwable { }; Helpers.findAndHookMethod("com.android.systemui.statusbar.phone.StatusBar", lpparam.classLoader, "interceptTouchEvent", MotionEvent.class, hook); - if (Helpers.is12()) - Helpers.findAndHookMethod("com.android.systemui.miui.statusbar.phone.ControlPanelWindowView", lpparam.classLoader, "onTouchEvent", MotionEvent.class, hook); + Helpers.findAndHookMethod("com.android.systemui.controlcenter.phone.ControlPanelWindowView", lpparam.classLoader, "onTouchEvent", MotionEvent.class, hook); } public static void ScreenshotConfigHook(LoadPackageParam lpparam) {