1919
2020package com .sevtinge .hyperceiler .hook .module .hook .mms ;
2121
22+ import static com .sevtinge .hyperceiler .hook .module .base .tool .AppsTool .getPackageVersionCode ;
2223import static de .robv .android .xposed .XposedHelpers .getObjectField ;
2324import static de .robv .android .xposed .XposedHelpers .setObjectField ;
2425
@@ -42,7 +43,7 @@ public void init() throws NoSuchMethodException {
4243 public BaseData dexkit (DexKitBridge bridge ) throws ReflectiveOperationException {
4344 MethodData methodData = bridge .findMethod (FindMethod .create ()
4445 .matcher (MethodMatcher .create ()
45- .usingStrings ("fillSmartContactByB2c: old smart contact is not null" )
46+ .usingStrings ("fillSmartContactByB2c: old smart contact is not null" )
4647 )).singleOrNull ();
4748 return methodData ;
4849 }
@@ -52,9 +53,9 @@ public BaseData dexkit(DexKitBridge bridge) throws ReflectiveOperationException
5253 public BaseData dexkit (DexKitBridge bridge ) throws ReflectiveOperationException {
5354 MethodData methodData = bridge .findMethod (FindMethod .create ()
5455 .matcher (MethodMatcher .create ()
55- .usingStrings ("11" , "460" , "12" , " " )
56- .returnType (void .class )
57- . paramTypes ( "com.miui.smsextra.sdk.SmartContact" , "" )
56+ .usingStrings ("fillYellowPageContact: " , "ContactFetcher " )
57+ .returnType (void .class )
58+ . paramCount ( 2 )
5859 )).singleOrNull ();
5960 return methodData ;
6061 }
@@ -65,6 +66,27 @@ protected void before(MethodHookParam param) throws Throwable {
6566 param .setResult (false );
6667 }
6768 });
69+ if (mPrefsMap .getBoolean ("mms_disable_fraud_risk_tip" )) findAndHookMethod ("com.miui.smsextra.sdk.SmartContact" , "isDefraudNumber" , new MethodHook (){
70+ @ Override
71+ protected void before (MethodHookParam param ) throws Throwable {
72+ param .setResult (false );
73+ }
74+ });
75+ if (getPackageVersionCode (lpparam ) >= 170000000 ) {
76+ findAndHookMethod ("com.miui.smsextra.internal.sdk.xiaomi.YellowPagePhone" , "isRiskyNumber" , new MethodHook (){
77+ @ Override
78+ protected void before (MethodHookParam param ) throws Throwable {
79+ param .setResult (false );
80+ }
81+ });
82+ if (mPrefsMap .getBoolean ("mms_disable_fraud_risk_tip" ))
83+ findAndHookMethod ("com.miui.smsextra.internal.sdk.xiaomi.YellowPagePhone" , "isDefraudNumber" , new MethodHook () {
84+ @ Override
85+ protected void before (MethodHookParam param ) throws Throwable {
86+ param .setResult (false );
87+ }
88+ });
89+ }
6890 hookMethod (method1 , new MethodHook (){
6991 @ Override
7092 protected void after (MethodHookParam param ) throws Throwable {
0 commit comments