Merge "Suppress the wtf log for notifications that are expected"
This commit is contained in:
@@ -178,15 +178,31 @@ public class NetworkNotificationManager {
|
|||||||
CharSequence title;
|
CharSequence title;
|
||||||
CharSequence details;
|
CharSequence details;
|
||||||
int icon = getIcon(transportType, notifyType);
|
int icon = getIcon(transportType, notifyType);
|
||||||
if (notifyType == NotificationType.NO_INTERNET && transportType == TRANSPORT_WIFI) {
|
if (notifyType == NotificationType.NO_INTERNET) {
|
||||||
|
switch (transportType) {
|
||||||
|
case TRANSPORT_WIFI:
|
||||||
title = r.getString(R.string.wifi_no_internet,
|
title = r.getString(R.string.wifi_no_internet,
|
||||||
WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID()));
|
WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID()));
|
||||||
details = r.getString(R.string.wifi_no_internet_detailed);
|
details = r.getString(R.string.wifi_no_internet_detailed);
|
||||||
} else if (notifyType == NotificationType.PARTIAL_CONNECTIVITY
|
break;
|
||||||
&& transportType == TRANSPORT_WIFI) {
|
default:
|
||||||
|
// TODO: Display notifications for those networks that provide internet.
|
||||||
|
// except VPN.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (notifyType == NotificationType.PARTIAL_CONNECTIVITY) {
|
||||||
|
switch (transportType) {
|
||||||
|
case TRANSPORT_WIFI:
|
||||||
title = r.getString(R.string.network_partial_connectivity,
|
title = r.getString(R.string.network_partial_connectivity,
|
||||||
WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID()));
|
WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID()));
|
||||||
details = r.getString(R.string.network_partial_connectivity_detailed);
|
details = r.getString(R.string.network_partial_connectivity_detailed);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// TODO: Display notifications for those networks that provide internet.
|
||||||
|
// except VPN.
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else if (notifyType == NotificationType.LOST_INTERNET &&
|
} else if (notifyType == NotificationType.LOST_INTERNET &&
|
||||||
transportType == TRANSPORT_WIFI) {
|
transportType == TRANSPORT_WIFI) {
|
||||||
title = r.getString(R.string.wifi_no_internet,
|
title = r.getString(R.string.wifi_no_internet,
|
||||||
|
|||||||
Reference in New Issue
Block a user