private static void invokePreferencePerformClickOnMainThread(
      final Preference preference, final PreferenceScreen preferenceScreen) {
    runOnMainSyncWithTimeout(
        new Callable<Void>() {
          @Override
          public Void call() {
            invokePreferencePerformClick(preference, preferenceScreen);
            return null;
          }
        });
  }
Taps the specified preference displayed by the provided Activity.
javatests/com/google/android/apps/authenticator/testing/TestUtilities.java