public boolean execute(MessageContextMenu menu, MyAccount ma) { MyLog.v(this, "execute started"); if (mIsAsync) { executeAsync1(menu, ma); } else { executeOnUiThread(menu, MessageEditorData.newEmpty(ma).setMsgId(menu.getMsgId())); } return false; }
@Override void executeOnUiThread(MessageContextMenu menu, MessageEditorData editorData) { Uri uri = MatchedUri.getUserListUri( editorData.ma.getUserId(), UserListType.USERS_OF_MESSAGE, menu.messageList.isTimelineCombined(), menu.getMsgId()); if (MyLog.isLoggable(this, MyLog.DEBUG)) { MyLog.d(this, "onItemClick, startActivity=" + uri); } menu.messageList.getActivity().startActivity(MyAction.VIEW_USERS.getIntent(uri)); }
@Override void executeOnUiThread(MessageContextMenu menu, MessageEditorData editorData) { Uri uri = MatchedUri.getTimelineItemUri( editorData.ma.getUserId(), menu.messageList.getTimelineType(), menu.messageList.isTimelineCombined(), menu.messageList.getSelectedUserId(), menu.getMsgId()); String action = menu.messageList.getActivity().getIntent().getAction(); if (Intent.ACTION_PICK.equals(action) || Intent.ACTION_GET_CONTENT.equals(action)) { if (MyLog.isLoggable(this, MyLog.DEBUG)) { MyLog.d(this, "onItemClick, setData=" + uri); } menu.messageList.getActivity().setResult(Activity.RESULT_OK, new Intent().setData(uri)); } else { if (MyLog.isLoggable(this, MyLog.DEBUG)) { MyLog.d(this, "onItemClick, startActivity=" + uri); } menu.messageList.getActivity().startActivity(MyAction.VIEW_CONVERSATION.getIntent(uri)); } }