aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-08-26 10:19:42 +0200
committerChristian Schneppe <christian@pix-art.de>2016-08-26 22:37:10 +0200
commit2b79b43075e5ead799c560236086f1f3b598b17d (patch)
tree2974cb23a70f513e88e6eb33e80a0610142f8af1 /src/main/java/de/pixart
parentcf32b40d53be0d22c225b77fd0f2fb1db05dae68 (diff)
always display allow contact perm dialog after intro
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index 40929a9ea..e70675847 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/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);