1 /*
2  * Copyright (C) 2024 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 #define LOG_TAG "uprobestats"
18 
19 #include <android_uprobestats_flags.h>
20 #include <android_uprobestats_mainline_flags.h>
21 
22 #include "FlagSelector.h"
23 
24 namespace android {
25 namespace uprobestats {
26 namespace flag_selector {
27 
enable_uprobestats()28 bool enable_uprobestats() {
29 #ifdef UPROBESTATS_IN_MAINLINE
30   return android::uprobestats::mainline::flags::enable_uprobestats();
31 #else
32   return android::uprobestats::flags::enable_uprobestats();
33 #endif
34 }
35 
uprobestats_support_update_device_idle_temp_allowlist()36 bool uprobestats_support_update_device_idle_temp_allowlist() {
37 #ifdef UPROBESTATS_IN_MAINLINE
38   return android::uprobestats::mainline::flags::
39       uprobestats_support_update_device_idle_temp_allowlist();
40 #else
41   return android::uprobestats::flags::
42       uprobestats_support_update_device_idle_temp_allowlist();
43 #endif
44 }
45 
executable_method_file_offsets()46 bool executable_method_file_offsets() {
47 #ifdef UPROBESTATS_IN_MAINLINE
48   return android::uprobestats::mainline::flags::
49       executable_method_file_offsets();
50 #else
51   return android::uprobestats::flags::executable_method_file_offsets();
52 #endif
53 }
54 
55 } // namespace flag_selector
56 } // namespace uprobestats
57 } // namespace android
58