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

Commit 8d741e27 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make DocsUI only log to device policy logger on R+" into rvc-dev am:...

Merge "Make DocsUI only log to device policy logger on R+" into rvc-dev am: f59ffe06 am: d456d3bf am: e83749ce

Change-Id: I9bf80e663f719591dfbff08d19caf8d6b096b908
parents 01123a51 e83749ce
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.documentsui.picker.PickResult;
import com.android.documentsui.roots.ProvidersAccess;
import com.android.documentsui.services.FileOperationService;
import com.android.documentsui.services.FileOperationService.OpType;
import com.android.documentsui.util.VersionUtils;

import java.io.FileNotFoundException;
import java.util.List;
@@ -645,11 +646,15 @@ public final class Metrics {
    }

    /**
     * The implementation is copied from StatsLogInternal for the DEVICE_POLICY_EVENT.
     * The implementation is copied from StatsLogInternal for the DEVICE_POLICY_EVENT. This is a
     * no-op pre-R.
     */
    private static class DevicePolicyEventLogger {
        public static void write(@DevicePolicyMetricConsts.EventId int eventId,
                boolean booleanValue) {
            if (!VersionUtils.isAtLeastR()) {
                return;
            }
            final StatsEvent.Builder builder = StatsEvent.newBuilder();
            builder.setAtomId(DevicePolicyMetricConsts.ATOM_DEVICE_POLICY_EVENT);
            builder.writeInt(eventId); // eventId