Trace RemoteEditText#hideIme which can make binder calls

I am not certain how to safely background this call, but I want to trace this method ASAP so that we can quickly identify when this is the culprit in the future.

Bug: 288578300
Test: perfetto
Change-Id: I060224b37a51a0e063f71cf6151284cb6ef4ed61
This commit is contained in:
Jeff DeCew
2023-07-21 13:24:48 -04:00
parent c44cfb9c7f
commit ff09b41793

View File

@@ -30,6 +30,7 @@ import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.GradientDrawable;
import android.os.Trace;
import android.os.UserHandle;
import android.text.Editable;
import android.text.SpannedString;
@@ -1032,10 +1033,12 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
}
private void hideIme() {
Trace.beginSection("RemoteEditText#hideIme");
final WindowInsetsController insetsController = getWindowInsetsController();
if (insetsController != null) {
insetsController.hide(WindowInsets.Type.ime());
}
Trace.endSection();
}
private void defocusIfNeeded(boolean animate) {