Merge "Add NPE check for method assignDefaultPhoto in Utils.java"

This commit is contained in:
Lei Yu
2016-12-28 22:28:10 +00:00
committed by Android (Google) Code Review
3 changed files with 23 additions and 4 deletions

View File

@@ -65,4 +65,10 @@ public class UtilsTest {
assertThat(Utils.getWifiIpAddresses(mContext)).isNull();
}
@Test
public void testAssignDefaultPhoto_ContextNull_ReturnFalseAndNotCrash() {
// Should not crash here
assertThat(Utils.assignDefaultPhoto(null, 0)).isFalse();
}
}