[Libreoffice-commits] core.git: 3 commits - android/experimental

Tor Lillqvist tml at iki.fi
Fri Apr 19 01:09:20 PDT 2013


 android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java |   26 +++++++---
 1 file changed, 19 insertions(+), 7 deletions(-)

New commits:
commit 41d6003e87b580dc435a423863f92b7c0c20647e
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 17:25:06 2013 +0300

    Make the use of SAL_LOG=+WARN+INFO optional
    
    Change-Id: I6af17a7745f4de88b4933e93b77eda1050760794

diff --git a/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java b/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
index 02845d3..59e5994 100644
--- a/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
+++ b/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
@@ -68,7 +68,12 @@ public class Desktop
 
         Bootstrap.setup(this);
 
-        Bootstrap.putenv("SAL_LOG=+WARN+INFO");
+        // To enable the putenv below, which turns on all SAL_INFO
+        // logging, do: "adb shell setprop log.tag.LODesktopLogging
+        // VERBOSE".
+
+        if (Log.isLoggable("LODesktopLogging", Log.VERBOSE))
+            Bootstrap.putenv("SAL_LOG=+WARN+INFO");
     }
 
     // This sucks, we need to experiment and think, can an app process
commit 9e7c73d54cc6a33689cb7bf65bcc6274acc748ad
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 15:51:05 2013 +0300

    Minor comment change
    
    Change-Id: I14e9b86c23ff000df2339a37ba78a11cc319f27c

diff --git a/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java b/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
index 5e3f15b..02845d3 100644
--- a/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
+++ b/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
@@ -312,11 +312,14 @@ public class Desktop
             // Just temporary hack. We should not show the keyboard
             // unconditionally on a ACTION_UP event here. The LO level
             // should callback to us requesting showing the keyboard
-            // if the user taps in a text area. Also, if the device
-            // has a hardware keyboard, we probably should not show
-            // the soft one unconditionally? But what if the user
-            // wants to input in another script than what the hardware
-            // keyboard covers?
+            // if the user taps in a text area. Unfortunately it seems
+            // less than obvious where the correct place to insert
+            // such a request is.
+
+            // Also, if the device has a hardware keyboard, we
+            // probably should not show the soft one unconditionally?
+            // But what if the user wants to input in another script
+            // than what the hardware keyboard covers?
             if (!scrollJustEnded &&
                 event.getPointerCount() == 1 &&
                 event.getActionMasked() == MotionEvent.ACTION_UP) {
commit bf2a1812a4e4233c08f9432ce765f87d1b57727e
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 15:49:48 2013 +0300

    Attempt to avoid popping up keyboard after panning
    
    Change-Id: Ie5639ea5a2c50e54ab880ac850287de07ff69959

diff --git a/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java b/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
index 5fb59f2..5e3f15b 100644
--- a/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
+++ b/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java
@@ -282,6 +282,7 @@ public class Desktop
 
         @Override public boolean onTouchEvent(MotionEvent event)
         {
+            boolean scrollJustEnded = false;
             if (event.getPointerCount() == 1 &&
                 gestureDetector.onTouchEvent(event)) {
                 return true;
@@ -298,6 +299,7 @@ public class Desktop
                 Desktop.scroll((int) translateX, (int) translateY);
                 translateX = translateY = 0;
                 scrollInProgress = false;
+                scrollJustEnded = true;
                 invalidate();
             } else if (event.getPointerCount() == 2 &&
                        scaleDetector.onTouchEvent(event) &&
@@ -315,7 +317,9 @@ public class Desktop
             // the soft one unconditionally? But what if the user
             // wants to input in another script than what the hardware
             // keyboard covers?
-            if (event.getActionMasked() == MotionEvent.ACTION_UP) {
+            if (!scrollJustEnded &&
+                event.getPointerCount() == 1 &&
+                event.getActionMasked() == MotionEvent.ACTION_UP) {
                 // show the keyboard so we can enter text
                 InputMethodManager imm = (InputMethodManager) getContext()
                     .getSystemService(Context.INPUT_METHOD_SERVICE);


More information about the Libreoffice-commits mailing list