Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume Perrot <guperrot@microsoft.com>
  • Loading branch information
Ruslan Urmeev and guperrot committed Jun 26, 2020
1 parent 27a0175 commit dc55c99
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ public void getDeviceInfoApi16() throws PackageManager.NameNotFoundException, De
when(mWindowManager.getDefaultDisplay()).thenReturn(mDisplay);
//noinspection deprecation
doAnswer(new Answer<Void>() {

@Override
public Void answer(InvocationOnMock invocationOnMock) {

/* Do not call set method and assign values directly to variables. */
Object[] args = invocationOnMock.getArguments();
/* DO NOT call set method and assign values directly to variables. */
((Point) args[0]).x = SCREEN_WIDTH;
((Point) args[0]).y = SCREEN_HEIGHT;
return null;
Expand Down Expand Up @@ -337,4 +339,4 @@ public void getDeviceInfoMissingScreenSize() throws DeviceInfoHelper.DeviceInfoE
verifyStatic();
AppCenterLog.error(eq(AppCenter.LOG_TAG), anyString(), any(Exception.class));
}
}
}

0 comments on commit dc55c99

Please sign in to comment.