rotation-manager: Don't claim accel when orientation is locked
This reduces iio-sensor-proxy CPU usage a lot in the "unlocked screen" case where we so far claimed the accelerometer but didn't use the values. (We always unclaimed the accelerometer on screen lock).
This also moves the claim/release logic into a single place which makes it easier to grasp.
The other wakeup source here is the light (not proximity) sensor which is claimed by GSD (https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/616) which i'll fix there if it's really not needed.
Signed-off-by: Guido Günther guido.gunther@puri.sm
Edited by Guido Gunther