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 2a3998dd05)
Change-Id: I1eaab5ea702063dde3e23324d3a1b3dc172c5ac5
This commit is contained in:
committed by
Lorenzo Colitti
parent
739d7e9ce7
commit
7488fe4159
@@ -114,7 +114,7 @@ public class NetworkNotificationManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
Slog.d(TAG, "showNotification " + notifyType
|
Slog.d(TAG, "showNotification id=" + id + " " + notifyType
|
||||||
+ " transportType=" + getTransportName(transportType)
|
+ " transportType=" + getTransportName(transportType)
|
||||||
+ " extraInfo=" + extraInfo + " highPriority=" + highPriority);
|
+ " extraInfo=" + extraInfo + " highPriority=" + highPriority);
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ public class NetworkNotificationManager {
|
|||||||
try {
|
try {
|
||||||
mNotificationManager.notifyAsUser(NOTIFICATION_ID, id, notification, UserHandle.ALL);
|
mNotificationManager.notifyAsUser(NOTIFICATION_ID, id, notification, UserHandle.ALL);
|
||||||
} catch (NullPointerException npe) {
|
} 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 {
|
try {
|
||||||
mNotificationManager.cancelAsUser(NOTIFICATION_ID, id, UserHandle.ALL);
|
mNotificationManager.cancelAsUser(NOTIFICATION_ID, id, UserHandle.ALL);
|
||||||
} catch (NullPointerException npe) {
|
} catch (NullPointerException npe) {
|
||||||
Slog.d(TAG, "setNotificationVisible: cancel notificationManager npe=" + npe);
|
Slog.d(TAG, "setNotificationVisible: cancel notificationManager error", npe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user