Skip to content

Commit

Permalink
jugad
Browse files Browse the repository at this point in the history
  • Loading branch information
adithya2306 committed Aug 9, 2021
1 parent 48f0063 commit 727cbad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions res/values/wave_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
<string name="total_ram">Total RAM</string>

<!-- Add sliders for color balance adjustment via ColorDisplayManager -->
<string name="color_mode_balance_summary">Adjust color balance</string>
<string name="color_mode_balance_red">Red strength</string>
<string name="color_mode_balance_green">Green strength</string>
<string name="color_mode_balance_blue">Blue strength</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ public ColorModePreferenceController(Context context, String key) {

@Override
public int getAvailabilityStatus() {
return mContext.getSystemService(ColorDisplayManager.class)
return AVAILABLE; /* mContext.getSystemService(ColorDisplayManager.class)
.isDeviceColorManaged()
&& !ColorDisplayManager.areAccessibilityTransformsEnabled(mContext) ?
AVAILABLE : DISABLED_FOR_USER;
AVAILABLE : DISABLED_FOR_USER; */
}

@Override
public CharSequence getSummary() {
if (!getColorDisplayManager().isDeviceColorManaged()) {
return mContext.getText(R.string.color_mode_balance_summary);
}

final int colorMode = getColorDisplayManager().getColorMode();
if (colorMode == ColorDisplayManager.COLOR_MODE_AUTOMATIC) {
return mContext.getText(R.string.color_mode_option_automatic);
Expand Down

0 comments on commit 727cbad

Please sign in to comment.