Reputation: 1136
Xiaomi Redmi 7A with MIUI 12.5 keeps killing background service / application (Telegram SMS
and Termux
) when the phone is not connected to charger. Logcat
log:
01-06 10:45:57.787 1892 1892 I MiuiChargeManager: notifyBatteryStatusChanged: status: 3 isPlugged: 0 level: 70 wireState: -1 chargeSpeed: 0 m
WiredChargeType: 0 mWirelessChargeType: 0 chargeDeviceType: -1
01-06 10:50:15.716 4344 4652 W PowerChecker.Controller: autoKillApp, calling ProcessManager uid = 10289, pkg = com.termux
01-06 10:50:15.716 1580 2093 I ProcessManager: Kill reason AutoPowerKill from pid=4344
01-06 10:50:15.829 1580 2093 I ProcessManager: AutoPowerKill: kill com.termux Adj=200 State=5
01-06 10:50:15.830 1580 2093 I ActivityManager: Killing 13234:com.termux/u0a289 (adj 200): AutoPowerKill
01-06 10:50:15.875 4344 4652 W PowerChecker.Controller: autoKillApp, calling ProcessManager uid = 10305, pkg = com.qwe7002.telegram_sms
01-06 10:50:15.876 1580 2093 I ProcessManager: Kill reason AutoPowerKill from pid=4344
01-06 10:50:15.877 1580 2093 I ProcessManager: AutoPowerKill: kill com.qwe7002.telegram_sms:command Adj=200 State=5
01-06 10:50:15.878 1580 2093 I ActivityManager: Killing 23378:com.qwe7002.telegram_sms:command/u0a305 (adj 200): AutoPowerKill
01-06 10:50:15.880 1580 2093 I ProcessManager: AutoPowerKill: kill com.qwe7002.telegram_sms:battery Adj=200 State=5
01-06 10:50:15.880 1580 2093 I ActivityManager: Killing 23348:com.qwe7002.telegram_sms:battery/u0a305 (adj 200): AutoPowerKill
01-06 10:50:15.961 1580 1848 I ProcessManager: remove no clear notification:StatusBarNotification(pkg=com.termux user=UserHandle{0} id=1337 tag=null key=0|com.termux|1337|null|10289: Notification(channel=termux_notification_channel pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x62 color=0xff607d8b actions=2 vis=PRIVATE))
01-06 10:50:15.968 1580 3450 W ActivityManager: Scheduling restart of crashed service com.termux/.app.TermuxService in 1000ms
01-06 10:50:15.973 1580 1665 W ActivityManager: setHasOverlayUi called on unknown pid: 13234
01-06 10:50:15.977 1580 4023 W ActivityManager: Scheduling restart of crashed service com.qwe7002.telegram_sms/.battery_service in 10992ms
01-06 10:50:15.983 1580 1848 I ProcessManager: remove no clear notification:StatusBarNotification(pkg=com.qwe7002.telegram_sms user=UserHandle{0} id=2 tag=null key=0|com.qwe7002.telegram_sms|2|null|10305: Notification(channel=Chat command pri=0 contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x62 color=0x00000000 vis=PRIVATE))
01-06 10:50:15.984 1580 4019 W ActivityManager: Scheduling restart of crashed service com.qwe7002.telegram_sms/.chat_command_service in 20984ms
01-06 10:50:16.650 23510 23510 E ExtAssistant: Error occurred processing removal of StatusBarNotification(pkg=com.termux user=UserHandle{0} id=1337 tag=null key=0|com.termux|1337|null|10289: Notification(channel=termux_notification_channel pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x62 color=0xff607d8b actions=2 vis=PRIVATE))
How to fix this?
Upvotes: 0
Views: 179
Reputation: 1136
Need to lock application in Recents menu:
Go to Security app > tap settings (gear on top right) > Boost speed > Lock apps > Lock the app you need to keep running. This replaces the "padlock" icon (App pinning from the recents menu) that no longer is visible in MIUI 12.
But much better to use Android 9 with MIUI 11. Android 10 with MIUI 12 quite aggressively are killing background apps.
Upvotes: 0