• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Bestechnic (Shanghai) Co., Ltd. All rights reserved.
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 #if defined(UI_TEST) || defined(ABILITY_TEST)
16 #include "ohos_init.h"
17 #include "ui_main.h"
18 #if defined(UI_TEST)
19 #include "ui_test.h"
20 #elif defined(ABILITY_TEST)
21 #include "ability_test.h"
22 #endif
23 
24 #if defined(HISTREAMER_TEST)
25 #include "audio_player.h"
26 #endif
27 
28 /* ui app entry */
RunApp()29 void RunApp()
30 {
31 #ifdef UI_TEST
32     // AnimatorDemoStart();
33     // UiDemoStart();
34     // ImageDemoStart();
35     ViewDemoStart();
36 #elif defined(ABILITY_TEST)
37     // StartLauncherApp();
38     StartJSApp();
39 #endif
40 }
41 
AppEntry(void)42 void AppEntry(void)
43 {
44     UiMain();
45 #if defined(HISTREAMER_TEST)
46     AudioPlayerStart();
47 #endif
48 }
49 
50 APP_FEATURE_INIT(AppEntry);
51 #endif
52