platform_bootable_recovery/otautil/Android.bp
Tianjie Xu 3bbb20f557 Add a singleton CacheLocation to replace the hard coded locations
This class allows us to set the following locations dynamically:
cache_temp_source, last_command_file, stash_directory_base.

In the updater's main function, we reset the values of these variables
to their default locations in /cache; while we can set them to temp
files in unit tests or host simulation.

Test: unit tests pass
Change-Id: I528652650caa41373617ab055d41b1f1a4ec0f87
2018-02-28 11:19:11 -08:00

42 lines
1 KiB
Text

// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_library_static {
name: "libotautil",
host_supported: true,
srcs: [
"SysUtil.cpp",
"DirUtil.cpp",
"ThermalUtil.cpp",
"cache_location.cpp",
"rangeset.cpp",
],
static_libs: [
"libselinux",
"libbase",
],
cflags: [
"-D_FILE_OFFSET_BITS=64",
"-Werror",
"-Wall",
],
export_include_dirs: [
"include",
],
}