[Libreoffice-commits] online.git: android/app

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 7 10:58:50 UTC 2019


 android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e0a5b5244442e34fd34da3f2c274bf5e5502dea1
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Jun 6 22:12:26 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Jun 7 12:58:25 2019 +0200

    android: Create the handler on demand.
    
    Somehow I've seen situation when the activity tried to read it before it
    was even initialized...
    
    Change-Id: Iafa2f5bebfb7005db9d38bd4832f2027373cd950

diff --git a/android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java b/android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java
index 8ae751e6f..22594f665 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/LibreOfficeApplication.java
@@ -18,10 +18,12 @@ public class LibreOfficeApplication extends Application {
     private static Handler mainHandler;
 
     public LibreOfficeApplication() {
-        mainHandler = new Handler();
     }
 
     public static Handler getMainHandler() {
+        if (mainHandler == null)
+            mainHandler = new Handler();
+
         return mainHandler;
     }
 


More information about the Libreoffice-commits mailing list