Merge "AF/FR Fix onActivityResult condition."

This commit is contained in:
TreeHugger Robot
2018-01-23 20:29:36 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 2 deletions

View File

@@ -270,6 +270,13 @@ public class MasterClearTest {
assertThat(mMasterClear.tryShowAccountConfirmation()).isTrue();
}
@Test
public void testIsValidRequestCode() {
assertThat(mMasterClear.isValidRequestCode(MasterClear.KEYGUARD_REQUEST)).isTrue();
assertThat(mMasterClear.isValidRequestCode(MasterClear.CREDENTIAL_CONFIRM_REQUEST)).isTrue();
assertThat(mMasterClear.isValidRequestCode(0)).isFalse();
}
private void initScrollView(int height, int scrollY, int childBottom) {
when(mScrollView.getHeight()).thenReturn(height);
when(mScrollView.getScrollY()).thenReturn(scrollY);