public static void init(Context context) {
    ChitSettings.context = context;
    preferences = context.getSharedPreferences("mainconfig", Context.MODE_PRIVATE);

    GhostHelper.init(preferences);
    SkinMan.config(preferences);
    NightModeUtil.config(context, preferences);

    GhostModeEnabled = GhostHelper.isGhostEnabled();
    hideTypingState = GhostHelper.isHideTyping();

    confirmBeforeSendingSticker = getTBoolean(confirmStickerKey);
    showTabs = getTBoolean(showTabKey);
    showInviterInGroup = getTBoolean(showInviterKey);
    showMutualDot = getTBoolean(showMutualKey);
    defaultTab = preferences.getInt(defTabKey, DialogActivityH.globalDefaultSelectedTab);
    lastSelectedTab = preferences.getInt(lastSelectedTabKey, -1);

    showFantasy = getTBoolean(fantasyActivityKey);

    channelJoinShown = getBoolean(channelJoinShownKey);

    selectedWallpaper = preferences.getInt(dialogBackKey, defaultBackGround);
    selectedColor = preferences.getInt(dialogColorKey, 0);
    overRideLedColor = getBoolean(overRideLedColorKey);

    loadWallpaper();
  }
 public static void changeNightMode(int hour, int minute, boolean from) {
   NightModeUtil.changeHourMinute(preferences, hour, minute, from);
 }
 /** @return night enabled */
 public static boolean changeNightMode(boolean enabled) {
   return NightModeUtil.change(preferences, enabled);
 }