Commit a10889bb authored by Max Lv's avatar Max Lv

fix a bug

parent 800e85dc
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/> <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-feature <uses-feature
android:name="android.hardware.touchscreen" android:name="android.hardware.touchscreen"
......
...@@ -6,13 +6,18 @@ ...@@ -6,13 +6,18 @@
<!-- Enable automatic Activity measurement --> <!-- Enable automatic Activity measurement -->
<bool name="ga_autoActivityTracking">true</bool> <bool name="ga_autoActivityTracking">true</bool>
<!-- Enable exception reports -->
<bool name="ga_reportUncaughtExceptions">true</bool>
<!-- The screen names that will appear in reports --> <!-- The screen names that will appear in reports -->
<screenName name="com.google.android.gms.analytics.samples.mobileplayground.ScreenviewFragment"> <screenName name="com.google.android.gms.analytics.samples.mobileplayground.ScreenviewFragment">
Shadowsocks ScreenView Shadowsocks ScreenView
</screenName> </screenName>
<screenName name="com.google.android.gms.analytics.samples.mobileplayground.EcommerceFragment"> <screenName name="com.google.android.gms.analytics.samples.mobileplayground.EcommerceFragment">
Shadowsocks EcommerceView Shadowsocks EcommerceView
</screenName> </screenName>
<!-- The following value should be replaced with correct property id. --> <!-- The following value should be replaced with correct property id. -->
<string name="ga_trackingId">UA-37082941-1</string> <string name="ga_trackingId">UA-37082941-1</string>
</resources> </resources>
\ No newline at end of file
...@@ -128,11 +128,6 @@ object Shadowsocks { ...@@ -128,11 +128,6 @@ object Shadowsocks {
// Helper functions // Helper functions
def updateListPreference(pref: Preference, value: String) { def updateListPreference(pref: Preference, value: String) {
pref.asInstanceOf[ListPreference].setValue(value) 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) { def updatePasswordEditTextPreference(pref: Preference, value: String) {
......
...@@ -56,7 +56,7 @@ class SummaryListPreference(context: Context, attrs: AttributeSet) ...@@ -56,7 +56,7 @@ class SummaryListPreference(context: Context, attrs: AttributeSet)
} }
override def setSummary(summary: CharSequence) { override def setSummary(summary: CharSequence) {
if (summary.toString.isEmpty) { if (summary == null || summary.toString.isEmpty) {
super.setSummary("") super.setSummary("")
} else { } else {
super.setSummary(summary) super.setSummary(summary)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment