This commit is contained in:
Your Name 2025-04-15 02:30:34 +03:00
parent 84270659cf
commit 273507ea6f

View file

@ -393,10 +393,13 @@ 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
requestUssdNumber(phone);
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()
));
}
/*