diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-09-17 20:10:43 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-09-17 20:10:43 +0200 |
commit | 61b7e83316adc2e341fa80adbda6a6ba27f11ba0 (patch) | |
tree | 7fc6420773946aa7e1428b321846732c0d571921 /src/main/java/de | |
parent | 4450b2d934860811c053df9b2ddc3d13973e296d (diff) |
catch all throwables when loading contacts
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/PhoneHelper.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java index 187317f86..12e71720d 100644 --- a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java +++ b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java @@ -142,7 +142,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/de/pixart/messenger/utils/PhoneHelper.java b/src/main/java/de/pixart/messenger/utils/PhoneHelper.java index 7c19961b9..805b76673 100644 --- a/src/main/java/de/pixart/messenger/utils/PhoneHelper.java +++ b/src/main/java/de/pixart/messenger/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; |