Source:
protected void onHandleIntent(Intent intent) { final Context context = this; long intentVersion = intent.getLongExtra(Constants.JSON_KEY_VERSION, 0); long expectedVersion = SyncConstants.SYNC_ACCOUNT_DELETED_INTENT_VERSION; if (intentVersion != expectedVersion) { Logger.warn(LOG_TAG, "Intent malformed: version " + intentVersion + " given but version " + expectedVersion + "expected. " + "Not cleaning up after deleted Account."); return; } String accountName = intent.getStringExtra(Constants.JSON_KEY_ACCOUNT); if (accountName == null) { Logger.warn(LOG_TAG, "Intent malformed: no account name given. Not cleaning up after deleted Account."); return; } Logger.info(LOG_TAG, "Sync account named " + accountName + " being removed; " + "deleting saved pickle file '" + Constants.ACCOUNT_PICKLE_FILENAME + "'."); deletePickle(context); SyncAccountParameters params; try { String payload = intent.getStringExtra(Constants.JSON_KEY_PAYLOAD); if (payload == null) { Logger.warn(LOG_TAG, "Intent malformed: no payload given. Not deleting client record."); return; } ExtendedJSONObject o = ExtendedJSONObject.parseJSONObject(payload); params = new SyncAccountParameters(context, AccountManager.get(context), o); } catch (Exception e) { Logger.warn(LOG_TAG, "Got exception fetching account parameters from intent data; not deleting client record."); return; } Logger.info(LOG_TAG, "Account named " + accountName + " being removed; " + "deleting client record from server."); deleteClientRecord(context, accountName, params.password, params.serverURL); Logger.info(LOG_TAG, "Deleting the entire clients database and the non-local tabs"); FennecTabsRepository.deleteNonLocalClientsAndTabs(context); }

Target:
protected void onHandleIntent(Intent intent) { final Context context = this; long intentVersion = intent.getLongExtra(Constants.JSON_KEY_VERSION, 0); long expectedVersion = SyncConstants.SYNC_ACCOUNT_DELETED_INTENT_VERSION; if (intentVersion != expectedVersion) { Logger.warn(LOG_TAG, "Intent malformed: version " + intentVersion + " given but version " + expectedVersion + "expected. " + "Not cleaning up after deleted Account."); return; } String accountName = intent.getStringExtra(Constants.JSON_KEY_ACCOUNT); if (accountName == null) { Logger.warn(LOG_TAG, "Intent malformed: no account name given. Not cleaning up after deleted Account."); return; } Logger.info(LOG_TAG, "Sync account named " + accountName + " being removed; " + "deleting saved pickle file '" + Constants.ACCOUNT_PICKLE_FILENAME + "'."); deletePickle(context); SyncAccountParameters params; try { String payload = intent.getStringExtra(Constants.JSON_KEY_PAYLOAD); if (payload == null) { Logger.warn(LOG_TAG, "Intent malformed: no payload given. Not deleting client record."); return; } ExtendedJSONObject o = ExtendedJSONObject.parseJSONObject(payload); params = new SyncAccountParameters(context, AccountManager.get(context), o); } catch (Exception e) { Logger.warn(LOG_TAG, "Got exception fetching account parameters from intent data; not deleting client record."); return; } Logger.info(LOG_TAG, "Account named " + accountName + " being removed; " + "deleting client record from server."); deleteClientRecord(context, accountName, params.password, params.serverURL); Logger.info(LOG_TAG, "Deleting the entire clients database and non-local tabs"); FennecTabsRepository.deleteNonLocalClientsAndTabs(context); }