Use category for Apps without category

This commit is contained in:
Jonas L 2019-01-24 20:36:54 +01:00
parent 0c60d0be42
commit bb918eac7a
2 changed files with 13 additions and 1 deletions

View file

@ -185,6 +185,7 @@ class BackgroundTaskLogic(val appLogic: AppLogic) {
} else if (foregroundAppPackageName != null) {
val appCategory = appCategories.get(Pair(foregroundAppPackageName, categories.map { it.id })).waitForNullableValue()
val category = categories.find { it.id == appCategory?.categoryId }
?: categories.find { it.id == deviceUserEntry.categoryForNotAssignedApps }
if (category == null) {
usedTimeUpdateHelper?.commit(appLogic)