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 package com.android.healthconnect.controller.utils.logging 17 18 import com.android.healthconnect.controller.HealthFitnessUiStatsLog.* 19 import dagger.hilt.EntryPoint 20 import dagger.hilt.InstallIn 21 import dagger.hilt.components.SingletonComponent 22 import javax.inject.Inject 23 import javax.inject.Singleton 24 25 /** Helper class for logging UI Impressions and Interactions. */ 26 @Singleton 27 class HealthConnectLogger @Inject constructor() { 28 29 private var pageName = PageName.UNKNOWN_PAGE 30 31 /** 32 * Sets the page ID which will be used for all impressions and interaction logging on this page. 33 */ setPageIdnull34 fun setPageId(pageName: PageName) { 35 this.pageName = pageName 36 } 37 38 /** Logs the impression of a page. */ logPageImpressionnull39 fun logPageImpression() { 40 write(HEALTH_CONNECT_UI_IMPRESSION, pageName.impressionId) 41 } 42 43 /** Logs the impression of an element. */ logImpressionnull44 fun logImpression(element: ElementName) { 45 write(HEALTH_CONNECT_UI_IMPRESSION, pageName.impressionId, element.impressionId) 46 } 47 48 /** Logs the interaction with an element. */ logInteractionnull49 fun logInteraction(element: ElementName, action: UIAction = UIAction.ACTION_CLICK) { 50 write( 51 HEALTH_CONNECT_UI_INTERACTION, pageName.interactionId, element.interactionId, action.id) 52 } 53 } 54 55 /** Enum class for UI Actions, used to specify whether we wish to log a click or a toggle. */ 56 enum class UIAction(val id: Int) { 57 ACTION_CLICK(HEALTH_CONNECT_UI_INTERACTION__ACTION__ACTION_CLICK), 58 ACTION_TOGGLE_ON(HEALTH_CONNECT_UI_INTERACTION__ACTION__ACTION_TOGGLE_ON), 59 ACTION_TOGGLE_OFF(HEALTH_CONNECT_UI_INTERACTION__ACTION__ACTION_TOGGLE_OFF), 60 ACTION_UNKNOWN(HEALTH_CONNECT_UI_INTERACTION__ACTION__ACTION_UNKNOWN) 61 } 62 63 /** Enum class for PageName. Each loggable fragment in the application should define a page name. */ 64 enum class PageName(val impressionId: Int, val interactionId: Int) { 65 HOME_PAGE( 66 HEALTH_CONNECT_UI_IMPRESSION__PAGE__HOME_PAGE, 67 HEALTH_CONNECT_UI_INTERACTION__PAGE__HOME_PAGE), 68 ONBOARDING_PAGE( 69 HEALTH_CONNECT_UI_IMPRESSION__PAGE__ONBOARDING_PAGE, 70 HEALTH_CONNECT_UI_INTERACTION__PAGE__ONBOARDING_PAGE), 71 RECENT_ACCESS_PAGE( 72 HEALTH_CONNECT_UI_IMPRESSION__PAGE__RECENT_ACCESS_PAGE, 73 HEALTH_CONNECT_UI_INTERACTION__PAGE__RECENT_ACCESS_PAGE), 74 APP_PERMISSIONS_PAGE( 75 HEALTH_CONNECT_UI_IMPRESSION__PAGE__APP_PERMISSIONS_PAGE, 76 HEALTH_CONNECT_UI_INTERACTION__PAGE__APP_PERMISSIONS_PAGE), 77 // TODO (b/270965648) not needed 78 APP_PERMISSIONS_EMPTY_STATE_PAGE( 79 HEALTH_CONNECT_UI_IMPRESSION__PAGE__APP_PERMISSIONS_EMPTY_STATE_PAGE, 80 HEALTH_CONNECT_UI_INTERACTION__PAGE__APP_PERMISSIONS_EMPTY_STATE_PAGE), 81 HELP_AND_FEEDBACK_PAGE( 82 HEALTH_CONNECT_UI_IMPRESSION__PAGE__HELP_AND_FEEDBACK_PAGE, 83 HEALTH_CONNECT_UI_INTERACTION__PAGE__HELP_AND_FEEDBACK_PAGE), 84 CATEGORIES_PAGE( 85 HEALTH_CONNECT_UI_IMPRESSION__PAGE__CATEGORIES_PAGE, 86 HEALTH_CONNECT_UI_INTERACTION__PAGE__CATEGORIES_PAGE), 87 AUTO_DELETE_PAGE( 88 HEALTH_CONNECT_UI_IMPRESSION__PAGE__AUTO_DELETE_PAGE, 89 HEALTH_CONNECT_UI_INTERACTION__PAGE__AUTO_DELETE_PAGE), 90 PERMISSION_TYPES_PAGE( 91 HEALTH_CONNECT_UI_IMPRESSION__PAGE__PERMISSION_TYPES_PAGE, 92 HEALTH_CONNECT_UI_INTERACTION__PAGE__PERMISSION_TYPES_PAGE), 93 DATA_ACCESS_PAGE( 94 HEALTH_CONNECT_UI_IMPRESSION__PAGE__DATA_ACCESS_PAGE, 95 HEALTH_CONNECT_UI_INTERACTION__PAGE__DATA_ACCESS_PAGE), 96 DATA_ENTRIES_PAGE( 97 HEALTH_CONNECT_UI_IMPRESSION__PAGE__DATA_ENTRIES_PAGE, 98 HEALTH_CONNECT_UI_INTERACTION__PAGE__DATA_ENTRIES_PAGE), 99 ENTRY_DETAILS_PAGE( 100 HEALTH_CONNECT_UI_IMPRESSION__PAGE__ENTRY_DETAILS_PAGE, 101 HEALTH_CONNECT_UI_INTERACTION__PAGE__ENTRY_DETAILS_PAGE), 102 APP_ACCESS_PAGE( 103 HEALTH_CONNECT_UI_IMPRESSION__PAGE__APP_ACCESS_PAGE, 104 HEALTH_CONNECT_UI_INTERACTION__PAGE__APP_ACCESS_PAGE), 105 UNITS_PAGE( 106 HEALTH_CONNECT_UI_IMPRESSION__PAGE__UNITS_PAGE, 107 HEALTH_CONNECT_UI_INTERACTION__PAGE__UNITS_PAGE), 108 ALL_CATEGORIES_PAGE( 109 HEALTH_CONNECT_UI_IMPRESSION__PAGE__ALL_CATEGORIES_PAGE, 110 HEALTH_CONNECT_UI_INTERACTION__PAGE__ALL_CATEGORIES_PAGE), 111 REQUEST_PERMISSIONS_PAGE( 112 HEALTH_CONNECT_UI_IMPRESSION__PAGE__REQUEST_PERMISSIONS_PAGE, 113 HEALTH_CONNECT_UI_INTERACTION__PAGE__REQUEST_PERMISSIONS_PAGE), 114 REQUEST_COMBINED_ADDITIONAL_PERMISSIONS_PAGE( 115 HEALTH_CONNECT_UI_IMPRESSION__PAGE__REQUEST_COMBINED_ADDITIONAL_PERMISSIONS_PAGE, 116 HEALTH_CONNECT_UI_INTERACTION__PAGE__REQUEST_COMBINED_ADDITIONAL_PERMISSIONS_PAGE), 117 REQUEST_BACKGROUND_READ_PERMISSION_PAGE( 118 HEALTH_CONNECT_UI_IMPRESSION__PAGE__REQUEST_BACKGROUND_READ_PERMISSION_PAGE, 119 HEALTH_CONNECT_UI_INTERACTION__PAGE__REQUEST_BACKGROUND_READ_PERMISSION_PAGE), 120 REQUEST_HISTORY_READ_PERMISSION_PAGE( 121 HEALTH_CONNECT_UI_IMPRESSION__PAGE__REQUEST_HISTORY_READ_PERMISSION_PAGE, 122 HEALTH_CONNECT_UI_INTERACTION__PAGE__REQUEST_HISTORY_READ_PERMISSION_PAGE), 123 MANAGE_PERMISSIONS_PAGE( 124 HEALTH_CONNECT_UI_IMPRESSION__PAGE__MANAGE_PERMISSIONS_PAGE, 125 HEALTH_CONNECT_UI_INTERACTION__PAGE__MANAGE_PERMISSIONS_PAGE), 126 SETTINGS_MANAGE_PERMISSIONS_PAGE( 127 HEALTH_CONNECT_UI_IMPRESSION__PAGE__SETTINGS_MANAGE_PERMISSIONS_PAGE, 128 HEALTH_CONNECT_UI_INTERACTION__PAGE__SETTINGS_MANAGE_PERMISSIONS_PAGE), 129 MIGRATION_IN_PROGRESS_PAGE( 130 HEALTH_CONNECT_UI_IMPRESSION__PAGE__MIGRATION_IN_PROGRESS_PAGE, 131 HEALTH_CONNECT_UI_INTERACTION__PAGE__MIGRATION_IN_PROGRESS_PAGE), 132 MIGRATION_APP_UPDATE_NEEDED_PAGE( 133 HEALTH_CONNECT_UI_IMPRESSION__PAGE__MIGRATION_APP_UPDATE_NEEDED_PAGE, 134 HEALTH_CONNECT_UI_INTERACTION__PAGE__MIGRATION_APP_UPDATE_NEEDED_PAGE), 135 MIGRATION_MODULE_UPDATE_NEEDED_PAGE( 136 HEALTH_CONNECT_UI_IMPRESSION__PAGE__MIGRATION_MODULE_UPDATE_NEEDED_PAGE, 137 HEALTH_CONNECT_UI_INTERACTION__PAGE__MIGRATION_MODULE_UPDATE_NEEDED_PAGE), 138 MIGRATION_PAUSED_PAGE( 139 HEALTH_CONNECT_UI_IMPRESSION__PAGE__MIGRATION_PAUSED_PAGE, 140 HEALTH_CONNECT_UI_INTERACTION__PAGE__MIGRATION_PAUSED_PAGE), 141 MANAGE_DATA_PAGE( 142 HEALTH_CONNECT_UI_IMPRESSION__PAGE__MANAGE_DATA_PAGE, 143 HEALTH_CONNECT_UI_INTERACTION__PAGE__MANAGE_DATA_PAGE), 144 DATA_SOURCES_PAGE( 145 HEALTH_CONNECT_UI_IMPRESSION__PAGE__DATA_SOURCES_PAGE, 146 HEALTH_CONNECT_UI_INTERACTION__PAGE__DATA_SOURCES_PAGE), 147 ADD_AN_APP_PAGE( 148 HEALTH_CONNECT_UI_IMPRESSION__PAGE__ADD_AN_APP_PAGE, 149 HEALTH_CONNECT_UI_INTERACTION__PAGE__ADD_AN_APP_PAGE), 150 ADDITIONAL_ACCESS_PAGE( 151 HEALTH_CONNECT_UI_IMPRESSION__PAGE__ADDITIONAL_ACCESS_PAGE, 152 HEALTH_CONNECT_UI_INTERACTION__PAGE__ADDITIONAL_ACCESS_PAGE), 153 DATA_RESTORE_IN_PROGRESS_PAGE( 154 HEALTH_CONNECT_UI_IMPRESSION__PAGE__DATA_RESTORE_IN_PROGRESS_PAGE, 155 HEALTH_CONNECT_UI_INTERACTION__PAGE__DATA_RESTORE_IN_PROGRESS_PAGE), 156 SEARCH_APPS_PAGE( 157 HEALTH_CONNECT_UI_IMPRESSION__PAGE__SEARCH_APPS_PAGE, 158 HEALTH_CONNECT_UI_INTERACTION__PAGE__SEARCH_APPS_PAGE), 159 UNKNOWN_PAGE( 160 HEALTH_CONNECT_UI_IMPRESSION__PAGE__PAGE_UNKNOWN, 161 HEALTH_CONNECT_UI_INTERACTION__PAGE__PAGE_UNKNOWN) 162 } 163 164 /** Common interface for loggable elements. */ 165 interface ElementName { 166 val impressionId: Int 167 val interactionId: Int 168 } 169 170 /** Loggable elements in the Home page. */ 171 enum class HomePageElement(override val impressionId: Int, override val interactionId: Int) : 172 ElementName { 173 APP_PERMISSIONS_BUTTON( 174 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__APP_PERMISSIONS_BUTTON, 175 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__APP_PERMISSIONS_BUTTON), 176 DATA_AND_ACCESS_BUTTON( 177 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_AND_ACCESS_BUTTON, 178 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_AND_ACCESS_BUTTON), 179 SEE_ALL_RECENT_ACCESS_BUTTON( 180 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SEE_ALL_RECENT_ACCESS_BUTTON, 181 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SEE_ALL_RECENT_ACCESS_BUTTON), 182 MANAGE_DATA_BUTTON( 183 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MANAGE_DATA_BUTTON, 184 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MANAGE_DATA_BUTTON), 185 } 186 187 /** Loggable elements in the Onboarding page. */ 188 enum class OnboardingElement(override val impressionId: Int, override val interactionId: Int) : 189 ElementName { 190 ONBOARDING_COMPLETED_BUTTON( 191 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ONBOARDING_COMPLETED_BUTTON, 192 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ONBOARDING_COMPLETED_BUTTON), 193 ONBOARDING_GO_BACK_BUTTON( 194 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ONBOARDING_GO_BACK_BUTTON, 195 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ONBOARDING_GO_BACK_BUTTON), 196 } 197 198 /** Loggable elements in the Recent Access page. */ 199 enum class RecentAccessElement(override val impressionId: Int, override val interactionId: Int) : 200 ElementName { 201 RECENT_ACCESS_ENTRY_BUTTON( 202 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__RECENT_ACCESS_ENTRY, 203 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__RECENT_ACCESS_ENTRY), 204 MANAGE_PERMISSIONS_FAB( 205 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MANAGE_PERMISSIONS_FLOATING_BUTTON, 206 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MANAGE_PERMISSIONS_FLOATING_BUTTON), 207 } 208 209 /** Loggable elements in the Manage Data page. */ 210 enum class ManageDataElement(override val impressionId: Int, override val interactionId: Int) : 211 ElementName { 212 AUTO_DELETE_BUTTON( 213 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_BUTTON, 214 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_BUTTON), 215 BACKUP_BUTTON( 216 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__BACKUP_DATA_BUTTON, 217 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__BACKUP_DATA_BUTTON), 218 DATA_SOURCES_AND_PRIORITY_BUTTON( 219 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_SOURCES_AND_PRIORITY_BUTTON, 220 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_SOURCES_AND_PRIORITY_BUTTON), 221 SET_UNITS_BUTTON( 222 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SET_UNITS_BUTTON, 223 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SET_UNITS_BUTTON) 224 } 225 226 /** Loggable elements in the Category and All categories pages. */ 227 enum class CategoriesElement(override val impressionId: Int, override val interactionId: Int) : 228 ElementName { 229 CATEGORY_BUTTON( 230 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CATEGORY_BUTTON, 231 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CATEGORY_BUTTON), 232 SEE_ALL_CATEGORIES_BUTTON( 233 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SEE_ALL_CATEGORIES_BUTTON, 234 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SEE_ALL_CATEGORIES_BUTTON), 235 EXPORT_DATA_BUTTON( 236 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXPORT_DATA_BUTTON, 237 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXPORT_DATA_BUTTON), 238 AUTO_DELETE_BUTTON( 239 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_BUTTON, 240 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_BUTTON), 241 DELETE_ALL_DATA_BUTTON( 242 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETE_ALL_DATA_BUTTON, 243 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETE_ALL_DATA_BUTTON), 244 } 245 246 /** Loggable elements in the App Permissions and Settings App Permission pages. */ 247 enum class AppPermissionsElement(override val impressionId: Int, override val interactionId: Int) : 248 ElementName { 249 SEARCH_BUTTON( 250 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SEARCH_BUTTON, 251 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SEARCH_BUTTON), 252 CONNECTED_APP_BUTTON( 253 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CONNECTED_APP_BUTTON, 254 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CONNECTED_APP_BUTTON), 255 NOT_CONNECTED_APP_BUTTON( 256 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__NOT_CONNECTED_APP_BUTTON, 257 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__NOT_CONNECTED_APP_BUTTON), 258 INACTIVE_APP_BUTTON( 259 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__INACTIVE_APP_BUTTON, 260 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__INACTIVE_APP_BUTTON), 261 INACTIVE_APP_DELETE_BUTTON( 262 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__INACTIVE_APP_DELETE_BUTTON, 263 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__INACTIVE_APP_DELETE_BUTTON), 264 NEEDS_UPDATE_APP_BUTTON( 265 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_APP_UPDATE_APP_BUTTON, 266 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_APP_UPDATE_APP_BUTTON), 267 REMOVE_ALL_APPS_PERMISSIONS_BUTTON( 268 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__REMOVE_ALL_APPS_PERMISSIONS_BUTTON, 269 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__REMOVE_ALL_APPS_PERMISSIONS_BUTTON), 270 HELP_AND_FEEDBACK_BUTTON( 271 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__HELP_AND_FEEDBACK_BUTTON, 272 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__HELP_AND_FEEDBACK_BUTTON), 273 CHECK_FOR_UPDATES_BUTTON( 274 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CHECK_FOR_UPDATES_BUTTON, 275 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CHECK_FOR_UPDATES_BUTTON), 276 SEE_ALL_COMPATIBLE_APPS_BUTTON( 277 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SEE_ALL_COMPATIBLE_APPS_BUTTON, 278 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SEE_ALL_COMPATIBLE_APPS_BUTTON), 279 SEND_FEEDBACK_BUTTON( 280 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SEND_FEEDBACK_BUTTON, 281 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SEND_FEEDBACK_BUTTON), 282 } 283 284 /** Loggable elements in the App Access page. */ 285 enum class AppAccessElement(override val impressionId: Int, override val interactionId: Int) : 286 ElementName { 287 ALLOW_ALL_PERMISSIONS_SWITCH_ACTIVE( 288 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ALLOW_ALL_PERMISSIONS_SWITCH_ACTIVE, 289 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ALLOW_ALL_PERMISSIONS_SWITCH_ACTIVE), 290 ALLOW_ALL_PERMISSIONS_SWITCH_INACTIVE( 291 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ALLOW_ALL_PERMISSIONS_SWITCH_INACTIVE, 292 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ALLOW_ALL_PERMISSIONS_SWITCH_INACTIVE), 293 PERMISSION_SWITCH_ACTIVE( 294 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PERMISSION_SWITCH_ACTIVE, 295 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PERMISSION_SWITCH_ACTIVE), 296 PERMISSION_SWITCH_INACTIVE( 297 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PERMISSION_SWITCH_INACTIVE, 298 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PERMISSION_SWITCH_INACTIVE), 299 DELETE_APP_DATA_BUTTON( 300 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETE_APP_DATA_BUTTON, 301 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETE_APP_DATA_BUTTON), 302 PRIVACY_POLICY_LINK( 303 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PRIVACY_POLICY_LINK, 304 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PRIVACY_POLICY_LINK), 305 ADDITIONAL_ACCESS_BUTTON( 306 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ADDITIONAL_ACCESS_BUTTON, 307 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ADDITIONAL_ACCESS_BUTTON), 308 } 309 310 /** Loggable elements in the Permission types page. */ 311 enum class PermissionTypesElement(override val impressionId: Int, override val interactionId: Int) : 312 ElementName { 313 APP_FILTER_BUTTON( 314 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__APP_FILTER_BUTTON, 315 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__APP_FILTER_BUTTON), 316 PERMISSION_TYPE_BUTTON( 317 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PERMISSION_TYPE_BUTTON, 318 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PERMISSION_TYPE_BUTTON), 319 SET_APP_PRIORITY_BUTTON( 320 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SET_APP_PRIORITY_BUTTON, 321 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SET_APP_PRIORITY_BUTTON), 322 DELETE_CATEGORY_DATA_BUTTON( 323 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETE_CATEGORY_DATA_BUTTON, 324 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETE_CATEGORY_DATA_BUTTON), 325 326 // App priority dialog 327 // TODO (b/270966817) 328 SET_APP_PRIORITY_DIALOG_CONTAINER( 329 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ELEMENT_UNKNOWN, 330 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ELEMENT_UNKNOWN), 331 SET_APP_PRIORITY_DIALOG_CANCEL_BUTTON( 332 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ELEMENT_UNKNOWN, 333 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ELEMENT_UNKNOWN), 334 SET_APP_PRIORITY_DIALOG_SAVE_BUTTON( 335 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ELEMENT_UNKNOWN, 336 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ELEMENT_UNKNOWN), 337 338 // New app priority 339 DATA_SOURCES_AND_PRIORITY_BUTTON( 340 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_SOURCES_AND_PRIORITY_BUTTON, 341 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_SOURCES_AND_PRIORITY_BUTTON), 342 } 343 344 /** Loggable elements in the Data access page. */ 345 enum class DataAccessElement(override val impressionId: Int, override val interactionId: Int) : 346 ElementName { 347 DATA_ACCESS_APP_BUTTON( 348 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_ACCESS_APP_BUTTON, 349 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_ACCESS_APP_BUTTON), 350 DATA_ACCESS_INACTIVE_APP_BUTTON( 351 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_ACCESS_INACTIVE_APP_BUTTON, 352 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_ACCESS_INACTIVE_APP_BUTTON), 353 SEE_ALL_ENTRIES_BUTTON( 354 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SEE_ALL_ENTRIES_BUTTON, 355 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SEE_ALL_ENTRIES_BUTTON), 356 DELETE_THIS_DATA_BUTTON( 357 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETE_THIS_DATA_BUTTON, 358 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETE_THIS_DATA_BUTTON), 359 } 360 361 /** Loggable elements in the Data entries page. */ 362 enum class DataEntriesElement(override val impressionId: Int, override val interactionId: Int) : 363 ElementName { 364 AGGREGATION_DATA_VIEW( 365 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AGGREGATION_DATA_VIEW, 366 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AGGREGATION_DATA_VIEW), 367 DATA_ENTRY_VIEW( 368 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_ENTRY_VIEW, 369 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_ENTRY_VIEW), 370 DATA_ENTRY_DELETE_BUTTON( 371 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_ENTRY_DELETE_BUTTON, 372 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_ENTRY_DELETE_BUTTON), 373 EXERCISE_SESSION_ENTRY_BUTTON( 374 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_SESSION_ENTRY_BUTTON, 375 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_SESSION_ENTRY_BUTTON), 376 EXERCISE_SESSION_MAP_VIEW( 377 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_SESSION_MAP_VIEW, 378 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_SESSION_MAP_VIEW), 379 SLEEP_SESSION_ENTRY_BUTTON( 380 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SLEEP_SESSION_ENTRY_BUTTON, 381 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SLEEP_SESSION_ENTRY_BUTTON), 382 NEXT_DAY_BUTTON( 383 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__NEXT_DAY_BUTTON, 384 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__NEXT_DAY_BUTTON), 385 PREVIOUS_DAY_BUTTON( 386 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PREVIOUS_DAY_BUTTON, 387 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PREVIOUS_DAY_BUTTON), 388 SELECT_DATE_BUTTON( 389 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SELECT_DATE_BUTTON, 390 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SELECT_DATE_BUTTON), 391 PLANNED_EXERCISE_SESSION_ENTRY_BUTTON( 392 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PLANNED_EXERCISE_SESSION_ENTRY_BUTTON, 393 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PLANNED_EXERCISE_SESSION_ENTRY_BUTTON), 394 } 395 396 /** Loggable elements in the Entry details page. */ 397 enum class EntryDetailsElement(override val impressionId: Int, override val interactionId: Int) : 398 ElementName { 399 SESSION_DETAIL_ENTRY_VIEW( 400 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SESSION_DETAIL_ENTRY_VIEW, 401 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SESSION_DETAIL_ENTRY_VIEW), 402 SESSION_DETAIL_HEADER_VIEW( 403 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__SESSION_DETAIL_HEADER_VIEW, 404 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__SESSION_DETAIL_HEADER_VIEW), 405 REVERSE_SESSION_DETAIL_ENTRY_VIEW( 406 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__REVERSE_SESSION_DETAIL_ENTRY_VIEW, 407 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__REVERSE_SESSION_DETAIL_ENTRY_VIEW), 408 FORMATTED_SECTION_TITLE_VIEW( 409 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__FORMATTED_SECTION_TITLE_VIEW, 410 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__FORMATTED_SECTION_TITLE_VIEW), 411 FORMATTED_SECTION_CONTENT_VIEW( 412 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__FORMATTED_SECTION_CONTENT_VIEW, 413 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__FORMATTED_SECTION_CONTENT_VIEW), 414 PLANNED_EXERCISE_BLOCK_ENTRY_VIEW( 415 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PLANNED_EXERCISE_BLOCK_ENTRY_VIEW, 416 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PLANNED_EXERCISE_BLOCK_ENTRY_VIEW), 417 PLANNED_EXERCISE_STEP_ENTRY_VIEW( 418 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PLANNED_EXERCISE_STEP_ENTRY_VIEW, 419 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PLANNED_EXERCISE_STEP_ENTRY_VIEW), 420 EXERCISE_PERFORMANCE_GOAL_ENTRY_VIEW( 421 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_PERFORMANCE_GOAL_ENTRY_VIEW, 422 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_PERFORMANCE_GOAL_ENTRY_VIEW), 423 } 424 425 /** Loggable elements in the Units page. */ 426 enum class UnitsElement(override val impressionId: Int, override val interactionId: Int) : 427 ElementName { 428 // Units 429 CHANGE_UNITS_HEIGHT_BUTTON( 430 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CHANGE_UNITS_HEIGHT_BUTTON, 431 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CHANGE_UNITS_HEIGHT_BUTTON), 432 CHANGE_UNITS_WEIGHT_BUTTON( 433 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CHANGE_UNITS_WEIGHT_BUTTON, 434 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CHANGE_UNITS_WEIGHT_BUTTON), 435 CHANGE_UNITS_DISTANCE_BUTTON( 436 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CHANGE_UNITS_DISTANCE_BUTTON, 437 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CHANGE_UNITS_DISTANCE_BUTTON), 438 CHANGE_UNITS_ENERGY_BUTTON( 439 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CHANGE_UNITS_ENERGY_BUTTON, 440 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CHANGE_UNITS_ENERGY_BUTTON), 441 CHANGE_UNITS_TEMPERATURE_BUTTON( 442 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CHANGE_UNITS_TEMPERATURE_BUTTON, 443 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CHANGE_UNITS_TEMPERATURE_BUTTON), 444 CANCEL_BUTTON( 445 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CANCEL_BUTTON, 446 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CANCEL_BUTTON), 447 // Height 448 CENTIMETERS_BUTTON( 449 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CENTIMETERS_BUTTON, 450 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CENTIMETERS_BUTTON), 451 FEET_AND_INCHES_BUTTON( 452 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__FEET_AND_INCHES_BUTTON, 453 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__FEET_AND_INCHES_BUTTON), 454 // Weight 455 KILOGRAMS_BUTTON( 456 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__KILOGRAMS_BUTTON, 457 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__KILOGRAMS_BUTTON), 458 POUNDS_BUTTON( 459 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__POUNDS_BUTTON, 460 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__POUNDS_BUTTON), 461 STONES_BUTTON( 462 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__STONES_BUTTON, 463 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__STONES_BUTTON), 464 // Distance 465 KILOMETERS_BUTTON( 466 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__KILOMETERS_BUTTON, 467 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__KILOMETERS_BUTTON), 468 MILES_BUTTON( 469 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MILES_BUTTON, 470 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MILES_BUTTON), 471 // Energy 472 CALORIES_BUTTON( 473 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CALORIES_BUTTON, 474 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CALORIES_BUTTON), 475 KILOJOULES_BUTTON( 476 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__KILOJOULES_BUTTON, 477 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__KILOJOULES_BUTTON), 478 // Temperature 479 CELSIUS_BUTTON( 480 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CELSIUS_BUTTON, 481 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CELSIUS_BUTTON), 482 FAHRENHEIT_BUTTON( 483 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__FAHRENHEIT_BUTTON, 484 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__FAHRENHEIT_BUTTON), 485 KELVIN_BUTTON( 486 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__KELVIN_BUTTON, 487 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__KELVIN_BUTTON), 488 } 489 490 /** Loggable elements in the Auto delete page. */ 491 enum class AutoDeleteElement(override val impressionId: Int, override val interactionId: Int) : 492 ElementName { 493 AUTO_DELETE_3_MONTHS_BUTTON( 494 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_THREE_MONTHS_BUTTON, 495 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_THREE_MONTHS_BUTTON), 496 AUTO_DELETE_18_MONTHS_BUTTON( 497 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_EIGHTEEN_MONTHS_BUTTON, 498 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_EIGHTEEN_MONTHS_BUTTON), 499 AUTO_DELETE_NEVER_BUTTON( 500 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_NEVER_BUTTON, 501 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_NEVER_BUTTON), 502 503 // Auto-delete dialog 504 AUTO_DELETE_DIALOG_CONTAINER( 505 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_DIALOG_CONTAINER, 506 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_DIALOG_CONTAINER), 507 AUTO_DELETE_DIALOG_CANCEL_BUTTON( 508 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_DIALOG_CANCEL_BUTTON, 509 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_DIALOG_CANCEL_BUTTON), 510 AUTO_DELETE_DIALOG_CONFIRM_BUTTON( 511 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_DIALOG_CONFIRM_BUTTON, 512 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_DIALOG_CONFIRM_BUTTON), 513 AUTO_DELETE_CONFIRMATION_DIALOG_CONTAINER( 514 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_CONFIRMATION_DIALOG_CONTAINER, 515 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_CONFIRMATION_DIALOG_CONTAINER, 516 ), 517 AUTO_DELETE_CONFIRMATION_DIALOG_DONE_BUTTON( 518 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__AUTO_DELETE_CONFIRMATION_DIALOG_DONE_BUTTON, 519 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__AUTO_DELETE_CONFIRMATION_DIALOG_DONE_BUTTON), 520 } 521 522 /** Loggable elements in the Disconnect app dialog. */ 523 enum class DisconnectAppDialogElement( 524 override val impressionId: Int, 525 override val interactionId: Int 526 ) : ElementName { 527 DISCONNECT_APP_DIALOG_CONTAINER( 528 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISCONNECT_APP_DIALOG_CONTAINER, 529 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISCONNECT_APP_DIALOG_CONTAINER), 530 DISCONNECT_APP_DIALOG_CANCEL_BUTTON( 531 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISCONNECT_APP_DIALOG_CANCEL_BUTTON, 532 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISCONNECT_APP_DIALOG_CANCEL_BUTTON), 533 DISCONNECT_APP_DIALOG_CONFIRM_BUTTON( 534 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISCONNECT_APP_DIALOG_CONFIRM_BUTTON, 535 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISCONNECT_APP_DIALOG_CONFIRM_BUTTON), 536 DISCONNECT_APP_DIALOG_DELETE_CHECKBOX( 537 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISCONNECT_APP_DIALOG_DELETE_CHECKBOX, 538 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISCONNECT_APP_DIALOG_DELETE_CHECKBOX), 539 } 540 541 /** Loggable elements in the Disconnect all apps dialog. */ 542 enum class DisconnectAllAppsDialogElement( 543 override val impressionId: Int, 544 override val interactionId: Int 545 ) : ElementName { 546 DISCONNECT_ALL_APPS_DIALOG_CONTAINER( 547 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISCONNECT_ALL_APPS_DIALOG_CONTAINER, 548 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISCONNECT_ALL_APPS_DIALOG_CONTAINER), 549 DISCONNECT_ALL_APPS_DIALOG_CANCEL_BUTTON( 550 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISCONNECT_ALL_APPS_DIALOG_CANCEL_BUTTON, 551 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISCONNECT_ALL_APPS_DIALOG_CANCEL_BUTTON), 552 DISCONNECT_ALL_APPS_DIALOG_REMOVE_ALL_BUTTON( 553 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISCONNECT_ALL_APPS_DIALOG_REMOVE_ALL_BUTTON, 554 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISCONNECT_ALL_APPS_DIALOG_REMOVE_ALL_BUTTON), 555 } 556 557 /** Loggable elements in the Deletion dialog time range picker dialog. */ 558 enum class DeletionDialogTimeRangeElement( 559 override val impressionId: Int, 560 override val interactionId: Int 561 ) : ElementName { 562 // Deletion time range dialog 563 DELETION_DIALOG_TIME_RANGE_CONTAINER( 564 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_TIME_RANGE_CONTAINER, 565 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_TIME_RANGE_CONTAINER), 566 DELETION_DIALOG_TIME_RANGE_LAST_24_HOURS_BUTTON( 567 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_TIME_RANGE_LAST_24_HOURS_BUTTON, 568 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_TIME_RANGE_LAST_24_HOURS_BUTTON), 569 DELETION_DIALOG_TIME_RANGE_LAST_7_DAYS_BUTTON( 570 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_TIME_RANGE_LAST_7_DAYS_BUTTON, 571 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_TIME_RANGE_LAST_7_DAYS_BUTTON), 572 DELETION_DIALOG_TIME_RANGE_LAST_30_DAYS_BUTTON( 573 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_TIME_RANGE_LAST_30_DAYS_BUTTON, 574 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_TIME_RANGE_LAST_30_DAYS_BUTTON), 575 DELETION_DIALOG_TIME_RANGE_ALL_DATA_BUTTON( 576 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_TIME_RANGE_ALL_DATA_BUTTON, 577 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_TIME_RANGE_ALL_DATA_BUTTON), 578 DELETION_DIALOG_TIME_RANGE_CANCEL_BUTTON( 579 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_TIME_RANGE_CANCEL_BUTTON, 580 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_TIME_RANGE_CANCEL_BUTTON), 581 DELETION_DIALOG_TIME_RANGE_NEXT_BUTTON( 582 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_TIME_RANGE_NEXT_BUTTON, 583 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_TIME_RANGE_NEXT_BUTTON, 584 ), 585 } 586 587 /** Loggable elements in the Deletion dialog confirmation dialog. */ 588 enum class DeletionDialogConfirmationElement( 589 override val impressionId: Int, 590 override val interactionId: Int 591 ) : ElementName { 592 DELETION_DIALOG_CONFIRMATION_CONTAINER( 593 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_CONFIRMATION_CONTAINER, 594 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_CONFIRMATION_CONTAINER), 595 DELETION_DIALOG_CONFIRMATION_GO_BACK_BUTTON( 596 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_CONFIRMATION_GO_BACK_BUTTON, 597 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_CONFIRMATION_GO_BACK_BUTTON), 598 DELETION_DIALOG_CONFIRMATION_CANCEL_BUTTON( 599 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_CONFIRMATION_CANCEL_BUTTON, 600 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_CONFIRMATION_CANCEL_BUTTON), 601 DELETION_DIALOG_CONFIRMATION_DELETE_BUTTON( 602 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_CONFIRMATION_DELETE_BUTTON, 603 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_CONFIRMATION_DELETE_BUTTON), 604 DELETION_DIALOG_CONFIRMATION_REMOVE_APP_PERMISSIONS_BUTTON( 605 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_CONFIRMATION_REMOVE_APP_PERMISSIONS_BUTTON, 606 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_CONFIRMATION_REMOVE_APP_PERMISSIONS_BUTTON), 607 } 608 609 /** Loggable elements in the Progress dialog. */ 610 enum class ProgressDialogElement(override val impressionId: Int, override val interactionId: Int) : 611 ElementName { 612 DELETION_DIALOG_IN_PROGRESS_CONTAINER( 613 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_IN_PROGRESS_CONTAINER, 614 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_IN_PROGRESS_CONTAINER), 615 } 616 617 /** Loggable elements in the Success dialog. */ 618 enum class SuccessDialogElement(override val impressionId: Int, override val interactionId: Int) : 619 ElementName { 620 DELETION_DIALOG_SUCCESS_CONTAINER( 621 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_SUCCESS_CONTAINER, 622 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_SUCCESS_CONTAINER), 623 DELETION_DIALOG_SUCCESS_DONE_BUTTON( 624 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_SUCCESS_DONE_BUTTON, 625 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_SUCCESS_DONE_BUTTON), 626 } 627 628 /** Loggable elements in the Failed dialog. */ 629 enum class FailedDialogElement(override val impressionId: Int, override val interactionId: Int) : 630 ElementName { 631 DELETION_DIALOG_ERROR_CONTAINER( 632 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_ERROR_CONTAINER, 633 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_ERROR_CONTAINER), 634 DELETION_DIALOG_ERROR_CLOSE_BUTTON( 635 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_ERROR_CLOSE_BUTTON, 636 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_ERROR_CLOSE_BUTTON), 637 DELETION_DIALOG_ERROR_TRY_AGAIN_BUTTON( 638 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DELETION_DIALOG_ERROR_TRY_AGAIN_BUTTON, 639 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DELETION_DIALOG_ERROR_TRY_AGAIN_BUTTON), 640 } 641 642 /** Loggable elements in the Request and Manage permissions pages. */ 643 enum class PermissionsElement(override val impressionId: Int, override val interactionId: Int) : 644 ElementName { 645 ALLOW_PERMISSIONS_BUTTON( 646 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ALLOW_PERMISSIONS_BUTTON, 647 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ALLOW_PERMISSIONS_BUTTON), 648 CANCEL_PERMISSIONS_BUTTON( 649 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CANCEL_PERMISSIONS_BUTTON, 650 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CANCEL_PERMISSIONS_BUTTON), 651 ALLOW_ALL_SWITCH( 652 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ALLOW_ALL_SWITCH, 653 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ALLOW_ALL_SWITCH), 654 PERMISSION_SWITCH( 655 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__PERMISSION_SWITCH, 656 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__PERMISSION_SWITCH), 657 APP_RATIONALE_LINK( 658 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__APP_RATIONALE_LINK, 659 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__APP_RATIONALE_LINK), 660 } 661 662 /** Loggable elements in the Request Combined Additional Permissions page. */ 663 enum class RequestCombinedAdditionalPermissionsElement( 664 override val impressionId: Int, 665 override val interactionId: Int 666 ) : ElementName { 667 ALLOW_COMBINED_ADDITIONAL_PERMISSIONS_BUTTON( 668 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ALLOW_COMBINED_ADDITIONAL_PERMISSIONS_BUTTON, 669 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ALLOW_COMBINED_ADDITIONAL_PERMISSIONS_BUTTON), 670 CANCEL_COMBINED_ADDITIONAL_PERMISSIONS_BUTTON( 671 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CANCEL_COMBINED_ADDITIONAL_PERMISSIONS_BUTTON, 672 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CANCEL_COMBINED_ADDITIONAL_PERMISSIONS_BUTTON), 673 BACKGROUND_READ_BUTTON( 674 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__BACKGROUND_READ_BUTTON, 675 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__BACKGROUND_READ_BUTTON), 676 HISTORY_READ_BUTTON( 677 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__HISTORY_READ_BUTTON, 678 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__HISTORY_READ_BUTTON) 679 } 680 681 /** Loggable elements in the Request Background Read permission page. */ 682 enum class RequestBackgroundReadPermissionElement( 683 override val impressionId: Int, 684 override val interactionId: Int 685 ) : ElementName { 686 ALLOW_BACKGROUND_READ_BUTTON( 687 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ALLOW_BACKGROUND_READ_BUTTON, 688 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ALLOW_BACKGROUND_READ_BUTTON), 689 CANCEL_BACKGROUND_READ_BUTTON( 690 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CANCEL_BACKGROUND_READ_BUTTON, 691 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CANCEL_BACKGROUND_READ_BUTTON) 692 } 693 694 /** Loggable elements in the Request History Read permission page. */ 695 enum class RequestHistoryReadPermissionElement( 696 override val impressionId: Int, 697 override val interactionId: Int 698 ) : ElementName { 699 ALLOW_HISTORY_READ_BUTTON( 700 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ALLOW_HISTORY_READ_BUTTON, 701 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ALLOW_HISTORY_READ_BUTTON), 702 CANCEL_HISTORY_READ_BUTTON( 703 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__CANCEL_HISTORY_READ_BUTTON, 704 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__CANCEL_HISTORY_READ_BUTTON) 705 } 706 707 enum class AdditionalAccessElement( 708 override val impressionId: Int, 709 override val interactionId: Int 710 ) : ElementName { 711 EXERCISE_ROUTES_BUTTON( 712 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTES_BUTTON, 713 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTES_BUTTON), 714 HISTORY_READ_BUTTON( 715 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ALLOW_HISTORY_READ_BUTTON, 716 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ALLOW_HISTORY_READ_BUTTON), 717 BACKGROUND_READ_BUTTON( 718 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__BACKGROUND_READ_BUTTON, 719 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__BACKGROUND_READ_BUTTON), 720 EXERCISE_ROUTES_DIALOG_CONTAINER( 721 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTES_DIALOG_CONTAINER, 722 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTES_DIALOG_CONTAINER), 723 EXERCISE_ROUTES_ALLOW_ALL_BUTTON( 724 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTES_DIALOG_ALLOW_ALL_BUTTON, 725 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTES_DIALOG_ALLOW_ALL_BUTTON), 726 EXERCISE_ROUTES_ASK_BUTTON( 727 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTES_DIALOG_ASK_BUTTON, 728 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTES_DIALOG_ASK_BUTTON), 729 EXERCISE_ROUTES_DIALOG_DENY_BUTTON( 730 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTES_DIALOG_DENY_BUTTON, 731 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTES_DIALOG_DENY_BUTTON), 732 ENABLE_EXERCISE_PERMISSION_DIALOG_CONTAINER( 733 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ENABLE_EXERCISE_PERMISSION_DIALOG_CONTAINER, 734 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ENABLE_EXERCISE_PERMISSION_DIALOG_CONTAINER), 735 ENABLE_EXERCISE_PERMISSION_DIALOG_POSITIVE_BUTTON( 736 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ENABLE_EXERCISE_PERMISSION_DIALOG_POSITIVE_BUTTON, 737 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ENABLE_EXERCISE_PERMISSION_DIALOG_POSITIVE_BUTTON), 738 ENABLE_EXERCISE_PERMISSION_DIALOG_NEGATIVE_BUTTON( 739 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ENABLE_EXERCISE_PERMISSION_DIALOG_NEGATIVE_BUTTON, 740 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ENABLE_EXERCISE_PERMISSION_DIALOG_NEGATIVE_BUTTON), 741 DISABLE_EXERCISE_PERMISSION_DIALOG_CONTAINER( 742 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISABLE_EXERCISE_PERMISSION_DIALOG_CONTAINER, 743 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISABLE_EXERCISE_PERMISSION_DIALOG_CONTAINER), 744 DISABLE_EXERCISE_PERMISSION_DIALOG_POSITIVE_BUTTON( 745 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISABLE_EXERCISE_PERMISSION_DIALOG_POSITIVE_BUTTON, 746 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISABLE_EXERCISE_PERMISSION_DIALOG_POSITIVE_BUTTON), 747 DISABLE_EXERCISE_PERMISSION_DIALOG_NEGATIVE_BUTTON( 748 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DISABLE_EXERCISE_PERMISSION_DIALOG_NEGATIVE_BUTTON, 749 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DISABLE_EXERCISE_PERMISSION_DIALOG_NEGATIVE_BUTTON) 750 } 751 752 /** Loggable elements in the toolbar. */ 753 enum class ToolbarElement(override val impressionId: Int, override val interactionId: Int) : 754 ElementName { 755 // Represents main menu 756 TOOLBAR_SETTINGS_BUTTON( 757 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__TOOLBAR_SETTINGS_BUTTON, 758 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__TOOLBAR_SETTINGS_BUTTON), 759 TOOLBAR_HELP_BUTTON( 760 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__TOOLBAR_HELP_BUTTON, 761 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__TOOLBAR_HELP_BUTTON), 762 // TODO update 763 TOOLBAR_UNITS_BUTTON( 764 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ELEMENT_UNKNOWN, 765 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ELEMENT_UNKNOWN), 766 // TODO not sure if this will be needed 767 TOOLBAR_OPEN_SOURCE_LICENSE_BUTTON( 768 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__TOOLBAR_OPEN_SOURCE_LICENSE_BUTTON, 769 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__TOOLBAR_OPEN_SOURCE_LICENSE_BUTTON), 770 } 771 772 /** Loggable elements in the Entry details page. */ 773 enum class MigrationElement(override val impressionId: Int, override val interactionId: Int) : 774 ElementName { 775 MIGRATION_UPDATE_NEEDED_UPDATE_BUTTON( 776 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_UPDATE_NEEDED_UPDATE_BUTTON, 777 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_UPDATE_NEEDED_UPDATE_BUTTON), 778 MIGRATION_UPDATE_NEEDED_CANCEL_BUTTON( 779 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_UPDATE_NEEDED_CANCEL_BUTTON, 780 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_UPDATE_NEEDED_CANCEL_BUTTON), 781 MIGRATION_PAUSED_CONTINUE_BUTTON( 782 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_PAUSED_CONTINUE_BUTTON, 783 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_PAUSED_CONTINUE_BUTTON), 784 MIGRATION_DONE_DIALOG_CONTAINER( 785 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_DONE_DIALOG_CONTAINER, 786 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_DONE_DIALOG_CONTAINER), 787 MIGRATION_DONE_DIALOG_BUTTON( 788 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_DONE_DIALOG_BUTTON, 789 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_DONE_DIALOG_BUTTON), 790 MIGRATION_IN_PROGRESS_DIALOG_CONTAINER( 791 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_IN_PROGRESS_DIALOG_CONTAINER, 792 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_IN_PROGRESS_DIALOG_CONTAINER), 793 MIGRATION_IN_PROGRESS_DIALOG_BUTTON( 794 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_IN_PROGRESS_DIALOG_BUTTON, 795 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_IN_PROGRESS_DIALOG_BUTTON), 796 MIGRATION_PENDING_DIALOG_CONTAINER( 797 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_PENDING_DIALOG_CONTAINER, 798 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_PENDING_DIALOG_CONTAINER), 799 MIGRATION_PENDING_DIALOG_CANCEL_BUTTON( 800 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_PENDING_DIALOG_CANCEL_BUTTON, 801 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_PENDING_DIALOG_CANCEL_BUTTON), 802 MIGRATION_PENDING_DIALOG_CONTINUE_BUTTON( 803 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_PENDING_DIALOG_CONTINUE_BUTTON, 804 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_PENDING_DIALOG_CONTINUE_BUTTON), 805 MIGRATION_NOT_COMPLETE_DIALOG_CONTAINER( 806 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_NOT_COMPLETE_DIALOG_CONTAINER, 807 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_NOT_COMPLETE_DIALOG_CONTAINER), 808 MIGRATION_NOT_COMPLETE_DIALOG_BUTTON( 809 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_NOT_COMPLETE_DIALOG_BUTTON, 810 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_NOT_COMPLETE_DIALOG_BUTTON), 811 MIGRATION_RESUME_BANNER( 812 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_RESUME_BANNER, 813 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_RESUME_BANNER), 814 MIGRATION_RESUME_BANNER_BUTTON( 815 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_RESUME_BANNER_BUTTON, 816 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_RESUME_BANNER_BUTTON), 817 MIGRATION_APP_UPDATE_BANNER( 818 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_APP_UPDATE_BANNER, 819 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_APP_UPDATE_BANNER), 820 MIGRATION_APP_UPDATE_BUTTON( 821 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_APP_UPDATE_BUTTON, 822 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_APP_UPDATE_BUTTON), 823 MIGRATION_APP_UPDATE_LEARN_MORE_BUTTON( 824 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_APP_UPDATE_LEARN_MORE_BUTTON, 825 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_APP_UPDATE_LEARN_MORE_BUTTON), 826 MIGRATION_APP_UPDATE_BANNER_DISMISS_BUTTON( 827 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__MIGRATION_APP_UPDATE_DISMISS_BUTTON, 828 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__MIGRATION_APP_UPDATE_DISMISS_BUTTON) 829 } 830 831 enum class DataRestoreElement(override val impressionId: Int, override val interactionId: Int) : 832 ElementName { 833 RESTORE_IN_PROGRESS_DIALOG_CONTAINER( 834 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_RESTORE_IN_PROGRESS_DIALOG_CONTAINER, 835 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_RESTORE_IN_PROGRESS_DIALOG_CONTAINER), 836 RESTORE_IN_PROGRESS_DIALOG_BUTTON( 837 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_RESTORE_IN_PROGRESS_DIALOG_BUTTON, 838 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_RESTORE_IN_PROGRESS_DIALOG_BUTTON), 839 RESTORE_PENDING_BANNER( 840 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_RESTORE_UPDATE_NEEDED_BANNER, 841 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_RESTORE_UPDATE_NEEDED_BANNER), 842 RESTORE_PENDING_BANNER_UPDATE_BUTTON( 843 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_RESTORE_UPDATE_NEEDED_BANNER_UPDATE_BUTTON, 844 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_RESTORE_UPDATE_NEEDED_BANNER_UPDATE_BUTTON) 845 } 846 847 /** Loggable elements in the Data sources page. */ 848 enum class DataSourcesElement(override val impressionId: Int, override val interactionId: Int) : 849 ElementName { 850 DATA_TYPE_SPINNER( 851 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_TYPE_SPINNER_BUTTON, 852 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_TYPE_SPINNER_BUTTON), 853 DATA_TOTALS_CARD( 854 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__DATA_TOTALS_CARD, 855 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__DATA_TOTALS_CARD), 856 APP_SOURCE_BUTTON( 857 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__APP_SOURCE_BUTTON, 858 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__APP_SOURCE_BUTTON), 859 ADD_AN_APP_BUTTON( 860 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ADD_AN_APP_BUTTON, 861 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ADD_AN_APP_BUTTON), 862 EDIT_SOURCE_LIST_BUTTON( 863 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EDIT_SOURCE_LIST_BUTTON, 864 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EDIT_SOURCE_LIST_BUTTON), 865 REORDER_APP_SOURCE_BUTTON( 866 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__REORDER_APP_SOURCE_BUTTON, 867 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__REORDER_APP_SOURCE_BUTTON), 868 REMOVE_APP_SOURCE_BUTTON( 869 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__REMOVE_APP_SOURCE_BUTTON, 870 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__REMOVE_APP_SOURCE_BUTTON) 871 } 872 873 /** Loggable elements in the Add an app page. */ 874 enum class AddAnAppElement(override val impressionId: Int, override val interactionId: Int) : 875 ElementName { 876 POTENTIAL_PRIORITY_APP_BUTTON( 877 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__POTENTIAL_PRIORITY_APP_BUTTON, 878 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__POTENTIAL_PRIORITY_APP_BUTTON) 879 } 880 881 enum class RouteRequestElement(override val impressionId: Int, override val interactionId: Int) : 882 ElementName { 883 EXERCISE_ROUTE_REQUEST_DIALOG_CONTAINER( 884 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTE_DIALOG_CONTAINER, 885 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTE_DIALOG_CONTAINER), 886 EXERCISE_ROUTE_DIALOG_INFORMATION_BUTTON( 887 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTE_DIALOG_INFORMATION_BUTTON, 888 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTE_DIALOG_INFORMATION_BUTTON), 889 EXERCISE_ROUTE_DIALOG_ROUTE_VIEW( 890 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTE_DIALOG_ROUTE_VIEW, 891 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTE_DIALOG_ROUTE_VIEW), 892 EXERCISE_ROUTE_DIALOG_ALLOW_BUTTON( 893 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTE_DIALOG_ALLOW_BUTTON, 894 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTE_DIALOG_ALLOW_BUTTON), 895 EXERCISE_ROUTE_DIALOG_ALWAYS_ALLOW_BUTTON( 896 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTE_DIALOG_ALWAYS_ALLOW_BUTTON, 897 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTE_DIALOG_ALWAYS_ALLOW_BUTTON), 898 EXERCISE_ROUTE_DIALOG_DONT_ALLOW_BUTTON( 899 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTE_DIALOG_DONT_ALLOW_BUTTON, 900 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTE_DIALOG_DONT_ALLOW_BUTTON), 901 EXERCISE_ROUTE_EDUCATION_DIALOG_CONTAINER( 902 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTE_EDUCATION_DIALOG_CONTAINER, 903 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTE_EDUCATION_DIALOG_CONTAINER), 904 EXERCISE_ROUTE_EDUCATION_DIALOG_BACK_BUTTON( 905 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__EXERCISE_ROUTE_EDUCATION_DIALOG_BACK_BUTTON, 906 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__EXERCISE_ROUTE_EDUCATION_DIALOG_BACK_BUTTON), 907 } 908 909 /** Loggable elements belonging to the error page, and the unknown element. */ 910 enum class ErrorPageElement(override val impressionId: Int, override val interactionId: Int) : 911 ElementName { 912 UNKNOWN_ELEMENT( 913 HEALTH_CONNECT_UI_IMPRESSION__ELEMENT__ELEMENT_UNKNOWN, 914 HEALTH_CONNECT_UI_INTERACTION__ELEMENT__ELEMENT_UNKNOWN) 915 } 916 917 @EntryPoint 918 @InstallIn(SingletonComponent::class) 919 interface HealthConnectLoggerEntryPoint { loggernull920 fun logger(): HealthConnectLogger 921 } 922