Merge "Replace the way to get the network for no internet dialog" am: f26f579c8d
am: 33855bfd7e
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1644547 Change-Id: I44ab529b8251c1f4630186c74ba2d16b5030e104
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user