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

Commit f26f579c authored by Chiachang Wang's avatar Chiachang Wang Committed by Gerrit Code Review
Browse files

Merge "Replace the way to get the network for no internet dialog"

parents 19c5d0a7 11c37350
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -65,22 +65,17 @@ public final class WifiNoInternetDialog extends AlertActivity implements
        super.onCreate(savedInstanceState);

        final Intent intent = getIntent();
        if (intent == null || !isKnownAction(intent) || !"netId".equals(intent.getScheme())) {
        if (intent == null || !isKnownAction(intent)) {
            Log.e(TAG, "Unexpected intent " + intent + ", exiting");
            finish();
            return;
        }

        mAction = intent.getAction();

        try {
            mNetwork = new Network(Integer.parseInt(intent.getData().getSchemeSpecificPart()));
        } catch (NullPointerException|NumberFormatException e) {
            mNetwork = null;
        }
        mNetwork = intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK);

        if (mNetwork == null) {
            Log.e(TAG, "Can't determine network from '" + intent.getData() + "' , exiting");
            Log.e(TAG, "Can't determine network from intent extra, exiting");
            finish();
            return;
        }