Add support for throttling motion events.
Change-Id: I24b3a17753e91ecda60a60fe5cd2e6b3260e033d
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user