mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-30 16:51:42 +01:00
fix bug in providerservice (Christian Schneppe)
This commit is contained in:
parent
9889478bff
commit
ac30593b96
1 changed files with 6 additions and 5 deletions
|
@ -6,6 +6,7 @@ import android.util.Log;
|
|||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
@ -76,12 +77,12 @@ public class ProviderService extends AsyncTask<String, Object, Boolean> {
|
|||
String ratingC2S = null;
|
||||
String ratingS2S = null;
|
||||
int ratingXmppComplianceTester = 0;
|
||||
final String provider = jsonObject.names().getString(i);
|
||||
final String provider = Objects.requireNonNull(jsonObject.names()).getString(i);
|
||||
if (provider.length() > 0) {
|
||||
for (int ii = 0; ii < jsonObject.length(); ii++) {
|
||||
final JSONObject json = new JSONObject(jsonObject.get(provider).toString());
|
||||
String featureName = json.names().getString(ii);
|
||||
final JSONObject subjson = new JSONObject(json.get(json.names().getString(ii)).toString());
|
||||
final JSONObject json = new JSONObject(jsonObject.get(provider).toString());
|
||||
for (int ii = 0; ii < json.length(); ii++) {
|
||||
String featureName = Objects.requireNonNull(json.names()).getString(ii);
|
||||
final JSONObject subjson = new JSONObject(json.get(Objects.requireNonNull(json.names()).getString(ii)).toString());
|
||||
if (featureName.equals("inBandRegistration")) {
|
||||
inBandRegistration = subjson.getBoolean("content");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue