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:
@@ -183,15 +183,6 @@
|
||||
android:defaultValue="5"
|
||||
settings:units="dp"
|
||||
android:persistent="false" />
|
||||
|
||||
<!--com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="sysui_rounded_content_padding"
|
||||
android:title="@string/content_padding"
|
||||
android:max="30"
|
||||
settings:min="0"
|
||||
settings:units="dp"
|
||||
android:persistent="false"
|
||||
android:dependency="sysui_rounded_fwvals" /-->
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user