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

This commit is contained in:
TreeHugger Robot
2017-07-05 17:39:13 +00:00
committed by Android (Google) Code Review
3 changed files with 12 additions and 2 deletions

View File

@@ -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>

View File

@@ -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() {

View File

@@ -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(