Extract strict literals into constants.
Bug: 143559646 Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java Change-Id: Id8ccd06bb08592138372fd1203dac51dfbc2e3eb
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user