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

Unified Diff: base/android/java/src/org/chromium/base/BaseChromiumApplication.java

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 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
Index: base/android/java/src/org/chromium/base/BaseChromiumApplication.java
diff --git a/base/android/java/src/org/chromium/base/BaseChromiumApplication.java b/base/android/java/src/org/chromium/base/BaseChromiumApplication.java
index 8f7d39da8ec725e82808fc72b137df537f4e519c..2946f6fb0004ad2da54e4e5985f4f75029ff2901 100644
--- a/base/android/java/src/org/chromium/base/BaseChromiumApplication.java
+++ b/base/android/java/src/org/chromium/base/BaseChromiumApplication.java
@@ -8,6 +8,7 @@ import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
+import android.view.KeyEvent;
import android.view.Window;
/**
@@ -47,6 +48,17 @@ public class BaseChromiumApplication extends Application {
listener.onWindowFocusChanged(activity, hasFocus);
}
}
+
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ // TODO(aurimas): remove this once AppCompatDelegateImpl no longer steals
+ // KEYCODE_MENU. (see b/20529185)
+ if (event.getKeyCode() == KeyEvent.KEYCODE_MENU
+ && activity.dispatchKeyEvent(event)) {
+ return true;
+ }
+ return super.dispatchKeyEvent(event);
+ }
});
}

Powered by Google App Engine
This is Rietveld 408576698