Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 542d8a30 authored by Chiachang Wang's avatar Chiachang Wang Committed by android-build-merger
Browse files

Merge "Suppress the wtf log for notifications that are expected" am: bca9bcef am: 4e3761e1

am: 1bb46d06

Change-Id: I228813f2a79025b51c206cec920e1762b680212f
parents 55e4fadc 1bb46d06
Loading
Loading
Loading
Loading
+25 −9
Original line number Diff line number Diff line
@@ -178,15 +178,31 @@ public class NetworkNotificationManager {
        CharSequence title;
        CharSequence details;
        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,
                        WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID()));
                    details = r.getString(R.string.wifi_no_internet_detailed);
        } else if (notifyType == NotificationType.PARTIAL_CONNECTIVITY
                && transportType == TRANSPORT_WIFI) {
                    break;
                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,
                        WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID()));
                    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 &&
                transportType == TRANSPORT_WIFI) {
            title = r.getString(R.string.wifi_no_internet,