Commit d0a15c61 authored by Nnamdi Theodore Johnson-Kanu's avatar Nnamdi Theodore Johnson-Kanu Committed by Commit Bot

[CrOS cellular] Show other APN when no APN is available

Before this CL, if a network APN list is empty or undefined a user is
not able to manually enter a custom APN. This CL fixes this issue and
allows a user to manually enter a new custom APN

Bug: 1146524
Change-Id: I6ec01936cb32eefd2627e4447fe5055c99dd1401
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537926
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Reviewed-by: default avatarAzeem Arshad <azeemarshad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827947}
parent 30f14e92
......@@ -183,15 +183,11 @@ Polymer({
* @private
*/
setApnSelectList_(activeApn) {
assert(!activeApn || activeApn.accessPointName);
// The generated APN list ensures nonempty accessPointName and name
// properties.
const apnList = this.generateApnList_();
if (apnList === undefined) {
// No APNList property indicates that the network is not in a
// connectable state. Disable the UI.
this.apnSelectList_ = [];
this.set('selectedApn_', '');
if (apnList === undefined || apnList.length === 0) {
// Show other APN when no APN list property is available.
this.apnSelectList_ = [this.otherApn_];
this.set('selectedApn_', kOtherAccessPointName);
return;
}
// Get the list entry for activeApn if it exists. It will have 'name' set.
......
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