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

[Cros cellular] Show carrier name for cellular in network list item

- Add provider name where possible

Before: https://screenshot.googleplex.com/7EE62daLS47D2Y2.png
After : https://screenshot.googleplex.com/9oHhYyy7TnbtVR7.png

Bug: 1093185
Change-Id: I353580175952c83f83b9d430e46f7a8bc52179d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2506169
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarAzeem Arshad <azeemarshad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827111}
parent c265207e
......@@ -1572,21 +1572,39 @@
<message name="IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR" desc="A11y label for a cellular network in a list in settings and oobe. Clicking the network starts a connection attempt.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="NETWORK_NAME">$3<ex>Verizon Wireless</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$4<ex>80</ex></ph>%, Connect
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_WITH_PROVIDER_NAME" desc="A11y label for a cellular network in a list in settings and oobe. Includes provider name. Clicking the network starts a connection attempt.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="NETWORK_NAME">$3<ex>Verizon Wireless</ex></ph>, <ph name="NETWORK_PROVIDER_NAME">$4<ex>Verizon LTE</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$5<ex>80</ex></ph>%, Connect
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_MANAGED" desc="A11y label for an enterprise managed cellular network in a list in settings and oobe. Clicking the network starts a connection attempt. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="NETWORK_NAME">$3<ex>Verizon Wireless</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$4<ex>80</ex></ph>%, Managed by your Administrator, Connect
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_MANAGED_WITH_PROVIDER_NAME" desc="A11y label for an enterprise managed cellular network in a list in settings and oobe. Includes provider name. Clicking the network starts a connection attempt. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="NETWORK_NAME">$3<ex>Verizon Wireless</ex></ph>, <ph name="NETWORK_PROVIDER_NAME">$4<ex>Verizon LTE</ex></ph> Signal Strength <ph name="SIGNAL_STRENGTH">$5<ex>80</ex></ph>%, Managed by your Administrator, Connect
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_WITH_CONNECTION_STATUS" desc="A11y label for a cellular network in a list in settings and oobe . Includes connection status. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="NETWORK_NAME">$3<ex>Verizon Wireless</ex></ph>, <ph name="CONNECTION_STATUS">$4<ex>Connecting...</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$5<ex>80</ex></ph>%, Details
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_WITH_CONNECTION_STATUS_AND_PROVIDER_NAME" desc="A11y label for a cellular network in a list in settings and oobe . Includes connection status and provider name. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="NETWORK_NAME">$3<ex>Verizon Wireless</ex></ph>, <ph name="NETWORK_PROVIDER_NAME">$4<ex>Verizon LTE</ex></ph>, <ph name="CONNECTION_STATUS">$5<ex>Connecting...</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$6<ex>80</ex></ph>%, Details
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_MANAGED_WITH_CONNECTION_STATUS" desc="A11y label for an enterprise managed cellular network in a list in settings and oobe. Includes connection status. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="NETWORK_NAME">$3<ex>Verizon Wireless</ex></ph>, <ph name="CONNECTION_STATUS">$4<ex>Connecting...</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$5<ex>80</ex></ph>%, Managed by your Administrator, Details
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_MANAGED_WITH_CONNECTION_STATUS_AND_PROVIDER_NAME" desc="A11y label for an enterprise managed cellular network in a list in settings and oobe. Includes connection status and provider name. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="NETWORK_NAME">$3<ex>Verizon Wireless</ex></ph>, <ph name="NETWORK_PROVIDER_NAME">$4<ex>Verizon LTE</ex></ph>, <ph name="CONNECTION_STATUS">$5<ex>Connecting...</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$6<ex>80</ex></ph>%, Managed by your Administrator, Details
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_TETHER" desc="A11y label for a phone tether network in a list in settings and oobe. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="PHONE_NAME">$3<ex>Pixel 4</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$4<ex>80</ex></ph>%, Phone Battery <ph name="BATTERY_STATUS">$5<ex>80</ex></ph>%, Connect
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_TETHER_WITH_PROVIDER_NAME" desc="A11y label for a phone tether network in a list in settings and oobe. Includes provider name. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="PHONE_NAME">$3<ex>Pixel 4</ex></ph>, <ph name="PROVIDER_NAME">$4<ex>Google Fi</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$5<ex>80</ex></ph>%, Phone Battery <ph name="BATTERY_STATUS">$6<ex>80</ex></ph>%, Connect
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_TETHER_WITH_CONNECTION_STATUS" desc="A11y label for a phone tether network in a list in settings and oobe. Includes connection status. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="PHONE_NAME">$3<ex>Pixel 4</ex></ph>, <ph name="CONNECTION_STATUS">$4<ex>Connecting...</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$5<ex>80</ex></ph>%, Phone Battery <ph name="BATTERY_STATUS">$6<ex>80</ex></ph>%, Details
</message>
<message name="IDS_NETWORK_LIST_ITEM_LABEL_TETHER_WITH_CONNECTION_STATUS_AND_PROVIDER_NAME" desc="A11y label for a phone tether network in a list in settings and oobe. Includes connection status. Clicking the network navigates to the details page.">
Network <ph name="NETWORK_INDEX">$1<ex>1</ex></ph> of <ph name="NETWORK_COUNT">$2<ex>10</ex></ph>, <ph name="PHONE_NAME">$3<ex>Pixel 4</ex></ph>, <ph name="PROVIDER_NAME">$4<ex>Google Fi</ex></ph>, <ph name="CONNECTION_STATUS">$5<ex>Connecting...</ex></ph>, Signal Strength <ph name="SIGNAL_STRENGTH">$6<ex>80</ex></ph>%, Phone Battery <ph name="BATTERY_STATUS">$7<ex>80</ex></ph>%, Details
</message>
<message name="IDS_WIFI_NETWORK_STATUS_SECURED" desc="a11y label used when a Wi-Fi network is secured.">
Secured
</message>
......
a61e251dad1c523e125920a0b52ff5cfa8c8276a
\ No newline at end of file
5cf735acb91ee11d84d4ed47cf1000c79f645881
\ No newline at end of file
......@@ -209,8 +209,6 @@ js_library("cellular_networks_list") {
"//ui/webui/resources/cr_components/chromeos/network:onc_mojo",
"//ui/webui/resources/js:i18n_behavior",
]
externs_list = [ "$externs_path/networking_private.js" ]
extra_sources = [ "$interfaces_path/networking_private_interface.js" ]
}
# TODO: Uncomment as the Polymer3 migration makes progress.
......
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_components/chromeos/network/onc_mojo.html">
<link rel="import" href="chrome://resources/cr_components/chromeos/network/network_list_types.html">
<link rel="import" href="chrome://resources/cr_components/chromeos/cellular_setup/cellular_types.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
......
......@@ -43,11 +43,17 @@ constexpr webui::LocalizedString kElementLocalizedStrings[] = {
IDS_NETWORK_LIST_ITEM_SUBPAGE_BUTTON_LABEL},
{"networkListItemLabel", IDS_NETWORK_LIST_ITEM_LABEL},
{"networkListItemLabelCellular", IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR},
{"networkListItemLabelCellularWithProviderName",
IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_WITH_PROVIDER_NAME},
{"networkListItemLabelCellularManaged",
IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_MANAGED},
{"networkListItemLabelCellularManagedWithProviderName",
IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_MANAGED_WITH_PROVIDER_NAME},
{"networkListItemLabelEthernetManaged",
IDS_NETWORK_LIST_ITEM_LABEL_ETHERNET_MANAGED},
{"networkListItemLabelTether", IDS_NETWORK_LIST_ITEM_LABEL_TETHER},
{"networkListItemLabelTetherWithProviderName",
IDS_NETWORK_LIST_ITEM_LABEL_TETHER_WITH_PROVIDER_NAME},
{"networkListItemLabelWifi", IDS_NETWORK_LIST_ITEM_LABEL_WIFI},
{"networkListItemLabelWifiManaged",
IDS_NETWORK_LIST_ITEM_LABEL_WIFI_MANAGED},
......@@ -57,14 +63,20 @@ constexpr webui::LocalizedString kElementLocalizedStrings[] = {
IDS_NETWORK_LIST_ITEM_LABEL_ETHERNET_MANAGED_WITH_CONNECTION_STATUS},
{"networkListItemLabelCellularWithConnectionStatus",
IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_WITH_CONNECTION_STATUS},
{"networkListItemLabelCellularWithConnectionStatusAndProviderName",
IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_WITH_CONNECTION_STATUS_AND_PROVIDER_NAME},
{"networkListItemLabelCellularManagedWithConnectionStatus",
IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_MANAGED_WITH_CONNECTION_STATUS},
{"networkListItemLabelCellularManagedWithConnectionStatusAndProviderName",
IDS_NETWORK_LIST_ITEM_LABEL_CELLULAR_MANAGED_WITH_CONNECTION_STATUS_AND_PROVIDER_NAME},
{"networkListItemLabelWifiWithConnectionStatus",
IDS_NETWORK_LIST_ITEM_LABEL_WIFI_WITH_CONNECTION_STATUS},
{"networkListItemLabelWifiManagedWithConnectionStatus",
IDS_NETWORK_LIST_ITEM_LABEL_WIFI_MANAGED_WITH_CONNECTION_STATUS},
{"networkListItemLabelTetherWithConnectionStatus",
IDS_NETWORK_LIST_ITEM_LABEL_TETHER_WITH_CONNECTION_STATUS},
{"networkListItemLabelTetherWithConnectionStatusAndProviderName",
IDS_NETWORK_LIST_ITEM_LABEL_TETHER_WITH_CONNECTION_STATUS_AND_PROVIDER_NAME},
{"wifiNetworkStatusSecured", IDS_WIFI_NETWORK_STATUS_SECURED},
{"wifiNetworkStatusUnsecured", IDS_WIFI_NETWORK_STATUS_UNSECURED},
{"networkListItemNotAvailable", IDS_NETWORK_LIST_NOT_AVAILABLE},
......
......@@ -39,7 +39,13 @@ GEN('#include "content/public/test/browser_test.h"');
['NetworkConfigToggle', 'network/network_config_toggle_test.js', []],
['NetworkIpConfig', 'network/network_ip_config_test.js', []],
['NetworkList', 'network/network_list_test.js', []],
['NetworkListItem', 'network/network_list_item_test.js', []],
['NetworkListItem', 'network/network_list_item_test.js',
[
'//ui/webui/resources/js/assert.js',
'//ui/webui/resources/js/promise_resolver.js',
'../../chromeos/fake_network_config_mojom.js',
]
],
['NetworkNameservers', 'network/network_nameservers_test.js', []],
['NetworkPasswordInput', 'network/network_password_input_test.js', []],
['NetworkPropertyListMojo', 'network/network_property_list_mojo_test.js', []],
......
......@@ -14,6 +14,8 @@
// #import {OncMojo} from 'chrome://resources/cr_components/chromeos/network/onc_mojo.m.js';
// #import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
// #import {FakeNetworkConfig} from 'chrome://test/chromeos/fake_network_config_mojom.m.js';
// #import {MojoInterfaceProviderImpl} from 'chrome://resources/cr_components/chromeos/network/mojo_interface_provider.m.js';
// clang-format on
suite('NetworkListTest', function() {
......@@ -22,28 +24,64 @@ suite('NetworkListTest', function() {
let mojom;
let mojoApi_ = null;
setup(function() {
mojom = chromeos.networkConfig.mojom;
mojoApi_ = new FakeNetworkConfig();
network_config.MojoInterfaceProviderImpl.getInstance().remote_ = mojoApi_;
listItem = document.createElement('network-list-item');
document.body.appendChild(listItem);
Polymer.dom.flush();
});
function initProperties(properties) {
assertTrue(!!properties.guid);
mojoApi_.setManagedPropertiesForTest(properties);
}
function flushAsync() {
Polymer.dom.flush();
// Use setTimeout to wait for the next macrotask.
return new Promise(resolve => setTimeout(resolve));
}
test('Network icon visibility', function() {
// The network icon is not shown if there is no network state.
let networkIcon = listItem.$$('network-icon');
assertFalse(!!networkIcon);
listItem.item = OncMojo.getDefaultNetworkState(mojom.NetworkType.kEthernet, 'eth0');
assertTrue(!!listItem.item);
// Update the network state.
listItem.networkState = listItem.item;
Polymer.dom.flush();
// The network icon exists now.
networkIcon = listItem.$$('network-icon');
assertTrue(!!networkIcon);
});
test('Network provider name visibilty', async () => {
listItem.item =
OncMojo.getDefaultNetworkState(mojom.NetworkType.kEthernet, 'eth0');
await flushAsync();
let providerName = listItem.$$('#networkProviderName');
assertFalse(!!providerName.textContent.trim());
const tether = OncMojo.getDefaultManagedProperties(
chromeos.networkConfig.mojom.NetworkType.kTether, 'tether1_guid', '');
tether.name = OncMojo.createManagedString('tether1');
tether.typeProperties.tether.carrier = 'Google Fi';
initProperties(tether);
listItem.item =
OncMojo.getDefaultNetworkState(mojom.NetworkType.kTether, 'tether1');
await flushAsync();
providerName = listItem.$$('#networkProviderName');
assertTrue(!!providerName);
assertEquals('Google Fi', providerName.textContent.trim());
});
});
......@@ -212,6 +212,7 @@ js_library("network_list") {
js_library("network_list_item") {
deps = [
":cr_policy_network_behavior_mojo",
":mojo_interface_provider",
":network_list_types",
"//ui/webui/resources/js:assert",
"//ui/webui/resources/js:i18n_behavior",
......@@ -451,6 +452,7 @@ js_library("network_list.m") {
js_library("network_list_item.m") {
sources = [ "$root_gen_dir/ui/webui/resources/cr_components/chromeos/network/network_list_item.m.js" ]
deps = [
":mojo_interface_provider.m",
":network_list_types.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js/cr/ui:focus_row_behavior.m",
......@@ -729,6 +731,7 @@ polymer_modulizer("network_list_item") {
html_file = "network_list_item.html"
html_type = "dom-module"
auto_imports = cr_components_chromeos_auto_imports
namespace_rewrites = cr_components_chromeos_namespace_rewrites
}
polymer_modulizer("network_nameservers") {
......
......@@ -14,7 +14,7 @@
network-list-item {
align-items: center;
height: 48px;
min-height: 48px;
}
#container {
......@@ -22,6 +22,10 @@
overflow-y: auto;
}
#networkList {
height: 100%;
}
/* Override scrollable border-bottom-color */
#container[no-bottom-scroll-border] {
border-bottom-color: transparent;
......
......@@ -11,6 +11,7 @@
<link rel="import" href="cr_policy_network_behavior_mojo.html">
<link rel="import" href="network_icon.html">
<link rel="import" href="network_list_types.html">
<link rel="import" href="mojo_interface_provider.html">
<link rel="import" href="onc_mojo.html">
<dom-module id="network-list-item">
......@@ -85,6 +86,11 @@
</template>
<div id="divText" class="layout horizontal flex">
<div aria-hidden="true">[[getItemName_(item)]]</div>
<div id="networkProviderName"
hidden$="[[!isProviderNameVisible_(providerName_)]]"
aria-hidden="true">
[[getProviderName_(providerName_)]]
</div>
<div id="networkStateText"
class="cr-secondary-text"
hidden$="[[!isStateTextVisible_(networkState)]]"
......
......@@ -56,7 +56,7 @@ Polymer({
rowLabel: {
type: String,
notify: true,
computed: 'getRowLabel_(item, networkState)',
computed: 'getRowLabel_(item, networkState, providerName_)',
},
buttonLabel: {
......@@ -95,6 +95,24 @@ Polymer({
* @private {!OncMojo.DeviceStateProperties|undefined} deviceState
*/
deviceState: Object,
/**
* Cellular/Tether network provider name
* @private {string}
*/
providerName_: {
type: String,
value: '',
},
},
/** @private {?chromeos.networkConfig.mojom.CrosNetworkConfigRemote} */
networkConfig_: null,
/** @override */
created() {
this.networkConfig_ = network_config.MojoInterfaceProviderImpl.getInstance()
.getMojoServiceRemote();
},
/** @override */
......@@ -112,11 +130,41 @@ Polymer({
if (this.item && !this.item.hasOwnProperty('customItemName')) {
this.networkState =
/** @type {!OncMojo.NetworkStateProperties} */ (this.item);
this.setProviderName_();
} else if (this.networkState) {
this.networkState = undefined;
}
},
/** @private */
setProviderName_() {
const mojom = chromeos.networkConfig.mojom;
if (this.networkState.type !== mojom.NetworkType.kTether &&
this.networkState.type !== mojom.NetworkType.kCellular) {
return;
}
this.networkConfig_.getManagedProperties(this.networkState.guid)
.then(response => {
if (!response || !response.result) {
return;
}
const managedProperty = response.result;
if (managedProperty.type === mojom.NetworkType.kTether &&
managedProperty.typeProperties.tether) {
this.providerName_ = managedProperty.typeProperties.tether.carrier;
}
if (managedProperty.type === mojom.NetworkType.kCellular &&
managedProperty.typeProperties.cellular.homeProvider) {
this.providerName_ =
managedProperty.typeProperties.cellular.homeProvider.name;
}
});
},
/** @private */
networkStateChanged_() {
if (!this.networkState) {
......@@ -162,6 +210,10 @@ Polymer({
* @private
*/
getRowLabel_() {
if (!this.item) {
return '';
}
const NetworkType = chromeos.networkConfig.mojom.NetworkType;
const OncSource = chromeos.networkConfig.mojom.OncSource;
const SecurityType = chromeos.networkConfig.mojom.SecurityType;
......@@ -187,21 +239,46 @@ Polymer({
case NetworkType.kCellular:
if (isManaged) {
if (status) {
if (this.providerName_) {
return this.i18n(
'networkListItemLabelCellularManagedWithConnectionStatusAndProviderName',
index, total, this.getItemName_(), this.providerName_, status,
this.item.typeState.cellular.signalStrength);
}
return this.i18n(
'networkListItemLabelCellularManagedWithConnectionStatus',
index, total, this.getItemName_(), status,
this.item.typeState.cellular.signalStrength);
}
if (this.providerName_) {
return this.i18n(
'networkListItemLabelCellularManagedWithProviderName', index,
total, this.getItemName_(), this.providerName_,
this.item.typeState.cellular.signalStrength);
}
return this.i18n(
'networkListItemLabelCellularManaged', index, total,
this.getItemName_(), this.item.typeState.cellular.signalStrength);
}
if (status) {
if (this.providerName_) {
return this.i18n(
'networkListItemLabelCellularWithConnectionStatusAndProviderName',
index, total, this.getItemName_(), this.providerName_, status,
this.item.typeState.cellular.signalStrength);
}
return this.i18n(
'networkListItemLabelCellularWithConnectionStatus', index, total,
this.getItemName_(), status,
this.item.typeState.cellular.signalStrength);
}
if (this.providerName_) {
return this.i18n(
'networkListItemLabelCellularWithProviderName', index, total,
this.getItemName_(), this.providerName_,
this.item.typeState.cellular.signalStrength);
}
return this.i18n(
'networkListItemLabelCellular', index, total, this.getItemName_(),
this.item.typeState.cellular.signalStrength);
......@@ -226,12 +303,26 @@ Polymer({
case NetworkType.kTether:
// Tether networks will never be controlled by policy (only disabled).
if (status) {
if (this.providerName_) {
return this.i18n(
'networkListItemLabelTetherWithConnectionStatusAndProviderName',
index, total, this.getItemName_(), this.providerName_, status,
this.item.typeState.tether.signalStrength,
this.item.typeState.tether.batteryPercentage);
}
return this.i18n(
'networkListItemLabelTetherWithConnectionStatus', index, total,
this.getItemName_(), status,
this.item.typeState.tether.signalStrength,
this.item.typeState.tether.batteryPercentage);
}
if (this.providerName_) {
return this.i18n(
'networkListItemLabelTetherWithProviderName', index, total,
this.getItemName_(), this.providerName_,
this.item.typeState.tether.signalStrength,
this.item.typeState.tether.batteryPercentage);
}
return this.i18n(
'networkListItemLabelTether', index, total, this.getItemName_(),
this.item.typeState.tether.signalStrength,
......@@ -311,6 +402,22 @@ Polymer({
return '';
},
/**
* @return {string}
* @private
*/
getProviderName_() {
return this.providerName_ ? this.providerName_ : '';
},
/**
* @return {boolean}
* @private
*/
isProviderNameVisible_() {
return !!this.providerName_;
},
/**
* @param {!OncMojo.NetworkStateProperties|undefined} networkState
* @param {boolean} showButtons
......
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