aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-08-26 10:19:42 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-08-26 10:19:42 +0200
commitb52f07929255f4cb43c97d6c2a0a019b0386fcb0 (patch)
tree2d060afb35d322d0c2e4455420dc96c630b37afe
parent9e0145a8f69ccbe5ef39cc4d7c9058be5461195d (diff)
always display allow contact perm dialog after intro
-rw-r--r--src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
index cc7394b4..66a7586a 100644
--- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
@@ -746,6 +746,16 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
}
}
});
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
+ builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
+ @Override
+ public void onDismiss(DialogInterface dialog) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS);
+ }
+ }
+ });
+ }
builder.create().show();
} else {
requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, 0);