File new.patch of Package upower

diff -ur upower-0.99.5/src/up-constants.h upower-0.99.5.new/src/up-constants.h
--- upower-0.99.5/src/up-constants.h	2017-04-10 14:16:37.000000000 +0300
+++ upower-0.99.5.new/src/up-constants.h	2017-08-15 11:16:59.011062660 +0300
@@ -28,8 +28,8 @@
 
 #define UP_DAEMON_UNKNOWN_TIMEOUT			   1 /* second */
 #define UP_DAEMON_UNKNOWN_RETRIES			   5
-#define UP_DAEMON_SHORT_TIMEOUT				  30 /* seconds */
-#define UP_DAEMON_LONG_TIMEOUT				 120 /* seconds */
+#define UP_DAEMON_SHORT_TIMEOUT				   5 /* seconds */
+#define UP_DAEMON_LONG_TIMEOUT				  30 /* seconds */
 
 #define UP_DAEMON_EPSILON				0.01 /* I can't believe it's not zero */
 
diff -ur upower-0.99.5/src/up-daemon.c upower-0.99.5.new/src/up-daemon.c
--- upower-0.99.5/src/up-daemon.c	2017-04-10 14:16:37.000000000 +0300
+++ upower-0.99.5.new/src/up-daemon.c	2017-08-15 11:17:04.262991188 +0300
@@ -785,10 +785,16 @@
 static guint
 calculate_timeout (UpDevice *device)
 {
-	UpDeviceLevel warning_level;
+	//UpDeviceLevel warning_level;
 
-	g_object_get (G_OBJECT (device), "warning-level", &warning_level, NULL);
-	if (warning_level >= UP_DEVICE_LEVEL_DISCHARGING)
+	//g_object_get (G_OBJECT (device), "warning-level", &warning_level, NULL);
+	
+	UpDeviceState state;
+	
+	g_object_get (G_OBJECT (device), "state", &state, NULL);
+	
+	//if (warning_level >= UP_DEVICE_LEVEL_DISCHARGING)
+	if (state == UP_DEVICE_STATE_DISCHARGING)
 		return UP_DAEMON_SHORT_TIMEOUT;
 	return UP_DAEMON_LONG_TIMEOUT;
 }