| | |
| | | } |
| | | |
| | | |
| | | public static void saveAiDaoMode(Context context, boolean content) { |
| | | saveConfig("aiDaoMode", content+"", context); |
| | | } |
| | | |
| | | public static boolean isAiDaoMode(Context context){ |
| | | String onLine= getConfig("aiDaoMode", context); |
| | | if(StringUtils.isEmpty(onLine)){ |
| | | return false; |
| | | } |
| | | return Boolean.parseBoolean(onLine); |
| | | } |
| | | |
| | | |
| | | private static void saveConfig(String key, String value, Context context) { |
| | | SharedPreferences.Editor editor = context.getSharedPreferences("config", Context.MODE_PRIVATE).edit(); |
| | | editor.putString(key, value); |