Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88b97e51 authored by Clark Scheff's avatar Clark Scheff Committed by Gerrit Code Review
Browse files

SystemUI: Restore bounds when loading new gradient

This fixes an issue introduced with the reloading of the nav bar
transitions after a theme change in Change-Id: I256afc30fc018ea752769029c5246bc7310c23a6

Change-Id: I648039506b826583d554b2a0cf4f6ab9a9bb1de8
parent 478ab9bb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -154,7 +154,12 @@ public class BarTransitions {
        public void updateResources(Resources res)  {
            mOpaque = res.getColor(R.color.system_bar_background_opaque);
            mSemiTransparent = res.getColor(R.color.system_bar_background_semi_transparent);
            // Retrieve the current bounds for mGradient so they can be set to
            // the new drawable being loaded, otherwise the bounds will be (0, 0, 0, 0)
            // and the gradient will not be drawn.
            Rect bounds = mGradient.getBounds();
            mGradient = res.getDrawable(mGradientResourceId);
            mGradient.setBounds(bounds);
        }

        @Override