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

Commit e4623957 authored by Harry Cutts's avatar Harry Cutts Committed by Android (Google) Code Review
Browse files

Merge "InputDispatcher: clean up input event tracing flag" into main

parents 666e72c8 1c11828a
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -25,13 +25,6 @@ flag {
  }
}

flag {
  name: "enable_input_event_tracing"
  namespace: "input"
  description: "Set to true to enable input event tracing, including always-on tracing on non-user builds"
  bug: "210460522"
}

flag {
  name: "enable_multi_device_input"
  namespace: "input"
+2 −8
Original line number Diff line number Diff line
@@ -82,17 +82,11 @@ namespace android::inputdispatcher {

namespace {

// Input tracing is only available on debuggable builds when the feature flag is enabled. When the
// flag is changed, tracing will only be available after reboot.
bool isInputTracingEnabled() {
    static const bool isDebuggable = base::GetBoolProperty("ro.debuggable", false);
    return input_flags::enable_input_event_tracing() && isDebuggable;
}

// Create the input tracing backend that writes to perfetto from a single thread.
std::unique_ptr<trace::InputTracingBackendInterface> createInputTracingBackendIfEnabled(
        JNIEnv* env) {
    if (!isInputTracingEnabled()) {
    static const bool isDebuggable = base::GetBoolProperty("ro.debuggable", false);
    if (!isDebuggable) {
        return nullptr;
    }
    return std::make_unique<trace::impl::ThreadedBackend<