omaticallyaccount ContactsContract.AUTHORITY true else mAccountManager.setPasswordaccount mPassword final Intent intent new Intent mAuthtoken mPassword intent.putExtraAccountManager.KEY_ACCOUNT_NAME mUsername intent.putExtraAccountManager.KEY_ACCOUNT_TYPE Constants.ACCOUNT_TYPE if mAuthtokenType null mAuthtokenType.equalsConstants.AUTHTOKEN_TYPE intent.putExtraAccountManager.KEY_AUTHTOKEN mAuthtoken setAccountAuthenticatorResultintent.getExtras setResultRESULT_OK intent finish / Hides the progress UI for a lengthy operation. / private void hideProgress dismissDialog0 / Called when the authentication process completes see attemptLogin. / public void onAuthenticationResultboolean result Log.iTAG onAuthenticationResult result // Hide the progress dialog hideProgress if result if mConfirmCredentials finishLogin else finishConfirmCredentialstrue else Log.eTAG onAuthenticationResult: failed to authenticate if mRequestNewAccount // Please enter a valid username/password. mMessage.setTextgetTextR.string.login_activity_loginfail_text_both else // Please enter a valid password. Used when the // account is already in the database but the password // doesnt work. mMessage.setTextgetTextR.string.login_activity_loginfail_text_pwonly / Returns the message to be displayed at the top of the login dialog box. / private CharSequence getMessage getStringR.string.label if TextUtils.isEmptymUsername // If no username then we ask the user to log in using an // appropriate service. final CharSequence msg getTextR.string.login_activity_newaccount_text return msg if TextUtils.isEmptymPassword // We have an account but no password return getTextR.string.login_activity_loginfail_text_pwmissing return null / Shows the progress UI for a lengthy operation. / private void showProgress showDialog0
上一篇:
64位ubuntu11 10使用git下载android源码
下一篇:
7*30m公路预应力混凝土连续梁桥上部结构设计