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

Commit 98f80351 authored by Nataniel Borges's avatar Nataniel Borges Committed by Android (Google) Code Review
Browse files

Merge "Update tracing restriction to ro.debuggable=1" into main

parents e586c302 7a87b8b0
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -82,12 +82,11 @@ namespace android::inputdispatcher {

namespace {

// Input tracing is only available on debuggable builds (userdebug and eng) when the feature
// flag is enabled. When the flag is changed, tracing will only be available after reboot.
// 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 std::string buildType = base::GetProperty("ro.build.type", "user");
    static const bool isUserdebugOrEng = buildType == "userdebug" || buildType == "eng";
    return input_flags::enable_input_event_tracing() && isUserdebugOrEng;
    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.
+2 −1
Original line number Diff line number Diff line
@@ -533,7 +533,8 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
    mRefreshRateOverlayShowInMiddle =
            property_get_bool("debug.sf.show_refresh_rate_overlay_in_middle", 0);

    if (!mIsUserBuild && base::GetBoolProperty("debug.sf.enable_transaction_tracing"s, true)) {
    if (base::GetBoolProperty("ro.debuggable", false) &&
        base::GetBoolProperty("debug.sf.enable_transaction_tracing"s, true)) {
        mTransactionTracing.emplace();
        mLayerTracing.setTransactionTracing(*mTransactionTracing);
    }