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 @Deprecated("This won't be used once the NEW_INFORMATION_ARCHITECTURE feature is enabled.")
20 object DeletionConstants {
21 
22     /** Used for attaching the DeletionFragment. */
23     const val FRAGMENT_TAG_DELETION = "FRAGMENT_TAG_DELETION"
24 
25     /** The key of a fragment result representing that the delete data button has been pressed. */
26     const val START_DELETION_EVENT = "START_DELETION_EVENT"
27 
28     /**
29      * The key of a fragment result representing that the delete data button has been pressed on an
30      * inactive app preference.
31      */
32     const val START_INACTIVE_APP_DELETION_EVENT = "START_INACTIVE_APP_DELETION_EVENT"
33 
34     /** The key of a fragment result representing that a time range has been selected. */
35     const val TIME_RANGE_SELECTION_EVENT = "TIME_RANGE_SELECTION_EVENT"
36 
37     /** The key of a fragment result representing that the go back button has been pressed. */
38     const val GO_BACK_EVENT = "GO_BACK_EVENT"
39 
40     /**
41      * The key of a fragment result representing that the deletion parameters have been confirmed.
42      */
43     const val CONFIRMATION_EVENT = "CONFIRMATION_EVENT"
44 
45     /** The key of a fragment result representing a successful deletion. */
46     const val DELETION_COMPLETED_SUCCESS_EVENT = "DELETION_COMPLETED_SUCCESS_EVENT"
47 
48     /** The key of a fragment result representing a failed deletion. */
49     const val DELETION_FAILURE_EVENT = "DELETION_FAILURE_EVENT"
50 
51     /** The key of a fragment result representing that the try again button has been pressed. */
52     const val TRY_AGAIN_EVENT = "TRY_AGAIN_EVENT"
53 
54     /** The bundle key for the deletion type requested by a fragment. */
55     const val DELETION_TYPE = "DELETION_TYPE"
56 
57     /**
58      * The bundle key for showing the time range picker dialog from a fragment, used when the value
59      * should be false.
60      */
61     const val SHOW_PICKER = "SHOW_PICKER"
62 
63     /** The bundle key for start time. */
64     const val START_TIME = "START_TIME"
65 
66     /** The bundle key for end time. */
67     const val END_TIME = "END_TIME"
68 }
69