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 17 package android.tools.common.traces.wm 18 19 import kotlin.js.JsExport 20 import kotlin.js.JsName 21 22 @JsExport 23 enum class TransitionType(val value: Int) { 24 UNDEFINED(-1), 25 NONE(0), 26 OPEN(1), 27 CLOSE(2), 28 TO_FRONT(3), 29 TO_BACK(4), 30 RELAUNCH(5), 31 CHANGE(6), 32 KEYGUARD_GOING_AWAY(7), 33 KEYGUARD_OCCLUDE(8), 34 KEYGUARD_UNOCCLUDE(9), 35 PIP(10), 36 WAKE(11), 37 SLEEP(12), 38 // START OF CUSTOM TYPES 39 FIRST_CUSTOM(1000), 40 EXIT_PIP(FIRST_CUSTOM.value + 1), 41 EXIT_PIP_TO_SPLIT(FIRST_CUSTOM.value + 2), 42 REMOVE_PIP(FIRST_CUSTOM.value + 3), 43 SPLIT_SCREEN_PAIR_OPEN(FIRST_CUSTOM.value + 4), 44 SPLIT_SCREEN_OPEN_TO_SIDE(FIRST_CUSTOM.value + 5), 45 SPLIT_DISMISS_SNAP(FIRST_CUSTOM.value + 6), 46 SPLIT_DISMISS(FIRST_CUSTOM.value + 7), 47 MAXIMIZE(FIRST_CUSTOM.value + 8), 48 RESTORE_FROM_MAXIMIZE(FIRST_CUSTOM.value + 9), 49 ENTER_FREEFORM(FIRST_CUSTOM.value + 10), 50 ENTER_DESKTOP_MODE(FIRST_CUSTOM.value + 11), 51 EXIT_DESKTOP_MODE(FIRST_CUSTOM.value + 12); 52 53 companion object { <lambda>null54 @JsName("fromInt") fun fromInt(value: Int) = values().first { it.value == value } 55 } 56 } 57