當前位置: 首頁>>代碼示例>>Java>>正文


Java GroupUtil.getDecodedId方法代碼示例

本文整理匯總了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);
  }
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:20,代碼來源:GroupCreateActivity.java

示例2: getId

import org.thoughtcrime.securesms.util.GroupUtil; //導入方法依賴的package包/類
public byte[] getId() {
  try {
    return GroupUtil.getDecodedId(id);
  } catch (IOException ioe) {
    throw new AssertionError(ioe);
  }
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:8,代碼來源:GroupDatabase.java

示例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;
  }
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:14,代碼來源:ConversationActivity.java

示例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);
  }
}
 
開發者ID:CableIM,項目名稱:Cable-Android,代碼行數:15,代碼來源:GroupCreateActivity.java

示例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);
  }
}
 
開發者ID:CableIM,項目名稱:Cable-Android,代碼行數:11,代碼來源:RetrieveProfileJob.java


注:本文中的org.thoughtcrime.securesms.util.GroupUtil.getDecodedId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。