Commit 84fed568 authored by Ben Chan's avatar Ben Chan Committed by Commit Bot

Keep user specified APN in all upper case.

The APN list UI incorrectly assumes that the user specified APN would
never match any APN found in shill's mobile operator database. If a user
specifies an APN that matches an existing APN provided by shill, the UI
goes into a weird state as described in b/78199279. To help resolve the
ambiguity situation, we leverage the fact that APNs are case sensitive.
This CL changes the APN list UI to store the user specified APN in all
upper case, while CL:1028794 normalizes all APNs in shill's mobile
operator database to all lower case.

      in the APN list. Verify that the user specified APN is stored in
      all upper case and the issue described in b/78199279 is not
      observed.

Bug: b/78199279
Test: Specify a custom APN with value that matches an existing one found
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I51994c87442c6e0a34e1637a8bf98b143f497059
Reviewed-on: https://chromium-review.googlesource.com/1028971Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553849}
parent c248b124
......@@ -82,7 +82,7 @@ Polymer({
},
/** @const */
DefaultAccessPointName: 'none',
DefaultAccessPointName: 'NONE',
/**
* Polymer networkProperties changed method.
......@@ -202,7 +202,12 @@ Polymer({
* @private
*/
onOtherApnChange_: function(event) {
this.set('otherApn_.' + event.detail.field, event.detail.value);
// TODO(benchan/stevenjb): Move this to shill or
// onc_translator_onc_to_shill.cc.
var value = (event.detail.field == 'AccessPointName') ?
event.detail.value.toUpperCase() :
event.detail.value;
this.set('otherApn_.' + event.detail.field, value);
// Don't send a change event for 'Other' until the 'Save' button is tapped.
},
......
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