mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-03-13 15:20:26 +08:00
MainApplication: oom fixes upd
This commit is contained in:
@@ -158,7 +158,7 @@ public class BackupAndRestoreManager implements MotherActivity.OnPermissions {
|
||||
|
||||
if (mDataDir.isDirectory() && !FileHelpers.isEmpty(mDataDir)) {
|
||||
File destination = new File(currentBackup, mDataDir.getName());
|
||||
FileHelpers.copy(mDataDir, destination);
|
||||
FileHelpers.copy(mDataDir, destination, fileName -> Helpers.endsWithAny(fileName.toString(), mBackupPatterns));
|
||||
|
||||
// Don't store unique id
|
||||
FileHelpers.delete(new File(destination, HiddenPrefs.SHARED_PREFERENCES_NAME + ".xml"));
|
||||
|
||||
@@ -105,7 +105,7 @@ public class MainApplication extends MultiDexApplication { // fix: Didn't find c
|
||||
}
|
||||
|
||||
private void applyCrashFixes(Throwable e) {
|
||||
if (e instanceof OutOfMemoryError) {
|
||||
if (e instanceof OutOfMemoryError || e.getCause() instanceof OutOfMemoryError) {
|
||||
Class<?> view = ViewManager.instance(getApplicationContext()).getTopView();
|
||||
if (view == PlaybackView.class) {
|
||||
PlayerTweaksData tweaksData = PlayerTweaksData.instance(getApplicationContext());
|
||||
|
||||
Reference in New Issue
Block a user