summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java b/apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java
index 20661c6f0833..eb414b0f11a6 100644
--- a/apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java
+++ b/apex/blobstore/service/java/com/android/server/blob/BlobStoreConfig.java
@@ -27,6 +27,11 @@ class BlobStoreConfig {
public static final int CURRENT_XML_VERSION = 1;
+ private static final String ROOT_DIR_NAME = "blobstore";
+ private static final String BLOBS_DIR_NAME = "blobs";
+ private static final String SESSIONS_INDEX_FILE_NAME = "sessions_index.xml";
+ private static final String BLOBS_INDEX_FILE_NAME = "blobs_index.xml";
+
@Nullable
public static File prepareBlobFile(long sessionId) {
final File blobsDir = prepareBlobsDir();
@@ -60,7 +65,7 @@ class BlobStoreConfig {
@NonNull
private static File getBlobsDir(File blobsRootDir) {
- return new File(blobsRootDir, "blobs");
+ return new File(blobsRootDir, BLOBS_DIR_NAME);
}
@Nullable
@@ -69,7 +74,7 @@ class BlobStoreConfig {
if (blobStoreRootDir == null) {
return null;
}
- return new File(blobStoreRootDir, "sessions_index.xml");
+ return new File(blobStoreRootDir, SESSIONS_INDEX_FILE_NAME);
}
@Nullable
@@ -78,7 +83,7 @@ class BlobStoreConfig {
if (blobsStoreRootDir == null) {
return null;
}
- return new File(blobsStoreRootDir, "blobs_index.xml");
+ return new File(blobsStoreRootDir, BLOBS_INDEX_FILE_NAME);
}
@Nullable
@@ -93,6 +98,6 @@ class BlobStoreConfig {
@NonNull
public static File getBlobStoreRootDir() {
- return new File(Environment.getDataSystemDirectory(), "blobstore");
+ return new File(Environment.getDataSystemDirectory(), ROOT_DIR_NAME);
}
}