Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Nov 21, 2014
1 parent 800e85d commit a10889b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

<uses-permission android:name="android.permission.INTERNET"/>
<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.ACCESS_SUPERUSER"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>

<uses-feature
android:name="android.hardware.touchscreen"
Expand Down
7 changes: 6 additions & 1 deletion src/main/res/xml/tracker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
<!-- Enable automatic Activity measurement -->
<bool name="ga_autoActivityTracking">true</bool>

<!-- Enable exception reports -->
<bool name="ga_reportUncaughtExceptions">true</bool>

<!-- The screen names that will appear in reports -->
<screenName name="com.google.android.gms.analytics.samples.mobileplayground.ScreenviewFragment">
Shadowsocks ScreenView
</screenName>

<screenName name="com.google.android.gms.analytics.samples.mobileplayground.EcommerceFragment">
Shadowsocks EcommerceView
</screenName>

<!-- The following value should be replaced with correct property id. -->
<string name="ga_trackingId">UA-37082941-1</string>
</resources>
</resources>
5 changes: 0 additions & 5 deletions src/main/scala/com/github/shadowsocks/Shadowsocks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a10889b

Please sign in to comment.