Fixed reply-all bug
Upon hitting reply all, all email addresses except that of the source message sender go in the CC: field. Previously they all went in the TO: field. Updated 3 tests in MessageComposeTests.java (testReplyAllAddresses1(), testReplyAllAddresses2(), and testReplyAllAddresses3()) to reflect this new behavior. Bug: 4534058 Change-Id: I852daebdd8843a45f685eecc67f757c87925bb6c
This commit is contained in:
parent
bc7cd16ec2
commit
15842c522e
@ -1954,7 +1954,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
|
|||||||
allAddresses.add(address);
|
allAddresses.add(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
safeAddAddresses(message.mTo, ourAddress, mToView, allAddresses);
|
safeAddAddresses(message.mTo, ourAddress, mCcView, allAddresses);
|
||||||
safeAddAddresses(message.mCc, ourAddress, mCcView, allAddresses);
|
safeAddAddresses(message.mCc, ourAddress, mCcView, allAddresses);
|
||||||
}
|
}
|
||||||
showCcBccFieldsIfFilled();
|
showCcBccFieldsIfFilled();
|
||||||
|
@ -516,8 +516,8 @@ public class MessageComposeTests
|
|||||||
*
|
*
|
||||||
* In this case, we're doing a "reply all"
|
* In this case, we're doing a "reply all"
|
||||||
* The user is TO1 (a "to" recipient)
|
* The user is TO1 (a "to" recipient)
|
||||||
* The to should be: FROM and TO2
|
* The to should be: FROM
|
||||||
* The cc should be: CC1, CC2, and CC3
|
* The cc should be: TO2, CC1, CC2, and CC3
|
||||||
*/
|
*/
|
||||||
public void testReplyAllAddresses1() throws Throwable {
|
public void testReplyAllAddresses1() throws Throwable {
|
||||||
final MessageCompose a = getActivity();
|
final MessageCompose a = getActivity();
|
||||||
@ -537,10 +537,10 @@ public class MessageComposeTests
|
|||||||
a.initFromIntent(intent);
|
a.initFromIntent(intent);
|
||||||
a.setupAddressViews(message, account, true);
|
a.setupAddressViews(message, account, true);
|
||||||
String result = Address.parseAndPack(mToView.getText().toString());
|
String result = Address.parseAndPack(mToView.getText().toString());
|
||||||
String expected = Address.parseAndPack(FROM + ',' + TO2);
|
String expected = Address.parseAndPack(FROM);
|
||||||
assertEquals(expected, result);
|
assertEquals(expected, result);
|
||||||
result = Address.parseAndPack(mCcView.getText().toString());
|
result = Address.parseAndPack(mCcView.getText().toString());
|
||||||
expected = Address.parseAndPack(CC1 + ',' + CC2 + ',' + CC3);
|
expected = Address.parseAndPack(TO2 + ',' + CC1 + ',' + CC2 + ',' + CC3);
|
||||||
assertEquals(expected, result);
|
assertEquals(expected, result);
|
||||||
TestUtils.assertViewVisible(mCcView);
|
TestUtils.assertViewVisible(mCcView);
|
||||||
}
|
}
|
||||||
@ -553,8 +553,8 @@ public class MessageComposeTests
|
|||||||
*
|
*
|
||||||
* In this case, we're doing a "reply all"
|
* In this case, we're doing a "reply all"
|
||||||
* The user is CC2 (a "cc" recipient)
|
* The user is CC2 (a "cc" recipient)
|
||||||
* The to should be: FROM, TO1, and TO2
|
* The to should be: FROM,
|
||||||
* The cc should be: CC1 and CC3 (CC2 is our account's email address)
|
* The cc should be: TO1, TO2, CC1 and CC3 (CC2 is our account's email address)
|
||||||
*/
|
*/
|
||||||
public void testReplyAllAddresses2() throws Throwable {
|
public void testReplyAllAddresses2() throws Throwable {
|
||||||
final MessageCompose a = getActivity();
|
final MessageCompose a = getActivity();
|
||||||
@ -574,10 +574,10 @@ public class MessageComposeTests
|
|||||||
a.initFromIntent(intent);
|
a.initFromIntent(intent);
|
||||||
a.setupAddressViews(message, account, true);
|
a.setupAddressViews(message, account, true);
|
||||||
String result = Address.parseAndPack(mToView.getText().toString());
|
String result = Address.parseAndPack(mToView.getText().toString());
|
||||||
String expected = Address.parseAndPack(FROM + ',' + TO1 + ',' + TO2);
|
String expected = Address.parseAndPack(FROM);
|
||||||
assertEquals(expected, result);
|
assertEquals(expected, result);
|
||||||
result = Address.parseAndPack(mCcView.getText().toString());
|
result = Address.parseAndPack(mCcView.getText().toString());
|
||||||
expected = Address.parseAndPack(CC1 + ',' + CC3);
|
expected = Address.parseAndPack(TO1 + ',' + TO2 + ',' + CC1 + ',' + CC3);
|
||||||
assertEquals(expected, result);
|
assertEquals(expected, result);
|
||||||
TestUtils.assertViewVisible(mCcView);
|
TestUtils.assertViewVisible(mCcView);
|
||||||
}
|
}
|
||||||
@ -611,10 +611,10 @@ public class MessageComposeTests
|
|||||||
a.initFromIntent(intent);
|
a.initFromIntent(intent);
|
||||||
a.setupAddressViews(message, account, true);
|
a.setupAddressViews(message, account, true);
|
||||||
String result = Address.parseAndPack(mToView.getText().toString());
|
String result = Address.parseAndPack(mToView.getText().toString());
|
||||||
String expected = Address.parseAndPack(FROM + ',' + TO1 + ',' + TO2 + ',' + TO3);
|
String expected = Address.parseAndPack(FROM);
|
||||||
assertEquals(expected, result);
|
assertEquals(expected, result);
|
||||||
result = Address.parseAndPack(mCcView.getText().toString());
|
result = Address.parseAndPack(mCcView.getText().toString());
|
||||||
expected = Address.parseAndPack(CC3);
|
expected = Address.parseAndPack(TO1 + ',' + TO2 + ',' + TO3+ ',' + CC3);
|
||||||
assertEquals(expected, result);
|
assertEquals(expected, result);
|
||||||
TestUtils.assertViewVisible(mCcView);
|
TestUtils.assertViewVisible(mCcView);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user