Android4.2Email源码流程解析

版权声明:本文为博主原创文章,未经博主允许不得转载。Android北京开发技术群 482266514密码CSDN https://blog.csdn.net/wds1181977/article/details/11472843

Email代码结构



源码地址http://download.csdn.net/detail/wds1181977/5623927


入口处为com.android.email.activity.Welcome

初始化操作,判断是否有账户信息,如果没有账户信息跳转入登录界面AccountSetupBasics,如果已登录则去主界面EmailActivity


  private void resolveAccount() {
        final int numAccount = EmailContent.count(this, Account.CONTENT_URI);
        if (numAccount == 0) {
            AccountSetupBasics.actionNewAccount(this);
            finish();
            return;
        } else {
            mAccountId = resolveAccountId(this, mAccountId, mAccountUuid);
            if (Account.isNormalAccount(mAccountId) &&
                    Mailbox.findMailboxOfType(this, mAccountId, Mailbox.TYPE_INBOX)
                            == Mailbox.NO_MAILBOX) {
                startInboxLookup();
                return;
            }
        }
        startEmailActivity();
    }

com.android.email.activity.setup.AccountSetupBasics登录账户界面


邮箱账户类型分为POP3 IMAP.Exchange这几种类型,登录邮箱需要配置接受设置和外发设置,下面是源码中的各个国家邮箱的接受设置和外发设置,当你点击下一步后会解析R.xml.providers.xml,如果你输入的账户能匹配到,就不需要手动配置邮箱,自动会导入配置(当你想新增邮箱你可以把配置加到这里就可以了)


<providers>

    <!-- Gmail variants -->
    <provider id="gmail" label="Gmail" domain="gmail.com">
        <incoming uri="imap+ssl+://imap.gmail.com" username="$email" />
        <outgoing uri="smtp+ssl+://smtp.gmail.com" username="$email" />
    </provider>
    <provider id="googlemail" label="Google Mail" domain="googlemail.com">
        <incoming uri="imap+ssl+://imap.googlemail.com" username="$email" />
        <outgoing uri="smtp+ssl+://smtp.googlemail.com" username="$email" />
    </provider>
    <provider id="google" label="Google" domain="google.com">
        <incoming uri="imap+ssl+://imap.gmail.com" username="$email" />
        <outgoing uri="smtp+ssl+://smtp.gmail.com" username="$email" />
    </provider>
    <provider id="android" label="Android" domain="android.com">
        <incoming uri="imap+ssl+://imap.gmail.com" username="$email" />
        <outgoing uri="smtp+ssl+://smtp.gmail.com" username="$email" />
    </provider>

    <!-- CHINA -->
    <provider id="163" label="163Mail" domain="163.com">
        <incoming uri="imap+ssl+trustallcerts://imap.163.com" username="$email" />
        <outgoing uri="smtp+ssl+trustallcerts://smtp.163.com" username="$email" />
    </provider>

    <provider id="qq" label="qqMail" domain="qq.com">
        <incoming uri="imap+ssl+trustallcerts://imap.qq.com" username="$email" />
        <outgoing uri="smtp+ssl+trustallcerts://smtp.qq.com" username="$email" />
    </provider>

    <provider id="126" label="126" domain="126.com">
        <incoming uri="imap+ssl+trustallcerts://imap.126.com" username="$email" />
        <outgoing uri="smtp+ssl+trustallcerts://smtp.126.com" username="$email" />
    </provider>

    <provider id="sina-com-cn" label="Sina.com.cn" domain="sina.com.cn">
        <incoming uri="imap://imap.sina.com.cn" username="$email" />
        <outgoing uri="smtp://smtp.sina.com.cn" username="$email" />
    </provider>

    <provider id="sina-cn" label="Sina.cn" domain="sina.cn">
        <incoming uri="imap://imap.sina.cn" username="$email" />
        <outgoing uri="smtp://smtp.sina.cn" username="$email" />
    </provider>
    
    <provider id="sina-com" label="Sina.com" domain="sina.com">
        <incoming uri="imap://imap.sina.com.cn" username="$email" />
        <outgoing uri="smtp://smtp.sina.com.cn" username="$email" />
    </provider>

    <provider id="sohu" label="Sohu" domain="sohu.com">
        <incoming uri="imap+ssl+trustallcerts://imap.sohu.com" username="$email" />
        <outgoing uri="smtp+ssl+trustallcerts://smtp.sohu.com" username="$email" />
    </provider>
    
    <!-- USA -->

    <!-- AOL and variants -->
    <!-- Note, AOL appears to support SSL on both sides, as well -->
    <provider id="aim" label="AIM" domain="aim.com">
        <incoming uri="imap+ssl+://imap.aim.com" label="IMAP" username="$email" />
        <outgoing uri="smtp+ssl+://smtp.aim.com" username="$email" />
    </provider>
    <!-- Note, AOL appears to support SSL on both sides, as well -->
    <provider id="aol" label="AOL" domain="aol.com">
        <incoming uri="imap+ssl+://imap.aol.com" label="IMAP" username="$email" />
        <outgoing uri="smtp+ssl+://smtp.aol.com" username="$email" />
    </provider>

    <!-- MobileMe and variants -->
    <provider id="dotmac" label=".Mac" domain="mac.com">
        <incoming uri="imap+ssl+://mail.mac.com" username="$email" />
        <outgoing uri="smtp+tls+://smtp.mac.com" username="$email" />
    </provider>
    <!-- Note: Mac Mail.app sets IMAP to mail.mac.com, but it's the same server -->
    <provider id="mobileme" label="MobileMe" domain="me.com">
        <incoming uri="imap+ssl+://mail.me.com" username="$email" />
        <outgoing uri="smtp+tls+://smtp.me.com" username="$email" />
    </provider>

    <!-- Hotmail and variants.  NOTE: These are handled by exchange if available, else POP3. -->
    <!-- EXCHANGE-REMOVE-SECTION-START -->
    <provider id="live1" label="Windows Live Hotmail Plus" domain="live.*">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <provider id="live2" label="Windows Live Hotmail Plus" domain="live.*.*">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <provider id="live3" label="Windows Live Hotmail Plus" domain="*.live.*">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <provider id="hotmail1" label="Windows Live Hotmail Plus" domain="hotmail.*">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <provider id="hotmail2" label="Windows Live Hotmail Plus" domain="hotmail.*.*">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <provider id="hotmail3" label="Windows Live Hotmail Plus" domain="livemail.*">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <provider id="hotmail4" label="Windows Live Hotmail Plus" domain="livemail.*.*">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <provider id="msn" label="Windows Live Hotmail Plus" domain="msn.*">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <provider id="msnhotmail" label="Windows Live Hotmail Plus" domain="msnhotmail.com">
        <incoming uri="eas+ssl+://m.hotmail.com"  username="$email" />
        <outgoing uri="eas+ssl+://m.hotmail.com" username="$email" />
    </provider>
    <!-- EXCHANGE-REMOVE-SECTION-END -->
    <provider id="live" label="Windows Live Hotmail Plus" domain="live.com"
            note="@string/provider_note_live">
        <incoming uri="pop3+ssl+://pop3.live.com"  username="$email" />
        <outgoing uri="smtp+tls+://smtp.live.com" username="$email" />
    </provider>
    <provider id="hotmail" label="Windows Live Hotmail Plus" domain="hotmail.com"
            note="@string/provider_note_live">
        <incoming uri="pop3+ssl+://pop3.live.com"  username="$email" />
        <outgoing uri="smtp+tls+://smtp.live.com" username="$email" />
    </provider>
    <provider id="msn" label="Windows Live Hotmail Plus" domain="msn.com"
            note="@string/provider_note_live">
        <incoming uri="pop3+ssl+://pop3.live.com"  username="$email" />
        <outgoing uri="smtp+tls+://smtp.live.com" username="$email" />
    </provider>

    <!-- Yahoo! Mail variants -->
    <provider id="yahoo" label="Yahoo!" domain="yahoo.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="rocketmail" label="Yahoo! RocketMail" domain="rocketmail.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="ymail" label="Yahoo!" domain="ymail.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="bellsouth" label="AT&T Bell South" domain="bellsouth.net">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="att" label="AT&T" domain="att.net">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="pacbell" label="AT&T Pacific Bell" domain="pacbell.net">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="sbcglobal" label="AT&T SBC Global" domain="sbcglobal.net">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="swbell" label="AT&T Southwest Bell" domain="swbell.net">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="btinternet" label="BT Internet" domain="btinternet.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="btopenworld" label="BT Open World" domain="btopenworld.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="talk21" label="BT Talk 21" domain="talk21.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="rogers" label="Rogers" domain="rogers.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="rogers-nl" label="Rogers" domain="nl.rogers.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>

    <!-- Roadrunner variants -->
    <provider id="rr-roadrunner" label="RoadRunner" domain="roadrunner.com">
        <incoming uri="pop3://pop-server.roadrunner.com" username="$email" />
        <outgoing uri="smtp://mobile-smtp.roadrunner.com" username="$email" />
    </provider>
    <provider id="rr-global" label="RoadRunner" domain="*.rr.com">
        <incoming uri="pop3://pop-server.$domain" username="$email" />
        <outgoing uri="smtp://mobile-smtp.roadrunner.com" username="$email" />
    </provider>

    <!-- USA (other)-->
    <provider id="comcast" label="Comcast" domain="comcast.net">
        <incoming uri="pop3+ssl+://mail.comcast.net" username="$user" />
        <outgoing uri="smtp+ssl+://smtp.comcast.net" username="$user" />
    </provider>
    <provider id="compuserve" label="CompuServe" domain="cs.com">
        <incoming uri="imap://imap.cs.com" username="$user" />
        <outgoing uri="smtp://smtp.cs.com" username="$user" />
    </provider>
    <provider id="cox" label="Cox" domain="cox.net">
        <incoming uri="pop3+ssl+://pop.east.cox.net" username="$user" />
        <outgoing uri="smtp+ssl+://smtp.east.cox.net" username="$user" />
    </provider>
    <provider id="earthlink" label="Earthlink" domain="earthlink.net">
        <incoming uri="pop3://pop.earthlink.net" username="$email" />
        <outgoing uri="smtp://smtpauth.earthlink.net:587" username="$email" />
    </provider>
    <!-- Tested with imap/ssl (no connection) and imap/tls (unsupported)-->
    <!-- Tested with smtp/ssl (no connection) and smtp/tls (unsupported)-->
    <provider id="juno" label="Juno" domain="juno.com">
        <incoming uri="pop3://pop.juno.com" username="$user" />
        <outgoing uri="smtp://smtp.juno.com" username="$user" />
    </provider>
    <provider id="netzero" label="NetZero" domain="netzero.com">
        <incoming uri="pop3://pop.netzero.com" username="$user" />
        <outgoing uri="smtp://smtp.netzero.com" username="$user" />
    </provider>
    <provider id="verizon" label="Verizon" domain="verizon.net">
        <incoming uri="pop3://incoming.verizon.net" username="$user" />
        <outgoing uri="smtp://outgoing.verizon.net" username="$user" />
    </provider>

    <!-- UK -->
    <provider id="aol-uk" label="AOL" domain="aol.co.uk">
        <incoming uri="imap+ssl+://imap.uk.aol.com" label="IMAP" username="$user" />
        <outgoing uri="smtp+ssl+://smtp.uk.aol.com" username="$user" />
    </provider>

    <!-- Germany -->
    <provider id="freenet" label="Freenet" domain="freenet.de">
        <incoming uri="pop3://mx.freenet.de" username="$user" />
        <outgoing uri="smtp+ssl://mx.freenet.de" username="$email" />
    </provider>
    <provider id="gmx" label="GMX" domain="gmx.de">
        <incoming uri="pop3://pop.gmx.net" username="$email" />
        <outgoing uri="smtp://mail.gmx.net" username="$email" />
    </provider>
    <provider id="T-Online" label="T-Online" domain="t-online.de"
              note="@string/provider_note_t_online">
        <incoming uri="pop3://popmail.t-online.de" username="$email" />
        <outgoing uri="smtp://smtpmail.t-online.de" username="$email" />
    </provider>
    <provider id="web.de" label="Web.de" domain="web.de">
        <incoming uri="pop3://pop3.web.de" username="$user" />
        <outgoing uri="smtp://smtp.web.de" username="$user" />
    </provider>

    <!-- Netherlands -->
    <!-- TODO:  For all of these, please confirm POP3, and switch to IMAP if supported -->
    <!-- TODO:  username="" in incoming element is broken - will not work -->
    <!-- Disabled until username="" is resolved
    <provider id="hetnet" label="Het Net" domain="hetnet.nl">
        <incoming uri="pop3://pop.hetnet.nl" username="" />
        <outgoing uri="smtp://mailhost.hetnet.nl" username="" />
    </provider>
    -->
    <!-- Disabled until test accounts provided
    <provider id="planet inet" label="Planet Internet" domain="planet.nl">
        <incoming uri="pop3://pop.planet.nl" username="$user" />
        <outgoing uri="smtp://mail.planet.nl" username="" />
    </provider>
    -->
    <!-- TODO:  username="" in incoming element is broken - will not work -->
    <!-- Disabled until username="" is resolved
    <provider id="tiscali" label="Tiscali" domain="tiscali.nl">
        <incoming uri="pop3://pop3.tiscali.nl" username="" />
        <outgoing uri="smtp://smtp.tiscali.nl" username="" />
    </provider>
    -->
    <!-- Disabled until test accounts provided
    <provider id="wanadoo" label="Wanadoo" domain="wanadoo.nl">
        <incoming uri="pop3://pop.wanadoo.nl" username="$user" />
        <outgoing uri="smtp://smtp.wanadoo.nl" username="$user" />
    </provider>
     -->

    <!-- Poland -->
    <provider id="onet" label="Onet.pl" domain="poczta.onet.pl">
        <incoming uri="pop3://pop3.poczta.onet.pl" username="$email" />
        <outgoing uri="smtp://smtp.poczta.onet.pl" username="$email" />
    </provider>
    <provider id="wirtualna" label="Wirtualna Polska" domain="wp.pl">
        <incoming uri="pop3://pop3.wp.pl" username="$user" />
        <outgoing uri="smtp://smtp.wp.pl" username="$user" />
    </provider>
    <provider id="interia" label="Interia" domain="interia.pl">
        <incoming uri="pop3+ssl://poczta.interia.pl" username="$user" />
        <outgoing uri="smtp+ssl://poczta.interia.pl" username="$user" />
    </provider>
    <provider id="o2" label="O2" domain="o2.pl">
        <incoming uri="pop3+ssl://poczta.o2.pl" username="$user" />
        <outgoing uri="smtp+ssl://poczta.o2.pl" username="$user" />
    </provider>

    <!-- Korea -->
    <provider id="daum" label="Daum Hanmail" domain="hanmail.net">
        <incoming uri="imap+ssl+://imap.hanmail.net" username="$user" />
        <outgoing uri="smtp+ssl+://smtp.hanmail.net" username="$user" />
    </provider>
    <provider id="naver" label="NAVER" domain="naver.com">
        <incoming uri="imap+ssl+://imap.naver.com" username="$user" />
        <outgoing uri="smtp+tls+://smtp.naver.com" username="$user" />
    </provider>
    <provider id="paran" label="Paran" domain="paran.com">
        <incoming uri="imap+ssl+://imap.paran.com" username="$email" />
        <outgoing uri="smtp+ssl+://smtp.paran.com" username="$email" />
    </provider>

    <!-- Yahoo! country-specific email domains -->
    <provider id="yahoo-y7" label="Yahoo!7" domain="y7mail.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="kimo" label="Yahoo! Taiwan" domain="kimo.com">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <!-- Note: Yahoo! Japan's ne.jp domain requires $user rather than the usual $email -->
    <provider id="yahoo-jp-ybb" label="Yahoo! Japan" domain="ybb.ne.jp">
        <incoming uri="imap+ssl+://imap.mail.yahoo.co.jp" username="$user" />
        <outgoing uri="smtp+ssl+://smtp.mail.yahoo.co.jp" username="$user" />
    </provider>
    <!-- Note: Yahoo! Japan's co.jp domain requires $user rather than the usual $email -->
    <provider id="yahoo-jp" label="Yahoo! Japan" domain="yahoo.co.jp">
        <incoming uri="imap+ssl+://imap.mail.yahoo.co.jp" username="$user" />
        <outgoing uri="smtp+ssl+://smtp.mail.yahoo.co.jp" username="$user" />
    </provider>
    <provider id="yahoo-com-XX" label="Country specific Yahoo!" domain="yahoo.com.??">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="yahoo-co-XX" label="Country specific Yahoo!" domain="yahoo.co.??">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <provider id="yahoo-XX" label="Country specific Yahoo!" domain="yahoo.??">
        <incoming uri="imap+ssl+://android.imap.mail.yahoo.com" username="$email" />
        <outgoing uri="smtp+ssl+://android.smtp.mail.yahoo.com" username="$email" />
    </provider>
    <!-- Claro Mail -->

    <provider id="claro" label="Claro Mail" domain="iclaro.com.pe">
        <incoming uri="pop3://pop.iclaro.com.pe" username="$email" />
        <outgoing uri="smtp://smtp.iclaro.com.pe" username="$email" />
    </provider>

</providers>

当你输了了账户密码点击下一步,

代码根据你输入类型查找xml匹配


    /**
     * When "next" button is clicked
     */
    private void onNext() {
        // Try auto-configuration from XML providers (unless in EAS mode, we can skip it)
        if (SetupData.getFlowMode() != SetupData.FLOW_MODE_ACCOUNT_MANAGER_EAS) {
            String email = mEmailView.getText().toString().trim();
            String[] emailParts = email.split("@");
            String domain = emailParts[1].trim();
            mProvider = AccountSettingsUtils.findProviderForDomain(this, domain);
            if (mProvider != null) {
                if (mProvider.note != null) {
                    NoteDialogFragment dialogFragment =
                            NoteDialogFragment.newInstance(mProvider.note);
                    dialogFragment.show(getFragmentManager(), NoteDialogFragment.TAG);
                } else {
                    finishAutoSetup();
                }
                return;
            }
        }
        // Can't use auto setup (although EAS accounts may still be able to AutoDiscover)
        onManualSetup(true);
    }

com.android.email.activity.setup.AccountSettingsUtils中解析过程

   /*package*/ static Provider findProviderForDomain(
            Context context, String domain, int resourceId) {
        try {
            XmlResourceParser xml = context.getResources().getXml(resourceId);
            int xmlEventType;
            Provider provider = null;
            while ((xmlEventType = xml.next()) != XmlResourceParser.END_DOCUMENT) {
                if (xmlEventType == XmlResourceParser.START_TAG
                        && "provider".equals(xml.getName())) {
                    String providerDomain = getXmlAttribute(context, xml, "domain");
                    try {
                        if (matchProvider(domain, providerDomain)) {
                            provider = new Provider();
                            provider.id = getXmlAttribute(context, xml, "id");
                            provider.label = getXmlAttribute(context, xml, "label");
                            provider.domain = domain.toLowerCase();
                            provider.note = getXmlAttribute(context, xml, "note");
                        }
                    } catch (IllegalArgumentException e) {
                        Log.w(Logging.LOG_TAG, "providers line: " + xml.getLineNumber() +
                                "; Domain contains multiple globals");
                    }
                }
                else if (xmlEventType == XmlResourceParser.START_TAG
                        && "incoming".equals(xml.getName())
                        && provider != null) {
                    provider.incomingUriTemplate = getXmlAttribute(context, xml, "uri");
                    provider.incomingUsernameTemplate = getXmlAttribute(context, xml, "username");
                }
                else if (xmlEventType == XmlResourceParser.START_TAG
                        && "outgoing".equals(xml.getName())
                        && provider != null) {
                    provider.outgoingUriTemplate = getXmlAttribute(context, xml, "uri");
                    provider.outgoingUsernameTemplate = getXmlAttribute(context, xml, "username");
                }
                else if (xmlEventType == XmlResourceParser.END_TAG
                        && "provider".equals(xml.getName())
                        && provider != null) {
                    return provider;
                }
            }
        }
        catch (Exception e) {
            Log.e(Logging.LOG_TAG, "Error while trying to load provider settings.", e);
        }
        return null;
    }






没有更多推荐了,返回首页