Skip to content

Commit

Permalink
Remove unused thread from DataLoaderService
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza417 committed Jun 27, 2024
1 parent 7c9ceb0 commit 735121b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/hamza.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class DataLoaderService : Service() {
private val tag: String = "DataLoaderService"
private var apps: ArrayList<PackageInfo> = arrayListOf()
private var uninstalledApps: ArrayList<PackageInfo> = arrayListOf()
private var downloaderThread: Thread? = null

private var isLoading = false
private var flags = PackageManager.GET_META_DATA
Expand Down Expand Up @@ -84,12 +83,6 @@ class DataLoaderService : Service() {
super.onDestroy()
Log.d(tag, "onDestroy: Dataloader service destroyed")
LocalBroadcastManager.getInstance(applicationContext).unregisterReceiver(broadcastReceiver!!)

try {
downloaderThread?.interrupt()
} catch (e: IllegalStateException) {
e.printStackTrace()
}
}

fun getInstalledApps(): ArrayList<PackageInfo> {
Expand Down Expand Up @@ -214,4 +207,4 @@ class DataLoaderService : Service() {
apps = loadInstalledApps() as ArrayList<PackageInfo>
onAppsLoaded(apps.clone() as ArrayList<PackageInfo>)
}
}
}

0 comments on commit 735121b

Please sign in to comment.