Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bf0dc0a authored by Yao Lu's avatar Yao Lu Committed by Android (Google) Code Review
Browse files

Merge "Change SharedPreference keys for feature discovery promo" into ub-contactsdialer-h-dev

parents ef6ceb27 ff561a6a
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -36,14 +36,14 @@ public class SharedPreferenceUtil {
    public static final String PREFERENCE_KEY_GLOBAL_SYNC_OFF_DISMISSES =
            "num-of-dismisses-auto-sync-off";

    private static final String PREFERENCE_KEY_HAMBURGER_PROMO_DISPLAYED_BEFORE =
            "hamburgerPromoDisplayedBefore";
    private static final String PREFERENCE_KEY_HAMBURGER_PROMO_DISPLAYED =
            "hamburgerPromoDisplayed";

    private static final String PREFERENCE_KEY_HAMBURGER_MENU_CLICKED_BEFORE =
            "hamburgerMenuClickedBefore";
    private static final String PREFERENCE_KEY_HAMBURGER_MENU_CLICKED =
            "hamburgerMenuClicked";

    private static final String PREFERENCE_KEY_HAMBURGER_PROMO_TRIGGER_ACTION_HAPPENED_BEFORE =
            "hamburgerPromoTriggerActionHappenedBefore";
    private static final String PREFERENCE_KEY_HAMBURGER_PROMO_TRIGGER_ACTION_HAPPENED =
            "hamburgerPromoTriggerActionHappened";

    private static final String PREFERENCE_KEY_IMPORTED_SIM_CARDS =
            "importedSimCards";
@@ -62,34 +62,34 @@ public class SharedPreferenceUtil {

    public static boolean getHamburgerPromoDisplayedBefore(Context context) {
        return getSharedPreferences(context)
                .getBoolean(PREFERENCE_KEY_HAMBURGER_PROMO_DISPLAYED_BEFORE, false);
                .getBoolean(PREFERENCE_KEY_HAMBURGER_PROMO_DISPLAYED, false);
    }

    public static void setHamburgerPromoDisplayedBefore(Context context) {
        getSharedPreferences(context).edit()
                .putBoolean(PREFERENCE_KEY_HAMBURGER_PROMO_DISPLAYED_BEFORE, true)
                .putBoolean(PREFERENCE_KEY_HAMBURGER_PROMO_DISPLAYED, true)
                .apply();
    }

    public static boolean getHamburgerMenuClickedBefore(Context context) {
        return getSharedPreferences(context)
                .getBoolean(PREFERENCE_KEY_HAMBURGER_MENU_CLICKED_BEFORE, false);
                .getBoolean(PREFERENCE_KEY_HAMBURGER_MENU_CLICKED, false);
    }

    public static void setHamburgerMenuClickedBefore(Context context) {
        getSharedPreferences(context).edit()
                .putBoolean(PREFERENCE_KEY_HAMBURGER_MENU_CLICKED_BEFORE, true)
                .putBoolean(PREFERENCE_KEY_HAMBURGER_MENU_CLICKED, true)
                .apply();
    }

    public static boolean getHamburgerPromoTriggerActionHappenedBefore(Context context) {
        return getSharedPreferences(context)
                .getBoolean(PREFERENCE_KEY_HAMBURGER_PROMO_TRIGGER_ACTION_HAPPENED_BEFORE, false);
                .getBoolean(PREFERENCE_KEY_HAMBURGER_PROMO_TRIGGER_ACTION_HAPPENED, false);
    }

    public static void setHamburgerPromoTriggerActionHappenedBefore(Context context) {
        getSharedPreferences(context).edit()
                .putBoolean(PREFERENCE_KEY_HAMBURGER_PROMO_TRIGGER_ACTION_HAPPENED_BEFORE, true)
                .putBoolean(PREFERENCE_KEY_HAMBURGER_PROMO_TRIGGER_ACTION_HAPPENED, true)
                .apply();
    }