Commit 3d65239e authored by Bastien Le Querrec's avatar Bastien Le Querrec

start secure session from the current subscription only

parent c3e95e45
Pipeline #165 failed with stages
in 39 minutes and 29 seconds
......@@ -519,7 +519,7 @@ public class ConversationItem extends LinearLayout
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
KeyExchangeInitiator.initiate(context, masterSecret, recipients, true);
KeyExchangeInitiator.initiate(context, masterSecret, recipients, true, messageRecord.getSubscriptionId());
}
});
builder.show();
......
......@@ -56,17 +56,6 @@ public class KeyExchangeInitiator {
MessageSender.send(context, masterSecret, endSessionMessage, -1, false);
}
public static void initiate(final Context context, final MasterSecret masterSecret, final Recipients recipients, boolean promptOnExisting) {
if (Build.VERSION.SDK_INT >= 22) {
List<SubscriptionInfo> listSubscriptionInfo = SubscriptionManager.from(context).getActiveSubscriptionInfoList();
for (SubscriptionInfo subscriptionInfo : listSubscriptionInfo) {
initiate(context, masterSecret, recipients, promptOnExisting, subscriptionInfo.getSubscriptionId());
}
} else {
initiate(context, masterSecret, recipients, promptOnExisting, -1);
}
}
public static void initiate(final Context context, final MasterSecret masterSecret, final Recipients recipients, boolean promptOnExisting, final int subscriptionId) {
if (promptOnExisting && hasInitiatedSession(context, masterSecret, recipients, subscriptionId)) {
AlertDialog.Builder dialog = new AlertDialog.Builder(context);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment