Reduce usages of ContextThemeWrapper causing memory churn
- Cache light/dark icon colors so we don't have to create additional
theme wrappers when updating them
- Convert rotation styles to separate drawables so we can skip creating
theme wrappers just to change some attributes of the drawable, these
icons are not changed much so it's worth the memory savings even if
this introduces copies of the drawable
- Clean up floating rotation drawable initialization slightly, only create
when updating the icon, and only start the animation when showing the
drawable
- Removed some unused code
Bug: 157510126
Test: atest SystemUiTests
Test: Verify rotation icon looks the same in all orientations with both
three button and gestural, and also with light/dark nav bar
Signed-off-by:
Winson Chung <winsonc@google.com>
Change-Id: I31e89f7aef00b38f2a7953d6e229c9ed7df8b479
Loading
Please register or sign in to comment