@Test public void getCacheDirWithUnscopedStorageTest() { mockUsingUnscopedStorage(); assertThat(storagePathProvider.getDirPath(StorageSubdirectory.CACHE), is("/storage/emulated/0/odk/.cache")); }
public String getDirPath(StorageSubdirectory subdirectory) { return storageStateProvider.isScopedStorageUsed() ? getScopedStorageDirPath(subdirectory) : getUnscopedStorageDirPath(subdirectory); }
StoragePathProvider { public String getDirPath(StorageSubdirectory subdirectory) { return storageStateProvider.isScopedStorageUsed() ? getScopedStorageDirPath(subdirectory) : getUnscopedStorageDirPath(subdirectory); } }
StoragePathProvider { public String getDirPath(StorageSubdirectory subdirectory) { return storageStateProvider.isScopedStorageUsed() ? getScopedStorageDirPath(subdirectory) : getUnscopedStorageDirPath(subdirectory); } StoragePathProvider();  StoragePathProvider(StorageStateProvider storageStateProvider); }
StoragePathProvider { public String getDirPath(StorageSubdirectory subdirectory) { return storageStateProvider.isScopedStorageUsed() ? getScopedStorageDirPath(subdirectory) : getUnscopedStorageDirPath(subdirectory); } StoragePathProvider();  StoragePathProvider(StorageStateProvider storageStateProvider); String[] getOdkDirPaths(); String getScopedStorageRootDirPath(); String getUnscopedStorageRootDirPath(); String getUnscopedStorageDirPath(StorageSubdirectory subdirectory); String getDirPath(StorageSubdirectory subdirectory); String getStorageRootDirPath(); String getTmpFilePath(); String getTmpDrawFilePath(); String getInstanceDbPath(String filePath); String getAbsoluteInstanceFilePath(String filePath); String getFormDbPath(String filePath); String getAbsoluteFormFilePath(String filePath); String getCacheDbPath(String filePath); String getAbsoluteCacheFilePath(String filePath); String getRelativeFilePath(String dirPath, String filePath); @SuppressWarnings("PMD.DoNotHardCodeSDCard") String getRelativeMapLayerPath(String path); String getAbsoluteOfflineMapLayerPath(String path); }
StoragePathProvider { public String getDirPath(StorageSubdirectory subdirectory) { return storageStateProvider.isScopedStorageUsed() ? getScopedStorageDirPath(subdirectory) : getUnscopedStorageDirPath(subdirectory); } StoragePathProvider();  StoragePathProvider(StorageStateProvider storageStateProvider); String[] getOdkDirPaths(); String getScopedStorageRootDirPath(); String getUnscopedStorageRootDirPath(); String getUnscopedStorageDirPath(StorageSubdirectory subdirectory); String getDirPath(StorageSubdirectory subdirectory); String getStorageRootDirPath(); String getTmpFilePath(); String getTmpDrawFilePath(); String getInstanceDbPath(String filePath); String getAbsoluteInstanceFilePath(String filePath); String getFormDbPath(String filePath); String getAbsoluteFormFilePath(String filePath); String getCacheDbPath(String filePath); String getAbsoluteCacheFilePath(String filePath); String getRelativeFilePath(String dirPath, String filePath); @SuppressWarnings("PMD.DoNotHardCodeSDCard") String getRelativeMapLayerPath(String path); String getAbsoluteOfflineMapLayerPath(String path);  }