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.ondevicepersonalization.services; 18 19 import com.android.ondevicepersonalization.services.data.user.UserDataCollectionJobService; 20 import com.android.ondevicepersonalization.services.download.OnDevicePersonalizationDownloadProcessingJobService; 21 import com.android.ondevicepersonalization.services.maintenance.OnDevicePersonalizationMaintenanceJobService; 22 23 import java.util.Map; 24 25 /** Hard-coded configs for OnDevicePersonalization */ 26 public class OnDevicePersonalizationConfig { OnDevicePersonalizationConfig()27 private OnDevicePersonalizationConfig() {} 28 29 /** 30 * Job ID for Mdd Maintenance Task ({@link 31 * com.android.ondevicepersonalization.services.download.mdd.MddJobService}) 32 */ 33 public static final int MDD_MAINTENANCE_PERIODIC_TASK_JOB_ID = 1000; 34 public static final String MDD_MAINTENANCE_PERIODIC_TASK_JOB_NAME = 35 "MDD_MAINTENANCE_PERIODIC_TASK"; 36 37 /** 38 * Job ID for Mdd Charging Periodic Task ({@link 39 * com.android.ondevicepersonalization.services.download.mdd.MddJobService}) 40 */ 41 public static final int MDD_CHARGING_PERIODIC_TASK_JOB_ID = 1001; 42 public static final String MDD_CHARGING_PERIODIC_TASK_JOB_NAME = 43 "MDD_CHARGING_PERIODIC_TASK_JOB"; 44 45 /** 46 * Job ID for Mdd Cellular Charging Task ({@link 47 * com.android.ondevicepersonalization.services.download.mdd.MddJobService}) 48 */ 49 public static final int MDD_CELLULAR_CHARGING_PERIODIC_TASK_JOB_ID = 1002; 50 public static final String MDD_CELLULAR_CHARGING_PERIODIC_TASK_JOB_NAME = 51 "MDD_CELLULAR_CHARGING_PERIODIC_TASK_JOB"; 52 53 /** 54 * Job ID for Mdd Wifi Charging Task ({@link 55 * com.android.ondevicepersonalization.services.download.mdd.MddJobService}) 56 */ 57 public static final int MDD_WIFI_CHARGING_PERIODIC_TASK_JOB_ID = 1003; 58 public static final String MDD_WIFI_CHARGING_PERIODIC_TASK_JOB_NAME = 59 "MDD_WIFI_CHARGING_PERIODIC_TASK_JOB"; 60 61 /** 62 * Job ID for Download Processing Task ({@link 63 * OnDevicePersonalizationDownloadProcessingJobService}) 64 */ 65 public static final int DOWNLOAD_PROCESSING_TASK_JOB_ID = 1004; 66 public static final String DOWNLOAD_PROCESSING_TASK_JOB_NAME = 67 "DOWNLOAD_PROCESSING_TASK_JOB"; 68 69 /** Job ID for Maintenance Task ({@link OnDevicePersonalizationMaintenanceJobService}) */ 70 public static final int MAINTENANCE_TASK_JOB_ID = 1005; 71 public static final String MAINTENANCE_TASK_JOB_NAME = 72 "MAINTENANCE_TASK_JOB"; 73 74 /** Job ID for User Data Collection Task ({@link UserDataCollectionJobService}) */ 75 public static final int USER_DATA_COLLECTION_ID = 1006; 76 public static final String USER_DATA_COLLECTION_JOB_NAME = 77 "USER_DATA_COLLECTION_JOB"; 78 79 /** Job ID for Reset Task ({@link ResetDataJobService}) */ 80 public static final int RESET_DATA_JOB_ID = 1007; 81 public static final String RESET_DATA_JOB_NAME = "RESET_JOB"; 82 83 public static final Map<Integer, String> JOB_ID_TO_NAME_MAP = Map.of( 84 MDD_MAINTENANCE_PERIODIC_TASK_JOB_ID, 85 MDD_MAINTENANCE_PERIODIC_TASK_JOB_NAME, 86 MDD_CHARGING_PERIODIC_TASK_JOB_ID, 87 MDD_CHARGING_PERIODIC_TASK_JOB_NAME, 88 MDD_CELLULAR_CHARGING_PERIODIC_TASK_JOB_ID, 89 MDD_CELLULAR_CHARGING_PERIODIC_TASK_JOB_NAME, 90 MDD_WIFI_CHARGING_PERIODIC_TASK_JOB_ID, 91 MDD_WIFI_CHARGING_PERIODIC_TASK_JOB_NAME, 92 DOWNLOAD_PROCESSING_TASK_JOB_ID, 93 DOWNLOAD_PROCESSING_TASK_JOB_NAME, 94 MAINTENANCE_TASK_JOB_ID, 95 MAINTENANCE_TASK_JOB_NAME, 96 USER_DATA_COLLECTION_ID, 97 USER_DATA_COLLECTION_JOB_NAME, 98 RESET_DATA_JOB_ID, 99 RESET_DATA_JOB_NAME 100 ); 101 } 102