diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index af9d734d..57797b47 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -5,10 +5,8 @@ - - true + + true + Shadowsocks ScreenView + Shadowsocks EcommerceView + UA-37082941-1 - \ No newline at end of file + diff --git a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala index 3cc8c831..ee09ca0c 100644 --- a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala +++ b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala @@ -128,11 +128,6 @@ object Shadowsocks { // Helper functions def updateListPreference(pref: Preference, value: String) { pref.asInstanceOf[ListPreference].setValue(value) - val entry = pref.asInstanceOf[ListPreference].getEntry - if (entry != null) - pref.setSummary(entry) - else - pref.setSummary(value) } def updatePasswordEditTextPreference(pref: Preference, value: String) { diff --git a/src/main/scala/com/github/shadowsocks/preferences/SummaryListPreference.scala b/src/main/scala/com/github/shadowsocks/preferences/SummaryListPreference.scala index c45c704d..4cf92bac 100644 --- a/src/main/scala/com/github/shadowsocks/preferences/SummaryListPreference.scala +++ b/src/main/scala/com/github/shadowsocks/preferences/SummaryListPreference.scala @@ -56,7 +56,7 @@ class SummaryListPreference(context: Context, attrs: AttributeSet) } override def setSummary(summary: CharSequence) { - if (summary.toString.isEmpty) { + if (summary == null || summary.toString.isEmpty) { super.setSummary("") } else { super.setSummary(summary)