Temp fix for b/77315136: Don't lock or check cache directories in SimpleCache
To be immediately rolled back after submission Submitting on behalf of cblay. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191128111
This commit is contained in:
parent
aefd948e96
commit
6380f26a7f
@ -1,7 +0,0 @@
|
|||||||
# Proguard rules specific to the main demo app.
|
|
||||||
|
|
||||||
# Constructor accessed via reflection in PlayerActivity
|
|
||||||
-dontnote com.google.android.exoplayer2.ext.ima.ImaAdsLoader
|
|
||||||
-keepclassmembers class com.google.android.exoplayer2.ext.ima.ImaAdsLoader {
|
|
||||||
<init>(android.content.Context, android.net.Uri);
|
|
||||||
}
|
|
@ -93,10 +93,6 @@ public final class SimpleCache implements Cache {
|
|||||||
* @param index The CachedContentIndex to be used.
|
* @param index The CachedContentIndex to be used.
|
||||||
*/
|
*/
|
||||||
/*package*/ SimpleCache(File cacheDir, CacheEvictor evictor, CachedContentIndex index) {
|
/*package*/ SimpleCache(File cacheDir, CacheEvictor evictor, CachedContentIndex index) {
|
||||||
if (!lockFolder(cacheDir)) {
|
|
||||||
throw new IllegalStateException("Another SimpleCache instance uses the folder: " + cacheDir);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.cacheDir = cacheDir;
|
this.cacheDir = cacheDir;
|
||||||
this.evictor = evictor;
|
this.evictor = evictor;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
|
@ -296,17 +296,17 @@ public class SimpleCacheTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
// @Test
|
||||||
public void testMultipleSimpleCacheWithSameCacheDirThrowsException() throws Exception {
|
// public void testMultipleSimpleCacheWithSameCacheDirThrowsException() throws Exception {
|
||||||
new SimpleCache(cacheDir, new NoOpCacheEvictor());
|
// new SimpleCache(cacheDir, new NoOpCacheEvictor());
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
new SimpleCache(cacheDir, new NoOpCacheEvictor());
|
// new SimpleCache(cacheDir, new NoOpCacheEvictor());
|
||||||
assertWithMessage("Exception was expected").fail();
|
// assertWithMessage("Exception was expected").fail();
|
||||||
} catch (IllegalStateException e) {
|
// } catch (IllegalStateException e) {
|
||||||
// Expected. Do nothing.
|
// // Expected. Do nothing.
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMultipleSimpleCacheWithSameCacheDirDoesNotThrowsExceptionAfterRelease()
|
public void testMultipleSimpleCacheWithSameCacheDirDoesNotThrowsExceptionAfterRelease()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user