summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTa-wei Yen <twyen@google.com>2016-10-25 21:30:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-10-25 21:30:37 +0000
commit356917e790905c1cbb5dd417fe41bfc54da0351b (patch)
tree6d68021d3a1b72b6757827bcc266cc1d81333275
parentae3f7dfb285277965831fa4304ceeec6f912a9c9 (diff)
parent1c63b28b9ce645625bca6b61d44277406d2e97d2 (diff)
downloadTelephony-nougat-mr1-dev.tar.gz
Merge "fix typo in DIGEST-MD5 charset" into nyc-mr1-devnougat-mr1-dev
-rw-r--r--src/com/android/phone/common/mail/store/imap/DigestMd5Utils.java2
-rw-r--r--tests/src/com/android/phone/common/mail/store/imap/DigestMd5UtilsTest.java20
2 files changed, 21 insertions, 1 deletions
diff --git a/src/com/android/phone/common/mail/store/imap/DigestMd5Utils.java b/src/com/android/phone/common/mail/store/imap/DigestMd5Utils.java
index f78dbdf12..436d03c81 100644
--- a/src/com/android/phone/common/mail/store/imap/DigestMd5Utils.java
+++ b/src/com/android/phone/common/mail/store/imap/DigestMd5Utils.java
@@ -54,7 +54,7 @@ public class DigestMd5Utils {
*/
public static class Data {
- private static final String CHARSET = "utf-8'";
+ private static final String CHARSET = "utf-8";
public String username;
public String password;
diff --git a/tests/src/com/android/phone/common/mail/store/imap/DigestMd5UtilsTest.java b/tests/src/com/android/phone/common/mail/store/imap/DigestMd5UtilsTest.java
index 553463246..81717a14d 100644
--- a/tests/src/com/android/phone/common/mail/store/imap/DigestMd5UtilsTest.java
+++ b/tests/src/com/android/phone/common/mail/store/imap/DigestMd5UtilsTest.java
@@ -50,4 +50,24 @@ public class DigestMd5UtilsTest extends TestCase {
assertEquals("ea40f60335c427b5527b84dbabcdfffd", response);
}
+ public void testData_createResponse() {
+ DigestMd5Utils.Data data = new DigestMd5Utils.Data();
+ data.username = "chris";
+ data.password = "secret";
+ data.realm = "elwood.innosoft.com";
+ data.nonce = "OA6MG9tEQGm2hh";
+ data.cnonce = "OA6MHXh6VqTrRk";
+ data.nc = "00000001";
+ data.qop = "auth";
+ data.digestUri = "imap/elwood.innosoft.com";
+ assertEquals(data.createResponse(), "CHARSET=utf-8,"
+ + "username=\"chris\","
+ + "realm=\"elwood.innosoft.com\","
+ + "nonce=\"OA6MG9tEQGm2hh\","
+ + "nc=00000001,"
+ + "cnonce=\"OA6MHXh6VqTrRk\","
+ + "digest-uri=\"imap/elwood.innosoft.com\","
+ + "response=d388dad90d4bbd760a152321f2143af7,"
+ + "qop=auth");
+ }
}