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

Commit 835cb496 authored by Paul Stewart's avatar Paul Stewart
Browse files

Fix other String.format issues in NetworkNotificationManager.java

Commit fb2609d3 added a string
format which caused an exception.  On top of the fixes to this
from e1406167, we can also fix
a few more issues here with some missing arguments to other
String.format invocations in the aforementioned CL, and other
formatting problems.

Bug: 33737715
Test: Build and run SUW
Change-Id: I13410ffebbc606b8801656ea0934f96ccd4b5357
parent 298b91ee
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -143,7 +143,8 @@ public class NetworkNotificationManager {
        if (DBG) {
            Slog.d(TAG, String.format(
                    "showNotification tag=%s event=%s transport=%s extraInfo=%s highPrioriy=%s",
                    tag, nameOf(eventId), getTransportName(transportType), extraInfo, highPriority));
                    tag, nameOf(eventId), getTransportName(transportType), extraInfo,
                    highPriority));
        }

        Resources r = Resources.getSystem();
@@ -227,13 +228,14 @@ public class NetworkNotificationManager {
        }
        final int eventId = mNotificationTypeMap.get(id);
        if (DBG) {
            Slog.d(TAG, String.format("clearing notification tag=%s event=", tag, nameOf(eventId)));
            Slog.d(TAG, String.format("clearing notification tag=%s event=%s", tag,
                   nameOf(eventId)));
        }
        try {
            mNotificationManager.cancelAsUser(tag, eventId, UserHandle.ALL);
        } catch (NullPointerException npe) {
            Slog.d(TAG, String.format(
                    "failed to clear notification tag=%s event=", tag, nameOf(eventId)), npe);
                    "failed to clear notification tag=%s event=%s", tag, nameOf(eventId)), npe);
        }
        mNotificationTypeMap.delete(id);
    }