Commit 30282d70 authored by tobiasjs's avatar tobiasjs Committed by Commit bot

Use the wrapped context to inflate the selection menu.

BUG=486734

Review URL: https://codereview.chromium.org/1139743003

Cr-Commit-Position: refs/heads/master@{#329648}
parent 887a102d
......@@ -393,8 +393,7 @@ public class WebViewContentsClientAdapter extends AwContentsClient {
TraceEvent.begin("WebViewContentsClientAdapter.startActionMode");
if (TRACE) Log.d(TAG, "startActionMode");
if (floating) return null;
ActionMode.Callback callback =
new SelectActionModeCallback(view.getContext(), actionHandler);
ActionMode.Callback callback = new SelectActionModeCallback(mContext, actionHandler);
ActionMode actionMode = view.startActionMode(callback);
return actionMode != null ? new SelectActionMode(actionMode) : null;
} finally {
......
......@@ -9,6 +9,7 @@ import android.content.Context;
import android.graphics.Rect;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
......@@ -141,7 +142,7 @@ public class SelectActionModeCallback implements ActionMode.Callback {
}
private void createActionMenu(ActionMode mode, Menu menu) {
mode.getMenuInflater().inflate(R.menu.select_action_menu, menu);
new MenuInflater(getContext()).inflate(R.menu.select_action_menu, menu);
if (mIsInsertion) {
menu.removeItem(R.id.select_action_menu_select_all);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment