There's an app called Anti-spam: Kaspersky Who Calls .
The problem with this app is that when someone calls you the app shows the caller information in a popup and if you don't dismiss the said popup, the phone screen will never turn off. Imagine you got a call and you couldn't answer it, you forget about it and later you realize the whole time the screen has been on and your battery is almost dead.
I know there's a thing called "Wake Lock " but it's all alien to me and I've no idea what to look for. I've used decompiler.com and got this but while grepping through the sources I wasn't able to find
FLAG_KEEP_SCREEN_ON
, so it could have been done differently or this service doesn't decode this flag correctly.
I've found this:
public static final long WAKE_LOCK_MAX_ACQUIRE_TIMEOUT_MS = 600000;
@SuppressLint({"Wakelock"})
public void run() {
PowerManager.WakeLock wakeLock;
if (h(this.f12161a)) {
this.f12162a.acquire(Constants.WAKE_LOCK_ACQUIRE_TIMEOUT_MILLIS);
}
It probably results in the screen being on for 10 minutes, not indefinitely but it's also excessive.
I wonder if it could be the culprit.
Asked by Artem S. Tashkinov
(215 rep)
Aug 29, 2023, 02:07 PM