public void onConfigurationChanged() {
    boolean visible = false;
    if (mView != null) {
      visible = mView.isShowing();
      mWindowManager.removeView(mView);
    }

    mView = (AssistOrbContainer) LayoutInflater.from(mContext).inflate(R.layout.assist_orb, null);
    mView.setVisibility(View.GONE);
    mView.setSystemUiVisibility(
        View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
    WindowManager.LayoutParams lp = getLayoutParams();
    mWindowManager.addView(mView, lp);
    if (visible) {
      mView.show(true /* show */, false /* animate */);
    }
  }
 @Override
 public void run() {
   mView.removeCallbacks(this);
   mView.show(false /* show */, true /* animate */);
 }
 private void showOrb() {
   maybeSwapSearchIcon();
   mView.show(true /* show */, true /* animate */);
 }