1 package com.android.onboarding.process 2 3 /** 4 * Interface representing the Onboarding Process responsible for keeping the calling process alive 5 * to prevent it from being terminated by the system. 6 */ 7 interface OnboardingProcess { 8 9 /** 10 * API used to keep the calling process alive. Accepts a [reason] explaining why the calling 11 * process should remain alive. Returns an [AutoCloseable], allowing for both lambda parameters 12 * and termination using the close API. 13 */ keepAlivenull14 fun keepAlive(reason: KeepAliveReason): AutoCloseable 15 } 16 17 /** 18 * Enum representing reasons for keeping an onboarding process alive. These reasons are used to 19 * determine when to utilize the Keep Alive API. 20 */ 21 enum class KeepAliveReason { 22 TEST_ONLY, // For testing purposes 23 OTHER, // Other unspecified reasons 24 } 25