Update string for Connected devices page.

- update Bluetooth summary text "Connected to" and "Not connected"
- update USB summary text "Charging" and "Supplying"
- update Printing summary to "... on" or "off

Change-Id: I39a809b560a5c6cc6a0e217315dfabb2c4d1a129
Fix: 36234108
Test: builds
This commit is contained in:
Doris Ling
2017-03-23 12:07:16 -07:00
parent 866497392d
commit fe768e9e22
3 changed files with 21 additions and 13 deletions

View File

@@ -4249,12 +4249,12 @@
<string name="print_settings">Printing</string>
<!-- Print setting summary in settings screen [CHAR LIMIT=50] -->
<string name="print_settings_summary_no_service">No print service</string>
<string name="print_settings_summary_no_service">Off</string>
<!-- Print setting summary in settings screen [CHAR LIMIT=50] -->
<plurals name="print_settings_summary">
<item quantity="one">1 print service</item>
<item quantity="other"><xliff:g id="count">%1$d</xliff:g> print services</item>
<item quantity="one">1 print service on</item>
<item quantity="other"><xliff:g id="count">%1$d</xliff:g> print services on</item>
</plurals>
<!-- Title for print service settings screen [CHAR LIMIT=25] -->
@@ -7230,7 +7230,7 @@
<!-- Title of one of the choices in a dialog (with title defined in usb_use) that lets the user
select what the USB connection for this device should be used for. This choice
is for charging only. -->
<string name="usb_use_charging_only">Charge this device</string>
<string name="usb_use_charging_only">Charging this device</string>
<!-- Decription of one of the choices in a dialog (with title defined in usb_use) that lets the
user select what the USB connection for this device should be used for. This choice
is for charging only. -->
@@ -7238,7 +7238,7 @@
<!-- Title of one of the choices in a dialog (with title defined in usb_use) that lets the user
select what the USB connection for this device should be used for. This choice
is for powering the other device only. -->
<string name="usb_use_power_only">Supply power</string>
<string name="usb_use_power_only">Supplying power</string>
<!-- Decription of one of the choices in a dialog (with title defined in usb_use) that lets the
user select what the USB connection for this device should be used for. This choice
is for powering the other device. -->
@@ -7938,9 +7938,12 @@
<!-- Title of screen controlling which apps have access to send premium SMS messages [CHAR LIMIT=60] -->
<string name="premium_sms_access">Premium SMS access</string>
<!-- Bluetooth is disabled. -->
<!-- Summary for Bluetooth when disabled. [CHAR LIMIT=NONE] -->
<string name="bluetooth_disabled">Not visible to other devices</string>
<!-- Summary for Bluetooth when connected. [CHAR LIMIT=NONE] -->
<string name="bluetooth_connected_summary">Connected to </string>
<!-- [CHAR LIMIT=60] Name of dev option called "System UI demo mode" -->
<string name="demo_mode">System UI demo mode</string>

View File

@@ -98,13 +98,13 @@ public final class BluetoothSummaryUpdater extends SummaryUpdater implements Blu
}
switch (mConnectionState) {
case BluetoothAdapter.STATE_CONNECTED:
return mContext.getString(R.string.bluetooth_connected);
return mContext.getString(R.string.bluetooth_connected_summary);
case BluetoothAdapter.STATE_CONNECTING:
return mContext.getString(R.string.bluetooth_connecting);
case BluetoothAdapter.STATE_DISCONNECTING:
return mContext.getString(R.string.bluetooth_disconnecting);
default:
return mContext.getString(R.string.bluetooth_disconnected);
return mContext.getString(R.string.disconnected);
}
}

View File

@@ -86,7 +86,8 @@ public class BluetoothSummaryUpdaterTest {
public void register_true_shouldSendSummaryChange() {
mSummaryUpdater.register(true);
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_connected));
verify(mListener).onSummaryChanged(
mContext.getString(R.string.bluetooth_connected_summary));
}
@Test
@@ -102,7 +103,8 @@ public class BluetoothSummaryUpdaterTest {
mSummaryUpdater.register(true);
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_ON);
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_connected));
verify(mListener).onSummaryChanged(
mContext.getString(R.string.bluetooth_connected_summary));
}
@Test
@@ -111,7 +113,8 @@ public class BluetoothSummaryUpdaterTest {
mSummaryUpdater.register(true);
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_TURNING_ON);
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disconnected));
verify(mListener).onSummaryChanged(
mContext.getString(R.string.disconnected));
}
@Test
@@ -128,7 +131,8 @@ public class BluetoothSummaryUpdaterTest {
mSummaryUpdater.onConnectionStateChanged(null /* device */,
BluetoothAdapter.STATE_CONNECTED);
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_connected));
verify(mListener).onSummaryChanged(
mContext.getString(R.string.bluetooth_connected_summary));
}
@Test
@@ -137,7 +141,8 @@ public class BluetoothSummaryUpdaterTest {
mSummaryUpdater.onConnectionStateChanged(null /* device */,
BluetoothAdapter.STATE_CONNECTED);
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disconnected));
verify(mListener).onSummaryChanged(
mContext.getString(R.string.disconnected));
}
@Test