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

Commit fc1d794c 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 am: 2743d872

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



Change-Id: Ie1c540bda049527745266dbb139fc035030842f4
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0f2aab1a 2743d872
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;
    }
}