Skip to content

Instantly share code, notes, and snippets.

@Justasic
Created June 5, 2020 01:41
Show Gist options
  • Save Justasic/541d55f30849d76b85d04fbcdeb53575 to your computer and use it in GitHub Desktop.
Save Justasic/541d55f30849d76b85d04fbcdeb53575 to your computer and use it in GitHub Desktop.
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
index ce39fb90889..b82ca3d83b3 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
@@ -52,7 +52,7 @@ public class FODCircleViewImpl extends SystemUI implements CommandQueue.Callback
// do nothing
}
mDisableNightMode = SystemProperties.getBoolean("persist.fod.night_mode_disabled", true);
- mDisableGrayscaleMode = SystemProperties.getBoolean("persist.fod.grayscale_mode_disabled", true);
+ mDisableGrayscaleMode = SystemProperties.getBoolean("persist.fod.grayscale_mode_disabled", false);
}
@Override
@@ -62,7 +62,7 @@ public class FODCircleViewImpl extends SystemUI implements CommandQueue.Callback
disableNightMode();
}
if (mDisableGrayscaleMode) {
- disableGrayscaleMode();
+ setGrayscaleMode(false);
}
mFodCircleView.show();
}
@@ -98,10 +98,9 @@ public class FODCircleViewImpl extends SystemUI implements CommandQueue.Callback
}
}
- private void disableGrayscaleMode() {
+ private void setGrayscaleMode(boolean activated) {
ColorDisplayManager colorDisplayManager = mContext.getSystemService(ColorDisplayManager.class);
mGrayscaleModeActive = colorDisplayManager.isSaturatuionActivated();
- colorDisplayManager.setSaturationActivated(false);
+ colorDisplayManager.setSaturationActivated(activated);
}
- }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment