Cherish:Remove old font options

should use system fonts it will better

Removed battery info fonts
Removed date/time lockscreen fonts
Removed weather lockscreen fonts
Removed owner info lockscreen fonts
Removed traffic network fonts
Removed Clock in status fonts

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Hưng Phan
2021-05-25 11:53:18 +07:00
parent f496170448
commit be809d0eaa
12 changed files with 1 additions and 468 deletions

View File

@@ -48,18 +48,14 @@ import com.cherish.settings.preferences.SystemSettingListPreference;
public class LockScreenSettings extends SettingsPreferenceFragment implements
Preference.OnPreferenceChangeListener {
private static final String LOCK_CLOCK_FONTS = "lock_clock_fonts";
private static final String CUSTOM_TEXT_CLOCK_FONTS = "custom_text_clock_fonts";
private static final String LOCK_DATE_FONTS = "lock_date_fonts";
private static final String CLOCK_FONT_SIZE = "lockclock_font_size";
private static final String CUSTOM_TEXT_CLOCK_FONT_SIZE = "custom_text_clock_font_size";
private static final String DATE_FONT_SIZE = "lockdate_font_size";
private static final String LOCK_OWNERINFO_FONTS = "lock_ownerinfo_fonts";
private static final String LOCKOWNER_FONT_SIZE = "lockowner_font_size";
private static final String KEY_FOD_RECOGNIZING_ANIMATION = "fod_recognizing_animation";
private static final String KEY_FOD_RECOGNIZING_ANIMATION_LIST = "fod_recognizing_animation_list";
private static final String AOD_SCHEDULE_KEY = "always_on_display_schedule";
private static final String KEY_CHARGE_INFO_FONT = "lockscreen_battery_info_font";
static final int MODE_DISABLED = 0;
static final int MODE_NIGHT = 1;
@@ -67,11 +63,6 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
static final int MODE_MIXED_SUNSET = 3;
static final int MODE_MIXED_SUNRISE = 4;
private ListPreference mLockClockFonts;
private ListPreference mLockDateFonts;
private ListPreference mTextClockFonts;
private ListPreference mLockOwnerInfoFonts;
private ListPreference mChargingInfoFont;
private CustomSeekBarPreference mClockFontSize;
private CustomSeekBarPreference mDateFontSize;
private CustomSeekBarPreference mOwnerInfoFontSize;
@@ -87,20 +78,6 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
final PreferenceScreen prefScreen = getPreferenceScreen();
Resources resources = getResources();
// Lockscren Clock Fonts
mLockClockFonts = (ListPreference) findPreference(LOCK_CLOCK_FONTS);
mLockClockFonts.setValue(String.valueOf(Settings.System.getInt(
getContentResolver(), Settings.System.LOCK_CLOCK_FONTS, 34)));
mLockClockFonts.setSummary(mLockClockFonts.getEntry());
mLockClockFonts.setOnPreferenceChangeListener(this);
// Lockscren Date Fonts
mLockDateFonts = (ListPreference) findPreference(LOCK_DATE_FONTS);
mLockDateFonts.setValue(String.valueOf(Settings.System.getInt(
getContentResolver(), Settings.System.LOCK_DATE_FONTS, 32)));
mLockDateFonts.setSummary(mLockDateFonts.getEntry());
mLockDateFonts.setOnPreferenceChangeListener(this);
// Lock Clock Size
mClockFontSize = (CustomSeekBarPreference) findPreference(CLOCK_FONT_SIZE);
mClockFontSize.setValue(Settings.System.getInt(getContentResolver(),
@@ -113,32 +90,12 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
Settings.System.LOCKDATE_FONT_SIZE, 18));
mDateFontSize.setOnPreferenceChangeListener(this);
// Lockscren OwnerInfo Fonts
mLockOwnerInfoFonts = (ListPreference) findPreference(LOCK_OWNERINFO_FONTS);
mLockOwnerInfoFonts.setValue(String.valueOf(Settings.System.getInt(
getContentResolver(), Settings.System.LOCK_OWNERINFO_FONTS, 0)));
mLockOwnerInfoFonts.setSummary(mLockOwnerInfoFonts.getEntry());
mLockOwnerInfoFonts.setOnPreferenceChangeListener(this);
// Lockscren OwnerInfo Size
mOwnerInfoFontSize = (CustomSeekBarPreference) findPreference(LOCKOWNER_FONT_SIZE);
mOwnerInfoFontSize.setValue(Settings.System.getInt(getContentResolver(),
Settings.System.LOCKOWNER_FONT_SIZE,21));
mOwnerInfoFontSize.setOnPreferenceChangeListener(this);
// Lockscren Text Clock Fonts
mTextClockFonts = (ListPreference) findPreference(CUSTOM_TEXT_CLOCK_FONTS);
mTextClockFonts.setValue(String.valueOf(Settings.System.getInt(
getContentResolver(), Settings.System.CUSTOM_TEXT_CLOCK_FONTS, 32)));
mTextClockFonts.setSummary(mTextClockFonts.getEntry());
mTextClockFonts.setOnPreferenceChangeListener(this);
mChargingInfoFont = (ListPreference) findPreference(KEY_CHARGE_INFO_FONT);
mChargingInfoFont.setValue(String.valueOf(Settings.System.getInt(
getContentResolver(), Settings.System.LOCKSCREEN_BATTERY_INFO_FONT, 28)));
mChargingInfoFont.setSummary(mChargingInfoFont.getEntry());
mChargingInfoFont.setOnPreferenceChangeListener(this);
// Custom Text Clock Size
mCustomTextClockFontSize = (CustomSeekBarPreference) findPreference(CUSTOM_TEXT_CLOCK_FONT_SIZE);
mCustomTextClockFontSize.setValue(Settings.System.getInt(getContentResolver(),
@@ -189,26 +146,7 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
public boolean onPreferenceChange(Preference preference, Object newValue) {
ContentResolver resolver = getActivity().getContentResolver();
if (preference == mLockClockFonts) {
Settings.System.putInt(getContentResolver(), Settings.System.LOCK_CLOCK_FONTS,
Integer.valueOf((String) newValue));
mLockClockFonts.setValue(String.valueOf(newValue));
mLockClockFonts.setSummary(mLockClockFonts.getEntry());
return true;
} else if (preference == mTextClockFonts) {
Settings.System.putInt(getContentResolver(), Settings.System.CUSTOM_TEXT_CLOCK_FONTS,
Integer.valueOf((String) newValue));
mTextClockFonts.setValue(String.valueOf(newValue));
mTextClockFonts.setSummary(mTextClockFonts.getEntry());
return true;
} else if (preference == mLockDateFonts) {
Settings.System.putInt(getContentResolver(), Settings.System.LOCK_DATE_FONTS,
Integer.valueOf((String) newValue));
mLockDateFonts.setValue(String.valueOf(newValue));
mLockDateFonts.setSummary(mLockDateFonts.getEntry());
return true;
} else if (preference == mClockFontSize) {
if (preference == mClockFontSize) {
int top = (Integer) newValue;
Settings.System.putInt(getContentResolver(),
Settings.System.LOCKCLOCK_FONT_SIZE, top*1);
@@ -223,24 +161,6 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
Settings.System.putInt(getContentResolver(),
Settings.System.LOCKDATE_FONT_SIZE, top*1);
return true;
} else if (preference == mLockOwnerInfoFonts) {
Settings.System.putInt(getContentResolver(), Settings.System.LOCK_OWNERINFO_FONTS,
Integer.valueOf((String) newValue));
mLockOwnerInfoFonts.setValue(String.valueOf(newValue));
mLockOwnerInfoFonts.setSummary(mLockOwnerInfoFonts.getEntry());
return true;
} else if (preference == mOwnerInfoFontSize) {
int top = (Integer) newValue;
Settings.System.putInt(getContentResolver(),
Settings.System.LOCKOWNER_FONT_SIZE, top*1);
return true;
} else if (preference == mChargingInfoFont) {
int value = Integer.valueOf((String) newValue);
Settings.System.putInt(getContentResolver(),
Settings.System.LOCKSCREEN_BATTERY_INFO_FONT, value);
mChargingInfoFont.setValue(String.valueOf(value));
mChargingInfoFont.setSummary(mChargingInfoFont.getEntry());
return true;
}
return false;
}