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 /** 20 * OnDevicePersonalization Feature Flags interface. This Flags interface hold the default values 21 * of flags. The default values in this class must match with the default values in PH since we 22 * will migrate to Flag Codegen in the future. With that migration, the Flags.java file will be 23 * generated from the GCL. 24 */ 25 public interface Flags { 26 27 boolean ONDEVICEPERSONALIZATION_ENABLED = false; 28 getOnDevicePersonalizationEnabled()29 default boolean getOnDevicePersonalizationEnabled() { 30 return ONDEVICEPERSONALIZATION_ENABLED; 31 } 32 33 /** 34 * Global OnDevicePersonalization Kill Switch. This overrides all other killswitches. 35 * The default value is false which means OnDevicePersonalization is enabled. 36 * This flag is used for emergency turning off the whole module. 37 */ 38 boolean GLOBAL_KILL_SWITCH = true; 39 getGlobalKillSwitch()40 default boolean getGlobalKillSwitch() { 41 return GLOBAL_KILL_SWITCH; 42 } 43 } 44