Service for reading and writing blocks to PST partition
Permits apps with permission
android.permission.ACCESS_PERSISTENT_PARTITION to obtain
a read and write data blocks to the PST partition.
Only one block ever exists at one time in PST. When
a client writes another block, the previous one is
overwritten.
This permits storing a block of data that will live
across factory resets.
Change-Id: I8f23df3531f3c0512118eb4b7530eff8a8e81c83
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index b63bbe7..e0ebd54 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -135,6 +135,7 @@
"com.android.server.ethernet.EthernetService";
private static final String JOB_SCHEDULER_SERVICE_CLASS =
"com.android.server.job.JobSchedulerService";
+ private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst";
private final int mFactoryTestMode;
private Timer mProfilerSnapshotTimer;
@@ -574,6 +575,10 @@
reportWtf("starting LockSettingsService service", e);
}
+ if (!SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals("")) {
+ mSystemServiceManager.startService(PersistentDataBlockService.class);
+ }
+
// Always start the Device Policy Manager, so that the API is compatible with
// API8.
mSystemServiceManager.startService(DevicePolicyManagerService.Lifecycle.class);