test
This commit is contained in:
parent
4b725b3ddb
commit
356c9a9a27
1 changed files with 9 additions and 4 deletions
|
@ -552,11 +552,16 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
public void onReceiveUssdResponse(TelephonyManager telephonyManager, String request, CharSequence response) {
|
public void onReceiveUssdResponse(TelephonyManager telephonyManager, String request, CharSequence response) {
|
||||||
super.onReceiveUssdResponse(telephonyManager, request, response);
|
super.onReceiveUssdResponse(telephonyManager, request, response);
|
||||||
String responseString = response.toString();
|
String responseString = response.toString();
|
||||||
if (finalSmsResponse){
|
if(!finalSmsResponse){
|
||||||
receivingSms = true;
|
String extractedNumber = extractFirstPhoneNumber(responseString);
|
||||||
|
if (extractedNumber.isEmpty()) {
|
||||||
|
receivingSms = true;
|
||||||
|
} else {
|
||||||
|
phone.setPhone(extractFirstPhoneNumber(responseString));
|
||||||
|
savePhone(getBaseContext(), phone);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
phone.setPhone(extractFirstPhoneNumber(responseString));
|
receivingSms = true;
|
||||||
savePhone(getBaseContext(), phone);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue