For the good practice: SdServer must be project wide be updated
// Apply the wake-lock to prevent CPU sleeping (very battery intensive!)
if (Objects.nonNull(mWakeLock)) {
if (!mWakeLock.isHeld()) {
mWakeLock.acquire(24 60 60 1000L /1 day*/);
Log.v(TAG, "Applied Wake Lock to prevent device sleeping");
} else Log.v(TAG, "onStartCommand(): lock already held");
mUtil.writeToSysLogFile("SdServer.onStartCommand() - applying wake lock");
} else {
Log.d(TAG, "mmm...mWakeLock is null, so not aquiring lock. This shouldn't happen!");
mUtil.writeToSysLogFile("SdServer.onStartCommand() - mWakeLock is not null - this shouldn't happen???");
}
For the good practice: SdServer must be project wide be updated
// Apply the wake-lock to prevent CPU sleeping (very battery intensive!) if (Objects.nonNull(mWakeLock)) { if (!mWakeLock.isHeld()) { mWakeLock.acquire(24 60 60 1000L /1 day*/); Log.v(TAG, "Applied Wake Lock to prevent device sleeping");
I will reintroduce this code into the upstream