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 #include <stdlib.h> 18 19 #include "android/set_abort_message.h" 20 21 #define FAKE(method_name) \ 22 void method_name() { \ 23 android_set_abort_message("Fake!"); \ 24 abort(); \ 25 } 26 27 FAKE(AStatsEvent_obtain); 28 FAKE(AStatsEvent_build); 29 FAKE(AStatsEvent_write); 30 FAKE(AStatsEvent_release); 31 FAKE(AStatsEvent_setAtomId); 32 FAKE(AStatsEvent_writeInt32); 33 FAKE(AStatsEvent_writeInt64); 34 FAKE(AStatsEvent_writeFloat); 35 FAKE(AStatsEvent_writeBool); 36 FAKE(AStatsEvent_writeByteArray); 37 FAKE(AStatsEvent_writeString); 38 FAKE(AStatsEvent_writeAttributionChain); 39 FAKE(AStatsEvent_writeInt32Array); 40 FAKE(AStatsEvent_writeInt64Array); 41 FAKE(AStatsEvent_writeFloatArray); 42 FAKE(AStatsEvent_writeBoolArray); 43 FAKE(AStatsEvent_writeStringArray); 44 FAKE(AStatsEvent_addBoolAnnotation); 45 FAKE(AStatsEvent_addInt32Annotation); 46 FAKE(AStatsSocket_close); 47