Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java

Issue 1913673002: Close IME on tapping on Blimp web content pane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup unwanted log Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java
diff --git a/blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java b/blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java
index 212d15db17a1b7d194ef1ba018f79d0cd08b9da8..69b697b4f408d4b120bbba75756933e2039bedf0 100644
--- a/blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java
+++ b/blimp/client/app/android/java/src/org/chromium/blimp/BlimpView.java
@@ -16,6 +16,7 @@ import android.view.WindowManager;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.blimp.session.BlimpClientSession;
+import org.chromium.ui.UiUtils;
/**
* A {@link View} that will visually represent the Blimp rendered content. This {@link View} starts
@@ -23,6 +24,7 @@ import org.chromium.blimp.session.BlimpClientSession;
*/
@JNINamespace("blimp::client")
public class BlimpView extends SurfaceView implements SurfaceHolder.Callback {
+ private static final String TAG = "BlimpView";
Khushal 2016/04/23 01:29:21 nit: Unused.
shaktisahu 2016/04/23 02:08:05 Just added to help in debugging and logging. I thi
nyquist 2016/04/26 18:28:58 Yeah, but we usually remove it if it ends up not b
shaktisahu 2016/04/26 20:06:42 Done.
private long mNativeBlimpViewPtr;
/**
@@ -96,6 +98,12 @@ public class BlimpView extends SurfaceView implements SurfaceHolder.Callback {
int eventAction = event.getActionMasked();
+ // Close the IME. It might be open for typing URL into toolbar.
+ // TODO(shaktisahu): Detect if the IME was open and return immediately.
Khushal 2016/04/23 01:29:21 Could we use UiUtils.isKeyboardShowing for this in
shaktisahu 2016/04/23 02:08:05 I tried using that. Seems like this method isn't a
+ if (eventAction == MotionEvent.ACTION_UP) {
Khushal 2016/04/23 01:29:21 Why do this only for ACTION_UP? If the user tries
shaktisahu 2016/04/23 02:08:05 Good catch. Initially, I didn't want to call this
+ UiUtils.hideKeyboard(this);
+ }
+
if (!isValidTouchEventActionForNative(eventAction)) return false;
int pointerCount = event.getPointerCount();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698