1 /*
2  * Copyright (C) 2023 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 
17 package com.android.server.healthconnect.migration;
18 
19 import java.time.LocalDate;
20 
21 /**
22  * Migration related constants.
23  *
24  * @hide
25  */
26 public final class MigrationConstants {
MigrationConstants()27     private MigrationConstants() {}
28 
29     public static final String EXTRA_USER_ID = "userId";
30     public static final String HC_PACKAGE_NAME_CONFIG_NAME =
31             "android:string/config_healthConnectMigratorPackageName";
32     public static final String MIGRATION_COMPLETE_JOB_NAME = "migration_completion_job";
33     public static final String MIGRATION_PAUSE_JOB_NAME = "migration_pause_job";
34     static final int COUNT_DEFAULT = 0;
35     static final int INTERVAL_DEFAULT = 0;
36     static final String HC_RELEASE_CERT_CONFIG_NAME =
37             "android:array/config_healthConnectMigrationKnownSigners";
38     static final String CURRENT_STATE_START_TIME_KEY = "current_state_start_time";
39     static final String ALLOWED_STATE_START_TIME_KEY = "allowed_state_start_time";
40     static final String MIGRATION_STATE_PREFERENCE_KEY = "migration_state";
41     static final String MIN_DATA_MIGRATION_SDK_EXTENSION_VERSION_KEY =
42             "min_data_migration_sdk_extension_version";
43     static final String MIGRATION_STARTS_COUNT_KEY = "migration_starts_count";
44     static final String HAVE_CANCELED_OLD_MIGRATION_JOBS_KEY = "have_canceled_old_migration_jobs";
45     static final String HAVE_RESET_MIGRATION_STATE_KEY = "have_reset_migration_state";
46     static final String MIGRATION_STATE_CHANGE_NAMESPACE = MigrationStateChangeJob.class.toString();
47 
48     public static final String IN_PROGRESS_TIMEOUT_REACHED_KEY = "in_progress_timeout_reached_key";
49     public static final String IDLE_TIMEOUT_REACHED_KEY = "idle_timeout_reached_key";
50 
51     static final LocalDate PREMATURE_MIGRATION_TIMEOUT_DATE = LocalDate.of(2023, 6, 15);
52 }
53