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

Commit 1464c5f0 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: Ia8d68d8b6343f4a38d419c07001521c4bbb2e143
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 936bcc1f 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;
    }
}