test
This commit is contained in:
parent
84270659cf
commit
273507ea6f
1 changed files with 14 additions and 6 deletions
|
@ -393,7 +393,10 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
|||
receivingSms = false;
|
||||
setCurrentHash(context, ""); // STATIC
|
||||
// Log.i("a", "Sim connected result: " + isSimConnected(context, phone.telephonyManager));
|
||||
if(!isSimConnected(context, phone.telephonyManager) || !ussd.has(phone.operator))
|
||||
if(!isSimConnected(context, phone.telephonyManager))
|
||||
nextPhone();
|
||||
else
|
||||
if(!ussd.has(phone.operator))
|
||||
nextPhone();
|
||||
else
|
||||
requestUssdNumber(phone);
|
||||
|
@ -448,9 +451,14 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
|||
|
||||
} else if (result.get("name"). // STATIC
|
||||
equals("languages")) { // STATIC
|
||||
String currentLanguage = Locale.getDefault().getLanguage();
|
||||
if(!result.getJSONObject("data").has(currentLanguage)) // STATIC
|
||||
currentLanguage = "en"; // STATIC
|
||||
|
||||
language = result.getJSONObject(
|
||||
"data" // STATIC
|
||||
).getJSONObject(Locale.getDefault().getLanguage());
|
||||
).getJSONObject(currentLanguage);
|
||||
|
||||
requestsCount += 1;
|
||||
}
|
||||
if (requestsCount == 2) {
|
||||
|
@ -460,7 +468,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
|||
requestPermissions(retrievePermissions(this));
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
} catch (Exception e) {
|
||||
// Log.i("ww", Arrays.toString(e.getStackTrace()));
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -578,8 +586,8 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
|||
phoneNumbers.add(new PhoneNumber(
|
||||
phoneNumber,
|
||||
telephonyManager,
|
||||
telephonyManager.getSimOperatorName(),
|
||||
currentCard.getCountryIso()
|
||||
telephonyManager.getSimOperatorName().toLowerCase(),
|
||||
currentCard.getCountryIso().toLowerCase()
|
||||
));
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue