Backup device information

Adding the device information to the backup will allow us to restore
data which is device specific if it's appropriate to do so (e.g. device
density)

The device specific settings which will be backed up are;

Settings.Secure.DISPLAY_DENSITY_FORCED

Test: atest SettingsProviderTest SettingsBackupTest
Test: Manual - Density changes during SUW when setting is restored
Fixes: 28437818
Change-Id: Ibc3595cdece3f1ccb4fccaff8212c1c3cb5c9756
diff --git a/packages/SettingsProvider/Android.bp b/packages/SettingsProvider/Android.bp
index 1c97fc3..e54b847 100644
--- a/packages/SettingsProvider/Android.bp
+++ b/packages/SettingsProvider/Android.bp
@@ -9,7 +9,10 @@
         "telephony-common",
         "ims-common",
     ],
-    static_libs: ["junit"],
+    static_libs: [
+        "junit",
+        "SettingsLib",
+    ],
     platform_apis: true,
     certificate: "platform",
     privileged: true,
@@ -21,11 +24,18 @@
     // because this test is not an instrumentation test. (because the target runs in the system process.)
     srcs: [
         "test/**/*.java",
+        "src/com/android/providers/settings/SettingsBackupAgent.java",
         "src/com/android/providers/settings/SettingsState.java",
         "src/com/android/providers/settings/SettingsHelper.java",
     ],
-    static_libs: ["androidx.test.rules"],
-    libs: ["android.test.base"],
+    static_libs: [
+        "androidx.test.rules",
+        "SettingsLib",
+    ],
+    libs: [
+        "android.test.base",
+        "android.test.mock",
+    ],
     resource_dirs: ["res"],
     aaptflags: [
         "--auto-add-overlay",