Implement Device Policy upgrade flow
Implement an upgrade flow in the DevicePolicyManagerService for
admin-set policies.
The purpose is to allow graceful, rather than ad-hoc, setting of default
values for new policies added to DevicePolicyData or ActiveAdmin.
This change also cleans up the lowest of hanging fruits - presence of
password properties metrics, by upgrading from version 0 (nonexistent)
to version 1.
The versioning mechanism is meant for handling additional upgrade
scenarios.
Test: Manual upgrade, flash to a build without a version and check that
the device boots and the version file is created.
Test: atest FrameworksServicesTests:PolicyVersionUpgraderTest
Bug: 181009337
Change-Id: Iac7d345b34beba00d6d5fb10d6fb0a2c745592e0
6 files changed