public I arg(Bundle map) { args.putAll(map); return (I) this; }
@Override public Builder readFrom(final CameraEffectTextures model) { if (model != null) { this.textures.putAll(model.textures); } return this; }
@Override public Builder readFrom(final CameraEffectArguments model) { if (model != null) { this.params.putAll(model.params); } return this; }
/** * Inserts all mappings from the given Bundle into this Bundle. * * @param bundle a Bundle */ public Bundler putAll(Bundle bundle) { this.bundle.putAll(bundle); return this; }
/** * Inserts all mappings from the given Bundle into this Bundle. * * @param bundle a Bundle */ public Bundler putAll(Bundle bundle) { this.bundle.putAll(bundle); return this; }
public BundleBuilder putAll(Bundle bundle) { this.bundle.putAll(bundle); return this; }
/** * Inserts all mappings from the given Bundle into the underlying Bundle. * * @param bundle a Bundle * @return this bundler instance to chain method calls */ public Bundler putAll(Bundle bundle) { delegate.putAll(bundle); return this; }
Builder addExtras(Bundle bundle) { if (bundle != null) { extras.putAll(bundle); } return this; }
/** * @deprecated This method is deprecated. Use GraphRequest directly to set parameters. */ @Deprecated public B setParameters(final Bundle parameters) { params.putAll(parameters); return (B) this; }
public UCrop withOptions(@NonNull Options options) { mCropOptionsBundle.putAll(options.getOptionBundle()); return this; }
@Override public E readFrom(final P model) { if (model != null) { this.bundle.putAll(model.getBundle()); } return (E)this; } }
@Override public Bundle getParameters() { Bundle parameters = new Bundle(); if (uploadContext.params != null) { parameters.putAll(uploadContext.params); } parameters.putString(PARAM_UPLOAD_PHASE, PARAM_VALUE_UPLOAD_FINISH_PHASE); parameters.putString(PARAM_SESSION_ID, uploadContext.sessionId); Utility.putNonEmptyString(parameters, PARAM_TITLE, uploadContext.title); Utility.putNonEmptyString(parameters, PARAM_DESCRIPTION, uploadContext.description); Utility.putNonEmptyString(parameters, PARAM_REF, uploadContext.ref); return parameters; }
final Bundle optionsIn = new Bundle(); if (addAccountOptions != null) { optionsIn.putAll(addAccountOptions);
/** * Creates a new Request configured to upload a photo to the specified graph path. * * @param accessToken the access token to use, or null * @param graphPath the graph path to use, defaults to me/photos * @param image the bitmap image to upload * @param caption the user generated caption for the photo, can be null * @param params the parameters, can be null * @param callback a callback that will be called when the request is completed to handle * success or error conditions, can be null * @return a Request that is ready to execute */ public static GraphRequest newUploadPhotoRequest( AccessToken accessToken, String graphPath, Bitmap image, String caption, Bundle params, Callback callback) { graphPath = getDefaultPhotoPathIfNull(graphPath); Bundle parameters = new Bundle(); if (params != null) { parameters.putAll(params); } parameters.putParcelable(PICTURE_PARAM, image); if (caption != null && !caption.isEmpty()) { parameters.putString(CAPTION_PARAM, caption); } return new GraphRequest(accessToken, graphPath, parameters, HttpMethod.POST, callback); }
@Override protected void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); savedInstanceState.putAll(state); }
protected Bundle parseResponseUri(String urlString) { Uri u = Uri.parse(urlString); Bundle b = Utility.parseUrlQueryString(u.getQuery()); b.putAll(Utility.parseUrlQueryString(u.getFragment())); return b; }
Bundle parameters = new Bundle(); if (params != null) { parameters.putAll(params);
/** * Confirm message and deliver callback to given activity * * @param activity * @param requestCode * @param title * @param message * @param bundle */ public static void show(final FragmentActivity activity, final int requestCode, final String title, final String message, final Bundle bundle) { Bundle arguments = createArguments(title, message, requestCode); if (bundle != null) { arguments.putAll(bundle); } show(activity, new ConfirmDialogFragment(), arguments, TAG); }
@NonNull static Controller newInstance(@NonNull Bundle bundle) { final String className = bundle.getString(KEY_CLASS_NAME); //noinspection ConstantConditions Class cls = ClassUtils.classForName(className, false); Constructor[] constructors = cls.getConstructors(); Constructor bundleConstructor = getBundleConstructor(constructors); Bundle args = bundle.getBundle(KEY_ARGS); if (args != null) { args.setClassLoader(cls.getClassLoader()); } Controller controller; try { if (bundleConstructor != null) { controller = (Controller)bundleConstructor.newInstance(args); } else { //noinspection ConstantConditions controller = (Controller)getDefaultConstructor(constructors).newInstance(); // Restore the args that existed before the last process death if (args != null) { controller.args.putAll(args); } } } catch (Exception e) { throw new RuntimeException("An exception occurred while creating a new instance of " + className + ". " + e.getMessage(), e); } controller.restoreInstanceState(bundle); return controller; }
@NonNull Bundle encode(@NonNull JobParameters jobParameters, @NonNull Bundle data) { if (data == null) { throw new IllegalArgumentException("Unexpected null Bundle provided"); } Bundle userExtras = jobParameters.getExtras(); if (userExtras != null) { data.putAll(userExtras); } data.putInt(prefix + BundleProtocol.PACKED_PARAM_LIFETIME, jobParameters.getLifetime()); data.putBoolean(prefix + BundleProtocol.PACKED_PARAM_RECURRING, jobParameters.isRecurring()); data.putBoolean( prefix + BundleProtocol.PACKED_PARAM_REPLACE_CURRENT, jobParameters.shouldReplaceCurrent()); data.putString(prefix + BundleProtocol.PACKED_PARAM_TAG, jobParameters.getTag()); data.putString(prefix + BundleProtocol.PACKED_PARAM_SERVICE, jobParameters.getService()); data.putInt( prefix + BundleProtocol.PACKED_PARAM_CONSTRAINTS, compact(jobParameters.getConstraints())); encodeTrigger(jobParameters.getTrigger(), data); encodeRetryStrategy(jobParameters.getRetryStrategy(), data); return data; }