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

Commit d6b10eaf authored by Peter Kalauskas's avatar Peter Kalauskas
Browse files

New trace slice for start of user switch

Add new trace section: UserDetailView.Adapter#onClick. This makes it
easier to spot the start of the user switch. Eventually, this may be
used in perfetto metrics for measuring total user switch time.

Bug: 197028912
Test: Capture perfetto trace, search for UserDetailView.Adapter#onClick
Change-Id: I38bebd27710123b53a0b840c523781773427eddb
parent c3fa0b09
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.os.Trace;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
@@ -150,6 +151,7 @@ public class UserDetailView extends PseudoGridView {
                return;
            }

            Trace.beginSection("UserDetailView.Adapter#onClick");
            UserSwitcherController.UserRecord tag =
                    (UserSwitcherController.UserRecord) view.getTag();
            if (tag.isDisabledByAdmin) {
@@ -167,6 +169,7 @@ public class UserDetailView extends PseudoGridView {
                }
                onUserListItemClicked(tag);
            }
            Trace.endSection();
        }
    }
}