1 /* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.server.accounts; 17 18 import android.accounts.Account; 19 20 /** 21 * Constants shared between test AccountAuthenticators and AccountManagerServiceTest. 22 */ 23 public final class AccountManagerServiceTestFixtures { 24 public static final String KEY_ACCOUNT_NAME = "account_manager_service_test:account_name_key"; 25 public static final String KEY_ACCOUNT_SESSION_BUNDLE = 26 "account_manager_service_test:account_session_bundle_key"; 27 public static final String KEY_ACCOUNT_STATUS_TOKEN = 28 "account_manager_service_test:account_status_token_key"; 29 public static final String KEY_ACCOUNT_PASSWORD = 30 "account_manager_service_test:account_password_key"; 31 public static final String KEY_INTENT_FLAGS = 32 "account_manager_service_test:intent_flags_key"; 33 public static final String KEY_OPTIONS_BUNDLE = 34 "account_manager_service_test:option_bundle_key"; 35 public static final String ACCOUNT_NAME_SUCCESS = "success_on_return@fixture.com"; 36 public static final String ACCOUNT_NAME_SUCCESS_2 = "success_on_return_2@fixture.com"; 37 public static final String ACCOUNT_NAME_INTERVENE = "intervene@fixture.com"; 38 public static final String ACCOUNT_NAME_ERROR = "error@fixture.com"; 39 40 public static final String ACCOUNT_NAME = 41 "com.android.server.accounts.account_manager_service_test.account.name"; 42 public static final String ACCOUNT_TYPE_1 = 43 "com.android.server.accounts.account_manager_service_test.account.type1"; 44 public static final String ACCOUNT_TYPE_2 = 45 "com.android.server.accounts.account_manager_service_test.account.type2"; 46 public static final String ACCOUNT_FAKE_TYPE = 47 "com.android.server.accounts.account_manager_service_test.account.type.fake"; 48 49 public static final String ACCOUNT_STATUS_TOKEN = 50 "com.android.server.accounts.account_manager_service_test.account.status.token"; 51 public static final String AUTH_TOKEN_LABEL = 52 "com.android.server.accounts.account_manager_service_test.auth.token.label"; 53 public static final String AUTH_TOKEN = 54 "com.android.server.accounts.account_manager_service_test.auth.token"; 55 public static final String KEY_TOKEN_EXPIRY = 56 "com.android.server.accounts.account_manager_service_test.auth.token.expiry"; 57 public static final String ACCOUNT_FEATURE1 = 58 "com.android.server.accounts.account_manager_service_test.feature1"; 59 public static final String ACCOUNT_FEATURE2 = 60 "com.android.server.accounts.account_manager_service_test.feature2"; 61 public static final String[] ACCOUNT_FEATURES = 62 new String[]{ACCOUNT_FEATURE1, ACCOUNT_FEATURE2}; 63 public static final String CALLER_PACKAGE = 64 "com.android.server.accounts.account_manager_service_test.caller.package"; 65 public static final String ACCOUNT_PASSWORD = 66 "com.android.server.accounts.account_manager_service_test.account.password"; 67 public static final String KEY_RESULT = "account_manager_service_test:result"; 68 public static final String KEY_CALLBACK = "account_manager_service_test:callback"; 69 70 public static final Account ACCOUNT_SUCCESS = 71 new Account(ACCOUNT_NAME_SUCCESS, ACCOUNT_TYPE_1); 72 public static final Account ACCOUNT_SUCCESS_2 = 73 new Account(ACCOUNT_NAME_SUCCESS_2, ACCOUNT_TYPE_1); 74 public static final Account ACCOUNT_INTERVENE = 75 new Account(ACCOUNT_NAME_INTERVENE, ACCOUNT_TYPE_1); 76 public static final Account ACCOUNT_ERROR = 77 new Account(ACCOUNT_NAME_ERROR, ACCOUNT_TYPE_1); 78 public static final Account ACCOUNT_SUCCESS_TYPE_2 = 79 new Account(ACCOUNT_NAME_SUCCESS, ACCOUNT_TYPE_2); 80 81 public static final String SESSION_DATA_NAME_1 = "session.data.name.1"; 82 public static final String SESSION_DATA_VALUE_1 = "session.data.value.1"; 83 84 public static final String ERROR_MESSAGE = 85 "com.android.server.accounts.account_manager_service_test.error.message"; 86 AccountManagerServiceTestFixtures()87 private AccountManagerServiceTestFixtures() {} 88 } 89