cache fixes
This commit is contained in:
@@ -237,7 +237,6 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
|||||||
ImEngineExt.a(ImEngine1.a());
|
ImEngineExt.a(ImEngine1.a());
|
||||||
AutoPlayCacheHolder.d.a();
|
AutoPlayCacheHolder.d.a();
|
||||||
MediaStorage.a();
|
MediaStorage.a();
|
||||||
deleteCache();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: {
|
case 1: {
|
||||||
|
|||||||
@@ -223,7 +223,6 @@ public class WallpaperMenuFragment extends MaterialPreferenceToolbarFragment {
|
|||||||
private void removeStickCache() {
|
private void removeStickCache() {
|
||||||
SharedPreferences prefs2 = getContext().getSharedPreferences("stickers_storage", Context.MODE_PRIVATE);
|
SharedPreferences prefs2 = getContext().getSharedPreferences("stickers_storage", Context.MODE_PRIVATE);
|
||||||
prefs2.edit().clear().apply();
|
prefs2.edit().clear().apply();
|
||||||
deleteCache();
|
|
||||||
ImEngineProvider.b().a();
|
ImEngineProvider.b().a();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,21 @@ import static ru.vtosters.lite.utils.Preferences.getSizeForDelete;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
|
||||||
|
import com.vk.im.engine.ImEngine1;
|
||||||
|
import com.vk.im.engine.ImEngineExt;
|
||||||
|
import com.vk.im.ui.providers.audiomsg.ImAudioMsgPlayerProvider;
|
||||||
|
import com.vk.im.ui.providers.audiomsg.PlayerActionSources;
|
||||||
|
import com.vk.imageloader.VKImageLoader;
|
||||||
|
import com.vk.media.player.cache.AutoPlayCacheHolder;
|
||||||
|
import com.vk.mediastore.MediaStorage;
|
||||||
|
import com.vk.stickers.Stickers;
|
||||||
|
import com.vtosters.lite.im.ImEngineProvider;
|
||||||
|
|
||||||
import java.text.CharacterIterator;
|
import java.text.CharacterIterator;
|
||||||
import java.text.StringCharacterIterator;
|
import java.text.StringCharacterIterator;
|
||||||
|
|
||||||
|
import b.h.g.m.FileUtils;
|
||||||
|
|
||||||
public class CacheUtils {
|
public class CacheUtils {
|
||||||
private static CacheUtils sInstance = new CacheUtils();
|
private static CacheUtils sInstance = new CacheUtils();
|
||||||
public long size = 0;
|
public long size = 0;
|
||||||
@@ -45,7 +57,13 @@ public class CacheUtils {
|
|||||||
|
|
||||||
if (size >= getSizeForDelete()) {
|
if (size >= getSizeForDelete()) {
|
||||||
if (dev()) sendToast("Кеш очищен");
|
if (dev()) sendToast("Кеш очищен");
|
||||||
deleteCache();
|
VKImageLoader.e();
|
||||||
|
ImAudioMsgPlayerProvider.b().e(PlayerActionSources.a);
|
||||||
|
ImAudioMsgPlayerProvider.b().d(PlayerActionSources.a);
|
||||||
|
FileUtils.l();
|
||||||
|
Stickers.l.c();
|
||||||
|
ImEngineExt.a(ImEngine1.a());
|
||||||
|
AutoPlayCacheHolder.d.a();
|
||||||
size = 0;
|
size = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user