Changes
* Restore previous timeout behaviour. This
behaviour was modified in Android S and
was previously working on Android R.
* If the selected timeout is less than
the max timeout set by the admin, select
the largest possible timeout.
* If there are no possible timeouts for the
user, disable the preference.
Manual testing steps
* Download CtsVerifier and CtsEmptyDeviceOwner apks
* Set device owner
* Run Policy transparency test > set max time to lock
* Set max time to lock and verify correct value is
shown in Settings. Compare behaviour with Android R.
Bug: 184104507
Test: manual testing
atest com.android.settings.display.ScreenTimeoutSettingsTest
Change-Id: I8d0e66ccce14cca244bcd380fd225a31df0b8999
Previously we would hide the screen timeout setting when it is disabled
by admin. Instead of hide it in Display Settings, now we gray it out and
also provide the info of the enforced admin.
Bug: 174834978
Test: manually
Change-Id: Idaa3c4512eb648b67fcf6df2996c771a2f1b9617