title: DevicePolicyManager.resetPassword and DevicePolicyManager.ACTION_START_ENCRYPTION
body: <p>I have one strange problem with resetPassword on Samsung S4. I just want to CLEAR the password, but the result is I cannot login to my phone and has to do a factory reset before I can use it. The thing I did is listed below:</p>
  
  <p>1: call <code>DevicePolicyManager.ACTION_START_ENCRYPTION</code> to start the storage encryption on the phone</p>
  
  <p>2: accept the action and finish the storage encryption on the phone and set the password</p>
  
  <p>3: clear the password in my app by calling <code>DevicePolicyManager.resetPassword("")</code></p>
  
  <p>after the above steps, I cannot login to the phone by the password I set and the screen is still locked to prompt the password, until I do the factory reset.</p>
  
  <p>I tried to find out what the lock-screen password is after the resetPassword. and find out it is quite complex to get the password string from the hash stored in password.key and the salt. Maybe this is not the feasible way to solve that.</p>
  
  <p>This only happened in my galaxy s4, any one has any idea about that?</p>
  
  <hr>
  
  <p>After some investigation, I found that this problem is caused by clear password while the device is still in "encrypted" state. If I decrypt the device first and then the reset password works ok now.</p>
  
  <p>So current work is find out: which API is used to decrypt the device? </p>