@FixWhenMinSdkVersion(11) @SuppressWarnings("deprecation")
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    addPreferencesFromResource(R.xml.preferences_about);

    try {
      String packageVersion = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
      findPreference("version").setSummary(packageVersion);
    } catch (NameNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
Activity that displays the "About" preferences.
java/com/google/android/apps/authenticator/settings/SettingsAboutActivity.java