Explorar o código

properly parse encryption/favorite flags

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger %!s(int64=4) %!d(string=hai) anos
pai
achega
1d734485bb

+ 1 - 1
app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java

@@ -61,7 +61,7 @@ public class NCEncrypted implements Property {
             try {
             try {
                 String text = XmlUtils.INSTANCE.readText(xmlPullParser);
                 String text = XmlUtils.INSTANCE.readText(xmlPullParser);
                 if (!TextUtils.isEmpty(text)) {
                 if (!TextUtils.isEmpty(text)) {
-                    return new NCEncrypted(Boolean.parseBoolean(text));
+                    return new NCEncrypted("1".equals(text));
                 }
                 }
             } catch (IOException | XmlPullParserException e) {
             } catch (IOException | XmlPullParserException e) {
                 Log.e("NCEncrypted", "failed to create property", e);
                 Log.e("NCEncrypted", "failed to create property", e);

+ 1 - 1
app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java

@@ -61,7 +61,7 @@ public class OCFavorite implements Property {
             try {
             try {
                 String text = XmlUtils.INSTANCE.readText(xmlPullParser);
                 String text = XmlUtils.INSTANCE.readText(xmlPullParser);
                 if (!TextUtils.isEmpty(text)) {
                 if (!TextUtils.isEmpty(text)) {
-                    return new OCFavorite(Boolean.parseBoolean(text));
+                    return new OCFavorite("1".equals(text));
                 }
                 }
             } catch (IOException | XmlPullParserException e) {
             } catch (IOException | XmlPullParserException e) {
                 Log.e("OCFavorite", "failed to create property", e);
                 Log.e("OCFavorite", "failed to create property", e);