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
Loading
Please register or sign in to comment