Commit 2aceb05e authored by Yuwei Huang's avatar Yuwei Huang Committed by Commit Bot

[CRD iOS] Remove mobile data warning

As discussed previously, people who care about mobile data usage can
limit mobile data usage from the app, so we can remove the warning
dialog for now and see if there is any feedback lamenting its loss.

Bug: 868194
Change-Id: I3efb1adb10b4207c67605c68195d480fbe7a7b3a
Reviewed-on: https://chromium-review.googlesource.com/1152547Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578874}
parent af6f4969
......@@ -264,45 +264,20 @@ using remoting::HostListService;
return;
}
void (^connectToHost)() = ^{
[MDCSnackbarManager dismissAndCallCompletionBlocksWithCategory:nil];
ClientConnectionViewController* clientConnectionViewController =
[[ClientConnectionViewController alloc] initWithHostInfo:cell.hostInfo];
[self.navigationController pushViewController:clientConnectionViewController
animated:YES];
};
switch (GetConnectionType()) {
case ConnectionType::WIFI:
connectToHost();
break;
case ConnectionType::WWAN: {
MDCAlertController* alert = [MDCAlertController
alertControllerWithTitle:nil
message:l10n_util::GetNSString(
IDS_MOBILE_NETWORK_WARNING)];
MDCAlertAction* continueAction = [MDCAlertAction
actionWithTitle:l10n_util::GetNSString(IDS_IDLE_CONTINUE)
handler:^(MDCAlertAction*) {
connectToHost();
}];
[alert addAction:continueAction];
MDCAlertAction* cancelAction =
[MDCAlertAction actionWithTitle:l10n_util::GetNSString(IDS_CANCEL)
handler:nil];
[alert addAction:cancelAction];
[self presentViewController:alert animated:YES completion:nil];
break;
}
default:
[MDCSnackbarManager
showMessage:[MDCSnackbarMessage
messageWithText:l10n_util::GetNSString(
IDS_ERROR_NETWORK_ERROR)]];
if (GetConnectionType() == ConnectionType::NONE) {
[MDCSnackbarManager
showMessage:[MDCSnackbarMessage
messageWithText:l10n_util::GetNSString(
IDS_ERROR_NETWORK_ERROR)]];
return;
}
[MDCSnackbarManager dismissAndCallCompletionBlocksWithCategory:nil];
ClientConnectionViewController* clientConnectionViewController =
[[ClientConnectionViewController alloc] initWithHostInfo:cell.hostInfo];
[self.navigationController pushViewController:clientConnectionViewController
animated:YES];
completionBlock();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment