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({ ...@@ -183,15 +183,11 @@ Polymer({
* @private * @private
*/ */
setApnSelectList_(activeApn) { setApnSelectList_(activeApn) {
assert(!activeApn || activeApn.accessPointName);
// The generated APN list ensures nonempty accessPointName and name
// properties.
const apnList = this.generateApnList_(); const apnList = this.generateApnList_();
if (apnList === undefined) { if (apnList === undefined || apnList.length === 0) {
// No APNList property indicates that the network is not in a // Show other APN when no APN list property is available.
// connectable state. Disable the UI. this.apnSelectList_ = [this.otherApn_];
this.apnSelectList_ = []; this.set('selectedApn_', kOtherAccessPointName);
this.set('selectedApn_', '');
return; return;
} }
// Get the list entry for activeApn if it exists. It will have 'name' set. // 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