Finish rotation controller if the transition becomes no change

This is similar to [1], which was for the case of switching apps.
But there may be another case that changes to previous rotation
without switching apps. So add an explicit flag to check whether
the transition will really run the rotation change. If the flag
is never set and there is no pending change, then finish the
controller to avoid unfinished fade animation.

[1]: I8d0e5bd07414f39fb8aca7cf33a01dcf0ae7956e

Fix: 315468658
Test: Enable auto-rotation, disable home rotation.
      Put device in non-natural rotation.
      Run the test many times without timeout log:
      atest VirtualDisplayTest#testVirtualDisplayRotatesWithContent
Change-Id: Idf7606f0367b8437b3350112ae10578f951f729e
1 file changed