Source:
<code>public static AndroidFxAccount unpickle(final Context context, final String filename) { final Account existingAccount = FirefoxAccounts.getFirefoxAccount(context); if (existingAccount != null) { Logger.debug(LOG_TAG, "Firefox Account already exists: returning it."); return new AndroidFxAccount(context, existingAccount); } final String jsonString = Utils.readFile(context, filename); if (jsonString == null) { Logger.info(LOG_TAG, "Pickle file '" + filename + "' not found; aborting."); return null; } ExtendedJSONObject json = null; try { json = ExtendedJSONObject.parseJSONObject(jsonString); } catch (Exception e) { Logger.warn(LOG_TAG, "Got exception reading pickle file '" + filename + "'; aborting.", e); return null; } final UnpickleParams params; try { params = UnpickleParams.fromJSON(json); } catch (Exception e) { Logger.warn(LOG_TAG, "Got exception extracting unpickle json; aborting.", e); return null; } final AndroidFxAccount account; try { account = AndroidFxAccount.addAndroidAccount(context, params.email, params.profile, params.idpServerURI, params.tokenServerURI, params.state, params.isSyncingEnabled, true); } catch (Exception e) { Logger.warn(LOG_TAG, "Exception when adding Android Account; aborting.", e); return null; } if (account == null) { Logger.warn(LOG_TAG, "Failed to add Android Account; aborting."); return null; } <START> account.persistBundle(params.bundle); <END> Long timestamp = json.getLong(KEY_PICKLE_TIMESTAMP); if (timestamp == null) { Logger.warn(LOG_TAG, "Did not find timestamp in pickle file; ignoring."); timestamp = new Long(-1); } Logger.info(LOG_TAG, "Un-pickled Android account named " + params.email + " (version " + params.pickleVersion + ", pickled at " + timestamp + ")."); return account; }</code><technical_language>AndroidFxAccount adder takes a bundle</technical_language>

Target:
public static AndroidFxAccount unpickle(final Context context, final String filename) { final String jsonString = Utils.readFile(context, filename); if (jsonString == null) { Logger.info(LOG_TAG, "Pickle file '" + filename + "' not found; aborting."); return null; } ExtendedJSONObject json = null; try { json = ExtendedJSONObject.parseJSONObject(jsonString); } catch (Exception e) { Logger.warn(LOG_TAG, "Got exception reading pickle file '" + filename + "'; aborting.", e); return null; } final UnpickleParams params; try { params = UnpickleParams.fromJSON(json); } catch (Exception e) { Logger.warn(LOG_TAG, "Got exception extracting unpickle json; aborting.", e); return null; } final AndroidFxAccount account; try { account = AndroidFxAccount.addAndroidAccount(context, params.email, params.profile, params.idpServerURI, params.tokenServerURI, params.state, params.accountVersion, params.isSyncingEnabled, true, params.bundle); } catch (Exception e) { Logger.warn(LOG_TAG, "Exception when adding Android Account; aborting.", e); return null; } if (account == null) { Logger.warn(LOG_TAG, "Failed to add Android Account; aborting."); return null; } Long timestamp = json.getLong(KEY_PICKLE_TIMESTAMP); if (timestamp == null) { Logger.warn(LOG_TAG, "Did not find timestamp in pickle file; ignoring."); timestamp = Long.valueOf(-1); } Logger.info(LOG_TAG, "Un-pickled Android account named " + params.email + " (version " + params.pickleVersion + ", pickled at " + timestamp + ")."); return account; }