|
@@ -22,35 +22,24 @@ public class SettingConfig {
|
|
|
private static final String KEY_SP_END_OF_DAY_LOCATION = "KEY_SP_END_OF_DAY_LOCATION";
|
|
|
private static final String end_of_day_location = "38";
|
|
|
|
|
|
+ //白天亮度
|
|
|
+ private static final String KEY_SP_DAYTIME_BRIGHTNESS = "KEY_SP_DAYTIME_BRIGHTNESS";
|
|
|
+ private static final int daytime_brightness = 80;
|
|
|
+ //晚上亮度
|
|
|
+ private static final String KEY_SP_NIGHT_BRIGHTNESS = "KEY_SP_NIGHT_BRIGHTNESS";
|
|
|
+ private static final int night_brightness = 50;
|
|
|
+
|
|
|
+ //门口机白天系统音量
|
|
|
+ private static final String KEY_SP_DOOR_DAYTIME_SYSTEM_VOLUME = "KEY_SP_DOOR_DAYTIME_SYSTEM_VOLUME";
|
|
|
+ private static final int door_daytime_system_volume = 100;
|
|
|
+ //门口机晚上系统音量
|
|
|
+ private static final String KEY_SP_DOOR_NIGHT_SYSTEM_VOLUME = "KEY_SP_DOOR_NIGHT_SYSTEM_VOLUME";
|
|
|
+ private static final int door_night_system_volume = 70;
|
|
|
+
|
|
|
+ //门口机通话音量
|
|
|
+ private static final String KEY_SP_DOOR_CALL_VOLUME = "KEY_SP_DOOR_CALL_VOLUME";
|
|
|
+ private static final int door_call_volume = 100;
|
|
|
|
|
|
- //分机白天亮度
|
|
|
- private static final String KEY_SP_EXTENSION_DAYTIME_BRIGHTNESS = "KEY_SP_EXTENSION_DAYTIME_BRIGHTNESS";
|
|
|
- private static final int extension_daytime_brightness = 80;
|
|
|
- //分机晚上亮度
|
|
|
- private static final String KEY_SP_EXTENSION_NIGHT_BRIGHTNESS = "KEY_SP_EXTENSION_NIGHT_BRIGHTNESS";
|
|
|
- private static final int extension_night_brightness = 50;
|
|
|
-
|
|
|
- //分机LED白天亮度
|
|
|
- private static final String KEY_SP_EXTENSION_DAYTIME_LED_BRIGHTNESS = "KEY_SP_EXTENSION_DAYTIME_LED_BRIGHTNESS";
|
|
|
- private static final int extension_daytime_led_brightness = 80;
|
|
|
- //分机LED晚上亮度
|
|
|
- private static final String KEY_SP_EXTENSION_NIGHT_LED_BRIGHTNESS = "KEY_SP_EXTENSION_NIGHT_LED_BRIGHTNESS";
|
|
|
- private static final int extension_night_led_brightness = 50;
|
|
|
-
|
|
|
- //分机白天系统音量
|
|
|
- private static final String KEY_SP_EXTENSION_DAYTIME_SYSTEM_VOLUME = "KEY_SP_EXTENSION_DAYTIME_SYSTEM_VOLUME";
|
|
|
- private static final int extension_daytime_system_volume = 100;
|
|
|
- //分机晚上系统音量
|
|
|
- private static final String KEY_SP_EXTENSION_NIGHT_SYSTEM_VOLUME = "KEY_SP_EXTENSION_NIGHT_SYSTEM_VOLUME";
|
|
|
- private static final int extension_night_system_volume = 70;
|
|
|
-
|
|
|
- //分机手柄录入音量
|
|
|
- private static final String KEY_SP_THE_EXTENSION_HANDLR_RECORDS_THE_VOLUME = "KEY_SP_THE_EXTENSION_HANDLR_RECORDS_THE_VOLUME";
|
|
|
- private static final int the_extension_handle_records_the_volume = 50;
|
|
|
-
|
|
|
- //分机通话音量
|
|
|
- private static final String KEY_SP_EXTENSION_CALL_VOLUME = "KEY_SP_EXTENSION_CALL_VOLUME";
|
|
|
- private static final int extension_call_volume = 100;
|
|
|
|
|
|
//呼叫超时时间
|
|
|
private static final String KEY_SP_SIP_OVERTIME = "KEY_SP_SIP_OVERTIME";
|
|
@@ -58,157 +47,100 @@ public class SettingConfig {
|
|
|
|
|
|
//息屏超时时间
|
|
|
private static final String KEY_SP_SLEEP_TIME = "KEY_SP_SLEEP_TIME";
|
|
|
- private static final int sip_sleep_time = 30;
|
|
|
+ private static final int sleep_time = 30;
|
|
|
|
|
|
//网络异常重启次数
|
|
|
private static final String KEY_SP_NET_ERR_RESET_COUNT = "KEY_SP_NET_ERR_RESET_COUNT";
|
|
|
|
|
|
/**
|
|
|
- * 获取分机白天亮度
|
|
|
+ * 获取白天亮度
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public static int getExtensionDaytimeBrightness(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_EXTENSION_DAYTIME_BRIGHTNESS, extension_daytime_brightness);
|
|
|
+ public static int getDaytimeBrightness(Context context) {
|
|
|
+ return getSP(context).getInt(KEY_SP_DAYTIME_BRIGHTNESS, daytime_brightness);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 设置分机白天亮度
|
|
|
+ * 设置白天亮度
|
|
|
*
|
|
|
* @param value
|
|
|
*/
|
|
|
- public static void setExtensionDaytimeBrightness(Context context, int value) {
|
|
|
- getEditor(context).putInt(KEY_SP_EXTENSION_DAYTIME_BRIGHTNESS, value).apply();
|
|
|
+ public static void setDaytimeBrightness(Context context, int value) {
|
|
|
+ getEditor(context).putInt(KEY_SP_DAYTIME_BRIGHTNESS, value).apply();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取分机晚上亮度
|
|
|
+ * 获取晚上亮度
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public static int getExtensionNightBrightness(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_EXTENSION_NIGHT_BRIGHTNESS, extension_night_brightness);
|
|
|
+ public static int getNightBrightness(Context context) {
|
|
|
+ return getSP(context).getInt(KEY_SP_NIGHT_BRIGHTNESS, night_brightness);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 设置分机晚上亮度
|
|
|
+ * 设置晚上亮度
|
|
|
*
|
|
|
* @param value
|
|
|
*/
|
|
|
- public static void setExtensionNightBrightness(Context context, int value) {
|
|
|
- getEditor(context).putInt(KEY_SP_EXTENSION_NIGHT_BRIGHTNESS, value).apply();
|
|
|
+ public static void setNightBrightness(Context context, int value) {
|
|
|
+ getEditor(context).putInt(KEY_SP_NIGHT_BRIGHTNESS, value).apply();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取分机LED白天亮度
|
|
|
+ * 获取门口机白天系统音量
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public static int getExtensionDaytimeLEDBrightness(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_EXTENSION_DAYTIME_LED_BRIGHTNESS, extension_daytime_led_brightness);
|
|
|
+ public static int getDoorDaytimeSystemVolume(Context context) {
|
|
|
+ return getSP(context).getInt(KEY_SP_DOOR_DAYTIME_SYSTEM_VOLUME, door_daytime_system_volume);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 设置分机LED白天亮度
|
|
|
+ * 设置门口机白天系统音量
|
|
|
*
|
|
|
* @param value
|
|
|
*/
|
|
|
- public static void setExtensionDaytimeLEDBrightness(Context context, int value) {
|
|
|
- getEditor(context).putInt(KEY_SP_EXTENSION_DAYTIME_LED_BRIGHTNESS, value).apply();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取分机LED晚上亮度
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static int getExtensionNightLEDBrightness(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_EXTENSION_NIGHT_LED_BRIGHTNESS, extension_night_led_brightness);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 设置分机LED晚上亮度
|
|
|
- *
|
|
|
- * @param value
|
|
|
- */
|
|
|
- public static void setExtensionNightLEDBrightness(Context context, int value) {
|
|
|
- getEditor(context).putInt(KEY_SP_EXTENSION_NIGHT_LED_BRIGHTNESS, value).apply();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取分机白天系统音量
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static int getExtensionDaytimeSystemVolume(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_EXTENSION_DAYTIME_SYSTEM_VOLUME, extension_daytime_system_volume);
|
|
|
+ public static void setDoorDaytimeSystemVolume(Context context, int value) {
|
|
|
+ getEditor(context).putInt(KEY_SP_DOOR_DAYTIME_SYSTEM_VOLUME, value).apply();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 设置分机白天系统音量
|
|
|
- *
|
|
|
- * @param value
|
|
|
- */
|
|
|
- public static void setExtensionDaytimeSystemVolume(Context context, int value) {
|
|
|
- getEditor(context).putInt(KEY_SP_EXTENSION_DAYTIME_SYSTEM_VOLUME, value).apply();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取分机晚上系统音量
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static int getExtensionNightSystemVolume(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_EXTENSION_NIGHT_SYSTEM_VOLUME, extension_night_system_volume);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 设置分机晚上系统音量
|
|
|
- *
|
|
|
- * @param value
|
|
|
- */
|
|
|
- public static void setExtensionNightSystemVolume(Context context, int value) {
|
|
|
- getEditor(context).putInt(KEY_SP_EXTENSION_NIGHT_SYSTEM_VOLUME, value).apply();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取分机手柄录入音量
|
|
|
+ * 获取门口机晚上系统音量
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public static int getTheExtensionHandleRecordsTheVolume(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_THE_EXTENSION_HANDLR_RECORDS_THE_VOLUME, the_extension_handle_records_the_volume);
|
|
|
+ public static int getDoorNightSystemVolume(Context context) {
|
|
|
+ return getSP(context).getInt(KEY_SP_DOOR_NIGHT_SYSTEM_VOLUME, door_night_system_volume);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 设置分机手柄录入音量
|
|
|
+ * 设置门口机晚上系统音量
|
|
|
*
|
|
|
* @param value
|
|
|
*/
|
|
|
- public static void setTheExtensionHandleRecordsTheVolume(Context context, int value) {
|
|
|
- getEditor(context).putInt(KEY_SP_THE_EXTENSION_HANDLR_RECORDS_THE_VOLUME, value).apply();
|
|
|
+ public static void setDoorNightSystemVolume(Context context, int value) {
|
|
|
+ getEditor(context).putInt(KEY_SP_DOOR_NIGHT_SYSTEM_VOLUME, value).apply();
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 获取分机通话音量
|
|
|
+ * 获取门口机通话音量
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public static int getExtensionCallVolume(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_EXTENSION_CALL_VOLUME, extension_call_volume);
|
|
|
+ return getSP(context).getInt(KEY_SP_DOOR_CALL_VOLUME, door_call_volume);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 设置分机通话音量
|
|
|
+ * 设置门口机通话音量
|
|
|
*
|
|
|
* @param value
|
|
|
*/
|
|
|
public static void setExtensionCallVolume(Context context, int value) {
|
|
|
- getEditor(context).putInt(KEY_SP_EXTENSION_CALL_VOLUME, value).apply();
|
|
|
+ getEditor(context).putInt(KEY_SP_DOOR_CALL_VOLUME, value).apply();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -319,7 +251,7 @@ public class SettingConfig {
|
|
|
* @return
|
|
|
*/
|
|
|
public static int getSleepTime(Context context) {
|
|
|
- return getSP(context).getInt(KEY_SP_SIP_OVERTIME, sip_sleep_time);
|
|
|
+ return getSP(context).getInt(KEY_SP_SIP_OVERTIME, sleep_time);
|
|
|
}
|
|
|
|
|
|
/**
|