diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3c9a4cca1dc..078b646fa3d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -344,7 +344,9 @@
"Phone book access request"
- %1$s wants to access your contacts and call history. Give access to %2$s?
+
+ %1$s wants to access your contacts and call history. Give access to %2$s?
+
Don\u2019t ask again
@@ -3032,7 +3034,7 @@
Unknown SIM operator
- %1$s has no known provisioning website
+ %1$s has no known provisioning website
Please insert SIM card and restart
@@ -4515,7 +4517,7 @@
Never
- at %1$s battery
+ at %1$sbattery
diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingDialogTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingDialogTest.java
index 035d29ee4b1..90f21063f13 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingDialogTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothPairingDialogTest.java
@@ -16,20 +16,24 @@
package com.android.settings.bluetooth;
import android.app.AlertDialog;
+import android.content.Context;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
+
import com.android.settings.R;
import com.android.settings.SettingsRobolectricTestRunner;
import com.android.settings.TestConfig;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
import org.robolectric.util.FragmentTestUtil;
import static com.google.common.truth.Truth.assertThat;
@@ -330,6 +334,14 @@ public class BluetoothPairingDialogTest {
assertThat(message.getVisibility()).isEqualTo(View.GONE);
}
+ @Test
+ public void pairingStringIsFormattedCorrectly() {
+ final String device = "test_device";
+ final Context context = ShadowApplication.getInstance().getApplicationContext();
+ assertThat(context.getString(R.string.bluetooth_pb_acceptance_dialog_text, device, device))
+ .contains(device);
+ }
+
private BluetoothPairingDialogFragment makeFragment() {
BluetoothPairingDialogFragment frag = new BluetoothPairingDialogFragment();
frag.setPairingController(controller);
diff --git a/tests/robotests/src/com/android/settings/network/MobilePlanPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/network/MobilePlanPreferenceControllerTest.java
new file mode 100644
index 00000000000..5827c8b45ad
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/network/MobilePlanPreferenceControllerTest.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.network;
+
+import android.content.Context;
+
+import com.android.settings.R;
+import com.android.settings.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowApplication;
+
+import static com.google.common.truth.Truth.assertThat;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class MobilePlanPreferenceControllerTest {
+
+ @Test
+ public void testNoProvisionStringFormattedCorrectly() {
+ final String operator = "test_operator";
+ final Context context = ShadowApplication.getInstance().getApplicationContext();
+ assertThat(context.getString(R.string.mobile_no_provisioning_url, operator, operator))
+ .contains(operator);
+ }
+}