1 /*
2 * Copyright (C) 2021 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 "palette/palette.h"
18
19 #include <android-base/macros.h>
20 #include <stdbool.h>
21
PaletteShouldReportDex2oatCompilation(bool * value)22 palette_status_t PaletteShouldReportDex2oatCompilation(bool* value) {
23 *value = 0;
24 return PALETTE_STATUS_OK;
25 }
26
PaletteNotifyStartDex2oatCompilation(int source_fd ATTRIBUTE_UNUSED,int art_fd ATTRIBUTE_UNUSED,int oat_fd ATTRIBUTE_UNUSED,int vdex_fd ATTRIBUTE_UNUSED)27 palette_status_t PaletteNotifyStartDex2oatCompilation(int source_fd ATTRIBUTE_UNUSED,
28 int art_fd ATTRIBUTE_UNUSED,
29 int oat_fd ATTRIBUTE_UNUSED,
30 int vdex_fd ATTRIBUTE_UNUSED) {
31 return PALETTE_STATUS_OK;
32 }
33
PaletteNotifyEndDex2oatCompilation(int source_fd ATTRIBUTE_UNUSED,int art_fd ATTRIBUTE_UNUSED,int oat_fd ATTRIBUTE_UNUSED,int vdex_fd ATTRIBUTE_UNUSED)34 palette_status_t PaletteNotifyEndDex2oatCompilation(int source_fd ATTRIBUTE_UNUSED,
35 int art_fd ATTRIBUTE_UNUSED,
36 int oat_fd ATTRIBUTE_UNUSED,
37 int vdex_fd ATTRIBUTE_UNUSED) {
38 return PALETTE_STATUS_OK;
39 }
40
PaletteNotifyDexFileLoaded(const char * path ATTRIBUTE_UNUSED)41 palette_status_t PaletteNotifyDexFileLoaded(const char* path ATTRIBUTE_UNUSED) {
42 return PALETTE_STATUS_OK;
43 }
44
PaletteNotifyOatFileLoaded(const char * path ATTRIBUTE_UNUSED)45 palette_status_t PaletteNotifyOatFileLoaded(const char* path ATTRIBUTE_UNUSED) {
46 return PALETTE_STATUS_OK;
47 }
48
PaletteShouldReportJniInvocations(bool * value)49 palette_status_t PaletteShouldReportJniInvocations(bool* value) {
50 *value = 0;
51 return PALETTE_STATUS_OK;
52 }
53
PaletteNotifyBeginJniInvocation(JNIEnv * env ATTRIBUTE_UNUSED)54 palette_status_t PaletteNotifyBeginJniInvocation(JNIEnv* env ATTRIBUTE_UNUSED) {
55 return PALETTE_STATUS_OK;
56 }
57
PaletteNotifyEndJniInvocation(JNIEnv * env ATTRIBUTE_UNUSED)58 palette_status_t PaletteNotifyEndJniInvocation(JNIEnv* env ATTRIBUTE_UNUSED) {
59 return PALETTE_STATUS_OK;
60 }
61