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 android.federatedcompute.common; 18 19 /** 20 * Constants for FederatedCompute packages and services. 21 * 22 * @hide 23 */ 24 public final class ClientConstants { 25 // Status code constants. 26 public static final int STATUS_SUCCESS = 0; 27 public static final int STATUS_INTERNAL_ERROR = 1; 28 public static final int STATUS_TRAINING_FAILED = 2; 29 public static final int STATUS_KILL_SWITCH_ENABLED = 3; 30 public static final int STATUS_NOT_ENOUGH_DATA = 4; 31 32 public static final String EXTRA_POPULATION_NAME = "android.federatedcompute.population_name"; 33 34 public static final String EXTRA_TASK_ID = "android.federatedcompute.task_id"; 35 36 public static final String EXTRA_CONTEXT_DATA = "android.federatedcompute.context_data"; 37 public static final String EXTRA_ELIGIBILITY_MIN_EXAMPLE = 38 "android.federatedcompute.eligibility_min_example"; 39 40 public static final String EXTRA_COMPUTATION_RESULT = 41 "android.federatedcompute.computation_result"; 42 43 public static final String EXTRA_EXAMPLE_CONSUMPTION_LIST = 44 "android.federatedcompute.example_consumption_list"; 45 46 // ExampleStoreService related constants. 47 public static final String EXAMPLE_STORE_ACTION = "android.federatedcompute.EXAMPLE_STORE"; 48 public static final String EXTRA_EXAMPLE_ITERATOR_CRITERIA = 49 "android.federatedcompute.example_iterator_criteria"; 50 public static final String EXTRA_EXAMPLE_ITERATOR_RESUMPTION_TOKEN = 51 "android.federatedcompute.example_iterator_resumption_token"; 52 53 public static final String EXTRA_COLLECTION_URI = 54 "android.federatedcompute.collection_uri"; 55 public static final String EXTRA_EXAMPLE_ITERATOR_RESULT = 56 "android.federatedcompute.example_iterator_result"; 57 58 // ResultHandlingService related constants. 59 public static final String RESULT_HANDLING_SERVICE_ACTION = 60 "android.federatedcompute.COMPUTATION_RESULT"; 61 62 // ODP mainline signed apex name 63 public static final String ODP_MAINLINE_SIGNED_APEX_NAME = 64 "com.google.android.ondevicepersonalization"; 65 66 // ODP AOSP built apex name 67 public static final String ODP_AOSP_BUILT_APEX_NAME = 68 "com.android.ondevicepersonalization"; 69 70 // ODP apex keyword to capture all other variations of ODP binary (go, other form factors) 71 public static final String ODP_APEX_KEYWORD = 72 "ondevicepersonalization"; 73 ClientConstants()74 private ClientConstants() {} 75 } 76