mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-04 18:29:27 +02:00
Fix crash when remotely removing a device at which a limited app is running
This commit is contained in:
parent
cf6d1e8f62
commit
b6b68691de
8 changed files with 69 additions and 27 deletions
|
@ -470,10 +470,11 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
|||
if (deviceEntry != null) {
|
||||
if (deviceEntry.currentAppVersion != currentAppVersion) {
|
||||
ApplyActionUtil.applyAppLogicAction(
|
||||
UpdateDeviceStatusAction.empty.copy(
|
||||
action = UpdateDeviceStatusAction.empty.copy(
|
||||
newAppVersion = currentAppVersion
|
||||
),
|
||||
appLogic
|
||||
appLogic = appLogic,
|
||||
ignoreIfDeviceIsNotConfigured = true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -503,10 +504,11 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
|||
|
||||
if (deviceEntry?.considerRebootManipulation == true) {
|
||||
ApplyActionUtil.applyAppLogicAction(
|
||||
UpdateDeviceStatusAction.empty.copy(
|
||||
action = UpdateDeviceStatusAction.empty.copy(
|
||||
didReboot = true
|
||||
),
|
||||
appLogic
|
||||
appLogic = appLogic,
|
||||
ignoreIfDeviceIsNotConfigured = true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -546,7 +548,11 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
|
|||
}
|
||||
|
||||
if (changes != UpdateDeviceStatusAction.empty) {
|
||||
ApplyActionUtil.applyAppLogicAction(changes, appLogic)
|
||||
ApplyActionUtil.applyAppLogicAction(
|
||||
action = changes,
|
||||
appLogic = appLogic,
|
||||
ignoreIfDeviceIsNotConfigured = true
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue