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

Commit 4cccea6b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Updates to brightness mirror to play with color extraction" into oc-dr1-dev

parents 890c4304 88262944
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,5 +15,5 @@
  ~ limitations under the License
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="?android:attr/colorPrimary" />
    <solid android:color="@color/qs_background_dark" />
</shape>
+3 −0
Original line number Diff line number Diff line
@@ -1317,6 +1317,9 @@ public class StatusBar extends SystemUI implements DemoMode,
                .setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
        mKeyguardIndicationController.setVisible(mState == StatusBarState.KEYGUARD);
        mKeyguardIndicationController.setDozing(mDozing);
        if (mBrightnessMirrorController != null) {
            mBrightnessMirrorController.onOverlayChanged();
        }
    }

    protected void reevaluateStyles() {
+8 −1
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ public class BrightnessMirrorController {
                .setInterpolator(Interpolators.ALPHA_IN);
    }


    public void setLocation(View original) {
        original.getLocationInWindow(mInt2Cache);

@@ -115,7 +114,15 @@ public class BrightnessMirrorController {
        mBrightnessMirror.setLayoutParams(lp);
    }

    public void onOverlayChanged() {
        reinflate();
    }

    public void onDensityOrFontScaleChanged() {
        reinflate();
    }

    private void reinflate() {
        int index = mStatusBarWindow.indexOfChild(mBrightnessMirror);
        mStatusBarWindow.removeView(mBrightnessMirror);
        mBrightnessMirror = LayoutInflater.from(mBrightnessMirror.getContext()).inflate(