Java 类org.jivesoftware.smack.packet.PrivacyItem.PrivacyRule 实例源码

项目:Beem    文件:PrivacyListManagerAdapter.java   
@Override
   public void createPrivacyList(String listName, List<PrivacyListItem> items) throws RemoteException {
Log.d(TAG, "BEGIN createPrivacyList.");
try {
    List<PrivacyItem> privacyItems = new ArrayList<PrivacyItem>();

    PrivacyItem item = new PrivacyItem(PrivacyItem.Type.subscription.name(), true, 2);
    item.setValue(PrivacyRule.SUBSCRIPTION_BOTH);
    privacyItems.add(item);

    mPrivacyListManager.createPrivacyList(listName, privacyItems);
} catch (XMPPException e) {
    Log.e(TAG, e.getMessage());
}
Log.d(TAG, "END createPrivacyList.");
   }
项目:beem-fork-xmpp    文件:PrivacyListManagerAdapter.java   
@Override
   public void createPrivacyList(String listName, List<PrivacyListItem> items) throws RemoteException {
Log.d(TAG, "BEGIN createPrivacyList.");
try {
    List<PrivacyItem> privacyItems = new ArrayList<PrivacyItem>();

    PrivacyItem item = new PrivacyItem(PrivacyItem.Type.subscription.name(), true, 2);
    item.setValue(PrivacyRule.SUBSCRIPTION_BOTH);
    privacyItems.add(item);

    mPrivacyListManager.createPrivacyList(listName, privacyItems);
} catch (XMPPException e) {
    Log.e(TAG, e.getMessage());
}
Log.d(TAG, "END createPrivacyList.");
   }