1 /** 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 * in compliance with the License. You may obtain a copy of the License at 6 * 7 * ``` 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * ``` 10 * 11 * Unless required by applicable law or agreed to in writing, software distributed under the License 12 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 13 * or implied. See the License for the specific language governing permissions and limitations under 14 * the License. 15 */ 16 package com.android.healthconnect.controller.deletion 17 18 /** Constants used for deletion operations. */ 19 object DeletionConstants { 20 21 /** Used for attaching the DeletionFragment. */ 22 const val FRAGMENT_TAG_DELETION = "FRAGMENT_TAG_DELETION" 23 24 /** The key of a fragment result representing that the delete data button has been pressed. */ 25 const val START_DELETION_EVENT = "START_DELETION_EVENT" 26 27 /** 28 * The key of a fragment result representing that the delete data button has been pressed on an 29 * inactive app preference. 30 */ 31 const val START_INACTIVE_APP_DELETION_EVENT = "START_INACTIVE_APP_DELETION_EVENT" 32 33 /** The key of a fragment result representing that a time range has been selected. */ 34 const val TIME_RANGE_SELECTION_EVENT = "TIME_RANGE_SELECTION_EVENT" 35 36 /** The key of a fragment result representing that the go back button has been pressed. */ 37 const val GO_BACK_EVENT = "GO_BACK_EVENT" 38 39 /** 40 * The key of a fragment result representing that the deletion parameters have been confirmed. 41 */ 42 const val CONFIRMATION_EVENT = "CONFIRMATION_EVENT" 43 44 /** The key of a fragment result representing a successful deletion. */ 45 const val DELETION_COMPLETED_SUCCESS_EVENT = "DELETION_COMPLETED_SUCCESS_EVENT" 46 47 /** The key of a fragment result representing a failed deletion. */ 48 const val DELETION_FAILURE_EVENT = "DELETION_FAILURE_EVENT" 49 50 /** The key of a fragment result representing that the try again button has been pressed. */ 51 const val TRY_AGAIN_EVENT = "TRY_AGAIN_EVENT" 52 53 /** The bundle key for the deletion type requested by a fragment. */ 54 const val DELETION_TYPE = "DELETION_TYPE" 55 56 /** 57 * The bundle key for showing the time range picker dialog from a fragment, used when the value 58 * should be false. 59 */ 60 const val SHOW_PICKER = "SHOW_PICKER" 61 62 /** The bundle key for start time. */ 63 const val START_TIME = "START_TIME" 64 65 /** The bundle key for end time. */ 66 const val END_TIME = "END_TIME" 67 } 68