@Override
  public void dispatchPanelClosed(int featureId, android.view.Menu menu) {
    if (DEBUG) Log.d(TAG, "[dispatchPanelClosed] featureId: " + featureId + ", menu: " + menu);

    if (featureId == Window.FEATURE_ACTION_BAR || featureId == Window.FEATURE_OPTIONS_PANEL) {
      if (aActionBar != null) {
        aActionBar.dispatchMenuVisibilityChanged(false);
      }
    }
  }
  @Override
  public boolean dispatchMenuOpened(int featureId, android.view.Menu menu) {
    if (DEBUG) Log.d(TAG, "[dispatchMenuOpened] featureId: " + featureId + ", menu: " + menu);

    if (featureId == Window.FEATURE_ACTION_BAR || featureId == Window.FEATURE_OPTIONS_PANEL) {
      if (aActionBar != null) {
        aActionBar.dispatchMenuVisibilityChanged(true);
      }
      return true;
    }

    return false;
  }