summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-01-16 20:39:58 +0900
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-26 10:27:34 +0100
commit3cb66f5ef8ee8d90a5972dcd8c0edfb671c9af28 (patch)
tree65d0663b27fa554c29ae3adab7132324f572fef8 /android
parentdf2c08855e2e5435004d291a1a5cdee52d0b52eb (diff)
android: move getMemoryClass to LOKitShell
Change-Id: I2db92ec20c1999c0a4373fa25690680cacd79331
Diffstat (limited to 'android')
-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);