DO NOT MERGE Captive portal systel log improvements
am: a4f17bcbdf
Change-Id: Icbba206e8c035f566ff6d9e500d972a3dcf65bb6
This commit is contained in:
@@ -80,7 +80,8 @@ import java.util.concurrent.TimeUnit;
|
|||||||
*/
|
*/
|
||||||
public class NetworkMonitor extends StateMachine {
|
public class NetworkMonitor extends StateMachine {
|
||||||
private static final String TAG = NetworkMonitor.class.getSimpleName();
|
private static final String TAG = NetworkMonitor.class.getSimpleName();
|
||||||
private static final boolean DBG = false;
|
private static final boolean DBG = true;
|
||||||
|
private static final boolean VDBG = false;
|
||||||
|
|
||||||
// Default configuration values for captive portal detection probes.
|
// Default configuration values for captive portal detection probes.
|
||||||
// TODO: append a random length parameter to the default HTTPS url.
|
// TODO: append a random length parameter to the default HTTPS url.
|
||||||
@@ -918,7 +919,7 @@ public class NetworkMonitor extends StateMachine {
|
|||||||
latencyBroadcast.putExtra(EXTRA_SSID, currentWifiInfo.getSSID());
|
latencyBroadcast.putExtra(EXTRA_SSID, currentWifiInfo.getSSID());
|
||||||
latencyBroadcast.putExtra(EXTRA_BSSID, currentWifiInfo.getBSSID());
|
latencyBroadcast.putExtra(EXTRA_BSSID, currentWifiInfo.getBSSID());
|
||||||
} else {
|
} else {
|
||||||
if (DBG) logw("network info is TYPE_WIFI but no ConnectionInfo found");
|
if (VDBG) logw("network info is TYPE_WIFI but no ConnectionInfo found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -931,8 +932,8 @@ public class NetworkMonitor extends StateMachine {
|
|||||||
if (cellInfo.isRegistered()) {
|
if (cellInfo.isRegistered()) {
|
||||||
numRegisteredCellInfo++;
|
numRegisteredCellInfo++;
|
||||||
if (numRegisteredCellInfo > 1) {
|
if (numRegisteredCellInfo > 1) {
|
||||||
log("more than one registered CellInfo. Can't " +
|
if (VDBG) logw("more than one registered CellInfo." +
|
||||||
"tell which is active. Bailing.");
|
" Can't tell which is active. Bailing.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cellInfo instanceof CellInfoCdma) {
|
if (cellInfo instanceof CellInfoCdma) {
|
||||||
@@ -948,7 +949,7 @@ public class NetworkMonitor extends StateMachine {
|
|||||||
CellIdentityWcdma cellId = ((CellInfoWcdma) cellInfo).getCellIdentity();
|
CellIdentityWcdma cellId = ((CellInfoWcdma) cellInfo).getCellIdentity();
|
||||||
latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
|
latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
|
||||||
} else {
|
} else {
|
||||||
if (DBG) logw("Registered cellinfo is unrecognized");
|
if (VDBG) logw("Registered cellinfo is unrecognized");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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