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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java

Issue 2175943002: [android]Fulfill a TODO of ianwen, since we have rolled to 24.1.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java
index c3968994cce997adb11e275644dae1e1e7fbd79f..886ce1b11e99f6a67f656084968ae7a4012e1fb2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java
@@ -12,7 +12,6 @@ import android.graphics.drawable.Drawable;
import android.view.ContextThemeWrapper;
import android.view.Menu;
import android.view.MenuItem;
-import android.view.Surface;
import android.view.View;
import android.widget.PopupMenu;
@@ -87,19 +86,6 @@ public class AppMenuHandler {
// This fixes the bug where the bottom of the menu starts at the top of
// the keyboard, instead of overlapping the keyboard as it should.
int displayHeight = mActivity.getResources().getDisplayMetrics().heightPixels;
- int widthHeight = mActivity.getResources().getDisplayMetrics().widthPixels;
-
- // In appcompat 23.2.1, DisplayMetrics are not updated after rotation change. This is a
- // workaround for it. See crbug.com/599048.
- // TODO(ianwen): Remove the rotation check after we roll to 23.3.0.
- if (rotation == Surface.ROTATION_0 || rotation == Surface.ROTATION_180) {
- displayHeight = Math.max(displayHeight, widthHeight);
- } else if (rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270) {
- displayHeight = Math.min(displayHeight, widthHeight);
- } else {
- assert false : "Rotation unexpected";
- }
-
Rect rect = new Rect();
mActivity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
int statusBarHeight = rect.top;
« 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