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