Fix ResetPasswordWithTokenTest failure

* When DPMS.resetPasswordInternal is called
  and the password is fully numeric, the credType
  is set to CREDENTIAL_TYPE_PIN instead of
  CREDENTIAL_TYPE_PASSWORD.
* If the password quality set by an admin is
  PASSWORD_QUALITY_COMPLEX, a password is
  required instead of a pin.
* This means a fully numeric password should not be
  set when the min password quality is
  PASSWORD_QUALITY_COMPLEX.

Bug: 185562016
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testResetPasswordWithToken
Change-Id: I6090cd4707f44647a212f40196b399a1ee032784
1 file changed