From 1d734485bb3f1e93135c4ed36e39d81944ae2bd1 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Thu, 6 May 2021 13:28:51 +0200 Subject: [PATCH] properly parse encryption/favorite flags Signed-off-by: Andy Scherzinger --- .../components/filebrowser/models/properties/NCEncrypted.java | 2 +- .../components/filebrowser/models/properties/OCFavorite.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java index 89f0b15ac..21932245f 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/NCEncrypted.java @@ -61,7 +61,7 @@ public class NCEncrypted implements Property { try { String text = XmlUtils.INSTANCE.readText(xmlPullParser); if (!TextUtils.isEmpty(text)) { - return new NCEncrypted(Boolean.parseBoolean(text)); + return new NCEncrypted("1".equals(text)); } } catch (IOException | XmlPullParserException e) { Log.e("NCEncrypted", "failed to create property", e); diff --git a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java index 85182119c..9ffdb01d0 100644 --- a/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java +++ b/app/src/main/java/com/nextcloud/talk/components/filebrowser/models/properties/OCFavorite.java @@ -61,7 +61,7 @@ public class OCFavorite implements Property { try { String text = XmlUtils.INSTANCE.readText(xmlPullParser); if (!TextUtils.isEmpty(text)) { - return new OCFavorite(Boolean.parseBoolean(text)); + return new OCFavorite("1".equals(text)); } } catch (IOException | XmlPullParserException e) { Log.e("OCFavorite", "failed to create property", e);