|
|
@@ -109,10 +109,25 @@ function getContext() {
|
|
|
|
|
|
setImmediate(() => {
|
|
|
Java.perform(function () {
|
|
|
- const context = getContext()
|
|
|
- const cr = context.getContentResolver()
|
|
|
- const Uri = Java.use('android.net.Uri')
|
|
|
- cr.delete(Uri.parse('content://sms/'), null, null)
|
|
|
- cr.delete(Uri.parse('content://mms/'), null, null)
|
|
|
+ const TelephonyRegistry = Java.use('com.android.server.TelephonyRegistry')
|
|
|
+ TelephonyRegistry.listenWithEventList.overload(
|
|
|
+ 'boolean',
|
|
|
+ 'boolean',
|
|
|
+ 'int',
|
|
|
+ 'java.lang.String',
|
|
|
+ 'java.lang.String',
|
|
|
+ 'com.android.internal.telephony.IPhoneStateListener',
|
|
|
+ '[I',
|
|
|
+ 'boolean'
|
|
|
+ ).implementation = function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
|
+ console.log('listenWithEventList', arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
|
|
+ arg5.onServiceStateChanged.overload('android.telephony.ServiceState').implementation = function (arg0) {
|
|
|
+ console.log('onServiceStateChanged', arg0)
|
|
|
+ return this.onServiceStateChanged(arg0)
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
})
|