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
This commit is contained in:
Christopher Tate
2014-03-05 22:20:56 +00:00
parent 2665f6e9f5
commit ff8b037c10

View File

@ -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()) {