@Test public void getOfflineMapLayerPathTestWithUnscopedStorage() { mockUsingUnscopedStorage(); assertThat(storagePathProvider.getAbsoluteOfflineMapLayerPath(null), is(nullValue())); assertThat(storagePathProvider.getAbsoluteOfflineMapLayerPath("/sdcard/odk/layers/countries/countries-raster.mbtiles"), is("/storage/emulated/0/odk/layers/countries/countries-raster.mbtiles")); assertThat(storagePathProvider.getAbsoluteOfflineMapLayerPath("/storage/emulated/0/odk/layers/countries/countries-raster.mbtiles"), is("/storage/emulated/0/odk/layers/countries/countries-raster.mbtiles")); }
public String getAbsoluteOfflineMapLayerPath(String path) { if (path == null) { return null; } return getDirPath(StorageSubdirectory.LAYERS) + File.separator + getRelativeMapLayerPath(path); }
StoragePathProvider { public String getAbsoluteOfflineMapLayerPath(String path) { if (path == null) { return null; } return getDirPath(StorageSubdirectory.LAYERS) + File.separator + getRelativeMapLayerPath(path); } }
StoragePathProvider { public String getAbsoluteOfflineMapLayerPath(String path) { if (path == null) { return null; } return getDirPath(StorageSubdirectory.LAYERS) + File.separator + getRelativeMapLayerPath(path); } StoragePathProvider();  StoragePathProvider(StorageStateProvider storageStateProvider); }
StoragePathProvider { public String getAbsoluteOfflineMapLayerPath(String path) { if (path == null) { return null; } return getDirPath(StorageSubdirectory.LAYERS) + File.separator + getRelativeMapLayerPath(path); } 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 getAbsoluteOfflineMapLayerPath(String path) { if (path == null) { return null; } return getDirPath(StorageSubdirectory.LAYERS) + File.separator + getRelativeMapLayerPath(path); } 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);  }