@Override
  public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);

    // Support for RTL languages
    RTLSupport.mirrorActionBar(this);
  }
  @Override
  protected void onDestroy() {
    super.onDestroy();

    // Avoid hiding invalid dialogs
    mIsDestroyed = true;
  }
  @Override
  protected void onResume() {
    super.onResume();

    // Any dialogs to display?
    showImportantDialogs();

    // Support for RTL languages
    RTLSupport.mirrorActionBar(this);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Load UI elements
    initializeUI();

    // Volume keys should control alert volume
    Volume.setVolumeKeysAction(this);
  }