Fix cache

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-10-26 16:46:11 +02:00
parent 6cdb84ecf2
commit 0a1fc26cc2
3 changed files with 1 additions and 19 deletions

View File

@ -203,8 +203,6 @@ public class CallController extends BaseController {
@Inject @Inject
AppPreferences appPreferences; AppPreferences appPreferences;
@Inject @Inject
Cache cache;
@Inject
EventBus eventBus; EventBus eventBus;
private PeerConnectionFactory peerConnectionFactory; private PeerConnectionFactory peerConnectionFactory;
@ -327,12 +325,6 @@ public class CallController extends BaseController {
setPipVideoViewDimensions(); setPipVideoViewDimensions();
try {
cache.evictAll();
} catch (IOException e) {
Log.e(TAG, "Failed to evict cache");
}
callControls.setZ(100.0f); callControls.setZ(100.0f);
basicInitialization(); basicInitialization();
initViews(); initViews();

View File

@ -105,9 +105,6 @@ public class CallNotificationController extends BaseController {
@Inject @Inject
AppPreferences appPreferences; AppPreferences appPreferences;
@Inject
Cache cache;
@Inject @Inject
EventBus eventBus; EventBus eventBus;
@ -313,12 +310,6 @@ public class CallNotificationController extends BaseController {
if (handler == null) { if (handler == null) {
handler = new Handler(); handler = new Handler();
try {
cache.evictAll();
} catch (IOException e) {
Log.e(TAG, "Failed to evict cache");
}
} }
if (currentConversation == null) { if (currentConversation == null) {

View File

@ -170,9 +170,8 @@ public class RestModule {
@Singleton @Singleton
@Provides @Provides
Cache provideCache() { Cache provideCache() {
int cacheSize = 128 * 1024 * 1024; // 128 MB
return new Cache(NextcloudTalkApplication.Companion.getSharedApplication().getCacheDir(), return new Cache(NextcloudTalkApplication.Companion.getSharedApplication().getCacheDir(),
cacheSize); Long.MAX_VALUE);
} }
@Singleton @Singleton