SoundWaves icon indicating copy to clipboard operation
SoundWaves copied to clipboard

ConnectivityManager.getBackgroundDataSetting() is no-longer functioning

Open LiliWeiSE opened this issue 7 years ago • 2 comments

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 avatar Sep 28 '17 05:09 LiliWeiSE

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

LiliWeiSE avatar Oct 23 '17 14:10 LiliWeiSE

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

bottiger avatar Oct 23 '17 21:10 bottiger