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

Commit e3621e06 authored by Chenjie Yu's avatar Chenjie Yu Committed by android-build-merger
Browse files

Merge "Fix uid for AppBreadcrumbReported for 3p app" into pi-dev

am: a3178fc4

Change-Id: I681358bd056e92c0ecc18e8137bedd87e433b640
parents a95a7607 a3178fc4
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.util;

import android.os.Process;

/**
 * StatsLog provides an API for developers to send events to statsd. The events can be used to
 * define custom metrics inside statsd. We will rate-limit how often the calls can be made inside
@@ -34,7 +36,8 @@ public final class StatsLog extends StatsLogInternal {
     */
    public static boolean logStart(int label) {
        if (label >= 0 && label < 16) {
            StatsLog.write(APP_BREADCRUMB_REPORTED, label, APP_BREADCRUMB_REPORTED__STATE__START);
            StatsLog.write(APP_BREADCRUMB_REPORTED, Process.myUid(),
                    label, APP_BREADCRUMB_REPORTED__STATE__START);
            return true;
        }
        return false;
@@ -48,7 +51,8 @@ public final class StatsLog extends StatsLogInternal {
     */
    public static boolean logStop(int label) {
        if (label >= 0 && label < 16) {
            StatsLog.write(APP_BREADCRUMB_REPORTED, label, APP_BREADCRUMB_REPORTED__STATE__STOP);
            StatsLog.write(APP_BREADCRUMB_REPORTED, Process.myUid(),
                    label, APP_BREADCRUMB_REPORTED__STATE__STOP);
            return true;
        }
        return false;
@@ -62,7 +66,7 @@ public final class StatsLog extends StatsLogInternal {
     */
    public static boolean logEvent(int label) {
        if (label >= 0 && label < 16) {
            StatsLog.write(APP_BREADCRUMB_REPORTED, label,
            StatsLog.write(APP_BREADCRUMB_REPORTED, Process.myUid(), label,
                    APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED);
            return true;
        }