FHellmann / Uniatron

This project is part of the course Mobile Application Development at the University of Augsburg
https://play.google.com/store/apps/details?id=com.edu.uni.augsburg.uniatron
Apache License 2.0
0 stars 3 forks source link

App usage by blacklisted apps #34

Closed FHellmann closed 6 years ago

FHellmann commented 6 years ago

Describe the bug The app usage time for a specified time range is collected for all apps.

Expected behavior The app usage time for a specified time range should be collectable only for the apps which are blacklisted.

Possible solution

In the AppUsageDao:

    @Query("SELECT (SELECT TOTAL(time_in_minutes * 60) FROM TimeCreditEntity "
            + "WHERE timestamp BETWEEN :dateFrom AND :dateTo) - TOTAL(usage_time_in_seconds) "
            + "FROM AppUsageEntity WHERE timestamp BETWEEN :dateFrom AND :dateTo")
    LiveData<Integer> loadRemainingAppUsageTime(Date dateFrom, Date dateTo);
anja-h commented 6 years ago

Edit App usage time in history view