| | |
| | | return getConfig("helpLink", context); |
| | | } |
| | | |
| | | /** |
| | | * 是否正在上线 |
| | | * |
| | | * @param context |
| | | * @param onLining |
| | | */ |
| | | public static void saveOnLining(Context context, boolean onLining) { |
| | | saveConfig("onLining", onLining + "", context); |
| | | } |
| | | |
| | | /** |
| | | * 是否正在上线 |
| | | * |
| | | * @param context |
| | | * @return |
| | | */ |
| | | public static boolean isOnLining(Context context) { |
| | | String result = getConfig("onLining", context); |
| | | if (result == null) { |
| | | return false; |
| | | } |
| | | return Boolean.parseBoolean(result); |
| | | } |
| | | |
| | | |
| | | private static void saveConfig(String key, String value, Context context) { |
| | | SharedPreferences.Editor editor = context.getSharedPreferences("config", Context.MODE_PRIVATE).edit(); |