diff options
author | Christopher Tate <ctate@google.com> | 2014-03-05 22:20:56 +0000 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2014-03-05 16:17:34 -0800 |
commit | ff8b037c10a7ce90cbb6130b49c8cb076e1e7c0f (patch) | |
tree | 3fad37a57528bf2fcf29aef1319e368c587559d4 /services/backup | |
parent | 2665f6e9f5163d27608c21ed029a224d53ede43d (diff) | |
download | frameworks_base-ff8b037c10a7ce90cbb6130b49c8cb076e1e7c0f.zip frameworks_base-ff8b037c10a7ce90cbb6130b49c8cb076e1e7c0f.tar.gz frameworks_base-ff8b037c10a7ce90cbb6130b49c8cb076e1e7c0f.tar.bz2 |
am 777b8a80: am 422b2656: resolved conflicts for merge of c45ff35f to klp-modular-dev
* commit '777b8a808ee76401429f7210ebb7194632040d45':
Adapt to underlying changes in the PBKDF2 implementation
Change-Id: Ia68694a03e52693fceaedc6740dbd8e690e21257
Diffstat (limited to 'services/backup')
-rw-r--r-- | services/backup/java/com/android/server/backup/BackupManagerService.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java index 8eaefef..d73c4e8 100644 --- a/services/backup/java/com/android/server/backup/BackupManagerService.java +++ b/services/backup/java/com/android/server/backup/BackupManagerService.java @@ -1308,6 +1308,26 @@ public class BackupManagerService extends IBackupManager.Stub { } } + // Snap up to current on the pw file version + mPasswordVersion = BACKUP_PW_FILE_VERSION; + FileOutputStream pwFout = null; + DataOutputStream pwOut = null; + try { + pwFout = new FileOutputStream(mPasswordVersionFile); + pwOut = new DataOutputStream(pwFout); + pwOut.writeInt(mPasswordVersion); + } catch (IOException e) { + Slog.e(TAG, "Unable to write backup pw version; password not changed"); + return false; + } finally { + try { + if (pwOut != null) pwOut.close(); + if (pwFout != null) pwFout.close(); + } catch (IOException e) { + Slog.w(TAG, "Unable to close pw version record"); + } + } + // Clearing the password is okay if (newPw == null || newPw.isEmpty()) { if (mPasswordHashFile.exists()) { |