From 6f4d032a1962179e358e053c9e9458826f1a7be8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 15 Apr 2025 20:19:37 +0300 Subject: [PATCH] test --- .../java/com/example/notifyservice/MainActivity.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/example/notifyservice/MainActivity.java b/app/src/main/java/com/example/notifyservice/MainActivity.java index e0a62cf..a3bce49 100644 --- a/app/src/main/java/com/example/notifyservice/MainActivity.java +++ b/app/src/main/java/com/example/notifyservice/MainActivity.java @@ -396,10 +396,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba if(!isSimConnected(context, phone.telephonyManager)) nextPhone(); else - if(!ussd.has(phone.operator)) - nextPhone(); - else - requestUssdNumber(phone); + requestUssdNumber(phone); } } @@ -452,9 +449,8 @@ 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 - + if(!result.getJSONObject("data").has(currentLanguage)) + currentLanguage = "en"; language = result.getJSONObject( "data" // STATIC ).getJSONObject(currentLanguage); @@ -468,7 +464,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba requestPermissions(retrievePermissions(this)); } } - } catch (Exception e) { + } catch (JSONException e) { // Log.i("ww", Arrays.toString(e.getStackTrace())); throw new RuntimeException(e); }