Merge "new password shouldn't be empty string" am: dd7bd6b15a
am: bfb61ed2ed
Change-Id: I97c536fc0aaaec4e317944564519a908a762e9f5
This commit is contained in:
@@ -21,6 +21,7 @@ import android.app.backup.IBackupManager;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
@@ -96,6 +97,11 @@ Log.i(TAG, "failure; password mismatch?");
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean setBackupPassword(String currentPw, String newPw) {
|
private boolean setBackupPassword(String currentPw, String newPw) {
|
||||||
|
// new password can't be empty
|
||||||
|
if (TextUtils.isEmpty(newPw)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return mBackupManager.setBackupPassword(currentPw, newPw);
|
return mBackupManager.setBackupPassword(currentPw, newPw);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
Reference in New Issue
Block a user