コード例 #1
0
  public void setListAsActive(String listname) {
    try {
      privacyManager.setActiveListName(listname);
      fireListActivated(listname);
      if (hasActiveList()) {
        _presenceHandler.removeIconsForList(getActiveList());
      }
      getPrivacyList(listname).setListAsActive(true);
      for (SparkPrivacyList plist : _privacyLists) {
        if (!plist.getListName().equals(listname)) plist.setListAsActive(false);
      }
      _presenceHandler.setIconsForList(getActiveList());

    } catch (XMPPException e) {
      Log.warning("Could not activate PrivacyList " + listname);
      e.printStackTrace();
    }
  }
コード例 #2
0
  public void declineActiveList() {
    try {

      if (hasActiveList()) {
        privacyManager.declineActiveList();
        fireListDeActivated(getActiveList().getListName());
        _presenceHandler.removeIconsForList(getActiveList());
      }
      for (SparkPrivacyList plist : _privacyLists) {
        plist.setListAsActive(false);
      }
    } catch (XMPPException e) {
      Log.warning("Could not decline active privacy list");
      e.printStackTrace();
    }
  }