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

Commit 0b606fb0 authored by Michael Wachenschwanz's avatar Michael Wachenschwanz Committed by Automerger Merge Worker
Browse files

Merge "Log and skip noteEvent calls with null name" into sc-dev am: 0e1ba5a3 am: 36fb9e1e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15419007

Change-Id: I5b4339952fb70e0d9fb18e2156b0443b0085f226
parents de7585fe 36fb9e1e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -841,6 +841,12 @@ public final class BatteryStatsService extends IBatteryStats.Stub

    public void noteEvent(final int code, final String name, final int uid) {
        enforceCallingPermission();
        if (name == null) {
            // TODO(b/194733136): Replace with an IllegalArgumentException throw.
            Slog.wtfStack(TAG, "noteEvent called with null name. code = " + code);
            return;
        }

        synchronized (mLock) {
            final long elapsedRealtime = SystemClock.elapsedRealtime();
            final long uptime = SystemClock.uptimeMillis();