Skip to content
Commit a9c51e7f authored by Alex Johnston's avatar Alex Johnston
Browse files

Remove requireAutoTime on upgrade

* In Android 11, setRequireAutoTime was deprecated.
  The user restriction DISALLOW_CONFIG_DATE_TIME
  should be used instead to enforce time policies.
* When removing the DO, requireAutoTime needs to
  be set to false
* When transferring policies from the DO to the
  COPE PO, the user restriction should be used instead
  of requireAutoTime. This is because requireAutoTime
  can never be turned false for the COPE PO

Manual testing steps - Scenario 1
* Flash device with Android Q build and set up
  device in DO mode
* Apply some policies using TestDPC, including requireAutoTime
* Flash device with Android R build and do not wipe
* Replicate issue by checking date time cannot be removed
* Flash device with Android S build and do not wipe
* Verify date time restriction can be removed

Manual testing steps - Scenario 2
* Flash device with Android Q build and set up
  device in DO mode
* Apply some policies using TestDPC, including requireAutoTime
* Flash device with Android S build and do not wipe
* Verify DO restriction has been set on parent admin
* Verify date time restriction can be removed

Bug: 165026695
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      Manual testing
Change-Id: I76344fe2df7475b6411362b4aff806a5cbf053a7
parent ad227b1c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment