Some error occured on device with Cyanogen:
04-03 14:35:04.793 E/AndroidRuntime(21105):
java.util.UnknownFormatConversionException: Conversion is ''
04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
$FormatSpecifierParser.advance(Formatter.java:2641)
04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
$FormatSpecifierParser.parseConversionType(Formatter.java:2716)
04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
$FormatSpecifierParser.parseArgumentIndexAndFlags(Formatter.java:2687)
04-03 14:35:04.793 E/AndroidRuntime(21105): at java.util.Formatter
$FormatSpecifierParser.parseFormatToken(Formatter.java:2624)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
java.util.Formatter.doFormat(Formatter.java:1072)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
java.util.Formatter.format(Formatter.java:994)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
java.lang.String.format(String.java:2254)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
java.lang.String.format(String.java:2219)
04-03 14:35:04.793 E/AndroidRuntime(21105): at
android.preference.ListPreference.getSummary(ListPreference.java)
It happens only on Cyanogen's firmware when there's "%" symbol in
ListPreference's summary.

If u will open ListPreference.java from Froyo's sources u wouldn't
find method ListPreference.getSummary, so it looks like ListPreference
uses base method from Preference.java:
 public CharSequence getSummary() {
        return mSummary;
    }
And javadoc's from eclipse it confirms that:Returns the summary of
this Preference.

Ok, now let's open ListPreference.java from Cyanogen's sources:
  public CharSequence getSummary() {
        final CharSequence entry = getEntry();
        if (mSummary == null || entry == null) {
            return super.getSummary();
        } else {
            return String.format(mSummary, entry);
        }
    }
It look's like it's Cyanogen's feature (only 8 bug reports from >3000
users), but let's go to 
http://developer.android.com/reference/android/preference/ListPreference.html:
Returns the summary of this ListPreference. If the summary has a
String formatting marker in it (i.e. "%s" or "%1$s"), then the current
entry value will be substituted in its place.

WHAT IS GOING ON HERE???
Can someone explain how *exactly* getSummary works?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to