mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 16:19:33 +01:00
Improve conversation list cold start performance.
This commit is contained in:
@@ -11,6 +11,8 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class JsonUtils {
|
||||
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
@@ -54,7 +56,7 @@ public class JsonUtils {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
public String getString(String name) throws JSONException {
|
||||
public @Nullable String getString(String name) throws JSONException {
|
||||
if (delegate.isNull(name)) return null;
|
||||
else return delegate.getString(name);
|
||||
}
|
||||
@@ -63,6 +65,10 @@ public class JsonUtils {
|
||||
return delegate.getLong(name);
|
||||
}
|
||||
|
||||
public boolean getBoolean(String name) throws JSONException {
|
||||
return delegate.getBoolean(name);
|
||||
}
|
||||
|
||||
public boolean isNull(String name) {
|
||||
return delegate.isNull(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user