Implement backup & restore for the device state based auto rotation setting

- Adds the setting to DeviceSpecificSettings so that it is only restored on the same device
- Prevents the non-device state based setting to be restored if device stated based settings are enabled

Fixes: 196933725
Test: atest SettingsHelperTest
Change-Id: I58163cb70e8136104370ae7c1cdaaa8b7124b853
diff --git a/packages/SettingsProvider/Android.bp b/packages/SettingsProvider/Android.bp
index f490c87..4a10427 100644
--- a/packages/SettingsProvider/Android.bp
+++ b/packages/SettingsProvider/Android.bp
@@ -32,6 +32,7 @@
     ],
     static_libs: [
         "junit",
+        "SettingsLibDeviceStateRotationLock",
         "SettingsLibDisplayDensityUtils",
     ],
     platform_apis: true,
@@ -55,6 +56,7 @@
     static_libs: [
         "androidx.test.rules",
         "mockito-target-minus-junit4",
+        "SettingsLibDeviceStateRotationLock",
         "SettingsLibDisplayDensityUtils",
         "platform-test-annotations",
         "truth-prebuilt",