The decor view may not be attached to the ViewRootImpl yet, so we can't resolve the layout direction. Also, cleans up an instanceof check for clearing the foreground since every class now supports foreground. Bug: 26459947 Change-Id: I261661338dbaad6cc971ec7ae6875f514ecfbcde