Merge "Enable PARTIAL_CONNECTIVITY dialog"
This commit is contained in:
@@ -2564,7 +2564,12 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
|| (nai.networkMisc.acceptPartialConnectivity
|
|| (nai.networkMisc.acceptPartialConnectivity
|
||||||
&& nai.partialConnectivity);
|
&& nai.partialConnectivity);
|
||||||
// Once a network is determined to have partial connectivity, it cannot
|
// Once a network is determined to have partial connectivity, it cannot
|
||||||
// go back to full connectivity without a disconnect.
|
// go back to full connectivity without a disconnect. This is because
|
||||||
|
// NetworkMonitor can only communicate either PARTIAL_CONNECTIVITY or VALID,
|
||||||
|
// but not both.
|
||||||
|
// TODO: Provide multi-testResult to improve the communication between
|
||||||
|
// ConnectivityService and NetworkMonitor, so that ConnectivityService could
|
||||||
|
// know the real status of network.
|
||||||
final boolean partialConnectivityChanged =
|
final boolean partialConnectivityChanged =
|
||||||
(partialConnectivity && !nai.partialConnectivity);
|
(partialConnectivity && !nai.partialConnectivity);
|
||||||
|
|
||||||
@@ -3581,9 +3586,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
// NetworkMonitor detects the network is partial connectivity. Need to change the design to
|
// NetworkMonitor detects the network is partial connectivity. Need to change the design to
|
||||||
// popup the notification immediately when the network is partial connectivity.
|
// popup the notification immediately when the network is partial connectivity.
|
||||||
if (nai.partialConnectivity) {
|
if (nai.partialConnectivity) {
|
||||||
// Treat PARTIAL_CONNECTIVITY as NO_INTERNET temporary until Settings has been updated.
|
showNetworkNotification(nai, NotificationType.PARTIAL_CONNECTIVITY);
|
||||||
// TODO: Need to change back to PARTIAL_CONNECTIVITY when Settings part is merged.
|
|
||||||
showNetworkNotification(nai, NotificationType.NO_INTERNET);
|
|
||||||
} else {
|
} else {
|
||||||
showNetworkNotification(nai, NotificationType.NO_INTERNET);
|
showNetworkNotification(nai, NotificationType.NO_INTERNET);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user