Merge "Revert "Declare that LatinIME does not use cleartext network traffic.""

main
Dan Zivkovic 2015-04-06 15:33:25 +00:00 committed by Android (Google) Code Review
commit c79ed10cf7
2 changed files with 6 additions and 7 deletions

View File

@ -38,8 +38,7 @@
<application android:label="@string/english_ime_name" <application android:label="@string/english_ime_name"
android:icon="@drawable/ic_launcher_keyboard" android:icon="@drawable/ic_launcher_keyboard"
android:supportsRtl="true" android:supportsRtl="true"
android:allowBackup="true" android:allowBackup="true">
android:usesCleartextTraffic="false">
<!-- Services --> <!-- Services -->
<service android:name="LatinIME" <service android:name="LatinIME"

View File

@ -87,7 +87,7 @@ public class HttpUrlConnectionBuilderTests extends AndroidTestCase {
public void testAddHeader() throws IOException { public void testAddHeader() throws IOException {
HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder(); HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
builder.setUrl("https://www.example.com"); builder.setUrl("http://www.example.com");
builder.addHeader("some-random-key", "some-random-value"); builder.addHeader("some-random-key", "some-random-value");
HttpURLConnection connection = builder.build(); HttpURLConnection connection = builder.build();
assertEquals("some-random-value", connection.getRequestProperty("some-random-key")); assertEquals("some-random-value", connection.getRequestProperty("some-random-key"));
@ -95,14 +95,14 @@ public class HttpUrlConnectionBuilderTests extends AndroidTestCase {
public void testSetUseCache_notSet() throws IOException { public void testSetUseCache_notSet() throws IOException {
HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder(); HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
builder.setUrl("https://www.example.com"); builder.setUrl("http://www.example.com");
HttpURLConnection connection = builder.build(); HttpURLConnection connection = builder.build();
assertFalse(connection.getUseCaches()); assertFalse(connection.getUseCaches());
} }
public void testSetUseCache_false() throws IOException { public void testSetUseCache_false() throws IOException {
HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder(); HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
builder.setUrl("https://www.example.com"); builder.setUrl("http://www.example.com");
HttpURLConnection connection = builder.build(); HttpURLConnection connection = builder.build();
connection.setUseCaches(false); connection.setUseCaches(false);
assertFalse(connection.getUseCaches()); assertFalse(connection.getUseCaches());
@ -110,7 +110,7 @@ public class HttpUrlConnectionBuilderTests extends AndroidTestCase {
public void testSetUseCache_true() throws IOException { public void testSetUseCache_true() throws IOException {
HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder(); HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
builder.setUrl("https://www.example.com"); builder.setUrl("http://www.example.com");
HttpURLConnection connection = builder.build(); HttpURLConnection connection = builder.build();
connection.setUseCaches(true); connection.setUseCaches(true);
assertTrue(connection.getUseCaches()); assertTrue(connection.getUseCaches());
@ -118,7 +118,7 @@ public class HttpUrlConnectionBuilderTests extends AndroidTestCase {
public void testSetMode_uploadOnly() throws IOException { public void testSetMode_uploadOnly() throws IOException {
HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder(); HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
builder.setUrl("https://www.example.com"); builder.setUrl("http://www.example.com");
builder.setMode(MODE_UPLOAD_ONLY); builder.setMode(MODE_UPLOAD_ONLY);
HttpURLConnection connection = builder.build(); HttpURLConnection connection = builder.build();
assertTrue(connection.getDoInput()); assertTrue(connection.getDoInput());