aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-09-17 11:31:35 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-09-17 11:31:35 +0200
commit7bdd4166c02a88b1e5249056fabcf0e1833ab555 (patch)
tree4e489516fd7e869b9173e5c9e395380ab6408030
parent00c04cd4131cdfc6ea17cbc7e01db29591bcbf3b (diff)
catch all throwables when loading contacts
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java2
-rw-r--r--src/main/java/eu/siacs/conversations/utils/PhoneHelper.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
index 0752ae32..f18013c4 100644
--- a/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/PublishProfilePictureActivity.java
@@ -141,7 +141,7 @@ public class PublishProfilePictureActivity extends XmppActivity {
}
});
- this.defaultUri = PhoneHelper.getSefliUri(getApplicationContext());
+ this.defaultUri = PhoneHelper.getSelfiUri(getApplicationContext());
}
private void chooseAvatar(boolean crop) {
diff --git a/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
index e3a24fcf..3242cfcf 100644
--- a/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
@@ -93,14 +93,14 @@ public class PhoneHelper {
try {
return (super.loadInBackground());
- } catch (SecurityException e) {
+ } catch (Throwable e) {
return(null);
}
}
}
- public static Uri getSefliUri(Context context) {
+ public static Uri getSelfiUri(Context context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
&& context.checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {
return null;