Skip to content

Commit c73e06b

Browse files
imbissbudenaesthetikDMyachinTe-kPeterDaveHelloDennis Arndt
authored
Development (#236)
* update gradle and some dependencies * safer thread handling of PermanentBluetoothScanner * add Website to InformationFragment * add Website to InformationFragment * show AirGuard Version Number on pdf report * handle tracker ignored as additional state for pdf export, fix colors in night mode * update kotlin version to 2.1.21 and update dependencies * fix onboarding loop bug * adjust Android 15 System Bar Configuration * initial implementation of review controller * update gradle * update dependencies * fix: pdf export shows that the tracker is following even if the notification has been longer than a month ago * pdf export: optimize loading times by creating map of locations instead of using the find on the database * optimize loading in pdf export by adding new indices to beacon * fix intent handling for notifications on newer android versions * update dependencies, kotlin version to 2.2.0 and gradle * change last name of maintainer * update dependencies * fix crash in some navigation cases in TrackingFragment * update dependencies * update grade and some dependencies * update some dependencies * fix some issues with the PermanentBluetoothScanner * fix issues in BluetoothLeService * fix issues with gatt disconnect in Utility * increment version number to 2.5.1 * show error message on home screen if samsung android 15 ble bug occurs * update gradle and dependencies * improve Bluetooth Error Detection * add ScanOrchestrator to avoid accessing Bluetooth Resources on too many Threads at once * add Listeners to check if bluetooth or location is enabled in the system * replace specific bluetooth error message on main page with generic one * bypass High Priority Scan in ScanOrchestrator immediately to ensure correct front end services * upgrade gradle, dependencies and kotlin version and target Android 16 * add dependency for Android 16 predictive back compatibility * make PermanentBluetoothScheduler a toggle in the expert settings * increase version number to 2.6.0 * update dependencies * add comment function for each individual tracker * show comment function only if database device exists * add japanese and german translations * reduce throttle window in ScanOrchestrator to ensure bluetooth scan access for high priority scans in edge cases * upgrade gradle and some dependencies * update proguard rules for ScanOrchestrator * fix default value for permanent bluetooth scanner * set permanentscanner default to disabled * F-Droid Release 2.6.0 * update dependencies * fix screenshots in ReadMe * Notification permission can now be denied, if disabled a warning will be shown on the home screen * Background Location can now be denied, if disabled a warning will be shown on the home screen * fix a bug where false alarm toggle was not displayed correctly * fix issue where notification buttons where not properly processed and dismissed * fix issue where notification dismissal was not processed properly * fix map render issue under certain memory conditions when accessing the TrackingFragment through a notification * fix edge to edge problems with menus accessed from a notification * fix old tracker deletion calculating with outdated times * fix back navigation not working when application is accessed through a notification * update dependencies, increase Version number to 2.6.1 * F-Droid Release 2.6.1 * update build workflow * update dependencies, remove google Play Review Controller and all google dependencies for all builds except the google Play Store builds * reduce ANR * PermanentScanner can now only be used between Android 12 and 14, as it causes severe issues on Android 15+ * loading improvements when accesing the TrackingView from the manual scan * ignore Apple Devices when risk sensitivity is not set to high to avoid false positives * fix system bar configuration in Onboarding, update some strings for clarification * fix consistency bug when loading drawable for each tracker * add slightly more consistency to display of device name, clean up code * fix clipping issue on manual scan * add animation to info button in Manual Scan * increase version number to 2.6.2 * F-Droid Release 2.6.2 * simply Github Action Check * detect Samsung SmartTag 2 directly in manual scan, for devices that are Premature Offline * detect Samsung SmartTag 2 directly in manual scan, for devices that are offline or overmature offline * devices matched using the 15 minute algorithm get labeled as such and create a warning in the pdf generation * add radius visualizer on map * redesign map legend * complete japanese translation * fix visual bugs on map * add explanation footer text to device map legend * add setting to prevent screenshots * add section to Information Fragment for language supporters, preparation for a broader language support * add new settings menu to select how long devices, beacons and locations should be stored. * deactivation of auto deletion now throws warning * rename irritating string * add machine translated italian translation (requires human oversight) * fix italian plurals * add czech language using machine translation (requires human oversight) * add slovak language using machine translation (requires human oversight) * add new language supporter credits and add necessary strings in all languages * improve slovak translation based on human feedback * Ru locale (#190) russian translation * Adds French translation (#186) French translation * Add a basic translation of Traditional Chinese (zh_TW) (#150) traditional chinese translation * integrate russian, french and traditional chinese translation * new strings (#220) added missing russian strings * upgrade dependencies and kotlin version * migrate aboutLibraries to Version 13 * replace MarkDownView as markdown renderer for the articles with markwon * Full Screen Device Map will not be shown anymore if internet connection is not available * remove Article Metadata shown in the front end * update italian translation based on human feedback * remove article download and replace with offline version * make language detection more dynamic * update italian based on human feedback * prepare new Hint when there are too many notifications * upgrade gradle * add dismiss button for error articles * update italian articles based on human translation * remove unnecessary translations * complete remaining missing translations using machine translation * more italian improvements * add image resource for moto tag * add image resource for moto tag, add owner retrieval support for hama and improvements for moto tag * add hama tracker icon * fix bug where determine tracker button was shown in some cases for safe google trackers * increment app version and update dependencies * increment version code * F-Droid Release 2.7.0 * improve scan distance fragment debug view * Update ScanDistanceFragment: add device icon, bring back battery feature (this time only in expert mode) * Add pop up when clicking on Location in All Location Map showing the most recently found device, refactor Utility * finish refactor: moving all map related functions out of Utility and into MapUtils * Make Pop Up more understandable, add per location filter to DeviceFragment and FoundDevicesFragment, add +x more trackers found hint to location Pop Up * update articles (include Google, update limitations to not include iOS limitations) * refactor DevicesFragment (delete FoundDevicesFragment and IgnoredDevicesFragment) * change issue with modified strings * Redesign and Refactor Filter Dialog for DeviceFragment * Update dependencies and refactor filter classes * update dependencies * Implement sorting functionality for the devices lists * Filters Ignored and Notified can now also be excluded from the list * Add navigation preselection logic for the new filters, modify the no devices logic found message according to the new filter logic * increment version code to 59 and update version name to 2.7.1 * F-Droid Release 2.7.1 * fix Sort Pop Up Alignment * add scrolling indicator to device list * add missing content descriptions * add sorting option by times seen in device list * fix crash when submitting feedback * fix inconsitencies in the data displayed * make clickable area on Marker Info Window for more trackers bigger * Move old device cleanup and google device clean up in its own independent Worker. Add a save button to the OldDeviceCleanUpFragment. * improve detection of bluetooth and location disabled during Scan * add heart / favourite functionality via swiping to the device list and filter for favourites * add "Forget Tracker" functionality to delete device and related data (analog to iOS version) * Redesign Tracking Fragment (Device Detail Page), follows more the Material 3 Design Language * Redesign Export Device Fragment, Observe Tracker Fragment and Feedback Fragment for new Material Design * redesign ScanDistance Fragment for Material Design 3, add a Play Sound Button on Distance Fragment, fix memory leak in ScanDistanceFragment * adjust colors in Devices Fragment to be compliant to Material 3 Design language * Material Design 3 for ScanFragment * Adjust Settings partially for Material 3 * Adjust Edge to Edge handling (still causes some issues, but mostly working already) * Map View now has Material 3 Design, Fix Edge to Edge issues on Map View * fix edge to edge issue in DeviceFragment * fix edge to edge issue in ScanFragment * fix edge to edge issue in ScanDistanceFragment * fix color blending issue in tracking fragment and information fragment * update gradle to 9.0, Material3 for All Devices Fragment * Material3 for DashboardRiskFragment and RiskDetailFragment * fix color binding issues * remove manual detection of Theme * refactor onboarding fragments to use Material3 components and improve permission handling * remove all occurences of deprecated colors * rename fragments to Dialog and make consistent rounded corners for Bottom Sheet Dialogs * restore greyed out save changes button for delete study data menu * restore greyed out save changes button for delete study data menu * fix merge issue * replace heart with star icon, add star feature in tracking fragment * delete unused resources * Add support for Material You * Fix animation lag in DevicesFragment and improve loading of DevicesFragment for big databases * Fix animation of background bar in ScanDistanceFragment for error cases, fix Animation and Material Design in ScanFragment * fix play sound button visibility on ScanDistanceFragment * Refactor Export Device Fragment to use significantly more efficient data loading * rephrase all occurrences of following to "could be following" * complete translations in non-english languages * Bugfix: Map not loading when accesing through Notification * Material3 Optimizations for the Map * Clear focus from comment EditText when tapping outside * Refactor Bluetooth event handling to use BluetoothEvent class * Refactor all sound playing devices for better compatibility with modern APIs * Add minimum zoom level and set scrollable area limit for the map * update kotlin to 2.3.10, upgrade dependencies * upgrade Java Compiler to Version 21, increase version number * replace switch style in Settings with Material3 themed pill shape * replace ListPreferences with custom Material3 themed Preferences * fix Ripple effect slowing down to ressource intensive layoutlistener * clean up code, remove unused files, fix references * fix references * fix Onboarding for Android 9 * add better empty list explanations and fix visual bugs when lists are empty * rewrite Observe Tracker logic to be more consistent with modern scheduling guidelines * add long click functionality for Device Type Filters, rename favorite to marked * fix SQL issue in rare cases where Google Find My Network devices were mismatched * fix compile issues in tests * update proguard rules * improve location saving to handle edge cases leading to empty MarkerInfo Pop ups * update old device deletion logic, handle cancel workers better, set default setting to true (delete old devices, but not unsafe ones), add deletion of related notification objects for better cleanup * replace images with new design * update gradle version and dependencies * implement explanation for save state instead of map on TrackingFragment * F-Droid Release Metadata 3.0.0 * adjust Tile Branding to Tile / Life360 * update ATTrackingDetectionApplication access to handle uninitialized state * refactor manual scan to only use one RecyclerView instead of two (should reduce ANR), increase version number to 3.0.1, update dependencies * update JDK version to 21 and fix id issue * migrate to use k2 with legacy-kapt, future proof for upcoming AGP versions, update dependencies * refactor manual scan to avoid a situation where scan would freeze * F-Droid Release 3.0.1 * resolve f-droid by enforcing consistent futures dependency resolution * resolve f-droid build issue by ignoring failed tests and deleting empty tests * long press behavior on Filter Dialog can be reverted by long pressing again * enhance chip appearance and interaction in Filter Dialog with animations and visual states * switch some blocking threads to daemon threads to reduce ANR, delete unused graph ressource * fix typos * coroutine improvement and add comment * set app version to 3.0.2 and update dependencies * F-Droid Release 3.0.2 --------- Co-authored-by: DMyachin <dmitry.myachin@gmail.com> Co-authored-by: Tek <tek@randhome.io> Co-authored-by: Peter Dave Hello <hsu@peterdavehello.org> Co-authored-by: Dennis Arndt <darndt@seemoo.tu-darmstadt.de>
1 parent 3482843 commit c73e06b

14 files changed

Lines changed: 272 additions & 346 deletions

File tree

api.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
API_KEY="ZKpHA5D3.93jD8IMBSeZW0mRI6815RTHlPkOLzWBx"
1+
API_KEY="cTVQynqM.2HoOaVM63F5MJo9o6Pm6g86DIn0ju6q9"
22
API_BASE_ADDRESS="https://tpe.seemoo.tu-darmstadt.de/api/"

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ android {
3636
applicationId "de.seemoo.at_tracking_detection"
3737
minSdk = 28
3838
targetSdk = 36
39-
versionCode 63
40-
versionName "3.0.1"
39+
versionCode 64
40+
versionName "3.0.2"
4141
buildConfigField "String", "API_KEY", apiProperties["API_KEY"]
4242
buildConfigField "String", "API_BASE_ADDRESS", apiProperties["API_BASE_ADDRESS"]
4343

@@ -182,13 +182,13 @@ dependencies {
182182
implementation 'androidx.compose.material3:material3:1.4.0'
183183
implementation 'androidx.compose.material3:material3-window-size-class:1.4.0'
184184
// Animations
185-
implementation 'androidx.compose.animation:animation:1.10.5'
185+
implementation 'androidx.compose.animation:animation:1.10.6'
186186
// Tooling support (Previews, etc.)
187-
implementation 'androidx.compose.ui:ui-tooling:1.10.5'
187+
implementation 'androidx.compose.ui:ui-tooling:1.10.6'
188188
// Integration with ViewModels
189189
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.10.0'
190190
// UI Tests
191-
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.10.5'
191+
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.10.6'
192192
// When using a MDC theme
193193
implementation "com.google.android.material:compose-theme-adapter:1.2.1"
194194

app/src/main/java/de/seemoo/at_tracking_detection/detection/BackgroundBluetoothScanner.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ import de.seemoo.at_tracking_detection.util.risk.RiskLevelEvaluator
3636
import de.seemoo.at_tracking_detection.worker.BackgroundWorkScheduler
3737
import kotlinx.coroutines.Dispatchers
3838
import kotlinx.coroutines.delay
39+
import kotlinx.coroutines.suspendCancellableCoroutine
3940
import kotlinx.coroutines.sync.Mutex
4041
import kotlinx.coroutines.sync.withLock
4142
import kotlinx.coroutines.withContext
4243
import timber.log.Timber
4344
import java.time.LocalDateTime
4445
import java.util.concurrent.ConcurrentHashMap
4546
import kotlin.coroutines.resume
46-
import kotlin.coroutines.suspendCoroutine
4747

4848
object BackgroundBluetoothScanner {
4949
private var bluetoothAdapter: BluetoothAdapter? = null
@@ -348,7 +348,7 @@ object BackgroundBluetoothScanner {
348348
return true
349349
}
350350

351-
return suspendCoroutine { cont ->
351+
return suspendCancellableCoroutine { cont ->
352352
var coroutineFinished = false
353353

354354
val handler = Handler(Looper.getMainLooper())
@@ -479,6 +479,8 @@ object BackgroundBluetoothScanner {
479479
since = discoveryDate.minusMinutes(TIME_BETWEEN_BEACONS)
480480
) // sorted by newest first
481481

482+
// adding the beacons[0].locationId != locId check results in more than 1 beacon per 15 minutes if location is different
483+
// if (beacons.isEmpty()) {
482484
if (beacons.isEmpty() || beacons[0].locationId != locId) {
483485
Timber.d("Add new Beacon to the database!")
484486

app/src/main/java/de/seemoo/at_tracking_detection/detection/PermanentBluetoothScanner.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,18 @@ import java.time.ZoneId
3232
import java.time.temporal.ChronoUnit
3333
import java.util.Date
3434
import java.util.concurrent.Executors
35+
import java.util.concurrent.ThreadFactory
3536
import kotlin.math.abs
3637

3738
@RequiresApi(Build.VERSION_CODES.S)
3839
object PermanentBluetoothScanner: LocationHistoryListener {
3940
private var bluetoothAdapter: BluetoothAdapter? = null
4041

41-
private var executor = Executors.newSingleThreadExecutor()
42+
private val daemonThreadFactory = ThreadFactory { r ->
43+
Thread(r, "PermanentBleScanner").apply { isDaemon = true }
44+
}
45+
46+
private var executor = Executors.newSingleThreadExecutor(daemonThreadFactory)
4247
@Volatile private var keepRunning = false
4348

4449
private var pendingFoundDevices: ArrayList<BackgroundBluetoothScanner.DiscoveredDevice> =
@@ -174,7 +179,7 @@ object PermanentBluetoothScanner: LocationHistoryListener {
174179
executor.shutdown()
175180
// Optionally, replace the executor with a new one if you need to start again later
176181
if (executor.isShutdown || executor.isTerminated) {
177-
executor = Executors.newSingleThreadExecutor()
182+
executor = Executors.newSingleThreadExecutor(daemonThreadFactory)
178183
}
179184
// Ask orchestrator to stop only if we are the current callback
180185
try {

0 commit comments

Comments
 (0)