Cancel turning off, don't alter policy when wiggling
[gregoa/zavai.git] / src / app_power.vala
index 129be189c09deb2038d197c95759aee023171b33..0854f9c772dcccb4072f39d48551deee405f12f9 100644 (file)
@@ -106,8 +106,6 @@ public class Power : zavai.Resource, Object
                screen_locked = locked;
                if (!locked)
                        backlight.wiggle();
-               else
-                       backlight.turn_off();
 
                screen_lock_changed(locked);
        }
@@ -331,21 +329,8 @@ public class Backlight: zavai.Service
        public void wiggle()
        {
                // There must be a better method
-               //usage.RequestResource("Display");
-               //usage.ReleaseResource("Display");
-               turn_on();
-       }
-
-       public void turn_on()
-       {
-               usage.SetResourcePolicy("Display", "enabled");
-               usage.SetResourcePolicy("Display", "auto");
-       }
-
-       public void turn_off()
-       {
-               usage.SetResourcePolicy("Display", "disabled");
-               //usage.SetResourcePolicy("Display", "auto");
+               usage.RequestResource("Display");
+               usage.ReleaseResource("Display");
        }
 
        /// Request GPS resource