summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java7
-rw-r--r--android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java5
2 files changed, 7 insertions, 5 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
index 52066941c2e3..ac3e360649e5 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
@@ -1,6 +1,8 @@
package org.libreoffice;
+import android.app.ActivityManager;
+import android.content.Context;
import android.os.Handler;
import android.util.DisplayMetrics;
import android.view.KeyEvent;
@@ -38,6 +40,11 @@ public class LOKitShell {
});
}
+ public static int getMemoryClass(Context context) {
+ ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+ return activityManager.getMemoryClass() * 1024 * 1024;
+ }
+
public static DisplayMetrics getDisplayMetrics() {
if (LibreOfficeMainActivity.mAppContext == null) {
return null;
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
index 862d2c822d1b..d0fe36a5188b 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
@@ -31,11 +31,6 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba
protected RectF currentViewport = new RectF();
protected float currentZoom;
- private static int getMemoryClass(Context context) {
- ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
- return activityManager.getMemoryClass() * 1024 * 1024;
- }
-
public ComposedTileLayer(Context context) {
context.registerComponentCallbacks(this);
this.tileSize = new IntSize(256, 256);