Open vi opened 8 years ago
I guess you need to check if phoneNumber member starts with * in src/com/callrecorder/android/RecordService.java private void startRecording(Intent intent) and just return from the beginning of this function.
Here is working patch:
diff --git a/src/com/callrecorder/android/MyPhoneReceiver.java b/src/com/callrecorder/android/MyPhoneReceiver.java
index 0c0fd99..97d8322 100644
--- a/src/com/callrecorder/android/MyPhoneReceiver.java
+++ b/src/com/callrecorder/android/MyPhoneReceiver.java
@@ -34,6 +34,11 @@ public class MyPhoneReceiver extends BroadcastReceiver {
phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
String extraState = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
Log.d(Constants.TAG, "MyPhoneReciever phoneNumber "+phoneNumber);
+ if(phoneNumber != null &&
+ phoneNumber.startsWith("*")) {
+ Log.d(Constants.TAG, "MyPhoneReciever ignore phoneNumber "+phoneNumber);
+ return;
+ }
if (MainActivity.updateExternalStorageState() == Constants.MEDIA_MOUNTED) {
try {
Could you please merge https://github.com/riul88/call-recorder-for-android/pull/46 ? USSD recording attempts are quite annoying.
I do something like
*100#
and the recorder reacts with a notification.