Revert "Revert "Move error_code.h into otautil.""

This reverts commit 26436d6d60 to re-land
"Move error_code.h into otautil.".

This way it stops requiring relative path ".." in LOCAL_C_INCLUDES
(uncrypt and edify). Soong doesn't accept non-local ".." in
"local_include_dirs".

This CL needs to land with device-specific module changes (e.g. adding
the dependency on libotautil).

Test: lunch aosp_{angler,bullhead,dragon,fugu,sailfish}-userdebug;
      mmma bootable/recovery
Change-Id: If193241801af2dae73eccd31ce57cd2b81c9fd96
This commit is contained in:
Tao Bao 2017-10-06 07:43:41 -07:00
parent 7a3fc2de8e
commit 1fc5bf353a
14 changed files with 17 additions and 13 deletions

View file

@ -116,6 +116,7 @@ LOCAL_STATIC_LIBRARIES := \
libapplypatch \
libedify \
libotafault \
libotautil \
libbspatch \
libbase \
libziparchive \

View file

@ -30,8 +30,9 @@ LOCAL_CFLAGS := -Wall -Werror
LOCAL_CPPFLAGS := -Wno-unused-parameter
LOCAL_CPPFLAGS += -Wno-deprecated-register
LOCAL_MODULE := libedify
LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
LOCAL_STATIC_LIBRARIES += libbase
LOCAL_STATIC_LIBRARIES += \
libotautil \
libbase
include $(BUILD_STATIC_LIBRARY)

View file

@ -31,7 +31,7 @@
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include "error_code.h"
#include "otautil/error_code.h"
// Functions should:
//

View file

@ -23,7 +23,7 @@
#include <string>
#include <vector>
// Forward declaration to avoid including "error_code.h".
// Forward declaration to avoid including "otautil/error_code.h".
enum ErrorCode : int;
enum CauseCode : int;

View file

@ -49,9 +49,9 @@
#include <ziparchive/zip_archive.h>
#include "common.h"
#include "error_code.h"
#include "otautil/SysUtil.h"
#include "otautil/ThermalUtil.h"
#include "otautil/error_code.h"
#include "private/install.h"
#include "roots.h"
#include "ui.h"

View file

@ -15,6 +15,8 @@
cc_library_static {
name: "libotautil",
host_supported: true,
srcs: [
"SysUtil.cpp",
"DirUtil.cpp",

View file

@ -61,13 +61,13 @@
#include "adb_install.h"
#include "common.h"
#include "device.h"
#include "error_code.h"
#include "fuse_sdcard_provider.h"
#include "fuse_sideload.h"
#include "install.h"
#include "minadbd/minadbd.h"
#include "minui/minui.h"
#include "otautil/DirUtil.h"
#include "otautil/error_code.h"
#include "roots.h"
#include "rotate_logs.h"
#include "screen_ui.h"

View file

@ -39,8 +39,8 @@
#include "common/test_constants.h"
#include "edify/expr.h"
#include "error_code.h"
#include "otautil/SysUtil.h"
#include "otautil/error_code.h"
#include "print_sha1.h"
#include "updater/blockimg.h"
#include "updater/install.h"

View file

@ -17,10 +17,10 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := uncrypt.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_MODULE := uncrypt
LOCAL_STATIC_LIBRARIES := \
libbootloader_message \
libotautil \
libbase \
liblog \
libfs_mgr \

View file

@ -116,7 +116,7 @@
#include <cutils/sockets.h>
#include <fs_mgr.h>
#include "error_code.h"
#include "otautil/error_code.h"
static constexpr int WINDOW_SIZE = 5;
static constexpr int FIBMAP_RETRY_LIMIT = 3;

View file

@ -50,8 +50,8 @@
#include <ziparchive/zip_archive.h>
#include "edify/expr.h"
#include "error_code.h"
#include "otafault/ota_io.h"
#include "otautil/error_code.h"
#include "print_sha1.h"
#include "rangeset.h"
#include "updater/install.h"

View file

@ -57,10 +57,10 @@
#include <ziparchive/zip_archive.h>
#include "edify/expr.h"
#include "error_code.h"
#include "mounts.h"
#include "otafault/ota_io.h"
#include "otautil/DirUtil.h"
#include "otautil/error_code.h"
#include "print_sha1.h"
#include "tune2fs.h"
#include "updater/updater.h"

View file

@ -31,10 +31,10 @@
#include <ziparchive/zip_archive.h>
#include "edify/expr.h"
#include "error_code.h"
#include "otafault/config.h"
#include "otautil/DirUtil.h"
#include "otautil/SysUtil.h"
#include "otautil/error_code.h"
#include "updater/blockimg.h"
#include "updater/install.h"