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

View File

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

View File

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