public Bundle getBundle() { Bundle bundle = new Bundle(); // add description if (mName != null) { bundle.putString(MESSAGE, mName); } // add place if (mPlaceId != null) { bundle.putString(PLACE, mPlaceId); } // add privacy if (mPrivacy != null) { bundle.putString(PRIVACY, mPrivacy.getJSONString()); } // add image if (mParcelable != null) { bundle.putParcelable(PICTURE, mParcelable); } else if (mBytes != null) { bundle.putByteArray(PICTURE, mBytes); } return bundle; }
private void checkPrivacyJidBlocked(XMPPResourceConnection sess, String jid, boolean value) throws NotAuthorizedException, TigaseDBException { List<String> blocked = Privacy.getBlocked(sess); if (value) { assertTrue(blocked != null && blocked.contains(jid)); } else { assertTrue(blocked == null || !blocked.contains(jid)); } }
/** * The privacy settings of the feed. If not specified, this setting is automatically populated * by the privacy setting a user has configured for the app. * * @param privacy * @return {@link Builder} */ public Builder setPrivacy(Privacy privacy) { mBundle.putString(Parameters.PRIVACY, privacy.getJSONString()); return this; }