diff options
author | Fred Quintana <> | 2009-04-08 19:14:54 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-08 19:14:54 -0700 |
commit | a698f4276968d078b1b9e2f3738c4f559a3307b2 (patch) | |
tree | f0c3ce86180cb45853e3ed0ded1043d06a90fbc7 /core/java/android/accounts/Constants.java | |
parent | 44e4aaf13318be21913e9c4b0e70a922415e30e7 (diff) | |
download | frameworks_base-a698f4276968d078b1b9e2f3738c4f559a3307b2.zip frameworks_base-a698f4276968d078b1b9e2f3738c4f559a3307b2.tar.gz frameworks_base-a698f4276968d078b1b9e2f3738c4f559a3307b2.tar.bz2 |
AI 145177: phase two of the AccountManager
- added an AccountManagerActivity, a base Activity that can be
used by activities that are launched by AccountAuthenticator
intents. This makes it easy for an Activity to send a result
using an AccountAuthenticatorResponse
- added debug strings to the AccountAuthenticatorCache
- improved the API for the AccountAuthenticatorResponse and
made it Parcelable so that it can be passed to an Activity
via an Intent
- changed the AccountManager to use Futures for the
asynchronous calls and to notify the user via a callback
when the request is complete
- changed the AccountManager to convert any errors that are
returned into Exceptions
- added constants for the error codes that are passed across
the IAccountManagerResponse and
IAccountAuthenticatorResponse interfaces
- added a dump() method to the AccountManagerService so that
it can display the list of active sessions and registered
authenticators
- added an way to interrogate the AccountManagerService for
the list of registered authenticators
- removed more methods from the GoogleLoginServiceHelper and
GoogleLoginServiceBlockingHelper and changed the callers to
use the AccountManager
Automated import of CL 145177
Diffstat (limited to 'core/java/android/accounts/Constants.java')
-rw-r--r-- | core/java/android/accounts/Constants.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/core/java/android/accounts/Constants.java b/core/java/android/accounts/Constants.java new file mode 100644 index 0000000..d3b6aa0 --- /dev/null +++ b/core/java/android/accounts/Constants.java @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.accounts; + +public class Constants { + // this should never be instantiated + private Constants() {} + + public static final int ERROR_CODE_REMOTE_EXCEPTION = 1; + public static final int ERROR_CODE_NETWORK_ERROR = 3; + public static final int ERROR_CODE_CANCELED = 4; + public static final int ERROR_CODE_INVALID_RESPONSE = 5; + public static final int ERROR_CODE_UNSUPPORTED_OPERATION = 6; + + public static final String ACCOUNTS_KEY = "accounts"; + public static final String AUTHENTICATOR_TYPES_KEY = "authenticator_types"; + public static final String PASSWORD_KEY = "password"; + public static final String USERDATA_KEY = "userdata"; + public static final String AUTHTOKEN_KEY = "authtoken"; + public static final String ACCOUNT_NAME_KEY = "authAccount"; + public static final String ACCOUNT_TYPE_KEY = "accountType"; + public static final String ERROR_CODE_KEY = "errorCode"; + public static final String ERROR_MESSAGE_KEY = "errorMessage"; + public static final String INTENT_KEY = "intent"; + public static final String BOOLEAN_RESULT_KEY = "booleanResult"; + public static final String ACCOUNT_AUTHENTICATOR_RESPONSE_KEY = "accountAuthenticatorResponse"; + public static final String AUTH_FAILED_MESSAGE_KEY = "authFailedMessage"; + /** + * Action sent as a broadcast Intent by the AccountsService + * when accounts are added to and/or removed from the device's + * database, or when the primary account is changed. + */ + public static final String LOGIN_ACCOUNTS_CHANGED_ACTION = + "android.accounts.LOGIN_ACCOUNTS_CHANGED"; +} |