1 /* 2 * Copyright (C) 2024 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.health.connect; 18 19 import static com.android.healthfitness.flags.Flags.FLAG_PERSONAL_HEALTH_RECORD; 20 21 import android.annotation.FlaggedApi; 22 import android.annotation.IntDef; 23 import android.annotation.SystemApi; 24 25 import java.lang.annotation.Retention; 26 import java.lang.annotation.RetentionPolicy; 27 28 /** 29 * Represents the permission category of a {@link android.health.connect.datatypes.MedicalResource}. 30 * A {@link android.health.connect.datatypes.MedicalResource} can only belong to one and only one 31 * {@link MedicalPermissionCategory}. 32 * 33 * @hide 34 */ 35 @FlaggedApi(FLAG_PERSONAL_HEALTH_RECORD) 36 @SystemApi 37 public final class MedicalPermissionCategory { 38 /** Unknown medical permission category */ 39 public static final int UNKNOWN = 0; 40 41 /** Permission category for all medical data */ 42 public static final int ALL_MEDICAL_DATA = 1; 43 44 /** Permission category for immunization */ 45 public static final int IMMUNIZATION = 2; 46 MedicalPermissionCategory()47 private MedicalPermissionCategory() {} 48 49 /** @hide */ 50 @IntDef({UNKNOWN, ALL_MEDICAL_DATA, IMMUNIZATION}) 51 @Retention(RetentionPolicy.SOURCE) 52 public @interface Type {} 53 } 54