summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/InputManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/java/com/android/server/InputManager.java')
-rw-r--r--services/java/com/android/server/InputManager.java14
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;
+ }
}
}