Skip to content
Commit 0eb56cb3 authored by Tiger Huang's avatar Tiger Huang
Browse files

Remove the light flag if the bar isn't specified light in theme

Previously, PhoneWindow will add the light flag for the bar if it is
specified light in theme. It won't remove the light flag if the theme is
not light. The previous logic in PhoneWindow#generateLayout assumes the
decor view was newly created.

However, the decor view can be reused from the preserved window. This
happens if the activity is recreated. So if the previous activity was in
a light theme and the newly created activity is in a dark theme, we
should clear the light bar flags added in the previous activity.

Fix: 174502412
Test: 1. Set Dialer (Phone) to dark theme from Dialer's display options.
      2. Clear app data from Dialer's app info.
      3. Open Dialer again and see if the color of system bars are
         normal.
Change-Id: I3ea61322e4c3cfe26981e23792f42ab0b9a1e217
parent 9515d87d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment