Merge "Doc change: escape angle brackets in javadoc comment." into gingerbread
diff --git a/include/ui/InputDispatcher.h b/include/ui/InputDispatcher.h
index 4955d47..b0b855e 100644
--- a/include/ui/InputDispatcher.h
+++ b/include/ui/InputDispatcher.h
@@ -109,9 +109,6 @@
// (ignored for KeyEvents)
float xOffset, yOffset;
- // The window type of the input target.
- int32_t windowType;
-
// The subset of pointer ids to include in motion events dispatched to this input target
// if FLAG_SPLIT is set.
BitSet32 pointerIds;
@@ -1004,8 +1001,7 @@
void addWindowTargetLocked(const InputWindow* window, int32_t targetFlags,
BitSet32 pointerIds);
void addMonitoringTargetsLocked();
- bool shouldPokeUserActivityForCurrentInputTargetsLocked();
- void pokeUserActivityLocked(nsecs_t eventTime, int32_t eventType);
+ void pokeUserActivityLocked(const EventEntry* eventEntry);
bool checkInjectionPermission(const InputWindow* window, const InjectionState* injectionState);
bool isWindowObscuredAtPointLocked(const InputWindow* window, int32_t x, int32_t y) const;
bool isWindowFinishedWithPreviousInputLocked(const InputWindow* window);
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
index 92daee1..303075f 100644
--- a/libs/ui/InputDispatcher.cpp
+++ b/libs/ui/InputDispatcher.cpp
@@ -340,6 +340,11 @@
mInboundQueue.dequeue(entry);
mPendingEvent = entry;
}
+
+ // Poke user activity for this event.
+ if (mPendingEvent->policyFlags & POLICY_FLAG_PASS_TO_USER) {
+ pokeUserActivityLocked(mPendingEvent);
+ }
}
// Now we have an event to dispatch.
@@ -686,11 +691,6 @@
// Dispatch the key.
dispatchEventToCurrentInputTargetsLocked(currentTime, entry, false);
-
- // Poke user activity.
- if (shouldPokeUserActivityForCurrentInputTargetsLocked()) {
- pokeUserActivityLocked(entry->eventTime, POWER_MANAGER_BUTTON_EVENT);
- }
return true;
}
@@ -753,31 +753,6 @@
// Dispatch the motion.
dispatchEventToCurrentInputTargetsLocked(currentTime, entry, false);
-
- // Poke user activity.
- if (shouldPokeUserActivityForCurrentInputTargetsLocked()) {
- int32_t eventType;
- if (isPointerEvent) {
- switch (entry->action) {
- case AMOTION_EVENT_ACTION_DOWN:
- eventType = POWER_MANAGER_TOUCH_EVENT;
- break;
- case AMOTION_EVENT_ACTION_UP:
- eventType = POWER_MANAGER_TOUCH_UP_EVENT;
- break;
- default:
- if (entry->eventTime - entry->downTime >= EVENT_IGNORE_DURATION) {
- eventType = POWER_MANAGER_TOUCH_EVENT;
- } else {
- eventType = POWER_MANAGER_LONG_TOUCH_EVENT;
- }
- break;
- }
- } else {
- eventType = POWER_MANAGER_BUTTON_EVENT;
- }
- pokeUserActivityLocked(entry->eventTime, eventType);
- }
return true;
}
@@ -829,6 +804,8 @@
assert(eventEntry->dispatchInProgress); // should already have been set to true
+ pokeUserActivityLocked(eventEntry);
+
for (size_t i = 0; i < mCurrentInputTargets.size(); i++) {
const InputTarget& inputTarget = mCurrentInputTargets.itemAt(i);
@@ -1338,7 +1315,6 @@
target.flags = targetFlags;
target.xOffset = - window->frameLeft;
target.yOffset = - window->frameTop;
- target.windowType = window->layoutParamsType;
target.pointerIds = pointerIds;
}
@@ -1351,7 +1327,6 @@
target.flags = 0;
target.xOffset = 0;
target.yOffset = 0;
- target.windowType = -1;
}
}
@@ -1418,19 +1393,32 @@
}
}
-bool InputDispatcher::shouldPokeUserActivityForCurrentInputTargetsLocked() {
- for (size_t i = 0; i < mCurrentInputTargets.size(); i++) {
- if (mCurrentInputTargets[i].windowType == InputWindow::TYPE_KEYGUARD) {
- return false;
+void InputDispatcher::pokeUserActivityLocked(const EventEntry* eventEntry) {
+ int32_t eventType = POWER_MANAGER_BUTTON_EVENT;
+ if (eventEntry->type == EventEntry::TYPE_MOTION) {
+ const MotionEntry* motionEntry = static_cast<const MotionEntry*>(eventEntry);
+ if (motionEntry->source & AINPUT_SOURCE_CLASS_POINTER) {
+ switch (motionEntry->action) {
+ case AMOTION_EVENT_ACTION_DOWN:
+ eventType = POWER_MANAGER_TOUCH_EVENT;
+ break;
+ case AMOTION_EVENT_ACTION_UP:
+ eventType = POWER_MANAGER_TOUCH_UP_EVENT;
+ break;
+ default:
+ if (motionEntry->eventTime - motionEntry->downTime >= EVENT_IGNORE_DURATION) {
+ eventType = POWER_MANAGER_TOUCH_EVENT;
+ } else {
+ eventType = POWER_MANAGER_LONG_TOUCH_EVENT;
+ }
+ break;
+ }
}
}
- return true;
-}
-void InputDispatcher::pokeUserActivityLocked(nsecs_t eventTime, int32_t eventType) {
CommandEntry* commandEntry = postCommandLocked(
& InputDispatcher::doPokeUserActivityLockedInterruptible);
- commandEntry->eventTime = eventTime;
+ commandEntry->eventTime = eventEntry->eventTime;
commandEntry->userActivityEventType = eventType;
}
diff --git a/libs/utils/StreamingZipInflater.cpp b/libs/utils/StreamingZipInflater.cpp
index 7ebde78..1f62ac5 100644
--- a/libs/utils/StreamingZipInflater.cpp
+++ b/libs/utils/StreamingZipInflater.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#define LOG_NDEBUG 1
#define LOG_TAG "szipinf"
#include <utils/Log.h>
@@ -157,7 +158,7 @@
*/
int result = Z_OK;
if (mStreamNeedsInit) {
- LOGI("Initializing zlib to inflate");
+ LOGD("Initializing zlib to inflate");
result = inflateInit2(&mInflateState, -MAX_WBITS);
mStreamNeedsInit = false;
}
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 163b2db..3fb322a 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -840,7 +840,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
static char const * const gVendorString = "Google Inc.";
-static char const * const gVersionString = "1.2 Android Driver 1.1.0";
+static char const * const gVersionString = "1.2 Android Driver 1.2.0";
static char const * const gClientApiString = "OpenGL ES";
static char const * const gExtensionsString =
"EGL_KHR_image_base "
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
index a0f720a..8b4136a 100644
--- a/opengl/libagl/state.cpp
+++ b/opengl/libagl/state.cpp
@@ -33,7 +33,7 @@
// ----------------------------------------------------------------------------
static char const * const gVendorString = "Android";
-static char const * const gRendererString = "Android PixelFlinger 1.3";
+static char const * const gRendererString = "Android PixelFlinger 1.4";
static char const * const gVersionString = "OpenGL ES-CM 1.0";
static char const * const gExtensionsString =
"GL_OES_byte_coordinates " // OK