do not use pop up menus for encryption and attachment selection
This commit is contained in:
parent
6f5076e8c4
commit
63c4fe6f02
|
@ -114,6 +114,9 @@ public class ConversationActivity extends XmppActivity
|
||||||
|
|
||||||
private boolean conversationWasSelectedByKeyboard = false;
|
private boolean conversationWasSelectedByKeyboard = false;
|
||||||
|
|
||||||
|
private boolean showSoundRecorderAttachment = false;
|
||||||
|
private boolean showLocationAttachment = false;
|
||||||
|
|
||||||
private View mContentView;
|
private View mContentView;
|
||||||
|
|
||||||
private List<Conversation> conversationList = new ArrayList<>();
|
private List<Conversation> conversationList = new ArrayList<>();
|
||||||
|
@ -345,12 +348,9 @@ public class ConversationActivity extends XmppActivity
|
||||||
@Override
|
@Override
|
||||||
public void switchToConversation(Conversation conversation) {
|
public void switchToConversation(Conversation conversation) {
|
||||||
setSelectedConversation(conversation);
|
setSelectedConversation(conversation);
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
ConversationActivity.this.mConversationFragment.reInit(getSelectedConversation());
|
ConversationActivity.this.mConversationFragment.reInit(getSelectedConversation());
|
||||||
openConversation();
|
openConversation();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,6 +410,8 @@ public class ConversationActivity extends XmppActivity
|
||||||
final MenuItem menuInviteContact = menu.findItem(R.id.action_invite);
|
final MenuItem menuInviteContact = menu.findItem(R.id.action_invite);
|
||||||
final MenuItem menuMute = menu.findItem(R.id.action_mute);
|
final MenuItem menuMute = menu.findItem(R.id.action_mute);
|
||||||
final MenuItem menuUnmute = menu.findItem(R.id.action_unmute);
|
final MenuItem menuUnmute = menu.findItem(R.id.action_unmute);
|
||||||
|
final MenuItem menuAttachSoundRecorder = menu.findItem(R.id.attach_record_voice);
|
||||||
|
final MenuItem menuAttachLocation = menu.findItem(R.id.attach_location);
|
||||||
|
|
||||||
if (isConversationsOverviewVisable() && isConversationsOverviewHideable()) {
|
if (isConversationsOverviewVisable() && isConversationsOverviewHideable()) {
|
||||||
menuArchive.setVisible(false);
|
menuArchive.setVisible(false);
|
||||||
|
@ -443,59 +445,52 @@ public class ConversationActivity extends XmppActivity
|
||||||
} else {
|
} else {
|
||||||
menuUnmute.setVisible(false);
|
menuUnmute.setVisible(false);
|
||||||
}
|
}
|
||||||
|
menuAttachLocation.setVisible(showLocationAttachment);
|
||||||
|
menuAttachSoundRecorder.setVisible(showSoundRecorderAttachment);
|
||||||
|
configureEncryptionMenu(getSelectedConversation(),menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Config.supportOmemo()) {
|
|
||||||
new Handler().post(addOmemoDebuggerRunnable);
|
|
||||||
}
|
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Runnable addOmemoDebuggerRunnable = new Runnable() {
|
private static void configureEncryptionMenu(Conversation conversation, Menu menu) {
|
||||||
@Override
|
MenuItem otr = menu.findItem(R.id.encryption_choice_otr);
|
||||||
public void run() {
|
MenuItem none = menu.findItem(R.id.encryption_choice_none);
|
||||||
View view = findViewById(R.id.action_security);
|
MenuItem pgp = menu.findItem(R.id.encryption_choice_pgp);
|
||||||
if (view != null) {
|
MenuItem axolotl = menu.findItem(R.id.encryption_choice_axolotl);
|
||||||
view.setOnLongClickListener(new View.OnLongClickListener() {
|
pgp.setVisible(Config.supportOpenPgp());
|
||||||
@Override
|
none.setVisible(Config.supportUnencrypted() || conversation.getMode() == Conversation.MODE_MULTI);
|
||||||
public boolean onLongClick(View v) {
|
otr.setVisible(Config.supportOtr());
|
||||||
return v.getId() == R.id.action_security && quickOmemoDebugger(getSelectedConversation());
|
axolotl.setVisible(Config.supportOmemo());
|
||||||
|
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
||||||
|
otr.setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
if (!conversation.getAccount().getAxolotlService().isConversationAxolotlCapable(conversation)) {
|
||||||
|
axolotl.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
switch (conversation.getNextEncryption()) {
|
||||||
|
case Message.ENCRYPTION_NONE:
|
||||||
|
none.setChecked(true);
|
||||||
|
break;
|
||||||
|
case Message.ENCRYPTION_OTR:
|
||||||
|
otr.setChecked(true);
|
||||||
|
break;
|
||||||
|
case Message.ENCRYPTION_PGP:
|
||||||
|
pgp.setChecked(true);
|
||||||
|
break;
|
||||||
|
case Message.ENCRYPTION_AXOLOTL:
|
||||||
|
axolotl.setChecked(true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
none.setChecked(true);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
private boolean quickOmemoDebugger(Conversation c) {
|
|
||||||
if (c != null) {
|
|
||||||
boolean single = c.getMode() == Conversation.MODE_SINGLE;
|
|
||||||
AxolotlService axolotlService = c.getAccount().getAxolotlService();
|
|
||||||
Pair<AxolotlService.AxolotlCapability,Jid> capabilityJidPair = axolotlService.isConversationAxolotlCapableDetailed(c);
|
|
||||||
switch (capabilityJidPair.first) {
|
|
||||||
case MISSING_PRESENCE:
|
|
||||||
Toast.makeText(ConversationActivity.this,single ? getString(R.string.missing_presence_subscription) : getString(R.string.missing_presence_subscription_with_x,capabilityJidPair.second.toBareJid().toString()),Toast.LENGTH_SHORT).show();
|
|
||||||
return true;
|
|
||||||
case MISSING_KEYS:
|
|
||||||
Toast.makeText(ConversationActivity.this,single ? getString(R.string.missing_omemo_keys) : getString(R.string.missing_keys_from_x,capabilityJidPair.second.toBareJid().toString()),Toast.LENGTH_SHORT).show();
|
|
||||||
return true;
|
|
||||||
case WRONG_CONFIGURATION:
|
|
||||||
Toast.makeText(ConversationActivity.this,R.string.wrong_conference_configuration, Toast.LENGTH_SHORT).show();
|
|
||||||
return true;
|
|
||||||
case NO_MEMBERS:
|
|
||||||
Toast.makeText(ConversationActivity.this,R.string.this_conference_has_no_members, Toast.LENGTH_SHORT).show();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void selectPresenceToAttachFile(final int attachmentChoice, final int encryption) {
|
protected void selectPresenceToAttachFile(final int attachmentChoice, final int encryption) {
|
||||||
final Conversation conversation = getSelectedConversation();
|
final Conversation conversation = getSelectedConversation();
|
||||||
final Account account = conversation.getAccount();
|
final Account account = conversation.getAccount();
|
||||||
final OnPresenceSelected callback = new OnPresenceSelected() {
|
final OnPresenceSelected callback = () -> {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPresenceSelected() {
|
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
boolean chooser = false;
|
boolean chooser = false;
|
||||||
String fallbackPackageId = null;
|
String fallbackPackageId = null;
|
||||||
|
@ -546,7 +541,6 @@ public class ConversationActivity extends XmppActivity
|
||||||
} else if (fallbackPackageId != null) {
|
} else if (fallbackPackageId != null) {
|
||||||
startActivity(getInstallApkIntent(fallbackPackageId));
|
startActivity(getInstallApkIntent(fallbackPackageId));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
if ((account.httpUploadAvailable() || attachmentChoice == ATTACHMENT_CHOICE_LOCATION) && encryption != Message.ENCRYPTION_OTR) {
|
if ((account.httpUploadAvailable() || attachmentChoice == ATTACHMENT_CHOICE_LOCATION) && encryption != Message.ENCRYPTION_OTR) {
|
||||||
conversation.setNextCounterpart(null);
|
conversation.setNextCounterpart(null);
|
||||||
|
@ -704,8 +698,29 @@ public class ConversationActivity extends XmppActivity
|
||||||
return true;
|
return true;
|
||||||
} else if (getSelectedConversation() != null) {
|
} else if (getSelectedConversation() != null) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.action_attach_file:
|
case R.id.encryption_choice_axolotl:
|
||||||
attachFileDialog();
|
case R.id.encryption_choice_otr:
|
||||||
|
case R.id.encryption_choice_pgp:
|
||||||
|
case R.id.encryption_choice_none:
|
||||||
|
handleEncryptionSelection(item);
|
||||||
|
break;
|
||||||
|
case R.id.attach_choose_picture:
|
||||||
|
attachFile(ATTACHMENT_CHOICE_CHOOSE_IMAGE);
|
||||||
|
break;
|
||||||
|
case R.id.attach_take_picture:
|
||||||
|
attachFile(ATTACHMENT_CHOICE_TAKE_PHOTO);
|
||||||
|
break;
|
||||||
|
case R.id.attach_record_video:
|
||||||
|
attachFile(ATTACHMENT_CHOICE_RECORD_VIDEO);
|
||||||
|
break;
|
||||||
|
case R.id.attach_choose_file:
|
||||||
|
attachFile(ATTACHMENT_CHOICE_CHOOSE_FILE);
|
||||||
|
break;
|
||||||
|
case R.id.attach_record_voice:
|
||||||
|
attachFile(ATTACHMENT_CHOICE_RECORD_VOICE);
|
||||||
|
break;
|
||||||
|
case R.id.attach_location:
|
||||||
|
attachFile(ATTACHMENT_CHOICE_LOCATION);
|
||||||
break;
|
break;
|
||||||
case R.id.action_archive:
|
case R.id.action_archive:
|
||||||
this.endConversation(getSelectedConversation());
|
this.endConversation(getSelectedConversation());
|
||||||
|
@ -723,9 +738,6 @@ public class ConversationActivity extends XmppActivity
|
||||||
case R.id.action_invite:
|
case R.id.action_invite:
|
||||||
inviteToConversation(getSelectedConversation());
|
inviteToConversation(getSelectedConversation());
|
||||||
break;
|
break;
|
||||||
case R.id.action_security:
|
|
||||||
selectEncryptionDialog(getSelectedConversation());
|
|
||||||
break;
|
|
||||||
case R.id.action_clear_history:
|
case R.id.action_clear_history:
|
||||||
clearHistoryDialog(getSelectedConversation());
|
clearHistoryDialog(getSelectedConversation());
|
||||||
break;
|
break;
|
||||||
|
@ -779,17 +791,12 @@ public class ConversationActivity extends XmppActivity
|
||||||
protected void clearHistoryDialog(final Conversation conversation) {
|
protected void clearHistoryDialog(final Conversation conversation) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle(getString(R.string.clear_conversation_history));
|
builder.setTitle(getString(R.string.clear_conversation_history));
|
||||||
View dialogView = getLayoutInflater().inflate(
|
final View dialogView = getLayoutInflater().inflate(R.layout.dialog_clear_history, null);
|
||||||
R.layout.dialog_clear_history, null);
|
final CheckBox endConversationCheckBox = dialogView.findViewById(R.id.end_conversation_checkbox);
|
||||||
final CheckBox endConversationCheckBox = (CheckBox) dialogView
|
|
||||||
.findViewById(R.id.end_conversation_checkbox);
|
|
||||||
builder.setView(dialogView);
|
builder.setView(dialogView);
|
||||||
builder.setNegativeButton(getString(R.string.cancel), null);
|
builder.setNegativeButton(getString(R.string.cancel), null);
|
||||||
builder.setPositiveButton(getString(R.string.delete_messages),
|
builder.setPositiveButton(getString(R.string.delete_messages),
|
||||||
new OnClickListener() {
|
(dialog, which) -> {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
ConversationActivity.this.xmppConnectionService.clearConversationHistory(conversation);
|
ConversationActivity.this.xmppConnectionService.clearConversationHistory(conversation);
|
||||||
if (endConversationCheckBox.isChecked()) {
|
if (endConversationCheckBox.isChecked()) {
|
||||||
endConversation(conversation);
|
endConversation(conversation);
|
||||||
|
@ -797,55 +804,10 @@ public class ConversationActivity extends XmppActivity
|
||||||
updateConversationList();
|
updateConversationList();
|
||||||
ConversationActivity.this.mConversationFragment.updateMessages();
|
ConversationActivity.this.mConversationFragment.updateMessages();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void attachFileDialog() {
|
|
||||||
View menuAttachFile = findViewById(R.id.action_attach_file);
|
|
||||||
if (menuAttachFile == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
PopupMenu attachFilePopup = new PopupMenu(this, menuAttachFile);
|
|
||||||
attachFilePopup.inflate(R.menu.attachment_choices);
|
|
||||||
if (new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION).resolveActivity(getPackageManager()) == null) {
|
|
||||||
attachFilePopup.getMenu().findItem(R.id.attach_record_voice).setVisible(false);
|
|
||||||
}
|
|
||||||
if (new Intent("eu.siacs.conversations.location.request").resolveActivity(getPackageManager()) == null) {
|
|
||||||
attachFilePopup.getMenu().findItem(R.id.attach_location).setVisible(false);
|
|
||||||
}
|
|
||||||
attachFilePopup.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
|
||||||
switch (item.getItemId()) {
|
|
||||||
case R.id.attach_choose_picture:
|
|
||||||
attachFile(ATTACHMENT_CHOICE_CHOOSE_IMAGE);
|
|
||||||
break;
|
|
||||||
case R.id.attach_take_picture:
|
|
||||||
attachFile(ATTACHMENT_CHOICE_TAKE_PHOTO);
|
|
||||||
break;
|
|
||||||
case R.id.attach_record_video:
|
|
||||||
attachFile(ATTACHMENT_CHOICE_RECORD_VIDEO);
|
|
||||||
break;
|
|
||||||
case R.id.attach_choose_file:
|
|
||||||
attachFile(ATTACHMENT_CHOICE_CHOOSE_FILE);
|
|
||||||
break;
|
|
||||||
case R.id.attach_record_voice:
|
|
||||||
attachFile(ATTACHMENT_CHOICE_RECORD_VOICE);
|
|
||||||
break;
|
|
||||||
case R.id.attach_location:
|
|
||||||
attachFile(ATTACHMENT_CHOICE_LOCATION);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
UIHelper.showIconsInPopup(attachFilePopup);
|
|
||||||
attachFilePopup.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void verifyOtrSessionDialog(final Conversation conversation, View view) {
|
public void verifyOtrSessionDialog(final Conversation conversation, View view) {
|
||||||
if (!conversation.hasValidOtrSession() || conversation.getOtrSession().getSessionStatus() != SessionStatus.ENCRYPTED) {
|
if (!conversation.hasValidOtrSession() || conversation.getOtrSession().getSessionStatus() != SessionStatus.ENCRYPTED) {
|
||||||
Toast.makeText(this, R.string.otr_session_not_started, Toast.LENGTH_LONG).show();
|
Toast.makeText(this, R.string.otr_session_not_started, Toast.LENGTH_LONG).show();
|
||||||
|
@ -881,19 +843,12 @@ public class ConversationActivity extends XmppActivity
|
||||||
popup.show();
|
popup.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void selectEncryptionDialog(final Conversation conversation) {
|
private void handleEncryptionSelection(MenuItem item) {
|
||||||
View menuItemView = findViewById(R.id.action_security);
|
Conversation conversation = getSelectedConversation();
|
||||||
if (menuItemView == null) {
|
if (conversation == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PopupMenu popup = new PopupMenu(this, menuItemView);
|
final ConversationFragment fragment = (ConversationFragment) getFragmentManager().findFragmentByTag("conversation");
|
||||||
final ConversationFragment fragment = (ConversationFragment) getFragmentManager()
|
|
||||||
.findFragmentByTag("conversation");
|
|
||||||
if (fragment != null) {
|
|
||||||
popup.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.encryption_choice_none:
|
case R.id.encryption_choice_none:
|
||||||
conversation.setNextEncryption(Message.ENCRYPTION_NONE);
|
conversation.setNextEncryption(Message.ENCRYPTION_NONE);
|
||||||
|
@ -929,43 +884,6 @@ public class ConversationActivity extends XmppActivity
|
||||||
fragment.updateChatMsgHint();
|
fragment.updateChatMsgHint();
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
refreshUi();
|
refreshUi();
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
popup.inflate(R.menu.encryption_choices);
|
|
||||||
MenuItem otr = popup.getMenu().findItem(R.id.encryption_choice_otr);
|
|
||||||
MenuItem none = popup.getMenu().findItem(R.id.encryption_choice_none);
|
|
||||||
MenuItem pgp = popup.getMenu().findItem(R.id.encryption_choice_pgp);
|
|
||||||
MenuItem axolotl = popup.getMenu().findItem(R.id.encryption_choice_axolotl);
|
|
||||||
pgp.setVisible(Config.supportOpenPgp());
|
|
||||||
none.setVisible(Config.supportUnencrypted() || conversation.getMode() == Conversation.MODE_MULTI);
|
|
||||||
otr.setVisible(Config.supportOtr());
|
|
||||||
axolotl.setVisible(Config.supportOmemo());
|
|
||||||
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
|
||||||
otr.setVisible(false);
|
|
||||||
}
|
|
||||||
if (!conversation.getAccount().getAxolotlService().isConversationAxolotlCapable(conversation)) {
|
|
||||||
axolotl.setEnabled(false);
|
|
||||||
}
|
|
||||||
switch (conversation.getNextEncryption()) {
|
|
||||||
case Message.ENCRYPTION_NONE:
|
|
||||||
none.setChecked(true);
|
|
||||||
break;
|
|
||||||
case Message.ENCRYPTION_OTR:
|
|
||||||
otr.setChecked(true);
|
|
||||||
break;
|
|
||||||
case Message.ENCRYPTION_PGP:
|
|
||||||
pgp.setChecked(true);
|
|
||||||
break;
|
|
||||||
case Message.ENCRYPTION_AXOLOTL:
|
|
||||||
axolotl.setChecked(true);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
none.setChecked(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
popup.show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void muteConversationDialog(final Conversation conversation) {
|
protected void muteConversationDialog(final Conversation conversation) {
|
||||||
|
@ -1165,12 +1083,14 @@ public class ConversationActivity extends XmppActivity
|
||||||
recreate();
|
recreate();
|
||||||
}
|
}
|
||||||
this.mActivityPaused = false;
|
this.mActivityPaused = false;
|
||||||
|
|
||||||
|
|
||||||
if (!isConversationsOverviewVisable() || !isConversationsOverviewHideable()) {
|
if (!isConversationsOverviewVisable() || !isConversationsOverviewHideable()) {
|
||||||
sendReadMarkerIfNecessary(getSelectedConversation());
|
sendReadMarkerIfNecessary(getSelectedConversation());
|
||||||
}
|
}
|
||||||
|
new Handler().post(() -> {
|
||||||
|
showSoundRecorderAttachment = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION).resolveActivity(getPackageManager()) != null;
|
||||||
|
showLocationAttachment = new Intent("eu.siacs.conversations.location.request").resolveActivity(getPackageManager()) != null;
|
||||||
|
invalidateOptionsMenu();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -551,19 +551,4 @@ public class UIHelper {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean showIconsInPopup(PopupMenu attachFilePopup) {
|
|
||||||
try {
|
|
||||||
Field field = attachFilePopup.getClass().getDeclaredField("mPopup");
|
|
||||||
field.setAccessible(true);
|
|
||||||
Object menuPopupHelper = field.get(attachFilePopup);
|
|
||||||
Class<?> cls = Class.forName("com.android.internal.view.menu.MenuPopupHelper");
|
|
||||||
Method method = cls.getDeclaredMethod("setForceShowIcon", new Class[]{boolean.class});
|
|
||||||
method.setAccessible(true);
|
|
||||||
method.invoke(menuPopupHelper, new Object[]{true});
|
|
||||||
return true;
|
|
||||||
} catch (Exception e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/attach_choose_file"
|
|
||||||
android:title="@string/choose_file"
|
|
||||||
android:icon="?attr/ic_attach_document"/>
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/attach_choose_picture"
|
|
||||||
android:title="@string/attach_choose_picture"
|
|
||||||
android:icon="?attr/ic_attach_photo"/>
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/attach_take_picture"
|
|
||||||
android:title="@string/attach_take_picture"
|
|
||||||
android:icon="?attr/ic_attach_camera"/>
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/attach_record_video"
|
|
||||||
android:title="@string/attach_record_video"
|
|
||||||
android:icon="?attr/ic_attach_videocam"/>
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/attach_record_voice"
|
|
||||||
android:title="@string/attach_record_voice"
|
|
||||||
android:icon="?attr/ic_attach_record"/>
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/attach_location"
|
|
||||||
android:title="@string/send_location"
|
|
||||||
android:icon="?attr/ic_attach_location"/>
|
|
||||||
|
|
||||||
</menu>
|
|
|
@ -12,13 +12,63 @@
|
||||||
android:icon="?attr/icon_not_secure"
|
android:icon="?attr/icon_not_secure"
|
||||||
android:orderInCategory="20"
|
android:orderInCategory="20"
|
||||||
app:showAsAction="always"
|
app:showAsAction="always"
|
||||||
android:title="@string/action_secure"/>
|
android:title="@string/action_secure">
|
||||||
|
<menu>
|
||||||
|
<group android:checkableBehavior="single" >
|
||||||
|
<item
|
||||||
|
android:id="@+id/encryption_choice_none"
|
||||||
|
android:title="@string/encryption_choice_unencrypted"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/encryption_choice_axolotl"
|
||||||
|
android:title="@string/encryption_choice_omemo"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/encryption_choice_otr"
|
||||||
|
android:title="@string/encryption_choice_otr"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/encryption_choice_pgp"
|
||||||
|
android:title="@string/encryption_choice_pgp"/>
|
||||||
|
</group>
|
||||||
|
</menu>
|
||||||
|
</item>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_attach_file"
|
android:id="@+id/action_attach_file"
|
||||||
android:icon="?attr/icon_new_attachment"
|
android:icon="?attr/icon_new_attachment"
|
||||||
android:orderInCategory="30"
|
android:orderInCategory="30"
|
||||||
app:showAsAction="always"
|
app:showAsAction="always"
|
||||||
android:title="@string/attach_file"/>
|
android:title="@string/attach_file">
|
||||||
|
<menu>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/attach_choose_file"
|
||||||
|
android:title="@string/choose_file"
|
||||||
|
android:icon="?attr/ic_attach_document"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/attach_choose_picture"
|
||||||
|
android:title="@string/attach_choose_picture"
|
||||||
|
android:icon="?attr/ic_attach_photo"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/attach_take_picture"
|
||||||
|
android:title="@string/attach_take_picture"
|
||||||
|
android:icon="?attr/ic_attach_camera"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/attach_record_video"
|
||||||
|
android:title="@string/attach_record_video"
|
||||||
|
android:icon="?attr/ic_attach_videocam"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/attach_record_voice"
|
||||||
|
android:title="@string/attach_record_voice"
|
||||||
|
android:icon="?attr/ic_attach_record"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/attach_location"
|
||||||
|
android:title="@string/send_location"
|
||||||
|
android:icon="?attr/ic_attach_location"/>
|
||||||
|
</menu>
|
||||||
|
</item>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_contact_details"
|
android:id="@+id/action_contact_details"
|
||||||
android:orderInCategory="40"
|
android:orderInCategory="40"
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
|
|
||||||
<group android:checkableBehavior="single" >
|
|
||||||
<item
|
|
||||||
android:id="@+id/encryption_choice_none"
|
|
||||||
android:title="@string/encryption_choice_unencrypted"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/encryption_choice_axolotl"
|
|
||||||
android:title="@string/encryption_choice_omemo"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/encryption_choice_otr"
|
|
||||||
android:title="@string/encryption_choice_otr"/>
|
|
||||||
<item
|
|
||||||
android:id="@+id/encryption_choice_pgp"
|
|
||||||
android:title="@string/encryption_choice_pgp"/>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</menu>
|
|
Loading…
Reference in New Issue