From 4e3dc8980b7814cc16706bf7b2f8fa967fb59ef6 Mon Sep 17 00:00:00 2001 From: Adam Baker Date: Sun, 11 Jun 2017 14:24:51 +0100 Subject: [PATCH] Update to newer version of cling, fixes #5 --- build.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 4 ++-- .../com/github/nutomic/controldlna/gui/MainActivity.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 29fbfa1..48d674e 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:1.2.2' + classpath 'com.android.tools.build:gradle:2.3.1' classpath 'com.alexvasilkov:android_sign:0.2' } } @@ -22,8 +22,8 @@ repositories { dependencies { compile 'com.android.support:appcompat-v7:19.1.+' compile 'com.android.support:mediarouter-v7:19.1.+' - compile 'org.fourthline.cling:cling-core:2.1.0' - compile 'org.fourthline.cling:cling-support:2.1.0' + compile 'org.fourthline.cling:cling-core:2.1.1' + compile 'org.fourthline.cling:cling-support:2.1.1' compile 'org.eclipse.jetty:jetty-server:8.1.8.v20121106' compile 'org.eclipse.jetty:jetty-servlet:8.1.8.v20121106' compile 'org.eclipse.jetty:jetty-client:8.1.8.v20121106' @@ -32,7 +32,7 @@ dependencies { android { compileSdkVersion 19 - buildToolsVersion "19.1.0" + buildToolsVersion '25.0.0' // Caused by cling, because they apparently include APIs for other platforms. lintOptions { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9fe2750..84dbbf8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun May 03 22:20:30 BST 2015 +#Sun Jun 11 12:46:47 BST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java b/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java index ee3c00b..c57c27f 100644 --- a/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java +++ b/src/main/java/com/github/nutomic/controldlna/gui/MainActivity.java @@ -134,7 +134,7 @@ public class MainActivity extends ActionBarActivity { .setText(R.string.title_route) .setTabListener(tabListener)); - final WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); + final WifiManager wifi = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE); if (!wifi.isWifiEnabled()) { String value = PreferenceManager.getDefaultSharedPreferences(this) .getString(PreferencesActivity.KEY_ENABLE_WIFI_ON_START, "ask");