How can I identify which code in my Android application initiates the creation of threads using the Android Profiler
I am working on a plugin-based application which has different plugins. Each plugin is independent of the others. I am also using the Google Places API as a plugin in it. There is an option to refresh the plugin in case of any error. However, whenever I refresh the plugin, it restarts and spawns new threads every time. In the case of other plugins based on the Google Sleep API, etc., this problem does not occur. However, the Places API creates new threads internally every time I refresh it, and they are not deleted. Is there any way in Android Studio Profiler to identify which part of the code is initiating those threads, and is there any way to terminate them?