Revert "DO NOT MERGE Refactor passwords/pins/patterns to byte[]"
This reverts commit 34042bbf1d.
Reason for revert: <INSERT REASONING HERE>
Change-Id: I49ac37f6b1702db9248879e21134a028d8cb3892
(cherry picked from commit ef22665a2c1876b0112af1086cef772e73da896a)
This commit is contained in:
committed by
android-build-team Robot
parent
feddc93ab6
commit
9804cf5b7d
@@ -38,7 +38,6 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.android.settings.core.InstrumentedFragment;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
public class CryptKeeperConfirm extends InstrumentedFragment {
|
||||
@@ -88,12 +87,7 @@ public class CryptKeeperConfirm extends InstrumentedFragment {
|
||||
IStorageManager storageManager = IStorageManager.Stub.asInterface(service);
|
||||
try {
|
||||
Bundle args = getIntent().getExtras();
|
||||
// TODO(b/120484642): Update vold to accept a password as a byte array
|
||||
byte[] passwordBytes = args.getByteArray("password");
|
||||
String password = passwordBytes != null ? new String(passwordBytes) : null;
|
||||
Arrays.fill(passwordBytes, (byte) 0);
|
||||
storageManager.encryptStorage(args.getInt("type", -1),
|
||||
password);
|
||||
storageManager.encryptStorage(args.getInt("type", -1), args.getString("password"));
|
||||
} catch (Exception e) {
|
||||
Log.e("CryptKeeper", "Error while encrypting...", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user