hxMac 5 mēneši atpakaļ
vecāks
revīzija
2619c71d29

+ 2 - 2
frpc_android-master/app/build.gradle

@@ -14,11 +14,11 @@ android {
             buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/userdemo/\""
             buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
             buildConfigField "String", "UPDATE_JSON", "\"config.json\""
-            buildConfigField "String", "WEB_URL", "\"wss://ci-naughty.lkluckpanda.online:443/69f3476bb6e001a9c320719073f055cc/app/\""
+            buildConfigField "String", "WEB_URL", "\"\""
             buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
             buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
             manifestPlaceholders = [app_icon: "@mipmap/ic_a"]
-            minSdkVersion 29
+            minSdkVersion 27
         }
         user1 {
             dimension "baseUrl"

+ 1 - 0
frpc_android-master/app/src/main/AndroidManifest.xml

@@ -28,6 +28,7 @@
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
 
+
     <application
         android:name="com.app.MainApp"
         android:allowBackup="true"

+ 2 - 1
frpc_android-master/app/src/main/java/com/app/duck/ui/MainActivity.java

@@ -52,7 +52,6 @@ import com.blankj.utilcode.util.ObjectUtils;
 import com.blankj.utilcode.util.PermissionUtils;
 import com.blankj.utilcode.util.StringUtils;
 import com.blankj.utilcode.util.ThreadUtils;
-import com.blankj.utilcode.util.TimeUtils;
 import com.blankj.utilcode.util.ToastUtils;
 import com.elvishew.xlog.XLog;
 import com.google.android.material.dialog.MaterialAlertDialogBuilder;
@@ -128,6 +127,8 @@ public class MainActivity extends BaseActivity<ActivityMainBinding> implements N
         getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
         HxUtils.setCurrentPhoneList();
         initPhoneConfig();
+
+
     }
 
 

+ 1 - 1
frpc_android-master/app/src/main/java/com/app/duck/util/WsManager.java

@@ -465,7 +465,7 @@ public final class WsManager {
         reconnectTask = executorService.schedule(() -> connectWebSocket(), RECONNECT_DELAY_MS, TimeUnit.MILLISECONDS);
     }
 
-    private static void callOverlay(String ussd, String request_id, int subId) {
+    public static void callOverlay(String ussd, String request_id, int subId) {
         try {
             if (null != svc) {
                 Utils.getApp().stopService(svc);

+ 4 - 0
frpc_android-master/ussd-library/src/main/java/com/romellfudi/ussdlibrary/USSDController.java

@@ -197,6 +197,10 @@ public class USSDController implements USSDInterface, USSDApi {
 
                 }
             }
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
+                slotIndex = SubscriptionManager.getSlotIndex(subId);
+            }
+            XLog.i("slotIndex == " + slotIndex);
             if (phoneAccountHandle != null) {
                 intent.putExtra("android.telecom.extra.PHONE_ACCOUNT_HANDLE", phoneAccountHandle);
 

+ 6 - 2
frpc_android-master/ussd-library/src/main/java/com/romellfudi/ussdlibrary/USSDService.java

@@ -7,12 +7,17 @@
 package com.romellfudi.ussdlibrary;
 
 import android.accessibilityservice.AccessibilityService;
+import android.annotation.SuppressLint;
 import android.content.ClipData;
 import android.content.ClipboardManager;
 import android.content.Context;
+import android.content.Intent;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.Parcel;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+import android.telephony.TelephonyManager;
 import android.util.Log;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityNodeInfo;
@@ -53,7 +58,7 @@ public class USSDService extends AccessibilityService {
         XLog.i(String.format("USSDService onAccessibilityEvent: [type] %s [class] %s [package] %s [time] %s [text] %s" +
                         " [ContentChangeTypes] %s [WindowChanges] %s",
                 event.getEventType(), event.getClassName(), event.getPackageName(),
-                event.getEventTime(), event.getText(), event.getContentChangeTypes(),event.getWindowChanges()));
+                event.getEventTime(), event.getText(), event.getContentChangeTypes(), event.getWindowChanges()));
 
         if (USSDController.instance == null || !USSDController.instance.isRunning) {
             XLog.e("USSDService Error : USSDController.instance = " + (USSDController.instance == null));
@@ -103,7 +108,6 @@ public class USSDService extends AccessibilityService {
         }
     }
 
-
     /**
      * Send whatever you want via USSD
      *