Skip to content

Commit

Permalink
increase storage limit
Browse files Browse the repository at this point in the history
(cherry picked from commit a7c9289)
  • Loading branch information
wolverineks authored and vsubhuman committed Sep 16, 2021
1 parent 19628f5 commit ca9161c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions android/app/src/main/java/com/emurgo/MainApplication.java
Expand Up @@ -11,6 +11,8 @@
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.List;
import android.database.CursorWindow;
import java.lang.reflect.Field;

public class MainApplication extends Application implements ReactApplication {

Expand Down Expand Up @@ -49,6 +51,16 @@ public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());

try {
Field field = CursorWindow.class.getDeclaredField("sCursorWindowSize");
field.setAccessible(true);
field.set(null, 100 * 1024 * 1024); //the 100MB is the new size
} catch (Exception e) {
if (e != null) {
e.printStackTrace();
}
}
}
/**
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
Expand Down

0 comments on commit ca9161c

Please sign in to comment.