private void handleQueryContactInfoResult(int result, UserContact contact) {
   L.v(TAG, "handleQueryContactInfoResult(), result=%1$d, count=%2$s", result, contact);
   if (contact != null && contact.getUserId().equals(mContact.getUserId())) {
     contact.setId(mContact.getId());
     mContact = contact;
     mLabelIdMap = buildLabelIdMap(mContact.getLabels());
   }
   mContactQueried = true;
   updateContactLabelPraise();
 }
 private void handleLoadLabelPraiseResult(int result, LabelPraise[] labelPraises) {
   L.v(
       TAG,
       "handleLoadLabelPraiseResult(), result=%1$d, count=%2$d",
       result,
       labelPraises != null ? labelPraises.length : 0);
   mLabelPraiseLoaded = true;
   mLabelPraises = labelPraises;
   updateContactLabelPraise();
 }
Example #3
0
  public void setLabelsByString(String labels) {
    if (TextUtils.isEmpty(labels)) {
      this.labels = null;
      return;
    }

    UserLabel[] labelArray = null;

    try {
      labelArray = LabelCmdUtils.toUserLabelArray(new JSONArray(labels));
    } catch (JSONException e) {
      L.w(TAG, e);
    } finally {
      this.labels = labelArray;
    }
  }