diff --git a/README.md b/README.md index 9526e0c..94e6685 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# fcmfix(Android 10 & 11) +# fcmfix(Android 10 & 11 & 12?) 使用xposed让被完全停止的应用响应fcm,让fcm送达率达到100%,不错过任何通知 diff --git a/app/src/main/java/com/kooritea/fcmfix/xposed/BroadcastFix.java b/app/src/main/java/com/kooritea/fcmfix/xposed/BroadcastFix.java index 2d5adc4..990a111 100644 --- a/app/src/main/java/com/kooritea/fcmfix/xposed/BroadcastFix.java +++ b/app/src/main/java/com/kooritea/fcmfix/xposed/BroadcastFix.java @@ -35,9 +35,12 @@ protected void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwa if(Build.VERSION.SDK_INT == Build.VERSION_CODES.Q){ intent_args_index = 2; appOp_args_index = 9; - }else if(Build.VERSION.SDK_INT > Build.VERSION_CODES.Q){ + }else if(Build.VERSION.SDK_INT == Build.VERSION_CODES.R){ intent_args_index = 3; appOp_args_index = 10; + }else if(Build.VERSION.SDK_INT == 31){ + intent_args_index = 3; + appOp_args_index = 11; } Intent intent = (Intent) methodHookParam.args[intent_args_index]; if(intent != null && intent.getPackage() != null && intent.getFlags() != Intent.FLAG_INCLUDE_STOPPED_PACKAGES && "com.google.android.c2dm.intent.RECEIVE".equals(intent.getAction())){