Open saket opened 2 weeks ago
Does ScreenOrientationRule need a try block around its statement evaluation?
ScreenOrientationRule
try
Current:
val orientationToRestore = defaultOrientation ?: getCurrentOrientation() statement.evaluate() onDevice().perform(setScreenOrientation(orientationToRestore))
Proposed:
val orientationToRestore = defaultOrientation ?: getCurrentOrientation() try { statement.evaluate() } finally { onDevice().perform(setScreenOrientation(orientationToRestore)) }
Does
ScreenOrientationRule
need atry
block around its statement evaluation?Current:
Proposed: