Don't include "error_code.h" in edify/expr.h.

Use forward declartion to avoid pull in the module that contains
error_code.h (trying to move it into libotautil). Otherwise all the
modules that include "edify/expr.h" need to depend on the module that
exports error_code.h.

.cpp sources should include "error_code.h" explicitly to use the enums.

Test: lunch aosp_{angler,bullhead,dragon,fugu,sailfish}-userdebug;
      mmma bootable/recovery
Change-Id: Ic82db2746c7deb866e8cdfb3c57e0b1ecc71c4dc
This commit is contained in:
Tao Bao
2017-10-05 12:06:49 -07:00
parent 9baa19012a
commit 0bf20d5133
4 changed files with 28 additions and 26 deletions
+3 -3
View File
@@ -17,7 +17,7 @@
#ifndef _ERROR_CODE_H_
#define _ERROR_CODE_H_
enum ErrorCode {
enum ErrorCode : int {
kNoError = -1,
kLowBattery = 20,
kZipVerificationFailure,
@@ -30,7 +30,7 @@ enum ErrorCode {
kUpdateBinaryCommandFailure,
};
enum CauseCode {
enum CauseCode : int {
kNoCause = -1,
kArgsParsingFailure = 100,
kStashCreationFailure,
@@ -51,7 +51,7 @@ enum CauseCode {
kVendorFailure = 200
};
enum UncryptErrorCode {
enum UncryptErrorCode : int {
kUncryptNoError = -1,
kUncryptErrorPlaceholder = 50,
kUncryptTimeoutError = 100,