diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-08-18 15:51:08 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2010-08-18 16:58:27 -0700 |
commit | ae9fc03bdccda709101291bbcd3beaa5b6daebfc (patch) | |
tree | 69367f760a943f9eda3edabcb1130302ea6cb0d8 /services/java/com/android/server/InputManager.java | |
parent | 6b2c56a299eb05deef2b887549e29e9e9f0f2cf6 (diff) |
Add support for throttling motion events.
Change-Id: I24b3a17753e91ecda60a60fe5cd2e6b3260e033d
Diffstat (limited to 'services/java/com/android/server/InputManager.java')
-rw-r--r-- | services/java/com/android/server/InputManager.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/services/java/com/android/server/InputManager.java b/services/java/com/android/server/InputManager.java index c2c799b4e0a0..e54f1837c8c8 100644 --- a/services/java/com/android/server/InputManager.java +++ b/services/java/com/android/server/InputManager.java @@ -26,6 +26,7 @@ import android.content.res.Configuration; import android.os.Environment; import android.os.LocalPowerManager; import android.os.PowerManager; +import android.os.SystemProperties; import android.util.Slog; import android.util.Xml; import android.view.InputChannel; @@ -507,5 +508,18 @@ public class InputManager { return names.toArray(new String[names.size()]); } + + @SuppressWarnings("unused") + public int getMaxEventsPerSecond() { + int result = 0; + try { + result = Integer.parseInt(SystemProperties.get("windowsmgr.max_events_per_sec")); + } catch (NumberFormatException e) { + } + if (result < 1) { + result = 35; + } + return result; + } } } |