[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - 2 commits - android/experimental

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Fri Jan 16 03:43:22 PST 2015


 android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java              |    7 +++++++
 android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java |    6 ------
 android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java |    5 -----
 3 files changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 0a598eefa1003a6b8b7e3f58e115791e2bd6f4ab
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri Jan 16 20:41:59 2015 +0900

    android: remove getDisplayMetrics as it exists in LOKitShell
    
    Change-Id: I5e7fa1b9c99707db382c555c5ffdfe601eb4622a

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 5efbc68..48c46ff 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -85,12 +85,6 @@ public class LibreOfficeMainActivity extends LOAbout {
         return super.onPrepareOptionsMenu(menu);
     }
 
-    public DisplayMetrics getDisplayMetrics() {
-        DisplayMetrics metrics = new DisplayMetrics();
-        getWindowManager().getDefaultDisplay().getMetrics(metrics);
-        return metrics;
-    }
-
     @Override
     public void onCreate(Bundle savedInstanceState) {
         Log.w(LOGTAG, "onCreate..");
commit c6f5205477878cd82072fd2988f764fce8286efb
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri Jan 16 20:39:58 2015 +0900

    android: move getMemoryClass to LOKitShell
    
    Change-Id: I2db92ec20c1999c0a4373fa25690680cacd79331

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
index 5206694..ac3e360 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 862d2c8..d0fe36a 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);


More information about the Libreoffice-commits mailing list