Fix code to work properly with isActive()

* The documentation for SecurityPolicy.isActive() indicates that
  we test against the settings (password, idle timeout, etc.) in
  place.  In fact, it only does this if the policy being tested
  is already registered with the DPM
* Change code order a bit in tryProvision so that we set the new
  policy immediately, rather than waiting for the result of

Bug: 4489608

Change-Id: Ic2950a6624d1ff603701e62a01f0657456627def
1 file changed