diff options
Diffstat (limited to 'libs/androidfw')
-rw-r--r-- | libs/androidfw/AssetManager.cpp | 14 | ||||
-rw-r--r-- | libs/androidfw/InputDevice.cpp | 4 | ||||
-rw-r--r-- | libs/androidfw/InputTransport.cpp | 5 |
3 files changed, 21 insertions, 2 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp index 8bd805c..b08c36b 100644 --- a/libs/androidfw/AssetManager.cpp +++ b/libs/androidfw/AssetManager.cpp @@ -19,6 +19,7 @@ // #define LOG_TAG "asset" +#define ATRACE_TAG ATRACE_TAG_RESOURCES //#define LOG_NDEBUG 0 #include <androidfw/Asset.h> @@ -32,6 +33,9 @@ #include <utils/threads.h> #include <utils/Timers.h> #include <utils/ZipFileRO.h> +#ifdef HAVE_ANDROID_OS +#include <cutils/trace.h> +#endif #include <assert.h> #include <dirent.h> @@ -51,6 +55,14 @@ _rc; }) #endif +#ifdef HAVE_ANDROID_OS +#define MY_TRACE_BEGIN(x) ATRACE_BEGIN(x) +#define MY_TRACE_END() ATRACE_END() +#else +#define MY_TRACE_BEGIN(x) +#define MY_TRACE_END() +#endif + using namespace android; /* @@ -638,6 +650,7 @@ const ResTable* AssetManager::getResTable(bool required) const ResTable* sharedRes = NULL; bool shared = true; const asset_path& ap = mAssetPaths.itemAt(i); + MY_TRACE_BEGIN(ap.path.string()); Asset* idmap = openIdmapLocked(ap); ALOGV("Looking for resource asset in '%s'\n", ap.path.string()); if (ap.type != kFileTypeDirectory) { @@ -702,6 +715,7 @@ const ResTable* AssetManager::getResTable(bool required) const if (idmap != NULL) { delete idmap; } + MY_TRACE_END(); } if (required && !rt) ALOGW("Unable to find resources file resources.arsc"); diff --git a/libs/androidfw/InputDevice.cpp b/libs/androidfw/InputDevice.cpp index fe891cb..f742052 100644 --- a/libs/androidfw/InputDevice.cpp +++ b/libs/androidfw/InputDevice.cpp @@ -172,8 +172,8 @@ void InputDeviceInfo::addSource(uint32_t source) { } void InputDeviceInfo::addMotionRange(int32_t axis, uint32_t source, float min, float max, - float flat, float fuzz) { - MotionRange range = { axis, source, min, max, flat, fuzz }; + float flat, float fuzz, float resolution) { + MotionRange range = { axis, source, min, max, flat, fuzz, resolution }; mMotionRanges.add(range); } diff --git a/libs/androidfw/InputTransport.cpp b/libs/androidfw/InputTransport.cpp index 351c666..498389e 100644 --- a/libs/androidfw/InputTransport.cpp +++ b/libs/androidfw/InputTransport.cpp @@ -219,6 +219,11 @@ status_t InputChannel::receiveMessage(InputMessage* msg) { return OK; } +sp<InputChannel> InputChannel::dup() const { + int fd = ::dup(getFd()); + return fd >= 0 ? new InputChannel(getName(), fd) : NULL; +} + // --- InputPublisher --- |