From 47230f539a40a2b44dce1ec2c4fd85880df43d6e Mon Sep 17 00:00:00 2001 From: Hugo Benichi Date: Mon, 21 Nov 2016 13:50:05 +0900 Subject: [PATCH] DO NOT MERGE Captive portal systel log improvements This patch improves system logging around captive portal detection to make inspection of bug reports sligthly easier: - NetworkMonitor now logs by default CMD_CAPTIVE_PORTAL_RECHECK and CMD_CAPTIVE_PORTAL_APP_FINISHED. Other system logs are kept off with a new VDBG boolean contant, - NetworkNotificationManager now prints the notification id at notification time. This allows to easily correlate show and clear. - errors in NetworkNotificationManager are logged as Throwable instead of through their implicit toString() method. Test: $ runtest frameworks-net Bug: 32198726 (cherry picked from commit 8b025bf108c729156b40159038befa0e6c5bebce) Change-Id: I7780c389a94c4b9fa226f53b02fe5960d1c08618 --- .../server/connectivity/NetworkNotificationManager.java | 6 +++--- 1 file changed, 3 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 f7b01be48d..c6bf4c5fcd 100644 --- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java @@ -114,7 +114,7 @@ public class NetworkNotificationManager { } if (DBG) { - Slog.d(TAG, "showNotification " + notifyType + Slog.d(TAG, "showNotification id=" + id + " " + notifyType + " transportType=" + getTransportName(transportType) + " extraInfo=" + extraInfo + " highPriority=" + highPriority); } @@ -187,7 +187,7 @@ public class NetworkNotificationManager { try { mNotificationManager.notifyAsUser(NOTIFICATION_ID, id, notification, UserHandle.ALL); } catch (NullPointerException npe) { - Slog.d(TAG, "setNotificationVisible: visible notificationManager npe=" + npe); + Slog.d(TAG, "setNotificationVisible: visible notificationManager error", npe); } } @@ -198,7 +198,7 @@ public class NetworkNotificationManager { try { mNotificationManager.cancelAsUser(NOTIFICATION_ID, id, UserHandle.ALL); } catch (NullPointerException npe) { - Slog.d(TAG, "setNotificationVisible: cancel notificationManager npe=" + npe); + Slog.d(TAG, "setNotificationVisible: cancel notificationManager error", npe); } }