[Libreoffice-commits] core.git: 7 commits - android/Bootstrap android/source

Christian Lohmaier lohmaier+LibreOffice at googlemail.com
Sat Oct 3 13:55:49 PDT 2015


 android/Bootstrap/AndroidManifest.xml                                          |    4 
 android/Bootstrap/src/org/libreoffice/android/Bootstrap.java                   |  105 ----------
 android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java                  |   45 +++-
 android/source/res/drawable/bg_striped.xml                                     |    6 
 android/source/res/drawable/bg_striped_split.xml                               |    6 
 android/source/res/drawable/black_white_gradient.xml                           |   15 -
 android/source/res/layout/about.xml                                            |    8 
 android/source/res/layout/document_part_list_layout.xml                        |    4 
 android/source/res/layout/file_explorer_grid_item.xml                          |    9 
 android/source/res/layout/file_list_item.xml                                   |    8 
 android/source/res/layout/navigation_grid_item.xml                             |   23 --
 android/source/res/menu/main.xml                                               |    1 
 android/source/res/values-v21/themes.xml                                       |   18 -
 android/source/res/values/strings.xml                                          |    3 
 android/source/src/java/org/libreoffice/InvalidationHandler.java               |   15 -
 android/source/src/java/org/libreoffice/LOKitShell.java                        |    2 
 android/source/src/java/org/libreoffice/LOKitThread.java                       |    2 
 android/source/src/java/org/libreoffice/LOKitTileProvider.java                 |    2 
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java           |    6 
 android/source/src/java/org/libreoffice/MockTileProvider.java                  |    4 
 android/source/src/java/org/libreoffice/TileProvider.java                      |    1 
 android/source/src/java/org/libreoffice/TileProviderFactory.java               |    2 
 android/source/src/java/org/libreoffice/canvas/SelectionHandleEnd.java         |    1 
 android/source/src/java/org/libreoffice/canvas/SelectionHandleMiddle.java      |    1 
 android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java       |    1 
 android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java     |    2 
 android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java |    2 
 android/source/src/java/org/libreoffice/ui/FileUtilities.java                  |    6 
 android/source/src/java/org/libreoffice/ui/FolderIconView.java                 |    6 
 android/source/src/java/org/libreoffice/ui/GridItemAdapter.java                |   22 --
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java          |   16 -
 android/source/src/java/org/libreoffice/ui/WriterViewerActivity.java           |   50 ----
 android/source/src/java/org/mozilla/gecko/gfx/LayerView.java                   |    2 
 android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java              |    2 
 android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java            |    2 
 dev/null                                                                       |binary
 36 files changed, 96 insertions(+), 306 deletions(-)

New commits:
commit 1a6ec13d0805b7aa8c3bdcbfcc444c4916dfc817
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat Oct 3 22:53:37 2015 +0200

    tdf#93281 clean cache directory on each start
    
    to avoid segfault in native lib.
    
    It's only a workaround, but I couldn't see what's wrong with the
    cache...
    
    Change-Id: Iceeee1e190bbbd6efe336d84ddcbd8c4d3a1c621

diff --git a/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java b/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java
index 2a60f84..431c384 100644
--- a/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java
+++ b/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java
@@ -13,6 +13,7 @@ import android.app.Activity;
 import android.content.pm.ApplicationInfo;
 import android.util.Log;
 
+import java.io.File;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 
@@ -54,23 +55,23 @@ public final class LibreOfficeKit
             return;
         }
 
-        String dataDir = null;
-
         ApplicationInfo applicationInfo = activity.getApplicationInfo();
-        dataDir = applicationInfo.dataDir;
+        String dataDir = applicationInfo.dataDir;
         Log.i(LOGTAG, String.format("Initializing LibreOfficeKit, dataDir=%s\n", dataDir));
 
         redirectStdio(true);
-
+        // ToDo: ugly workaround - find out why it segfaults with existing cachedir
+        deleteRecursive(activity.getApplication().getCacheDir());
         String cacheDir = activity.getApplication().getCacheDir().getAbsolutePath();
         String apkFile = activity.getApplication().getPackageResourcePath();
 
-        // If we notice that a fonts.conf file was extracted, automatically
+        // If there is a fonts.conf file in the apk that can be extracted, automatically
         // set the FONTCONFIG_FILE env var.
-        InputStream inputStream = null;
+        InputStream inputStream;
         try {
             inputStream = activity.getAssets().open("unpack/etc/fonts/fonts.conf");
         } catch (java.io.IOException exception) {
+            inputStream = null;
         }
 
         putenv("OOO_DISABLE_RECOVERY=1");
@@ -80,23 +81,47 @@ public final class LibreOfficeKit
         }
 
         // TMPDIR is used by osl_getTempDirURL()
-        putenv("TMPDIR=" + activity.getCacheDir().getAbsolutePath());
+        putenv("TMPDIR=" + cacheDir);
 
         if (!initializeNative(dataDir, cacheDir, apkFile)) {
-            Log.i(LOGTAG, "Initialize native failed!");
+            Log.e(LOGTAG, "Initialize native failed!");
             return;
         }
-
         initializeDone = true;
     }
+    /**
+     * Deletes files and recursively deletes directories.
+     *
+     * @param file
+     *            File or directory to be deleted.
+     */
+    private static void deleteRecursive(File file) {
+        Log.d(LOGTAG, "deleting cacheDir recursively - this is only a workaround - fixme please");
+        if (file.isDirectory()) {
+            for (File child : file.listFiles())
+                deleteRecursive(child);
+        }
+        file.delete();
+    }
 
     // Now with static loading we always have all native code in one native
     // library which we always call liblo-native-code.so, regardless of the
     // app. The library has already been unpacked into /data/data/<app
     // name>/lib at installation time by the package manager.
     static {
-        System.loadLibrary("lo-native-code");
+        NativeLibLoader.load();
     }
 }
 
+class NativeLibLoader {
+        private static boolean done = false;
+
+        protected static synchronized void load() {
+            if (done)
+                return;
+            System.loadLibrary("lo-native-code");
+            done = true;
+        }
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit cdfdf76787b1c3983e4eae0620fe711647ed0b9e
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat Oct 3 21:51:17 2015 +0200

    android: avoid arrayIndexOutOfBounds when lokit payload doesn't have a value
    
    and is not handled yet like ".uno:CharFontName="
    
    Change-Id: I09d17b6be9ce9b9c9ae6883f8222c8628268815d

diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index fd382db..32fe853 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -84,6 +84,10 @@ public class InvalidationHandler implements Document.MessageCallback {
 
     private void stateChanged(String payload) {
         String[] parts = payload.split("=");
+        if (parts.length < 2) {
+            Log.e(LOGTAG, "LOK_CALLBACK_STATE_CHANGED unexpected payload: " + payload);
+            return;
+        }
         boolean pressed = Boolean.parseBoolean(parts[1]);
         if (parts[0].equals(".uno:Bold")) {
             LOKitShell.getToolbarController().onToggleStateChanged(Document.BOLD, pressed);
commit 233b9b0ec95069b5ce98aab942304459ca7344a8
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat Oct 3 21:49:25 2015 +0200

    android: make strikethrough work (it's not .uno:StrikeOut, but .uno:Strikeout)
    
    Change-Id: I8d629272cf94eaac406c163c06c9bbdd6a248b79

diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index fcbff63..fd382db 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -91,7 +91,7 @@ public class InvalidationHandler implements Document.MessageCallback {
             LOKitShell.getToolbarController().onToggleStateChanged(Document.ITALIC, pressed);
         } else if (parts[0].equals(".uno:Underline")) {
             LOKitShell.getToolbarController().onToggleStateChanged(Document.UNDERLINE, pressed);
-        } else if (parts[0].equals(".uno:StrikeOut")) {
+        } else if (parts[0].equals(".uno:Strikeout")) {
             LOKitShell.getToolbarController().onToggleStateChanged(Document.STRIKEOUT, pressed);
         } else {
             Log.d(LOGTAG, "LOK_CALLBACK_STATE_CHANGED type uncatched: " + payload);
diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index ad7247f..324423c 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -109,7 +109,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity {
                 LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Underline"));
                 return true;
             case R.id.action_strikeout:
-                LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:StrikeOut"));
+                LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Strikeout"));
                 return true;
             case R.id.action_keyboard:
                 showSoftKeyboard();
commit c320161f48990fbf6cad162633b26e07de873923
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat Oct 3 20:26:01 2015 +0200

    compare strings using equals, not with ==
    
    Change-Id: I8869980198123bbe9e86e12638e3316be24588c3

diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
index 3455b9c..6ae8310 100644
--- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
@@ -160,7 +160,7 @@ public class FileUtilities {
         if (filename == null)
             return false;
 
-        if (byMode == ALL && byFilename == "") {
+        if (byMode == ALL && byFilename.equals("")) {
             if (filename.startsWith(".")) {//ignore hidden files
                 return false;
             }
@@ -171,7 +171,7 @@ public class FileUtilities {
             if (mExtnMap.get (getExtension (filename)) != byMode)
                 return false;
         }
-        if (byFilename != "") {
+        if (!byFilename.equals("")) {
             // FIXME return false on a non-match
         }
         return true;
commit 7b282e3db8cc608373d09e49dba57945be07f895
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat Oct 3 20:23:25 2015 +0200

    android: remove unused imports, call static methods the static way
    
    and remove some redundant casts
    
    Change-Id: If58a395227e4b9d54b0d757032d4a55c25315019

diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index f0a3982..fcbff63 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -10,7 +10,6 @@ import org.libreoffice.canvas.SelectionHandle;
 import org.libreoffice.kit.Document;
 import org.libreoffice.overlay.DocumentOverlay;
 import org.mozilla.gecko.gfx.GeckoLayerClient;
-import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -28,7 +27,7 @@ public class InvalidationHandler implements Document.MessageCallback {
 
     public InvalidationHandler(LibreOfficeMainActivity mainActivity) {
         mDocumentOverlay = mainActivity.getDocumentOverlay();
-        mLayerClient = mainActivity.getLayerClient();
+        mLayerClient = LibreOfficeMainActivity.getLayerClient();
         mState = OverlayState.NONE;
     }
 
@@ -123,16 +122,14 @@ public class InvalidationHandler implements Document.MessageCallback {
         int width = Integer.decode(coordinates[2]);
         int height = Integer.decode(coordinates[3]);
 
-        float dpi = (float) LOKitShell.getDpi();
+        float dpi = LOKitShell.getDpi();
 
-        RectF rect = new RectF(
+        return new RectF(
                 LOKitTileProvider.twipToPixel(x, dpi),
                 LOKitTileProvider.twipToPixel(y, dpi),
                 LOKitTileProvider.twipToPixel(x + width, dpi),
                 LOKitTileProvider.twipToPixel(y + height, dpi)
         );
-
-        return rect;
     }
 
     /**
diff --git a/android/source/src/java/org/libreoffice/LOKitShell.java b/android/source/src/java/org/libreoffice/LOKitShell.java
index 5c8ce78..609a6cf 100644
--- a/android/source/src/java/org/libreoffice/LOKitShell.java
+++ b/android/source/src/java/org/libreoffice/LOKitShell.java
@@ -78,7 +78,7 @@ public class LOKitShell {
     }
 
     public static LayerView getLayerView() {
-        return LibreOfficeMainActivity.mAppContext.getLayerClient().getView();
+        return LibreOfficeMainActivity.getLayerClient().getView();
     }
 
     // EVENTS
diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java b/android/source/src/java/org/libreoffice/LOKitThread.java
index a762184..d87a152 100644
--- a/android/source/src/java/org/libreoffice/LOKitThread.java
+++ b/android/source/src/java/org/libreoffice/LOKitThread.java
@@ -174,7 +174,7 @@ public class LOKitThread extends Thread {
             mApplication = LibreOfficeMainActivity.mAppContext;
         }
 
-        mLayerClient = mApplication.getLayerClient();
+        mLayerClient = LibreOfficeMainActivity.getLayerClient();
 
         mInvalidationHandler = new InvalidationHandler(LibreOfficeMainActivity.mAppContext);
         mTileProvider = TileProviderFactory.create(mLayerClient, mInvalidationHandler, filename);
diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index 00af8d5..6b7759d 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -55,7 +55,7 @@ public class LOKitTileProvider implements TileProvider {
     public LOKitTileProvider(GeckoLayerClient layerClient, Document.MessageCallback messageCallback, String input) {
         mLayerClient = layerClient;
         mMessageCallback = messageCallback;
-        mDPI = (float) LOKitShell.getDpi();
+        mDPI = LOKitShell.getDpi();
         mTileWidth = pixelToTwip(TILE_SIZE, mDPI);
         mTileHeight = pixelToTwip(TILE_SIZE, mDPI);
 
diff --git a/android/source/src/java/org/libreoffice/MockTileProvider.java b/android/source/src/java/org/libreoffice/MockTileProvider.java
index 44f9e6b..19f7b48 100644
--- a/android/source/src/java/org/libreoffice/MockTileProvider.java
+++ b/android/source/src/java/org/libreoffice/MockTileProvider.java
@@ -69,9 +69,7 @@ public class MockTileProvider implements TileProvider {
         String imageName = "d" + tileNumber;
         Bitmap bitmap = mLayerClient.getView().getDrawable(imageName);
 
-        CairoImage image = new BufferedCairoImage(bitmap);
-
-        return image;
+        return new BufferedCairoImage(bitmap);
     }
 
     @Override
diff --git a/android/source/src/java/org/libreoffice/TileProvider.java b/android/source/src/java/org/libreoffice/TileProvider.java
index 9a70696..cf9173a 100644
--- a/android/source/src/java/org/libreoffice/TileProvider.java
+++ b/android/source/src/java/org/libreoffice/TileProvider.java
@@ -11,7 +11,6 @@ package org.libreoffice;
 
 import android.graphics.Bitmap;
 import android.graphics.PointF;
-import android.graphics.RectF;
 import android.view.KeyEvent;
 
 import org.mozilla.gecko.gfx.CairoImage;
diff --git a/android/source/src/java/org/libreoffice/TileProviderFactory.java b/android/source/src/java/org/libreoffice/TileProviderFactory.java
index 6dff903..003a714 100644
--- a/android/source/src/java/org/libreoffice/TileProviderFactory.java
+++ b/android/source/src/java/org/libreoffice/TileProviderFactory.java
@@ -35,7 +35,7 @@ public class TileProviderFactory {
         }
     }
 
-    private static enum TileProviderID {
+    private enum TileProviderID {
         MOCK, LOKIT
     }
 }
diff --git a/android/source/src/java/org/libreoffice/canvas/SelectionHandleEnd.java b/android/source/src/java/org/libreoffice/canvas/SelectionHandleEnd.java
index c13ad1f..7d4d635 100644
--- a/android/source/src/java/org/libreoffice/canvas/SelectionHandleEnd.java
+++ b/android/source/src/java/org/libreoffice/canvas/SelectionHandleEnd.java
@@ -1,7 +1,6 @@
 package org.libreoffice.canvas;
 
 import android.content.Context;
-import android.graphics.Bitmap;
 
 import org.libreoffice.R;
 
diff --git a/android/source/src/java/org/libreoffice/canvas/SelectionHandleMiddle.java b/android/source/src/java/org/libreoffice/canvas/SelectionHandleMiddle.java
index 7415d6d..b7f6e26 100644
--- a/android/source/src/java/org/libreoffice/canvas/SelectionHandleMiddle.java
+++ b/android/source/src/java/org/libreoffice/canvas/SelectionHandleMiddle.java
@@ -1,7 +1,6 @@
 package org.libreoffice.canvas;
 
 import android.content.Context;
-import android.graphics.Bitmap;
 
 import org.libreoffice.R;
 
diff --git a/android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java b/android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java
index af2e7ba..ac6e089 100644
--- a/android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java
+++ b/android/source/src/java/org/libreoffice/canvas/SelectionHandleStart.java
@@ -1,7 +1,6 @@
 package org.libreoffice.canvas;
 
 import android.content.Context;
-import android.graphics.Bitmap;
 
 import org.libreoffice.R;
 
diff --git a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
index 89a7f09..13c3d6c 100644
--- a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
+++ b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
@@ -9,8 +9,6 @@ import java.util.List;
 
 import org.libreoffice.storage.IFile;
 
-import android.util.Log;
-
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
 import com.owncloud.android.lib.resources.files.ChunkedUploadRemoteFileOperation;
 import com.owncloud.android.lib.resources.files.DownloadRemoteFileOperation;
diff --git a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
index bf866b9..c037941 100644
--- a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
+++ b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
@@ -144,7 +144,7 @@ public class OwnCloudProvider implements IDocumentProvider,
      * @param file
      *            File or directory to be deleted.
      */
-    private void deleteRecursive(File file) {
+    private static void deleteRecursive(File file) {
         if (file.isDirectory()) {
             for (File child : file.listFiles())
                 deleteRecursive(child);
diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
index e2df3f0..3455b9c 100644
--- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
@@ -8,8 +8,6 @@
  */
 package org.libreoffice.ui;
 
-import org.libreoffice.R;
-
 import org.libreoffice.storage.IFile;
 
 import java.io.File;
diff --git a/android/source/src/java/org/libreoffice/ui/FolderIconView.java b/android/source/src/java/org/libreoffice/ui/FolderIconView.java
index 1c2b25f..004e5e9 100644
--- a/android/source/src/java/org/libreoffice/ui/FolderIconView.java
+++ b/android/source/src/java/org/libreoffice/ui/FolderIconView.java
@@ -8,15 +8,11 @@
  */
 package org.libreoffice.ui;
 
-import org.libreoffice.R;
-
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
 import android.graphics.Paint;
-import android.graphics.Paint.Style;
-import android.graphics.Rect;
 import android.graphics.RectF;
 import android.graphics.Color;
 import android.util.AttributeSet;
@@ -100,7 +96,7 @@ public class FolderIconView extends View{
         for (File file : contents) {
             if (!FileUtilities.isThumbnail(file))
                 continue;
-            thumbs.push(factory.decodeFile(file.getAbsolutePath()));//TODO switch to push for semantics
+            thumbs.push(BitmapFactory.decodeFile(file.getAbsolutePath()));//TODO switch to push for semantics
             if (thumbs.size() > 3)
                 break;
         }
diff --git a/android/source/src/java/org/libreoffice/ui/GridItemAdapter.java b/android/source/src/java/org/libreoffice/ui/GridItemAdapter.java
index c50d3a3..d1e4278 100644
--- a/android/source/src/java/org/libreoffice/ui/GridItemAdapter.java
+++ b/android/source/src/java/org/libreoffice/ui/GridItemAdapter.java
@@ -9,15 +9,6 @@
 
 package org.libreoffice.ui;
 
-import org.libreoffice.R;
-import org.libreoffice.storage.IFile;
-
-
-import java.io.File;
-import java.nio.ByteBuffer;
-import java.nio.IntBuffer;
-import java.util.List;
-
 import android.content.Context;
 import android.util.Log;
 import android.view.LayoutInflater;
@@ -26,12 +17,11 @@ import android.view.ViewGroup;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
 import android.widget.TextView;
-import android.graphics.BitmapFactory;
-import android.graphics.Bitmap;
-import android.graphics.BlurMaskFilter;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.Color;
+
+import org.libreoffice.R;
+import org.libreoffice.storage.IFile;
+
+import java.util.List;
 
 public class GridItemAdapter extends BaseAdapter {
     Context mContext;
@@ -69,7 +59,7 @@ public class GridItemAdapter extends BaseAdapter {
         if (convertView == null) {
             gridView = new View(mContext);
         } else {
-            gridView = (View) convertView;
+            gridView = convertView;
         }
 
         // get layout from mobile.xml
diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 72d2e82..5290a50 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -15,8 +15,6 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.database.DataSetObserver;
-import android.graphics.Shader;
-import android.graphics.drawable.BitmapDrawable;
 import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Bundle;
@@ -24,8 +22,8 @@ import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.support.v4.widget.DrawerLayout;
 import android.support.v7.app.ActionBar;
-import android.support.v7.app.ActionBarActivity;
 import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AppCompatActivity;
 import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.ContextMenu;
@@ -68,7 +66,7 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 
-public class LibreOfficeUIActivity extends ActionBarActivity implements ActionBar.OnNavigationListener {
+public class LibreOfficeUIActivity extends AppCompatActivity implements ActionBar.OnNavigationListener {
     private String LOGTAG = LibreOfficeUIActivity.class.getSimpleName();
     private SharedPreferences prefs;
     private int filterMode = FileUtilities.ALL;
@@ -464,7 +462,7 @@ public class LibreOfficeUIActivity extends ActionBarActivity implements ActionBa
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.view_menu, menu);
 
-        MenuItem item = (MenuItem)menu.findItem(R.id.menu_view_toggle);
+        MenuItem item = menu.findItem(R.id.menu_view_toggle);
         if (viewMode == GRID_VIEW) {
             item.setTitle(R.string.list_view);
             item.setIcon(R.drawable.light_view_as_list);
@@ -473,21 +471,21 @@ public class LibreOfficeUIActivity extends ActionBarActivity implements ActionBa
             item.setIcon(R.drawable.light_view_as_grid);
         }
 
-        item = (MenuItem)menu.findItem(R.id.menu_sort_size);
+        item = menu.findItem(R.id.menu_sort_size);
         if (sortMode == FileUtilities.SORT_LARGEST) {
             item.setTitle(R.string.sort_smallest);
         } else {
             item.setTitle(R.string.sort_largest);
         }
 
-        item = (MenuItem)menu.findItem(R.id.menu_sort_az);
+        item = menu.findItem(R.id.menu_sort_az);
         if (sortMode == FileUtilities.SORT_AZ) {
             item.setTitle(R.string.sort_za);
         } else {
             item.setTitle(R.string.sort_az);
         }
 
-        item = (MenuItem)menu.findItem(R.id.menu_sort_modified);
+        item = menu.findItem(R.id.menu_sort_modified);
         if (sortMode == FileUtilities.SORT_NEWEST) {
             item.setTitle(R.string.sort_oldest);
         } else {
@@ -721,7 +719,7 @@ public class LibreOfficeUIActivity extends ActionBarActivity implements ActionBa
                 listItem = new View(mContext);
                 listItem = inflater.inflate(R.layout.file_list_item, null);
             } else {
-                listItem = (View) convertView;
+                listItem = convertView;
             }
             final int pos = position;
             listItem.setClickable(true);
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
index 88d93ca..62dc997 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -342,7 +342,7 @@ public class LayerView extends FrameLayout {
     /** This function is invoked by Gecko (compositor thread) via JNI; be careful when modifying signature. */
     public static GLController registerCxxCompositor() {
         try {
-            LayerView layerView = LibreOfficeMainActivity.mAppContext.getLayerClient().getView();
+            LayerView layerView = LibreOfficeMainActivity.getLayerClient().getView();
             layerView.mListener.compositorCreated();
             return layerView.getGLController();
         } catch (Exception e) {
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java b/android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java
index 09229d8..7ef8ff0 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java
@@ -13,10 +13,8 @@ import android.graphics.PorterDuff;
 import android.graphics.Rect;
 import android.graphics.RectF;
 import android.opengl.GLES20;
-import android.util.Log;
 
 import org.libreoffice.kit.DirectBufferAllocator;
-import org.libreoffice.LibreOfficeMainActivity;
 import org.mozilla.gecko.util.FloatUtils;
 
 import java.nio.ByteBuffer;
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java b/android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java
index 1527261..bccd896 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java
@@ -35,7 +35,7 @@ public class TextureGenerator {
     public synchronized int take() {
         try {
             // Will block until one becomes available
-            return (int) mTextureIds.take();
+            return mTextureIds.take();
         } catch (InterruptedException e) {
             return 0;
         }
commit 20d5c4cce51284fd39d22755d19ac7a28ab51e14
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat Oct 3 19:58:59 2015 +0200

    android: make layouts nicer to work with by providing sample values in editor
    
    Change-Id: I76495becb0257cb36340397d7296f26565fca4cd

diff --git a/android/source/res/layout/about.xml b/android/source/res/layout/about.xml
index 9882ab1..e8d8322 100644
--- a/android/source/res/layout/about.xml
+++ b/android/source/res/layout/about.xml
@@ -1,9 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 
-<ScrollView>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="match_parent"
-              android:layout_height="match_parent"
+              android:layout_height="wrap_content"
               android:orientation="vertical"
               android:padding="20dip">
 
@@ -33,7 +35,7 @@
         android:paddingTop="20dip"
         android:text="@string/app_credits"
         android:textColor="@android:color/secondary_text_light"
-        android:textSize="18dip"/>
+        android:textSize="18sp"/>
 
     <TextView
         android:id="@+id/about_vendor"
diff --git a/android/source/res/layout/document_part_list_layout.xml b/android/source/res/layout/document_part_list_layout.xml
index 51ce0e0..a20aeaf 100644
--- a/android/source/res/layout/document_part_list_layout.xml
+++ b/android/source/res/layout/document_part_list_layout.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
@@ -8,13 +9,14 @@
 
     <ImageView
         android:id="@+id/image"
+        tools:src="@drawable/dummy_page"
         android:layout_width="128dp"
         android:layout_height="128dp"/>
 
     <TextView
         android:id="@+id/text"
+        tools:text="slide or page#"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="Large Text"
         android:textAppearance="?android:attr/textAppearanceLarge"/>
 </LinearLayout>
\ No newline at end of file
diff --git a/android/source/res/layout/file_explorer_grid_item.xml b/android/source/res/layout/file_explorer_grid_item.xml
index 5242f8f..8dfb9ed 100644
--- a/android/source/res/layout/file_explorer_grid_item.xml
+++ b/android/source/res/layout/file_explorer_grid_item.xml
@@ -6,6 +6,7 @@
  file, You can obtain one at http://mozilla.org/MPL/2.0/.
  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:paddingTop="10dp"
@@ -13,22 +14,24 @@
 
     <ImageView
         android:id="@+id/grid_item_image"
+        tools:src="@drawable/folder"
         android:layout_width="100dp"
         android:layout_height="100dp"
         android:scaleType="fitStart"
-        android:layout_gravity="center">
+        android:layout_gravity="center"
+        android:contentDescription="@string/file_icon_desc" >
     </ImageView>
 
     <TextView
         android:id="@+id/grid_item_label"
+        tools:text="file or dirname"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@+id/label"
         android:paddingLeft="10dp"
         android:paddingRight="10dp"
         android:paddingTop="10dp"
         android:layout_gravity="center"
-        android:textSize="15dp"
+        android:textSize="15sp"
         android:textStyle="bold"
         android:textColor="@android:color/secondary_text_light"
         android:maxLines="2">
diff --git a/android/source/res/layout/file_list_item.xml b/android/source/res/layout/file_list_item.xml
index 17590fc..3529488 100644
--- a/android/source/res/layout/file_list_item.xml
+++ b/android/source/res/layout/file_list_item.xml
@@ -6,33 +6,39 @@
  file, You can obtain one at http://mozilla.org/MPL/2.0/.
  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="48dp"
     android:orientation="horizontal" >
     <ImageView
         android:id="@+id/file_list_item_icon"
+        tools:src="@drawable/folder"
         android:layout_height="match_parent"
         android:layout_width="32dp"
         android:layout_margin="8dp"
-        android:layout_gravity="center"/>
+        android:layout_gravity="center"
+        android:contentDescription="@string/file_icon_desc" />
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="48dp"
         android:orientation="horizontal">
         <TextView
             android:id="@+id/file_list_item_name"
+            tools:text="file or dirname"
             style="@style/ListItemText"
             android:layout_height="match_parent"
             android:layout_width="0dp"
             android:layout_weight="2" />
         <TextView
             android:id="@+id/file_list_item_size"
+            tools:text="filesize"
             style="@style/ListItemText"
             android:layout_height="match_parent"
             android:layout_width="0dp"
             android:layout_weight="1" />
         <TextView
             android:id="@+id/file_list_item_date"
+            tools:text="date/time"
             style="@style/ListItemText"
             android:layout_height="match_parent"
             android:layout_width="0dp"
diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml
index bf19105..ccf0dce 100644
--- a/android/source/res/menu/main.xml
+++ b/android/source/res/menu/main.xml
@@ -4,6 +4,7 @@
     tools:context="org.libreoffice.MainActivity">
 
     <group android:id="@+id/group_edit_actions"
+           tools:visible="true"
            android:visible="false">
         <item android:id="@+id/action_bold"
               android:title="@string/action_bold"
diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml
index c7d6e63..78318b9 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -30,6 +30,7 @@
     <string name="menu_sort_az">Sort A-Z</string>
     <string name="menu_sort_modified">Sort by Date</string>
     <string name="menu_preferences">Preferences</string>
+    <string name="file_icon_desc">fileicon</string>
     <!-- Pref keys as resources ; Not currently used -->
     <string name="EXPLORER_VIEW_TYPE_KEY">EXPLORER_VIEW_TYPE</string>
     <string name="CURRENT_DIRECTORY_KEY">CURRENT_DIRECTORY</string>
@@ -66,7 +67,7 @@
 
     <!-- Feedback messages -->
     <string name="message_saved">Save complete</string>
-    <string name="message_saving">Saving the document...</string>
+    <string name="message_saving">Saving the document…</string>
     <string name="message_save_incomplete">Save incomplete. Were there any changes?</string>
 
     <!-- Document provider settings -->
commit de376cb1c42543cd7717b0de88056ed4ab8af6d4
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat Oct 3 19:39:55 2015 +0200

    android: remove no longer used files
    
    Change-Id: Id3b71ac50e3c8ce9705f6df18edaaaa6ba8ad3fd

diff --git a/android/Bootstrap/AndroidManifest.xml b/android/Bootstrap/AndroidManifest.xml
index 69c83e5..b602c87 100644
--- a/android/Bootstrap/AndroidManifest.xml
+++ b/android/Bootstrap/AndroidManifest.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-      package="org.libreoffice.android"
+      package="org.libreoffice.kit"
       android:versionCode="1"
       android:versionName="1.0">
     <application>
-        <activity android:name="org.libreoffice.android.Bootstrap" />
+        <activity android:name="org.libreoffice.kit.LibreOfficeKit" />
     </application>
 </manifest>
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
deleted file mode 100644
index ca7d48b..0000000
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ /dev/null
@@ -1,105 +0,0 @@
-// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-//
-// This file is part of the LibreOffice project.
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-//
-
-package org.libreoffice.android;
-
-import android.app.Activity;
-import android.content.pm.ApplicationInfo;
-import android.util.Log;
-
-import java.io.InputStream;
-
-// final because subclassing would be meaningless.
-public final class Bootstrap
-{
-    // private constructor because instantiating would be meaningless
-    private Bootstrap()
-    {
-    }
-
-    private static String TAG = "lo-bootstrap";
-
-    // Native methods in this class are all implemented in
-    // sal/android/lo-bootstrap.c as the lo-bootstrap library is loaded with
-    // System.loadLibrary() and Android's JNI works only to such libraries, it
-    // seems.
-
-    private static native boolean setup(String dataDir,
-                                        String cacheDir,
-                                        String apkFile);
-
-    // Wrapper for getpid()
-    public static native int getpid();
-
-    // Wrapper for system()
-    public static native void system(String cmdline);
-
-    // Wrapper for putenv()
-    public static native void putenv(String string);
-
-    // A wrapper for osl_setCommandArgs(). Before calling
-    // osl_setCommandArgs(), argv[0] is prefixed with the parent directory of
-    // where the lo-bootstrap library is.
-    public static native void setCommandArgs(String[] argv);
-
-    // A method that starts a thread to redirect stdout and stderr writes to
-    // the Android logging mechanism, or stops the redirection.
-    public static native void redirect_stdio(boolean state);
-
-    static boolean setup_done = false;
-
-    // This setup() method should be called from the upper Java level of
-    // LO-based apps.
-    public static synchronized void setup(Activity activity)
-    {
-        if (setup_done)
-            return;
-
-        setup_done = true;
-
-        String dataDir = null;
-
-        ApplicationInfo ai = activity.getApplicationInfo();
-        dataDir = ai.dataDir;
-        Log.i(TAG, String.format("dataDir=%s\n", dataDir));
-
-        redirect_stdio(true);
-
-        if (!setup(dataDir,
-                   activity.getApplication().getCacheDir().getAbsolutePath(),
-                   activity.getApplication().getPackageResourcePath()))
-            return;
-
-        // If we notice that a fonts.conf file was extracted, automatically
-        // set the FONTCONFIG_FILE env var.
-        InputStream i;
-        try {
-            i = activity.getAssets().open("unpack/etc/fonts/fonts.conf");
-        }
-        catch (java.io.IOException e) {
-            i = null;
-        }
-        putenv("OOO_DISABLE_RECOVERY=1");
-        if (i != null)
-            putenv("FONTCONFIG_FILE=" + dataDir + "/etc/fonts/fonts.conf");
-
-        // TMPDIR is used by osl_getTempDirURL()
-        putenv("TMPDIR=" + activity.getCacheDir().getAbsolutePath());
-    }
-
-    // Now with static loading we always have all native code in one native
-    // library which we always call liblo-native-code.so, regardless of the
-    // app. The library has already been unpacked into /data/data/<app
-    // name>/lib at installation time by the package manager.
-    static {
-        System.loadLibrary("lo-native-code");
-    }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/source/res/drawable-hdpi/bg_striped_img.png b/android/source/res/drawable-hdpi/bg_striped_img.png
deleted file mode 100644
index fd234f3..0000000
Binary files a/android/source/res/drawable-hdpi/bg_striped_img.png and /dev/null differ
diff --git a/android/source/res/drawable-hdpi/bg_striped_split_img.png b/android/source/res/drawable-hdpi/bg_striped_split_img.png
deleted file mode 100644
index 84d3660..0000000
Binary files a/android/source/res/drawable-hdpi/bg_striped_split_img.png and /dev/null differ
diff --git a/android/source/res/drawable-mdpi/bg_striped_img.png b/android/source/res/drawable-mdpi/bg_striped_img.png
deleted file mode 100644
index 4bbd703..0000000
Binary files a/android/source/res/drawable-mdpi/bg_striped_img.png and /dev/null differ
diff --git a/android/source/res/drawable-mdpi/bg_striped_split_img.png b/android/source/res/drawable-mdpi/bg_striped_split_img.png
deleted file mode 100644
index 3415ac1..0000000
Binary files a/android/source/res/drawable-mdpi/bg_striped_split_img.png and /dev/null differ
diff --git a/android/source/res/drawable-xhdpi/bg_striped_img.png b/android/source/res/drawable-xhdpi/bg_striped_img.png
deleted file mode 100644
index 79b9ffd..0000000
Binary files a/android/source/res/drawable-xhdpi/bg_striped_img.png and /dev/null differ
diff --git a/android/source/res/drawable-xhdpi/bg_striped_split_img.png b/android/source/res/drawable-xhdpi/bg_striped_split_img.png
deleted file mode 100644
index 8e68c98..0000000
Binary files a/android/source/res/drawable-xhdpi/bg_striped_split_img.png and /dev/null differ
diff --git a/android/source/res/drawable/bg_striped.xml b/android/source/res/drawable/bg_striped.xml
deleted file mode 100644
index 77e0aab..0000000
--- a/android/source/res/drawable/bg_striped.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/bg_striped_img"
-    android:tileMode="repeat"
-    android:dither="true" />
\ No newline at end of file
diff --git a/android/source/res/drawable/bg_striped_split.xml b/android/source/res/drawable/bg_striped_split.xml
deleted file mode 100644
index 9b0e313..0000000
--- a/android/source/res/drawable/bg_striped_split.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/bg_striped_split_img"
-    android:tileMode="repeat"
-    android:dither="true" />
\ No newline at end of file
diff --git a/android/source/res/drawable/black_white_gradient.xml b/android/source/res/drawable/black_white_gradient.xml
deleted file mode 100644
index 3ed538c..0000000
--- a/android/source/res/drawable/black_white_gradient.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle">
-    <gradient
-        android:type="radial"
-        android:gradientRadius="200"
-        android:startColor="#FF000000"
-        android:endColor="#00FFFFFF"
-        android:angle="45"/>
-    <padding android:left="7dp"
-        android:top="7dp"
-        android:right="7dp"
-        android:bottom="7dp" />
-    <corners android:radius="8dp" />
-</shape>
\ No newline at end of file
diff --git a/android/source/res/layout/navigation_grid_item.xml b/android/source/res/layout/navigation_grid_item.xml
deleted file mode 100644
index 20ad60f..0000000
--- a/android/source/res/layout/navigation_grid_item.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- This file is part of the LibreOffice project.
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
- -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="150dp"
-    android:layout_height="150dp"
-    android:layout_gravity="center"
-    android:background="#00880000"
-    android:orientation="vertical" >
-    <!-- Can I give all thumbs the same ID? works in grid adapter "getView" -->
-    <ImageView
-        android:src="@drawable/dummy_page"
-        android:id="@+id/thumbnail"
-        android:layout_width="120dp"
-        android:layout_height="120dp"
-        android:layout_margin="15dp"
-        android:layout_gravity="center"/>
-</LinearLayout>
diff --git a/android/source/res/values-v21/themes.xml b/android/source/res/values-v21/themes.xml
deleted file mode 100644
index 441ed82..0000000
--- a/android/source/res/values-v21/themes.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <style name="LibreOfficeTheme" parent="LibreOfficeTheme.Base">
-        <item name="android:windowContentTransitions">true</item>
-        <item name="android:windowAllowEnterTransitionOverlap">true</item>
-        <item name="android:windowAllowReturnTransitionOverlap">true</item>
-        <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
-        <item name="android:windowSharedElementExitTransition">@android:transition/move</item>
-    </style>
-
-    <style name="BrowserTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
-        <item name="android:windowContentTransitions">true</item>
-        <item name="android:windowAllowEnterTransitionOverlap">true</item>
-        <item name="android:windowAllowReturnTransitionOverlap">true</item>
-        <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
-        <item name="android:windowSharedElementExitTransition">@android:transition/move</item>
-    </style>
-</resources>
diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index c7fb342..ad7247f 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -11,7 +11,7 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.support.v4.widget.DrawerLayout;
-import android.support.v7.app.ActionBarActivity;
+import android.support.v7.app.AppCompatActivity;
 import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.Menu;
@@ -42,7 +42,7 @@ import java.util.List;
 /**
  * Main activity of the LibreOffice App. It is started in the UI thread.
  */
-public class LibreOfficeMainActivity extends ActionBarActivity {
+public class LibreOfficeMainActivity extends AppCompatActivity {
 
     private static final String LOGTAG = "LibreOfficeMainActivity";
     private static final String DEFAULT_DOC_PATH = "/assets/example.odt";
diff --git a/android/source/src/java/org/libreoffice/ui/WriterViewerActivity.java b/android/source/src/java/org/libreoffice/ui/WriterViewerActivity.java
deleted file mode 100644
index 56a2038..0000000
--- a/android/source/src/java/org/libreoffice/ui/WriterViewerActivity.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-package org.libreoffice.ui;
-
-import org.libreoffice.R;
-
-import android.app.ActionBar;
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.MenuItem;
-
-public class WriterViewerActivity extends Activity{
-    private Bundle extras;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        // TODO Auto-generated method stub
-        super.onCreate(savedInstanceState);
-        extras = getIntent().getExtras();
-        setContentView(R.layout.main);
-        ActionBar actionBar = getActionBar();
-        actionBar.setDisplayHomeAsUpEnabled(true);
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case android.R.id.home:
-                // app icon in action bar clicked; go home
-                Intent intent = new Intent(this, LibreOfficeUIActivity.class);
-                intent.putExtras( extras );
-                //intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-                startActivity(intent);
-                return true;
-            default:
-                return super.onOptionsItemSelected(item);
-        }
-    }
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list