Loading core/java/com/android/internal/widget/ActionBarView.java +11 −5 Original line number Diff line number Diff line Loading @@ -132,6 +132,8 @@ public class ActionBarView extends AbsActionBarView { private ExpandedActionViewMenuPresenter mExpandedMenuPresenter; View mExpandedActionView; Window.Callback mWindowCallback; private final AdapterView.OnItemSelectedListener mNavItemSelectedListener = new AdapterView.OnItemSelectedListener() { public void onItemSelected(AdapterView parent, View view, int position, long id) { Loading @@ -156,11 +158,7 @@ public class ActionBarView extends AbsActionBarView { private final OnClickListener mUpClickListener = new OnClickListener() { public void onClick(View v) { Context context = getContext(); if (context instanceof Activity) { Activity activity = (Activity) context; activity.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, mLogoNavItem); } mWindowCallback.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, mLogoNavItem); } }; Loading Loading @@ -275,6 +273,14 @@ public class ActionBarView extends AbsActionBarView { } } /** * Set the window callback used to invoke menu items; used for dispatching home button presses. * @param cb Window callback to dispatch to */ public void setWindowCallback(Window.Callback cb) { mWindowCallback = cb; } @Override public void onDetachedFromWindow() { super.onDetachedFromWindow(); Loading policy/src/com/android/internal/policy/impl/PhoneWindow.java +1 −0 Original line number Diff line number Diff line Loading @@ -2750,6 +2750,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } else { mActionBar = (ActionBarView) findViewById(com.android.internal.R.id.action_bar); if (mActionBar != null) { mActionBar.setWindowCallback(getCallback()); if (mActionBar.getTitle() == null) { mActionBar.setWindowTitle(mTitle); } Loading Loading
core/java/com/android/internal/widget/ActionBarView.java +11 −5 Original line number Diff line number Diff line Loading @@ -132,6 +132,8 @@ public class ActionBarView extends AbsActionBarView { private ExpandedActionViewMenuPresenter mExpandedMenuPresenter; View mExpandedActionView; Window.Callback mWindowCallback; private final AdapterView.OnItemSelectedListener mNavItemSelectedListener = new AdapterView.OnItemSelectedListener() { public void onItemSelected(AdapterView parent, View view, int position, long id) { Loading @@ -156,11 +158,7 @@ public class ActionBarView extends AbsActionBarView { private final OnClickListener mUpClickListener = new OnClickListener() { public void onClick(View v) { Context context = getContext(); if (context instanceof Activity) { Activity activity = (Activity) context; activity.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, mLogoNavItem); } mWindowCallback.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, mLogoNavItem); } }; Loading Loading @@ -275,6 +273,14 @@ public class ActionBarView extends AbsActionBarView { } } /** * Set the window callback used to invoke menu items; used for dispatching home button presses. * @param cb Window callback to dispatch to */ public void setWindowCallback(Window.Callback cb) { mWindowCallback = cb; } @Override public void onDetachedFromWindow() { super.onDetachedFromWindow(); Loading
policy/src/com/android/internal/policy/impl/PhoneWindow.java +1 −0 Original line number Diff line number Diff line Loading @@ -2750,6 +2750,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } else { mActionBar = (ActionBarView) findViewById(com.android.internal.R.id.action_bar); if (mActionBar != null) { mActionBar.setWindowCallback(getCallback()); if (mActionBar.getTitle() == null) { mActionBar.setWindowTitle(mTitle); } Loading