Skip to content

Commit 2e68105

Browse files
brettchabotcopybara-androidxtest
authored andcommitted
Switch internal content provider to use input root directory.
PiperOrigin-RevId: 635881616
1 parent 6691759 commit 2e68105

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

services/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Bug Fixes**
88

9+
* TestStorage: Use input directory location for internal files
10+
911
**New Features**
1012

1113
**Breaking Changes**

services/storage/java/androidx/test/services/storage/provider/InternalUseOnlyFilesContentProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ public final class InternalUseOnlyFilesContentProvider extends AbstractFileConte
2525

2626
@Override
2727
protected File getHostedDirectory(Context context) {
28+
// use input root directory here, as TestArgsContentProvider also uses this directory
2829
return new File(
29-
HostedFile.getOutputRootDirectory(context),
30+
HostedFile.getInputRootDirectory(context),
3031
TestStorageConstants.ON_DEVICE_PATH_INTERNAL_USE);
3132
}
3233

services/storage/java/androidx/test/services/storage/provider/TestArgsContentProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ private static TestArguments readProtoFromFile(Context context) {
125125
TestStorageConstants.ON_DEVICE_PATH_INTERNAL_USE
126126
+ TestStorageConstants.TEST_ARGS_FILE_NAME);
127127
if (!testArgsFile.exists()) {
128+
Log.i(TAG, "Test args file not found at " + testArgsFile.getAbsolutePath());
128129
return TestArguments.getDefaultInstance();
129130
}
130131
try {

0 commit comments

Comments
 (0)