Allow setting password during provisioning if FRP is not supported

On devices without PersistentDataBlock support, we should
always allow setting up password during provisioning.

Bug: 157451551
Test: make RunSettingsRoboTests
      ROBOTEST_FILTER=com.android.settings.password
Test: On cuttlefish, file ACTION_SET_NET_PASSWORD before SUW completes
Change-Id: Ic7b5d99b38e6427750ce70fa7e38f7ef6054d4ad
This commit is contained in:
Rubin Xu
2020-05-26 20:15:00 +01:00
parent 86b5034215
commit 5e51ed6a89
3 changed files with 16 additions and 44 deletions

View File

@@ -297,7 +297,8 @@ public class ChooseLockGeneric extends SettingsActivity {
getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
// Can only run during setup if factory reset protection has already been cleared
return (pdbm != null && pdbm.getDataBlockSize() == 0);
// or if the device does not support FRP.
return (pdbm == null || pdbm.getDataBlockSize() == 0);
}
protected Class<? extends ChooseLockGeneric.InternalActivity> getInternalActivityClass() {