/** * Serializing all accounts */ private void saveAllAccounts() { File accountFile = VEnvironment.getAccountConfigFile(); Parcel dest = Parcel.obtain(); try { dest.writeInt(1); List<VAccount> accounts = new ArrayList<>(); for (int i = 0; i < this.accountsByUserId.size(); i++) { List<VAccount> list = this.accountsByUserId.valueAt(i); if (list != null) { accounts.addAll(list); } } dest.writeInt(accounts.size()); for (VAccount account : accounts) { account.writeToParcel(dest, 0); } dest.writeLong(lastAccountChangeTime); FileOutputStream fileOutputStream = new FileOutputStream(accountFile); fileOutputStream.write(dest.marshall()); fileOutputStream.close(); } catch (Exception e) { e.printStackTrace(); } dest.recycle(); }
File accountFile = VEnvironment.getAccountConfigFile(); refreshAuthenticatorCache(null); if (accountFile.exists()) {
/** * Serializing all accounts */ private void saveAllAccounts() { File accountFile = VEnvironment.getAccountConfigFile(); Parcel dest = Parcel.obtain(); try { dest.writeInt(1); List<VAccount> accounts = new ArrayList<>(); for (int i = 0; i < this.accountsByUserId.size(); i++) { List<VAccount> list = this.accountsByUserId.valueAt(i); if (list != null) { accounts.addAll(list); } } dest.writeInt(accounts.size()); for (VAccount account : accounts) { account.writeToParcel(dest, 0); } dest.writeLong(lastAccountChangeTime); FileOutputStream fileOutputStream = new FileOutputStream(accountFile); fileOutputStream.write(dest.marshall()); fileOutputStream.close(); } catch (Exception e) { e.printStackTrace(); } dest.recycle(); }
/** * Serializing all accounts */ private void saveAllAccounts() { File accountFile = VEnvironment.getAccountConfigFile(); Parcel dest = Parcel.obtain(); try { dest.writeInt(1); List<VAccount> accounts = new ArrayList<>(); for (int i = 0; i < this.accountsByUserId.size(); i++) { List<VAccount> list = this.accountsByUserId.valueAt(i); if (list != null) { accounts.addAll(list); } } dest.writeInt(accounts.size()); for (VAccount account : accounts) { account.writeToParcel(dest, 0); } dest.writeLong(lastAccountChangeTime); FileOutputStream fileOutputStream = new FileOutputStream(accountFile); fileOutputStream.write(dest.marshall()); fileOutputStream.close(); } catch (Exception e) { e.printStackTrace(); } dest.recycle(); }
File accountFile = VEnvironment.getAccountConfigFile(); refreshAuthenticatorCache(null); if (accountFile.exists()) {
File accountFile = VEnvironment.getAccountConfigFile(); refreshAuthenticatorCache(null); if (accountFile.exists()) {