[Bugfix]migrate user restrictions to DevicePolicyEngine
Migrate user restrictions to DevicePolicyEngine, otherwise user restrictions will not be able to be queried when upgrading from Android 13 OTA to Android 14.
Bug: 323452689
Bug: 318497672
Test: case 1:Android 13 upgrade to Android 14
1.install TestDPC on Android 13
2.set TestDPC as Device Owner
3.set disallow factory reset
4.update Android 14 via OTA
5.The reset to factory settings in the settings app is still unavailable.
case 2:Android 14(bad version) upgrade to Android 14(new version)
1.install TestDPC on Android 13
2.set TestDPC as Device Owner
3.set disallow factory reset
4.update Android 14(bad version) via OTA
5.The reset to factory settings in the settings app is still available.
6.update Android 14(new version) via OTA
7.The reset to factory settings in the settings app is unavailable.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:470c1eabca9f341e163a38a2327615e8fa3126ae)
Merged-In: I7c63d52300a1c5aa0678f29c2e4b15195411517c
Change-Id: I7c63d52300a1c5aa0678f29c2e4b15195411517c
1 file changed