bottiger / SoundWaves

Free, Libre and Open Source podcatcher - for Android
GNU General Public License v3.0
139 stars 14 forks source link

ConnectivityManager.getBackgroundDataSetting() is no-longer functioning #156

Open LiliWeiSE opened 6 years ago

LiliWeiSE commented 6 years ago

Hi,

I found that in PodcastService.java, ConnectivityManager.getBackgroundDataSetting() is still in use. However, this API has been deprecated since API 14 and afterwards it will always return true. So this check actually is not functioning as the minSDK is now set to 16.

An alternative way to implement the functionality is to use getActiveNetworkInfo() and check wether the return value is null.

Hope this could help. :)

LiliWeiSE commented 6 years ago

Also, it is used in AbstractAlarmService.java. Now the checking is just equivalent to if (false)

bottiger commented 6 years ago

@frankFic Sorry for not responding before now. I will take a look at if this is actually important, or just legacy code. Thanks