Does the CPU stay on when the device is charging?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Does the CPU stay on when the device is charging?



The documentation mentions that 6.0+ Android devices will not enter doze mode while charging, but what about regular sleep mode? I could not find anything that indicates that the CPU will turn off when it is plugged to a charger.



From some testing I've done it seems that the device is fine without the CPU WakeLock when running background processes, but I want to make sure; because it could be a case of another app holding a WakeLock.


WakeLock


WakeLock




1 Answer
1



Android sleeps when no wake-lock is active no matter what thread or process you have to execute even when charging and some modified os like miui and other Chinese roms have aggressive cpu sleep, so it's better use wake lock or Other alternative check for more info here [https://developer.android.com/training/scheduling/wakelock].



Doze is more aggressive about preserving your battery life by putting your phone in a low-power.
In this state apps background processes execute in batches, this might have issues executing in background.



And from version 8.0 Google restrict background tasks even more





The question at hand is whether or not this behavior is affected by the device being charged. The only reason I am asking this is because from tests I've done, tasks (both background & foreground, both Oreo and below) were actually being completed when the device had its screen turned off for a long time (without the charger, tasks fail at about a 15-10 minute mark).
– Johan Z.
Aug 12 at 17:04






I noticed you edited your answer to include that Android will sleep even if the device is plugged into a charger. I am curious to know how do you know this to be true? I have found no documentation about this.
– Johan Z.
Aug 13 at 11:27






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered