Commit 52f62372 authored by Bastien Le Querrec's avatar Bastien Le Querrec

fix menu on 1-SIM phones

parent ba853253
Pipeline #170 passed with stages
in 44 minutes and 39 seconds
......@@ -448,14 +448,17 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
for (SubscriptionInfoCompat subscriptionInfo : activeSubscriptions) {
final int subscriptionId = subscriptionInfo.getSubscriptionId();
identitiesMenu.add(Menu.NONE, Menu.NONE, Menu.NONE, subscriptionInfo.getDisplayName())
.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
handleVerifyIdentity(subscriptionId);
return true;
}
});
if (SessionUtil.hasSession(this, masterSecret, recipients.getPrimaryRecipient().getNumber(), subscriptionId)) {
identitiesMenu.add(Menu.NONE, Menu.NONE, Menu.NONE, subscriptionInfo.getDisplayName())
.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
handleVerifyIdentity(subscriptionId);
return true;
}
});
}
}
} else {
menu.findItem(R.id.menu_verify_identity_dual_sim).setVisible(false);
......@@ -510,7 +513,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
}
} else {
menu.findItem(R.id.menu_abort_session).setVisible(false);
menu.findItem(R.id.menu_abort_session_dual_sim).setVisible(false);
menu.findItem(R.id.menu_start_secure_session_dual_sim).setVisible(false);
}
}
......
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