• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The Android Open Source Project
2 //
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 #pragma once
16 
17 #include "base/export.h"
18 #include "constants.h"
19 #include "avd/info.h"
20 #include "avd/hw-config.h"
21 
22 /* this structure is setup when loading the virtual device
23  * after that, you can read the 'flags' field to determine
24  * wether a data or cache wipe has been in effect.
25  */
26 extern AvdInfoParams     android_avdParams[1];
27 
28 /* a pointer to the android virtual device information
29  * object, which can be queried for the paths of various
30  * image files or the skin
31  */
32 extern AvdInfo*          android_avdInfo;
33 
34 /* MSVC only exports function pointers */
35 extern AEMU_EXPORT AvdInfo** aemu_get_android_avdInfoPtr();
36 
37 /* the hardware configuration for this specific virtual device */
38 extern AndroidHwConfig   android_hw[1];
39 
40 /* MSVC only exports function pointers */
41 AEMU_EXPORT AndroidHwConfig* aemu_get_android_hw();
42 
43 /* this is to support snapshot (currently only qemu1+software-renderer) */
44 extern const char* savevm_on_exit;
45 
46 /* this indicates that guest has mounted data partition */
47 extern int guest_data_partition_mounted;
48 
49 /* this indicates that guest has boot completed */
50 extern int guest_boot_completed;
51 
52 extern int arm_snapshot_save_completed;
53 
54 extern int host_emulator_is_headless;
55 
56 /* are we using the emulator in the android mode or plain qemu? */
57 extern int android_qemu_mode;
58 
59 /* are we using android-emu libraries for a minimal configuration? */
60 extern int min_config_qemu_mode;
61 
62 /* is android-emu running Fuchsia? */
63 extern int is_fuchsia;
64 
65 extern int android_snapshot_update_timer;
66 
67 /* are we using qemu 2? */
68 /* remove this flag once we deprecate qemu1 on both dev and release branches. */
69 extern int engine_supports_snapshot;
70 
71 /* are we changing the language, country, or locale? */
72 extern int changing_language_country_locale;
73 extern const char* to_set_language;
74 extern const char* to_set_country;
75 extern const char* to_set_locale;
76 
77 /* True if we are using keycode forwarding instead of translating text value to
78  * keycode */
79 /* on emulator host. */
80 extern int use_keycode_forwarding;
81 
82 enum WinsysPreferredGlesBackend {
83     WINSYS_GLESBACKEND_PREFERENCE_AUTO = 0,
84     WINSYS_GLESBACKEND_PREFERENCE_ANGLE = 1,
85     WINSYS_GLESBACKEND_PREFERENCE_ANGLE9 = 2,
86     WINSYS_GLESBACKEND_PREFERENCE_SWIFTSHADER = 3,
87     WINSYS_GLESBACKEND_PREFERENCE_NATIVEGL = 4,
88     WINSYS_GLESBACKEND_PREFERENCE_NUM = 5,
89 };
90 
91 enum WinsysPreferredGlesApiLevel {
92     WINSYS_GLESAPILEVEL_PREFERENCE_AUTO = 0,
93     WINSYS_GLESAPILEVEL_PREFERENCE_MAX = 1,
94     WINSYS_GLESAPILEVEL_PREFERENCE_COMPAT = 2,
95     WINSYS_GLESAPILEVEL_PREFERENCE_NUM = 3,
96 };
97 
98