1 /* 2 * Copyright (C) 2022 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.safetylabel; 18 19 import static android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE; 20 21 import android.annotation.SystemApi; 22 23 import androidx.annotation.RequiresApi; 24 25 /** 26 * Constants relating to the Safety Label feature. 27 * 28 * @hide 29 */ 30 @SystemApi 31 @RequiresApi(UPSIDE_DOWN_CAKE) 32 public final class SafetyLabelConstants { 33 34 /** 35 * Constant to be used as Device Config flag determining whether the Permission Rationale 36 * feature is enabled. 37 * 38 * <p>When this flag is enabled, permission rationale messaging will be displayed in permission 39 * settings and the runtime permissions grant dialog. 40 * 41 * @hide 42 */ 43 @SystemApi 44 @RequiresApi(UPSIDE_DOWN_CAKE) 45 public static final String PERMISSION_RATIONALE_ENABLED = "permission_rationale_enabled"; 46 47 /** 48 * Constant to be used as Device Config flag determining whether the Safety Label Change 49 * Notifications feature is enabled. 50 * 51 * <p>When this flag is enabled, a system notification will be sent to users if any apps they 52 * have installed have made recent updates to their data sharing policy in their app safety 53 * labels. 54 * 55 * @hide 56 */ 57 @SystemApi 58 @RequiresApi(UPSIDE_DOWN_CAKE) 59 public static final String SAFETY_LABEL_CHANGE_NOTIFICATIONS_ENABLED = 60 "safety_label_change_notifications_enabled"; 61 SafetyLabelConstants()62 private SafetyLabelConstants() {} 63 } 64