code: private boolean isDarkThemeSet() {
          SharedPreferences sharedPreferences =
                  PreferenceManager.getDefaultSharedPreferences(getActivity());
          String key = getString(R.string.theme_preference_key);
          String defaultValue = getString(R.string.theme_preference_default_value);
          return Integer.valueOf(sharedPreferences.getString(key, defaultValue)) != 0;
      }
docs: Returns, whether the app uses the dark theme, or not.
  
  @return True, if the app uses the dark theme, false otherwise