1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #8723 from volzhs/fix-android-master

Fix possible memory leak for Android and update gradle
This commit is contained in:
Rémi Verschelde
2017-05-12 08:24:22 +02:00
committed by GitHub
3 changed files with 6 additions and 5 deletions

View File

@@ -569,10 +569,10 @@ public abstract class DownloaderService extends CustomIntentService implements I
*/
void pollNetworkState() {
if (null == mConnectivityManager) {
mConnectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
mConnectivityManager = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
}
if (null == mWifiManager) {
mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
mWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
}
if (mConnectivityManager == null) {
Log.w(Constants.TAG,