Cherish: Rounded corners: Cleanup and improvements

* Fix reset corner radius to default fw value
* Remove commented code for Content Padding, which is not going to happen in A11

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
spezi77
2021-08-01 21:13:16 +09:00
committed by Hưng Phan
parent 2c1c2b3711
commit 0979fe036f
2 changed files with 0 additions and 26 deletions

View File

@@ -47,7 +47,6 @@ public class MiscSettings extends SettingsPreferenceFragment implements
private static final String SMART_PIXELS = "smart_pixels";
private static final String SYSUI_ROUNDED_SIZE = "sysui_rounded_size";
//private static final String SYSUI_ROUNDED_CONTENT_PADDING = "sysui_rounded_content_padding";
private static final String SYSUI_ROUNDED_FWVALS = "sysui_rounded_fwvals";
private static final String KEY_PULSE_BRIGHTNESS = "ambient_pulse_brightness";
private static final String KEY_DOZE_BRIGHTNESS = "ambient_doze_brightness";
@@ -100,16 +99,6 @@ public class MiscSettings extends SettingsPreferenceFragment implements
mCustomStatusbarPaddingEnd.setValue(customStatusbarPaddingEnd);
mCustomStatusbarPaddingEnd.setOnPreferenceChangeListener(this);
// Rounded Content Padding
//mContentPadding = (CustomSeekBarPreference) findPreference(SYSUI_ROUNDED_CONTENT_PADDING);
//int resourceIdPadding = res.getIdentifier("com.android.systemui:dimen/rounded_corner_content_padding", null,
// null);
//int contentPadding = Settings.Secure.getIntForUser(ctx.getContentResolver(),
// Settings.Secure.SYSUI_ROUNDED_CONTENT_PADDING,
// (int) (res.getDimension(resourceIdPadding) / density), UserHandle.USER_CURRENT);
//mContentPadding.setValue(contentPadding);
//mContentPadding.setOnPreferenceChangeListener(this);
// Rounded use Framework Values
mRoundedFwvals = (SecureSettingSwitchPreference) findPreference(SYSUI_ROUNDED_FWVALS);
mRoundedFwvals.setOnPreferenceChangeListener(this);
@@ -153,10 +142,6 @@ public class MiscSettings extends SettingsPreferenceFragment implements
Settings.Secure.putIntForUser(getContext().getContentResolver(), Settings.Secure.SYSUI_ROUNDED_SIZE,
(int) objValue, UserHandle.USER_CURRENT);
return true;
//} else if (preference == mContentPadding) {
// Settings.Secure.putIntForUser(getContext().getContentResolver(), Settings.Secure.SYSUI_ROUNDED_CONTENT_PADDING,
// (int) objValue, UserHandle.USER_CURRENT);
// return true;
} else if (preference == mRoundedFwvals) {
restoreCorners();
return true;
@@ -196,9 +181,7 @@ public class MiscSettings extends SettingsPreferenceFragment implements
}
int resourceIdRadius = (int) ctx.getResources().getDimension(com.android.internal.R.dimen.rounded_corner_radius);
//int resourceIdPadding = res.getIdentifier("com.android.systemui:dimen/rounded_corner_content_padding", null, null);
mCornerRadius.setValue((int) (resourceIdRadius / density));
//mContentPadding.setValue((int) (res.getDimension(resourceIdPadding) / density));
}
@Override