Class GeckoPreferenceController.SetGeckoPreference<T>

Object
org.mozilla.geckoview.GeckoPreferenceController.SetGeckoPreference<T>
Type Parameters:
T - May be constructed as String, Integer, or Boolean.
Enclosing class:
GeckoPreferenceController

public static class GeckoPreferenceController.SetGeckoPreference<T> extends Object
This object is for constructing instructions on how to set a given preference.
  • Field Details

    • pref

      @NonNull public final String pref
      The preference name.
    • value

      @NonNull public final T value
      The value the preference should be set to.
    • branch

      public final int branch
      The preference branch to operate on.
    • type

      public final int type
      The Gecko specified type of preference.
  • Method Details

    • setStringPref

      @AnyThread @NonNull public static GeckoPreferenceController.SetGeckoPreference<String> setStringPref(@NonNull String pref, @NonNull String value, int branch)
      Constructor for setting a String preference.
      Parameters:
      pref - The preference name.
      value - The value the preference should be set to.
      branch - The preference branch to operate on.
      Returns:
      A constructed SetGeckoPreference.
    • setIntPref

      @AnyThread @NonNull public static GeckoPreferenceController.SetGeckoPreference<Integer> setIntPref(@NonNull String pref, @NonNull Integer value, int branch)
      Constructor for setting an Integer preference.
      Parameters:
      pref - The preference name.
      value - The value the preference should be set to.
      branch - The preference branch to operate on.
      Returns:
      A constructed SetGeckoPreference.
    • setBoolPref

      @AnyThread @NonNull public static GeckoPreferenceController.SetGeckoPreference<Boolean> setBoolPref(@NonNull String pref, @NonNull Boolean value, int branch)
      Constructor for setting a Boolean preference.
      Parameters:
      pref - The preference name.
      value - The value the preference should be set to.
      branch - The preference branch to operate on.
      Returns:
      A constructed SetGeckoPreference.