本文整理匯總了Java中org.thoughtcrime.securesms.util.GroupUtil.getDecodedId方法的典型用法代碼示例。如果您正苦於以下問題:Java GroupUtil.getDecodedId方法的具體用法?Java GroupUtil.getDecodedId怎麽用?Java GroupUtil.getDecodedId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.thoughtcrime.securesms.util.GroupUtil
的用法示例。
在下文中一共展示了GroupUtil.getDecodedId方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initializeExistingGroup
import org.thoughtcrime.securesms.util.GroupUtil; //導入方法依賴的package包/類
private void initializeExistingGroup() {
final String encodedGroupId = RecipientFactory.getRecipientForId(this, getIntent().getLongExtra(GROUP_RECIPIENT_EXTRA, -1), true)
.getNumber();
byte[] groupId;
try {
groupId = GroupUtil.getDecodedId(encodedGroupId);
} catch (IOException ioe) {
Log.w(TAG, "Couldn't decode the encoded groupId passed in via intent", ioe);
groupId = null;
}
if (groupId != null) {
new FillExistingGroupInfoAsyncTask(this).execute(groupId);
} else {
groupName.setEnabled(true);
avatar.setEnabled(true);
recipientsEditor.setVisibility(View.VISIBLE);
contactsButton.setVisibility(View.VISIBLE);
}
}
示例2: getId
import org.thoughtcrime.securesms.util.GroupUtil; //導入方法依賴的package包/類
public byte[] getId() {
try {
return GroupUtil.getDecodedId(id);
} catch (IOException ioe) {
throw new AssertionError(ioe);
}
}
示例3: isActiveGroup
import org.thoughtcrime.securesms.util.GroupUtil; //導入方法依賴的package包/類
private boolean isActiveGroup() {
if (!isGroupConversation()) return false;
try {
byte[] groupId = GroupUtil.getDecodedId(getRecipients().getPrimaryRecipient().getNumber());
GroupRecord record = DatabaseFactory.getGroupDatabase(this).getGroup(groupId);
return record != null && record.isActive();
} catch (IOException e) {
Log.w("ConversationActivity", e);
return false;
}
}
示例4: initializeExistingGroup
import org.thoughtcrime.securesms.util.GroupUtil; //導入方法依賴的package包/類
private void initializeExistingGroup() {
final String encodedGroupId = RecipientFactory.getRecipientForId(this, getIntent().getLongExtra(GROUP_RECIPIENT_EXTRA, -1), true)
.getNumber();
byte[] groupId;
try {
groupId = GroupUtil.getDecodedId(encodedGroupId);
} catch (IOException ioe) {
Log.w(TAG, "Couldn't decode the encoded groupId passed in via intent", ioe);
groupId = null;
}
if (groupId != null) {
new FillExistingGroupInfoAsyncTask(this).execute(groupId);
}
}
示例5: handleGroupRecipient
import org.thoughtcrime.securesms.util.GroupUtil; //導入方法依賴的package包/類
private void handleGroupRecipient(Recipient group)
throws IOException, InvalidKeyException, InvalidNumberException
{
byte[] groupId = GroupUtil.getDecodedId(group.getNumber());
Recipients recipients = DatabaseFactory.getGroupDatabase(context).getGroupMembers(groupId, false);
for (Recipient recipient : recipients) {
handleIndividualRecipient(recipient);
}
}