public void setNavigationIconHints(int hints, boolean force) {
    if (!force && hints == mNavigationIconHints) return;

    if (DEBUG) {
      android.widget.Toast.makeText(mContext, "Navigation icon hints = " + hints, 500).show();
    }

    mNavigationIconHints = hints;

    getBackButton()
        .setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_BACK_NOP)) ? 0.5f : 1.0f);
    getHomeButton()
        .setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_HOME_NOP)) ? 0.5f : 1.0f);
    getRecentsButton()
        .setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_RECENT_NOP)) ? 0.5f : 1.0f);

    ((ImageView) getBackButton())
        .setImageDrawable(
            (0 != (hints & StatusBarManager.NAVIGATION_HINT_BACK_ALT))
                ? (mVertical ? mBackAltLandIcon : mBackAltIcon)
                : (mVertical ? mBackLandIcon : mBackIcon));

    ((ImageView) getRecentsButton()).setImageDrawable(mVertical ? mRecentLandIcon : mRecentIcon);

    setDisabledFlags(mDisabledFlags, true);
  }
  public void reorient() {
    int rot = mContext.getResources().getConfiguration().orientation;
    for (int i = 1; i < 3; i++) {
      mRotatedViews[i].setVisibility(View.GONE);
    }
    mCurrentView = mRotatedViews[rot];
    mCurrentView.setVisibility(View.VISIBLE);
    if (NavbarEditor.isDevicePhone(mContext)) {
      rot = mDisplay.getRotation();
      mVertical = (rot == Surface.ROTATION_90 || rot == Surface.ROTATION_270);
    } else {
      mVertical = getWidth() > 0 && getHeight() > getWidth();
    }
    mEditBar = new NavbarEditor((ViewGroup) mCurrentView.findViewById(R.id.container), mVertical);
    mEditBar.updateKeys();
    mEditBar.updateLowLights(mCurrentView);
    toggleButtonListener(true);

    mDeadZone = (DeadZone) mCurrentView.findViewById(R.id.deadzone);

    // force the low profile & disabled states into compliance
    setLowProfile(mLowProfile, false, true /* force */);
    setDisabledFlags(mDisabledFlags, true /* force */);
    setMenuVisibility(mShowMenu, true /* force */);

    if (DEBUG) {
      Slog.d(TAG, "reorient(): rot=" + mDisplay.getRotation());
    }

    setNavigationIconHints(mNavigationIconHints, true);
  }
  public void setNavigationIconHints(int hints, boolean force) {
    if (!force && hints == mNavigationIconHints) return;

    if (DEBUG) {
      android.widget.Toast.makeText(mContext, "Navigation icon hints = " + hints, 500).show();
    }

    mNavigationIconHints = hints;

    View button = mCurrentView.findViewWithTag(NavbarEditor.NAVBAR_HOME);
    if (button != null) {
      button.setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_HOME_NOP)) ? 0.5f : 1.0f);
    }
    button = mCurrentView.findViewWithTag(NavbarEditor.NAVBAR_RECENT);
    if (button != null) {
      button.setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_RECENT_NOP)) ? 0.5f : 1.0f);
    }
    button = mCurrentView.findViewWithTag(NavbarEditor.NAVBAR_BACK);
    if (button != null) {
      button.setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_BACK_NOP)) ? 0.5f : 1.0f);
      ((ImageView) button)
          .setImageDrawable(
              (0 != (hints & StatusBarManager.NAVIGATION_HINT_BACK_ALT))
                  ? (mVertical ? mBackAltLandIcon : mBackAltIcon)
                  : (mVertical ? mBackLandIcon : mBackIcon));
    }
    setDisabledFlags(mDisabledFlags, true);
  }
  public void reorient() {
    final int rot = mDisplay.getRotation();
    for (int i = 0; i < 4; i++) {
      mRotatedViews[i].setVisibility(View.GONE);
    }
    mCurrentView = mRotatedViews[rot];
    mCurrentView.setVisibility(View.VISIBLE);

    mDeadZone = (DeadZone) mCurrentView.findViewById(R.id.deadzone);

    // force the low profile & disabled states into compliance
    setLowProfile(mLowProfile, false, true /* force */);
    setDisabledFlags(mDisabledFlags, true /* force */);
    setMenuVisibility(mShowMenu, true /* force */);

    if (DEBUG) {
      Slog.d(TAG, "reorient(): rot=" + mDisplay.getRotation());
    }

    setNavigationIconHints(mNavigationIconHints, true);
  }
 public void setDisabledFlags(int disabledFlags) {
   setDisabledFlags(disabledFlags, false);
 }
 public void notifyScreenOn(boolean screenOn) {
   mScreenOn = screenOn;
   setDisabledFlags(mDisabledFlags, true);
 }