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

Commit 2743d872 authored by Anushree Ganjam's avatar Anushree Ganjam Committed by Automerger Merge Worker
Browse files

Merge "Generate TargetId for Toast Session logging when Toast surface is...

Merge "Generate TargetId for Toast Session logging when Toast surface is visible and invisible" into udc-dev am: 1d984bcc

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/libs/systemui/+/22464234



Change-Id: I86ae9c7b7c6badaa948340704227b2fab3075751
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 37f9203e 1d984bcc
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -107,4 +107,19 @@ public class SearchTargetEventHelper {
    public static String generatePlayTargetIdForLogging(String appPackage) {
        return "PLAY" + ":" + Process.myUserHandle().getIdentifier() + ":" + appPackage + ":Gms";
    }

    /**
     * Generate target id similar to AiAi targetId for logging Toast session based on surface
     * visible and invisible.
     * AiAi target id is of format "resultType:userId:packageName:extraInfo"
     *
     * @return string TargetId for Toast session
     * Example of Toast session target Id
     * targetId=SESSION_INFO:0:toast:SURFACE_VISIBLE
     * targetId=SESSION_INFO:0:toast:SURFACE_INVISIBLE
     */
    public static String generateToastSessionTargetIdForLogging(String surfaceVisibility) {
        return "SESSION_INFO:" + Process.myUserHandle().getIdentifier()
                + ":toast:" + surfaceVisibility;
    }
}