summaryrefslogtreecommitdiffstats
path: root/include/ui/InputReader.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-09-08 11:49:43 -0700
committerJeff Brown <jeffbrown@google.com>2010-09-12 16:52:03 -0700
commita665ca805c7ecda89ef95658f4d1c09ba6bd7f2e (patch)
treed5de6e4c6bfd94c7eb0a9fae613b488814081425 /include/ui/InputReader.h
parentf76fc380f5f97843d1c8f760ca1ae70cacb81ae4 (diff)
downloadframeworks_native-a665ca805c7ecda89ef95658f4d1c09ba6bd7f2e.zip
frameworks_native-a665ca805c7ecda89ef95658f4d1c09ba6bd7f2e.tar.gz
frameworks_native-a665ca805c7ecda89ef95658f4d1c09ba6bd7f2e.tar.bz2
Input dispatcher ANR handling enhancements.
This change is essentially a rewrite of the main input dispatcher loop with the target identification folded in. Since the input dispatcher now has all of the window state, it can make better decisions about when to ANR. Added a .5 second deadline for processing app switch keys. This behavior predates Gingerbread but had not previously been ported. Fixed some timing inaccuracies in the ANR accounting that could cause applications to ANR sooner than they should have. Added a mechanism for tracking key and motion events that have been dispatched to a window so that appropriate cancelation events can be synthesized when recovering from ANR. This change helps to keep applications in sync so they don't end up with stuck buttons upon recovery from ANRs. Added more comments to describe the tricky parts of PollLoop. Change-Id: I13dffca27acb436fc383980db536abc4d8b9e6f1
Diffstat (limited to 'include/ui/InputReader.h')
-rw-r--r--include/ui/InputReader.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h
index 7a089a4..903c3c4 100644
--- a/include/ui/InputReader.h
+++ b/include/ui/InputReader.h
@@ -95,10 +95,6 @@ public:
// The input dispatcher should dispatch the input to the application.
ACTION_DISPATCH = 0x00000001,
-
- // The input dispatcher should perform special filtering in preparation for
- // a pending app switch.
- ACTION_APP_SWITCH_COMING = 0x00000002,
};
/* Gets information about the display with the specified id.
@@ -168,6 +164,11 @@ protected:
virtual ~InputReaderInterface() { }
public:
+ /* Dumps the state of the input reader.
+ *
+ * This method may be called on any thread (usually by the input manager). */
+ virtual void dump(String8& dump) = 0;
+
/* Runs a single iteration of the processing loop.
* Nominally reads and processes one incoming message from the EventHub.
*
@@ -240,6 +241,8 @@ public:
const sp<InputDispatcherInterface>& dispatcher);
virtual ~InputReader();
+ virtual void dump(String8& dump);
+
virtual void loopOnce();
virtual void getInputConfiguration(InputConfiguration* outConfiguration);
@@ -305,6 +308,9 @@ private:
GetStateFunc getStateFunc);
bool markSupportedKeyCodes(int32_t deviceId, uint32_t sourceMask, size_t numCodes,
const int32_t* keyCodes, uint8_t* outFlags);
+
+ // dump state
+ void dumpDeviceInfo(String8& dump);
};
@@ -759,9 +765,11 @@ protected:
} mLocked;
virtual void configureParameters();
+ virtual void logParameters();
virtual void configureRawAxes();
virtual void logRawAxes();
virtual bool configureSurfaceLocked();
+ virtual void logMotionRangesLocked();
virtual void configureVirtualKeysLocked();
virtual void parseCalibration();
virtual void resolveCalibration();