Skip to content

Commit a10889b

Browse files
committed
fix a bug
1 parent 800e85d commit a10889b

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/main/AndroidManifest.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55

66
<uses-permission android:name="android.permission.INTERNET"/>
77
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
8-
<uses-permission android:name="android.permission.WAKE_LOCK"/>
98
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
109
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
11-
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
1210

1311
<uses-feature
1412
android:name="android.hardware.touchscreen"

src/main/res/xml/tracker.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@
66
<!-- Enable automatic Activity measurement -->
77
<bool name="ga_autoActivityTracking">true</bool>
88

9+
<!-- Enable exception reports -->
10+
<bool name="ga_reportUncaughtExceptions">true</bool>
11+
912
<!-- The screen names that will appear in reports -->
1013
<screenName name="com.google.android.gms.analytics.samples.mobileplayground.ScreenviewFragment">
1114
Shadowsocks ScreenView
1215
</screenName>
16+
1317
<screenName name="com.google.android.gms.analytics.samples.mobileplayground.EcommerceFragment">
1418
Shadowsocks EcommerceView
1519
</screenName>
20+
1621
<!-- The following value should be replaced with correct property id. -->
1722
<string name="ga_trackingId">UA-37082941-1</string>
18-
</resources>
23+
</resources>

src/main/scala/com/github/shadowsocks/Shadowsocks.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,6 @@ object Shadowsocks {
128128
// Helper functions
129129
def updateListPreference(pref: Preference, value: String) {
130130
pref.asInstanceOf[ListPreference].setValue(value)
131-
val entry = pref.asInstanceOf[ListPreference].getEntry
132-
if (entry != null)
133-
pref.setSummary(entry)
134-
else
135-
pref.setSummary(value)
136131
}
137132

138133
def updatePasswordEditTextPreference(pref: Preference, value: String) {

src/main/scala/com/github/shadowsocks/preferences/SummaryListPreference.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class SummaryListPreference(context: Context, attrs: AttributeSet)
5656
}
5757

5858
override def setSummary(summary: CharSequence) {
59-
if (summary.toString.isEmpty) {
59+
if (summary == null || summary.toString.isEmpty) {
6060
super.setSummary("")
6161
} else {
6262
super.setSummary(summary)

0 commit comments

Comments
 (0)