From e46b47d85d9a241a0f7d74c6d20e573f73d8c2c3 Mon Sep 17 00:00:00 2001 From: Paul Stewart Date: Mon, 19 Dec 2016 08:45:32 -0800 Subject: [PATCH] Fix other String.format issues in NetworkNotificationManager.java Commit 51727428fcfa9e09bfd70e710ceef02325994942 added a string format which caused an exception. On top of the fixes to this from 5a453273522e6b60ccb2d9098faf9fa95bc27da8, 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 --- .../server/connectivity/NetworkNotificationManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java index 2fbdbeb7c6..c0550c6c78 100644 --- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java @@ -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); }