• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16export const LaunchParam = {
17    launchReason: LaunchReason,
18    lastExitReason: LastExitReason,
19}
20export const LaunchReason = {
21    UNKNOWN: 0,
22    START_ABILITY: 1,
23    CALL: 2,
24    CONTINUATION: 3,
25}
26export const LastExitReason = {
27    UNKNOWN: 0,
28    ABILITY_NOT_RESPONDING: 1,
29    NORMAL: 2,
30}
31export const OnContinueResult = {
32    AGREE: 0,
33    REJECT: 1,
34    MISMATCH: 2,
35}
36export const MemoryLevel = {
37    MEMORY_LEVEL_MODERATE: 0,
38    MEMORY_LEVEL_LOW: 1,
39    MEMORY_LEVEL_CRITICAL: 2,
40}
41export const WindowMode = {
42    WINDOW_MODE_UNDEFINED: 0,
43    WINDOW_MODE_FULLSCREEN: 1,
44    WINDOW_MODE_SPLIT_PRIMARY: 100,
45    WINDOW_MODE_SPLIT_SECONDARY: 101,
46    WINDOW_MODE_FLOATING: 102,
47}
48export function mockAbilityConstant() {
49    const AbilityConstant = {
50        LaunchParam,
51        LaunchReason,
52        LastExitReason,
53        OnContinueResult,
54        MemoryLevel,
55        WindowMode
56    }
57    return AbilityConstant;
58}