diff options
author | Chiachang Wang <chiachangwang@google.com> | 2021-03-18 16:20:27 +0800 |
---|---|---|
committer | Chiachang Wang <chiachangwang@google.com> | 2021-03-19 02:08:01 +0000 |
commit | 4a013645cb4a6ba1a0df037aba7cf68381b34cb0 (patch) | |
tree | 34b70c27e158c20d9ad1155749eaec996d33ed91 /services | |
parent | 0fcb8d6db42f6c20f6b69d47e02c54e2706f88f9 (diff) |
Send a Network instead of network id for wifi no internet dialog
It's a refactor work for incoming connectivity mainline. The
network information contained in the no internet notification
action was placed the target network id. The receiver which is
Settings will need to construct the network from the network id
using the hidden Network constructor. Since Network is moving
into module, Settings will not be able to access it. Apps should
use Network instead of network id, so just send the network
object to Settings.
Bug: 172183305
Test: manually test with no internet dialog and check the
behavior and log
Test: atest FrameworksNetTests
Change-Id: I68acc70a26a27eeeb9ab7af068a459905839f942
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 3194bdcaad18..4f0f980fa8b5 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -4350,7 +4350,7 @@ public class ConnectivityService extends IConnectivityManager.Stub Intent intent = new Intent(action); if (type != NotificationType.PRIVATE_DNS_BROKEN) { - intent.setData(Uri.fromParts("netId", Integer.toString(nai.network.getNetId()), null)); + intent.putExtra(ConnectivityManager.EXTRA_NETWORK, nai.network); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // Some OEMs have their own Settings package. Thus, need to get the current using // Settings package name instead of just use default name "com.android.settings". |