always display allow contact perm dialog after intro

This commit is contained in:
Daniel Gultsch 2016-08-26 10:19:42 +02:00
parent 9e0145a8f6
commit b52f079292

View File

@ -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);