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

Commit fba2dda4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[play] Add generatePlayTargetIdForLogging." into tm-qpr-dev

parents 0e9853b1 8f4986ff
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -71,4 +71,16 @@ public class SearchTargetEventHelper {
        return appTargetId + appComponentName.getPackageName() + ":"
                + appComponentName.getClassName();
    }

    /**
     * Generate gms play target id similar to AiAi targetId for logging only n-state.
     * AiAi target id is of format "resultType:userId:packageName:extraInfo"
     *
     * @return string playTargetId
     * Example playTargetId for Candy Crush
     * PLAY:0:com.king.candycrushsaga:Gms
     */
    public static String generatePlayTargetIdForLogging(String appPackage) {
        return "PLAY" + ":" + Process.myUserHandle().getIdentifier() + ":" + appPackage + ":Gms";
    }
}