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