Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9645e857 authored by Wysie's avatar Wysie
Browse files

2.11. "Fixed" an FC when viewing certain contacts.

Quote from http://code.google.com/p/cyanogenmod/issues/detail?id=890:

"As I expected, it's because one of your IM addresses is "GTALK: xxx@googlemail.com"
instead of simply "xxx@googlemail.com". The GTALK prefix is causing the issue. Did
you use any other contacts application?

I've fixed it by catching the exception, since "GTALK: xxx@googlemail.com" is NOT
parsable as an IM address, thus the protocol type can't be detected. Will upload 2.11
in a while, hopefully in time for cyanogen to merge in.

Take note, however, this isn't really an issue with Contacts.apk, since if an app is
saving the Contact info correctly, it should not have the "GTALK: " or any other sort
of prefix."

Not really mine or AOSP's code's problem, but well :).
parent 14cedf41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -815,7 +815,7 @@
    <string name="title_about_name">Mod Name</string>
    <string name="summary_about_name">Wysie Contacts</string>
    <string name="title_about_version">Version</string>
    <string name="summary_about_version">2.1</string>
    <string name="summary_about_version">2.11</string>
    <string name="title_about_credits">Credits</string>
    <string name="summary_about_credits">ChainsDD and the rest of XDA! :)</string>
    
+7 −3
Original line number Diff line number Diff line
@@ -917,7 +917,7 @@ public class ViewContactActivity extends ListActivity
                    case Contacts.KIND_IM: {
                        Object protocolObj = ContactMethods.decodeImProtocol(
                                methodsCursor.getString(METHODS_AUX_DATA_COLUMN));
                        String host;
                        String host = null;
                        if (protocolObj instanceof Number) {
                            int protocol = ((Number) protocolObj).intValue();
                            entry.label = buildActionString(R.string.actionChat,
@@ -927,8 +927,12 @@ public class ViewContactActivity extends ListActivity
                                    || protocol == ContactMethods.PROTOCOL_MSN) {
                                entry.maxLabelLines = 2;
                            }
                        } else {
                        }
                        //Wysie_Soh: 2.11, temp fix for some people whose Contacts are not saved properly (probably some other app)
                        //Default AOSP code does not have the if part, just else (no checks)
                        else if (protocolObj != null) {
                            String providerName = (String) protocolObj;                            
                            
                            entry.label = buildActionString(R.string.actionChat,
                                    providerName, false);
                            host = providerName.toLowerCase();