This commit is contained in:
Mark Qvist 2022-10-02 10:58:00 +02:00
parent 8b275cbe7f
commit 93d214ead6
1 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,6 @@ class SidebandService():
if not self.multicast_lock.isHeld(): if not self.multicast_lock.isHeld():
RNS.log("Taking multicast lock") RNS.log("Taking multicast lock")
self.multicast_lock.acquire() self.multicast_lock.acquire()
RNS.log("Took lock")
if self.wake_lock == None: if self.wake_lock == None:
self.wake_lock = self.power_manager.newWakeLock(self.power_manager.PARTIAL_WAKE_LOCK, "sideband_service") self.wake_lock = self.power_manager.newWakeLock(self.power_manager.PARTIAL_WAKE_LOCK, "sideband_service")
@ -138,14 +137,15 @@ class SidebandService():
if not self.wake_lock.isHeld(): if not self.wake_lock.isHeld():
RNS.log("Taking wake lock") RNS.log("Taking wake lock")
self.wake_lock.acquire() self.wake_lock.acquire()
RNS.log("Took lock")
def release_locks(self): def release_locks(self):
if RNS.vendor.platformutils.get_platform() == "android": if RNS.vendor.platformutils.get_platform() == "android":
if not self.multicast_lock == None and self.multicast_lock.isHeld(): if not self.multicast_lock == None and self.multicast_lock.isHeld():
RNS.log("Releasing multicast lock")
self.multicast_lock.release() self.multicast_lock.release()
if not self.wake_lock == None and self.wake_lock.isHeld(): if not self.wake_lock == None and self.wake_lock.isHeld():
RNS.log("Releasing wake lock")
self.wake_lock.release() self.wake_lock.release()
def run(self): def run(self):