Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8dcea010 authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Automerger Merge Worker
Browse files

Merge "Add support for a hw_timeout_multiplier system property." am: 59f72059 am: 19995202

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1628803

Change-Id: I570d84af5e8d7b46edc047b52d15b03c5acac4c6
parents 117556d5 19995202
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -58,6 +58,7 @@ static constexpr bool DEBUG_FOCUS = false;
#include <sstream>
#include <sstream>


#include <android-base/chrono_utils.h>
#include <android-base/chrono_utils.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <android-base/stringprintf.h>
#include <binder/Binder.h>
#include <binder/Binder.h>
#include <input/InputDevice.h>
#include <input/InputDevice.h>
@@ -72,13 +73,14 @@ static constexpr bool DEBUG_FOCUS = false;
#define INDENT3 "      "
#define INDENT3 "      "
#define INDENT4 "        "
#define INDENT4 "        "


using android::base::HwTimeoutMultiplier;
using android::base::StringPrintf;
using android::base::StringPrintf;


namespace android::inputdispatcher {
namespace android::inputdispatcher {


// Default input dispatching timeout if there is no focused application or paused window
// Default input dispatching timeout if there is no focused application or paused window
// from which to determine an appropriate dispatching timeout.
// from which to determine an appropriate dispatching timeout.
constexpr std::chrono::nanoseconds DEFAULT_INPUT_DISPATCHING_TIMEOUT = 5s;
const std::chrono::nanoseconds DEFAULT_INPUT_DISPATCHING_TIMEOUT = 5s * HwTimeoutMultiplier();


// Amount of time to allow for all pending events to be processed when an app switch
// Amount of time to allow for all pending events to be processed when an app switch
// key is on the way.  This is used to preempt input dispatch and drop input events
// key is on the way.  This is used to preempt input dispatch and drop input events