<commit_before>package com.artemzin.android.wail.storage;

import android.content.Context;
import android.content.SharedPreferences;

import com.artemzin.android.bytes.common.StringUtil;
import com.artemzin.android.wail.api.lastfm.model.response.LFUserResponseModel;
import com.artemzin.android.wail.service.WAILService;
import com.artemzin.android.wail.storage.model.Track;

public class WAILSettings {

    private static final String APP_SETTINGS                       = "APP_SETTINGS";

    // region keys
    private static final String KEY_LOCALE                         = "KEY_LOCALE";
    private static final String KEY_THEME                          = "KEY_THEME";
    private static final String KEY_IS_ENABLED                     = "KEY_IS_ENABLED";
    private static final String KEY_START_ON_BOOT                  = "KEY_START_ON_BOOT";
    private static final String KEY_LASTFM_SESSION_KEY             = "KEY_LASTFM_SESSION_KEY";
    private static final String KEY_LASTFM_TOKEN                   = "KEY_LASTFM_TOKEN";
    private static final String KEY_MIN_TRACK_DURATION_IN_PERCENTS = "KEY_MIN_TRACK_DURATION_IN_PERCENTS";
    private static final String KEY_MIN_TRACK_DURATION_IN_SECONDS  = "KEY_MIN_TRACK_DURATION_IN_SECONDS";
    private static final String KEY_DISABLE_SCROBBLING_OVER_MOBILE_NETWORK = "KEY_DISABLE_SCROBBLING_OVER_MOBILE_NETWORK";
    private static final String KEY_TOTAL_HANDLED_TRACKS_COUNT     = "KEY_TOTAL_HANDLED_TRACKS_COUNT";
    private static final String KEY_LASTFM_USER_NAME               = "KEY_LASTFM_USER_NAME";
    private static final String KEY_LASTFM_USER_REGISTERED         = "KEY_LASTFM_USER_REGISTERED";
    private static final String KEY_IS_FIRST_LAUNCH                = "KEY_IS_FIRST_LAUNCH";
    private static final String KEY_IS_SHOW_FEEDBACK_REQUEST       = "KEY_IS_SHOW_FEEDBACK_REQUEST";

    private static final String KEY_IS_LASTFM_NOWPLAYING_UPDATE_ENABLED = "KEY_IS_LASTFM_NOWPLAYING_UPDATE_ENABLED";
    private static final String KEY_LAST_CAPTURED_TRACK_INFO            = "KEY_LAST_CAPTURED_TRACK_INFO";
    private static final String KEY_LASTFM_USER_INFO                    = "KEY_LASTFM_USER_INFO";
    private static final String KEY_LASTFM_USER_INFO_UPDATE_TIMESTAMP   = "KEY_LASTFM_USER_INFO_UPDATE_TIMESTAMP";

    private static final String KEY_SOUND_NOTIFICATION_TRACK_MARKED_AS_SCROBBLED_ENABLED = "KEY_SOUND_NOTIFICATION_TRACK_MARKED_AS_SCROBBLED_ENABLED";
    private static final String KEY_SOUND_NOTIFICATION_TRACK_SKIPPED_ENABLED = "KEY_SOUND_NOTIFICATION_TRACK_SKIPPED_ENABLED";

    private static final String KEY_STATUS_BAR_NOTIFICATION_TRACK_SCROBBLING = "KEY_STATUS_BAR_NOTIFICATION_TRACK_SCROBBLING";
    private static final String KEY_STATUS_BAR_NOTIFICATION_MIN_PRIORITY = "KEY_STATUS_BAR_NOTIFICATION_MIN_PRIORITY";

    private static final String KEY_NOW_SCROBBLING_TRACK_ARTIST = "KEY_NOW_SCROBBLING_TRACK_ARTIST";
    private static final String KEY_NOW_SCROBBLING_TRACK_TITLE = "KEY_NOW_SCROBBLING_TRACK_TITLE";

    private static final String KEY_NOW_SCROBBLING_PLAYER_PACKAGE_NAME = "KEY_NOW_SCROBBLING_PLAYER_PACKAGE_NAME";
    private static final String KEY_NOW_SCROBBLING_PLAYER_LABEL = "KEY_NOW_SCROBBLING_PLAYER_LABEL";

    // endregion

    // region default values<commit_msg>changed shared preferences keys for "min track duration in seconds" and "min track duration in percents" to reset it to the default value after the update.<commit_after>package com.artemzin.android.wail.storage;

import android.content.Context;
import android.content.SharedPreferences;

import com.artemzin.android.bytes.common.StringUtil;
import com.artemzin.android.wail.api.lastfm.model.response.LFUserResponseModel;
import com.artemzin.android.wail.service.WAILService;
import com.artemzin.android.wail.storage.model.Track;

public class WAILSettings {

    private static final String APP_SETTINGS                       = "APP_SETTINGS";

    // region keys
    private static final String KEY_LOCALE                         = "KEY_LOCALE";
    private static final String KEY_THEME                          = "KEY_THEME";
    private static final String KEY_IS_ENABLED                     = "KEY_IS_ENABLED";
    private static final String KEY_START_ON_BOOT                  = "KEY_START_ON_BOOT";
    private static final String KEY_LASTFM_SESSION_KEY             = "KEY_LASTFM_SESSION_KEY";
    private static final String KEY_LASTFM_TOKEN                   = "KEY_LASTFM_TOKEN";
    private static final String KEY_MIN_TRACK_DURATION_IN_PERCENTS = "KEY_MIN_TRACK_DURATION_IN_PERCENTS_V2";
    private static final String KEY_MIN_TRACK_DURATION_IN_SECONDS  = "KEY_MIN_TRACK_DURATION_IN_SECONDS_V2";
    private static final String KEY_DISABLE_SCROBBLING_OVER_MOBILE_NETWORK = "KEY_DISABLE_SCROBBLING_OVER_MOBILE_NETWORK";
    private static final String KEY_TOTAL_HANDLED_TRACKS_COUNT     = "KEY_TOTAL_HANDLED_TRACKS_COUNT";
    private static final String KEY_LASTFM_USER_NAME               = "KEY_LASTFM_USER_NAME";
    private static final String KEY_LASTFM_USER_REGISTERED         = "KEY_LASTFM_USER_REGISTERED";
    private static final String KEY_IS_FIRST_LAUNCH                = "KEY_IS_FIRST_LAUNCH";
    private static final String KEY_IS_SHOW_FEEDBACK_REQUEST       = "KEY_IS_SHOW_FEEDBACK_REQUEST";

    private static final String KEY_IS_LASTFM_NOWPLAYING_UPDATE_ENABLED = "KEY_IS_LASTFM_NOWPLAYING_UPDATE_ENABLED";
    private static final String KEY_LAST_CAPTURED_TRACK_INFO            = "KEY_LAST_CAPTURED_TRACK_INFO";
    private static final String KEY_LASTFM_USER_INFO                    = "KEY_LASTFM_USER_INFO";
    private static final String KEY_LASTFM_USER_INFO_UPDATE_TIMESTAMP   = "KEY_LASTFM_USER_INFO_UPDATE_TIMESTAMP";

    private static final String KEY_SOUND_NOTIFICATION_TRACK_MARKED_AS_SCROBBLED_ENABLED = "KEY_SOUND_NOTIFICATION_TRACK_MARKED_AS_SCROBBLED_ENABLED";
    private static final String KEY_SOUND_NOTIFICATION_TRACK_SKIPPED_ENABLED = "KEY_SOUND_NOTIFICATION_TRACK_SKIPPED_ENABLED";

    private static final String KEY_STATUS_BAR_NOTIFICATION_TRACK_SCROBBLING = "KEY_STATUS_BAR_NOTIFICATION_TRACK_SCROBBLING";
    private static final String KEY_STATUS_BAR_NOTIFICATION_MIN_PRIORITY = "KEY_STATUS_BAR_NOTIFICATION_MIN_PRIORITY";

    private static final String KEY_NOW_SCROBBLING_TRACK_ARTIST = "KEY_NOW_SCROBBLING_TRACK_ARTIST";
    private static final String KEY_NOW_SCROBBLING_TRACK_TITLE = "KEY_NOW_SCROBBLING_TRACK_TITLE";

    private static final String KEY_NOW_SCROBBLING_PLAYER_PACKAGE_NAME = "KEY_NOW_SCROBBLING_PLAYER_PACKAGE_NAME";
    private static final String KEY_NOW_SCROBBLING_PLAYER_LABEL = "KEY_NOW_SCROBBLING_PLAYER_LABEL";

    // endregion

    // region default values
{'fraction_non_alphanumeric': 0.0472732661529342, 'fraction_numerical': 0.0002963841138114997, 'mean_word_length': 4.473641524736415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5938399', 'n_tokens_mistral': 2240, 'n_tokens_neox': 2198, 'n_words': 394}