Merge "Create String before bundling AsyncTask" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-06-12 23:35:30 +00:00
committed by Android (Google) Code Review

View File

@@ -886,13 +886,13 @@ public class LockPatternUtils {
return;
}
// TODO(b/120484642): This is a location where we still use a String for vold
String passwordString = password != null ? new String(password) : null;
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... dummy) {
IStorageManager storageManager = IStorageManager.Stub.asInterface(service);
try {
// TODO(b/120484642): This is a location where we still use a String for vold
String passwordString = password != null ? new String(password) : null;
storageManager.changeEncryptionPassword(type, passwordString);
} catch (RemoteException e) {
Log.e(TAG, "Error changing encryption password", e);