summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2016-11-03 16:16:47 -0700
committerJohn Reck <jreck@google.com>2016-11-03 16:26:59 -0700
commitf6113af2d6f6eebee68d3ac510fe96d38a7a39e9 (patch)
treedc4e58122ad130f79315b5d11ec04ac21b7e1099
parenta46f009bbfc693319290c273b4e647dea2eebe10 (diff)
Re-unite sources with their headers
Move all the includes for androidfw under a common base path for that library instead of frameworks/base/includes. Also fixes -Werror issues that resulted in no longer being -isystem. Test: builds Change-Id: Ic4312eb61b197af114dded5691d5ae1ec82923f7
-rw-r--r--libs/androidfw/Android.mk4
-rw-r--r--libs/androidfw/ResourceTypes.cpp2
-rw-r--r--libs/androidfw/include/androidfw/Asset.h (renamed from include/androidfw/Asset.h)8
-rw-r--r--libs/androidfw/include/androidfw/AssetDir.h (renamed from include/androidfw/AssetDir.h)0
-rw-r--r--libs/androidfw/include/androidfw/AssetManager.h (renamed from include/androidfw/AssetManager.h)21
-rw-r--r--libs/androidfw/include/androidfw/AttributeResolution.h (renamed from include/androidfw/AttributeResolution.h)0
-rw-r--r--libs/androidfw/include/androidfw/BackupHelpers.h (renamed from include/androidfw/BackupHelpers.h)0
-rw-r--r--libs/androidfw/include/androidfw/ByteBucketArray.h (renamed from include/androidfw/ByteBucketArray.h)0
-rw-r--r--libs/androidfw/include/androidfw/CursorWindow.h (renamed from include/androidfw/CursorWindow.h)0
-rw-r--r--libs/androidfw/include/androidfw/DisplayEventDispatcher.h (renamed from include/androidfw/DisplayEventDispatcher.h)0
-rw-r--r--libs/androidfw/include/androidfw/LocaleData.h (renamed from include/androidfw/LocaleData.h)0
-rw-r--r--libs/androidfw/include/androidfw/ObbFile.h (renamed from include/androidfw/ObbFile.h)7
-rw-r--r--libs/androidfw/include/androidfw/ResourceTypes.h (renamed from include/androidfw/ResourceTypes.h)0
-rw-r--r--libs/androidfw/include/androidfw/StreamingZipInflater.h (renamed from include/androidfw/StreamingZipInflater.h)0
-rw-r--r--libs/androidfw/include/androidfw/TypeWrappers.h (renamed from include/androidfw/TypeWrappers.h)1
-rw-r--r--libs/androidfw/include/androidfw/ZipFileRO.h (renamed from include/androidfw/ZipFileRO.h)0
-rw-r--r--libs/androidfw/include/androidfw/ZipUtils.h (renamed from include/androidfw/ZipUtils.h)0
-rw-r--r--libs/androidfw/include/androidfw/misc.h (renamed from include/androidfw/misc.h)0
-rw-r--r--libs/hwui/hwui_static_deps.mk3
-rw-r--r--media/jni/Android.mk3
-rw-r--r--native/graphics/jni/Android.mk3
-rw-r--r--tools/split-select/Android.mk2
22 files changed, 23 insertions, 31 deletions
diff --git a/libs/androidfw/Android.mk b/libs/androidfw/Android.mk
index 7d7d42c76d81..ad1ead8f1d63 100644
--- a/libs/androidfw/Android.mk
+++ b/libs/androidfw/Android.mk
@@ -50,6 +50,8 @@ LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
LOCAL_SRC_FILES:= $(hostSources)
LOCAL_C_INCLUDES := external/zlib
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
include $(BUILD_HOST_STATIC_LIBRARY)
@@ -72,6 +74,8 @@ LOCAL_SHARED_LIBRARIES := \
libutils \
libz
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index b16279cbe308..7d1e3287bb1d 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -3577,7 +3577,7 @@ ssize_t ResTable::Theme::getAttribute(uint32_t resID, Res_value* outValue,
}
if (pi != NULL) {
if (kDebugTableTheme) {
- ALOGI("Desired type index is %zd in avail %zu", t, Res_MAXTYPE + 1);
+ ALOGI("Desired type index is %u in avail %zu", t, Res_MAXTYPE + 1);
}
if (t <= Res_MAXTYPE) {
const type_info& ti = pi->types[t];
diff --git a/include/androidfw/Asset.h b/libs/androidfw/include/androidfw/Asset.h
index 11709ce5f91b..461e773e5818 100644
--- a/include/androidfw/Asset.h
+++ b/libs/androidfw/include/androidfw/Asset.h
@@ -49,7 +49,7 @@ public:
static int32_t getGlobalCount();
static String8 getAssetAllocations();
-
+
/* used when opening an asset */
typedef enum AccessMode {
ACCESS_UNKNOWN = 0,
@@ -211,7 +211,7 @@ private:
AccessMode mAccessMode; // how the asset was opened
String8 mAssetSource; // debug string
-
+
Asset* mNext; // linked list.
Asset* mPrev;
};
@@ -274,7 +274,7 @@ private:
FileMap* mMap; // for memory map
unsigned char* mBuf; // for read
-
+
const void* ensureAlignment(FileMap* map);
};
@@ -311,7 +311,7 @@ public:
virtual const void* getBuffer(bool wordAligned);
virtual off64_t getLength(void) const { return mUncompressedLen; }
virtual off64_t getRemainingLength(void) const { return mUncompressedLen-mOffset; }
- virtual int openFileDescriptor(off64_t* outStart, off64_t* outLength) const { return -1; }
+ virtual int openFileDescriptor(off64_t* /* outStart */, off64_t* /* outLength */) const { return -1; }
virtual bool isAllocated(void) const { return mBuf != NULL; }
private:
diff --git a/include/androidfw/AssetDir.h b/libs/androidfw/include/androidfw/AssetDir.h
index bd89d7d34b97..bd89d7d34b97 100644
--- a/include/androidfw/AssetDir.h
+++ b/libs/androidfw/include/androidfw/AssetDir.h
diff --git a/include/androidfw/AssetManager.h b/libs/androidfw/include/androidfw/AssetManager.h
index 4377213997b0..0441b9d789e2 100644
--- a/include/androidfw/AssetManager.h
+++ b/libs/androidfw/include/androidfw/AssetManager.h
@@ -33,17 +33,8 @@
/*
* Native-app access is via the opaque typedef struct AAssetManager in the C namespace.
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct AAssetManager { };
-#ifdef __cplusplus
-};
-#endif
-
-
/*
* Now the proper C++ android-namespace definitions
*/
@@ -83,8 +74,8 @@ public:
virtual ~AssetManager(void);
static int32_t getGlobalCount();
-
- /*
+
+ /*
* Add a new source for assets. This can be called multiple times to
* look in multiple places for assets. It can be either a directory (for
* finding assets as raw files on the disk) or a ZIP file. This newly
@@ -178,7 +169,7 @@ public:
*/
FileType getFileType(const char* fileName);
- /*
+ /*
* Return the complete resource table to find things in the package.
*/
const ResTable& getResources(bool required = true) const;
@@ -255,12 +246,12 @@ private:
ResTable* getResourceTable();
ResTable* setResourceTable(ResTable* res);
-
+
bool isUpToDate();
void addOverlay(const asset_path& ap);
bool getOverlay(size_t idx, asset_path* out) const;
-
+
protected:
~SharedZip();
@@ -312,7 +303,7 @@ private:
void addOverlay(const String8& path, const asset_path& overlay);
bool getOverlay(const String8& path, size_t idx, asset_path* out) const;
-
+
private:
void closeZip(int idx);
diff --git a/include/androidfw/AttributeResolution.h b/libs/androidfw/include/androidfw/AttributeResolution.h
index 3ed8bced22ef..3ed8bced22ef 100644
--- a/include/androidfw/AttributeResolution.h
+++ b/libs/androidfw/include/androidfw/AttributeResolution.h
diff --git a/include/androidfw/BackupHelpers.h b/libs/androidfw/include/androidfw/BackupHelpers.h
index fc1ad4717c16..fc1ad4717c16 100644
--- a/include/androidfw/BackupHelpers.h
+++ b/libs/androidfw/include/androidfw/BackupHelpers.h
diff --git a/include/androidfw/ByteBucketArray.h b/libs/androidfw/include/androidfw/ByteBucketArray.h
index 87c6b128eca1..87c6b128eca1 100644
--- a/include/androidfw/ByteBucketArray.h
+++ b/libs/androidfw/include/androidfw/ByteBucketArray.h
diff --git a/include/androidfw/CursorWindow.h b/libs/androidfw/include/androidfw/CursorWindow.h
index 8a2979a3756d..8a2979a3756d 100644
--- a/include/androidfw/CursorWindow.h
+++ b/libs/androidfw/include/androidfw/CursorWindow.h
diff --git a/include/androidfw/DisplayEventDispatcher.h b/libs/androidfw/include/androidfw/DisplayEventDispatcher.h
index 3ade2156589a..3ade2156589a 100644
--- a/include/androidfw/DisplayEventDispatcher.h
+++ b/libs/androidfw/include/androidfw/DisplayEventDispatcher.h
diff --git a/include/androidfw/LocaleData.h b/libs/androidfw/include/androidfw/LocaleData.h
index b14829d07f04..b14829d07f04 100644
--- a/include/androidfw/LocaleData.h
+++ b/libs/androidfw/include/androidfw/LocaleData.h
diff --git a/include/androidfw/ObbFile.h b/libs/androidfw/include/androidfw/ObbFile.h
index 47559cdd0d61..3dbf997dc367 100644
--- a/include/androidfw/ObbFile.h
+++ b/libs/androidfw/include/androidfw/ObbFile.h
@@ -124,20 +124,13 @@ private:
/* Flags for this OBB type. */
int32_t mFlags;
- /* Whether the file is salted. */
- bool mSalted;
-
/* The encryption salt. */
unsigned char mSalt[8];
const char* mFileName;
- size_t mFileSize;
-
size_t mFooterStart;
- unsigned char* mReadBuf;
-
bool parseObbFile(int fd);
};
diff --git a/include/androidfw/ResourceTypes.h b/libs/androidfw/include/androidfw/ResourceTypes.h
index 08d6591e6886..08d6591e6886 100644
--- a/include/androidfw/ResourceTypes.h
+++ b/libs/androidfw/include/androidfw/ResourceTypes.h
diff --git a/include/androidfw/StreamingZipInflater.h b/libs/androidfw/include/androidfw/StreamingZipInflater.h
index 3ace5d5a83cf..3ace5d5a83cf 100644
--- a/include/androidfw/StreamingZipInflater.h
+++ b/libs/androidfw/include/androidfw/StreamingZipInflater.h
diff --git a/include/androidfw/TypeWrappers.h b/libs/androidfw/include/androidfw/TypeWrappers.h
index 4233b6bbee83..f1daf3365c28 100644
--- a/include/androidfw/TypeWrappers.h
+++ b/libs/androidfw/include/androidfw/TypeWrappers.h
@@ -31,6 +31,7 @@ struct TypeVariant {
iterator& operator=(const iterator& rhs) {
mTypeVariant = rhs.mTypeVariant;
mIndex = rhs.mIndex;
+ return *this;
}
bool operator==(const iterator& rhs) const {
diff --git a/include/androidfw/ZipFileRO.h b/libs/androidfw/include/androidfw/ZipFileRO.h
index 768034287afa..768034287afa 100644
--- a/include/androidfw/ZipFileRO.h
+++ b/libs/androidfw/include/androidfw/ZipFileRO.h
diff --git a/include/androidfw/ZipUtils.h b/libs/androidfw/include/androidfw/ZipUtils.h
index 55575d774522..55575d774522 100644
--- a/include/androidfw/ZipUtils.h
+++ b/libs/androidfw/include/androidfw/ZipUtils.h
diff --git a/include/androidfw/misc.h b/libs/androidfw/include/androidfw/misc.h
index 5a5a0e29125d..5a5a0e29125d 100644
--- a/include/androidfw/misc.h
+++ b/libs/androidfw/include/androidfw/misc.h
diff --git a/libs/hwui/hwui_static_deps.mk b/libs/hwui/hwui_static_deps.mk
index 299095217a8d..dca78b38e942 100644
--- a/libs/hwui/hwui_static_deps.mk
+++ b/libs/hwui/hwui_static_deps.mk
@@ -24,7 +24,8 @@ LOCAL_SHARED_LIBRARIES += \
libprotobuf-cpp-lite \
libharfbuzz_ng \
libft2 \
- libminikin
+ libminikin \
+ libandroidfw
ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT))
LOCAL_SHARED_LIBRARIES += libRS libRScpp
diff --git a/media/jni/Android.mk b/media/jni/Android.mk
index faefc9fdea24..9b217fbd1d24 100644
--- a/media/jni/Android.mk
+++ b/media/jni/Android.mk
@@ -41,7 +41,8 @@ LOCAL_SHARED_LIBRARIES := \
libcamera_client \
libmtp \
libexif \
- libpiex
+ libpiex \
+ libandroidfw
LOCAL_STATIC_LIBRARIES := \
diff --git a/native/graphics/jni/Android.mk b/native/graphics/jni/Android.mk
index 175f73007484..4c8a9db85646 100644
--- a/native/graphics/jni/Android.mk
+++ b/native/graphics/jni/Android.mk
@@ -20,7 +20,8 @@ LOCAL_SRC_FILES:= \
LOCAL_SHARED_LIBRARIES := \
libandroid_runtime \
- libskia
+ libskia \
+ libandroidfw
LOCAL_C_INCLUDES += \
frameworks/base/native/include \
diff --git a/tools/split-select/Android.mk b/tools/split-select/Android.mk
index 199fafab6e05..4a1511eae43a 100644
--- a/tools/split-select/Android.mk
+++ b/tools/split-select/Android.mk
@@ -73,7 +73,7 @@ LOCAL_MODULE := libsplit-select
LOCAL_MODULE_HOST_OS := darwin linux windows
LOCAL_SRC_FILES := $(sources)
-
+LOCAL_STATIC_LIBRARIES := $(hostStaticLibs)
LOCAL_C_INCLUDES := $(cIncludes)
LOCAL_CFLAGS := $(cFlags) -D_DARWIN_UNLIMITED_STREAMS