b696aee7b3
The problem turns out to have been a deep weirdness in the way that keyguard and incall interact. Incall gets relaunched when the keyboard is opened/closed, which transiently exposes keyguard with its nosensor orientation demands, and that plus the long keyguard-hide animation was leaving incall in a bad state from which the window manager didn't try to recover. We now disregard animating-towards-hidden windows [i.e. keyguard] when running through the app tokens to determine what orientation should be, and do not do configuration calculations at all while the display is frozen. There can still be a transient state in which incall is drawn in landscape, but things proceed from there to relaunch it back into the proper portrait orientation, and it ends up in the right state in the end. Change-Id: I0d74ee19064b6d7f65600976f1b5b16b7ec36f31