private static void setOnboardingCompletedPreference(Context context, boolean value) {
    SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
    if (value) {
      preferences.edit().putBoolean(AuthenticatorActivity.KEY_ONBOARDING_COMPLETED, true).commit();
    } else {
      preferences.edit().remove(AuthenticatorActivity.KEY_ONBOARDING_COMPLETED).commit();
    }
  }
Set the preference for key KEY_ONBOARDING_COMPLETED of {@link AuthenticatorActivity}

@param context the target context for the current activity
@param value when the value is false, this function just simply remove the key
javatests/com/google/android/apps/authenticator/AuthenticatorActivityTest.java