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

@@ -60,7 +60,6 @@ public class ClockSettings extends SettingsPreferenceFragment implements
private static final String STATUS_BAR_CLOCK_DATE_FORMAT = "clock_date_format";
private static final String STATUS_BAR_CLOCK_COLOR = "status_bar_clock_color";
private static final String STATUS_BAR_CLOCK_SIZE = "status_bar_clock_size";
private static final String STATUS_BAR_CLOCK_FONT_STYLE = "status_bar_clock_font_style";
public static final int CLOCK_DATE_STYLE_LOWERCASE = 1;
public static final int CLOCK_DATE_STYLE_UPPERCASE = 2;
private static final int CUSTOM_CLOCK_DATE_FORMAT_INDEX = 18;
@@ -77,7 +76,6 @@ public class ClockSettings extends SettingsPreferenceFragment implements
private ListPreference mClockDateFormat;
private ColorPickerPreference mClockColor;
private CustomSeekBarPreference mClockSize;
private ListPreference mClockFontStyle;
private ListPreference mClockDatePosition;
@Override
@@ -127,12 +125,6 @@ public class ClockSettings extends SettingsPreferenceFragment implements
mClockSize.setValue(clockSize / 1);
mClockSize.setOnPreferenceChangeListener(this);
mClockFontStyle = (ListPreference) findPreference(STATUS_BAR_CLOCK_FONT_STYLE);
int showClockFont = Settings.System.getInt(resolver,
Settings.System.STATUS_BAR_CLOCK_FONT_STYLE, 0);
mClockFontStyle.setValue(String.valueOf(showClockFont));
mClockFontStyle.setOnPreferenceChangeListener(this);
if (DateFormat.is24HourFormat(getActivity())) {
mStatusBarAmPm.setEnabled(false);
mStatusBarAmPm.setSummary(R.string.status_bar_am_pm_info);
@@ -236,13 +228,6 @@ public class ClockSettings extends SettingsPreferenceFragment implements
Settings.System.putInt(resolver,
Settings.System.STATUS_BAR_CLOCK_SIZE, width);
return true;
} else if (preference == mClockFontStyle) {
int showClockFont = Integer.valueOf((String) newValue);
int index = mClockFontStyle.findIndexOfValue((String) newValue);
Settings.System.putInt(resolver, Settings.System.
STATUS_BAR_CLOCK_FONT_STYLE, showClockFont);
mClockFontStyle.setSummary(mClockFontStyle.getEntries()[index]);
return true;
} else if (preference == mClockDateDisplay) {
int clockDateDisplay = Integer.valueOf((String) newValue);
int index = mClockDateDisplay.findIndexOfValue((String) newValue);

View File

@@ -45,7 +45,6 @@ public class CustomCarrierLabel extends SettingsPreferenceFragment
private static final String CUSTOM_CARRIER_LABEL = "custom_carrier_label";
private static final String STATUS_BAR_CARRIER_COLOR = "status_bar_carrier_color";
private static final String STATUS_BAR_CARRIER_FONT_SIZE = "status_bar_carrier_font_size";
private static final String CARRIER_FONT_STYLE = "status_bar_carrier_font_style";
static final int DEFAULT_STATUS_CARRIER_COLOR = 0xffffffff;
@@ -53,7 +52,6 @@ public class CustomCarrierLabel extends SettingsPreferenceFragment
private String mCustomCarrierLabelText;
private ColorPickerPreference mCarrierColorPicker;
private CustomSeekBarPreference mStatusBarCarrierSize;
private ListPreference mCarrierFontStyle;
@Override
public void onCreate(Bundle icicle) {
@@ -82,12 +80,6 @@ public class CustomCarrierLabel extends SettingsPreferenceFragment
Settings.System.STATUS_BAR_CARRIER_FONT_SIZE, 14);
mStatusBarCarrierSize.setValue(StatusBarCarrierSize / 1);
mStatusBarCarrierSize.setOnPreferenceChangeListener(this);
mCarrierFontStyle = (ListPreference) findPreference(CARRIER_FONT_STYLE);
int showCarrierFont = Settings.System.getInt(resolver,
Settings.System.STATUS_BAR_CARRIER_FONT_STYLE, 0);
mCarrierFontStyle.setValue(String.valueOf(showCarrierFont));
mCarrierFontStyle.setOnPreferenceChangeListener(this);
}
@Override
@@ -116,13 +108,6 @@ public class CustomCarrierLabel extends SettingsPreferenceFragment
Settings.System.putInt(resolver,
Settings.System.STATUS_BAR_CARRIER_FONT_SIZE, width);
return true;
} else if (preference == mCarrierFontStyle) {
int showCarrierFont = Integer.valueOf((String) newValue);
int index = mCarrierFontStyle.findIndexOfValue((String) newValue);
Settings.System.putInt(resolver, Settings.System.
STATUS_BAR_CARRIER_FONT_STYLE, showCarrierFont);
mCarrierFontStyle.setSummary(mCarrierFontStyle.getEntries()[index]);
return true;
}
return false;
}

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;
}

View File

@@ -53,7 +53,6 @@ import com.cherish.settings.preferences.SystemSettingListPreference;
public class Traffic extends SettingsPreferenceFragment implements OnPreferenceChangeListener {
private static final String NETWORK_TRAFFIC_FONT_SIZE = "network_traffic_font_size";
private static final String NETWORK_TRAFFIC_FONT_STYLE = "network_traffic_font_style";
private ListPreference mNetTrafficLocation;
private ListPreference mNetTrafficType;
@@ -61,7 +60,6 @@ public class Traffic extends SettingsPreferenceFragment implements OnPreferenceC
private CustomSeekBarPreference mNetTrafficSize;
private CustomSeekBarPreference mThreshold;
private SystemSettingSwitchPreference mShowArrows;
private SystemSettingListPreference mNetTrafficFont;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -104,12 +102,6 @@ public class Traffic extends SettingsPreferenceFragment implements OnPreferenceC
mThreshold.setOnPreferenceChangeListener(this);
mShowArrows = (SystemSettingSwitchPreference) findPreference("network_traffic_arrow");
mNetTrafficFont = (SystemSettingListPreference) findPreference(NETWORK_TRAFFIC_FONT_STYLE); int
netTrafFont = Settings.System.getInt(resolver,
Settings.System.NETWORK_TRAFFIC_FONT_STYLE, 0);
mNetTrafficFont.setValue(String.valueOf(netTrafFont));
mNetTrafficFont.setOnPreferenceChangeListener(this);
int netMonitorEnabled = Settings.System.getIntForUser(resolver,
Settings.System.NETWORK_TRAFFIC_STATE, 0, UserHandle.USER_CURRENT);
if (netMonitorEnabled == 1) {
@@ -179,13 +171,6 @@ public class Traffic extends SettingsPreferenceFragment implements OnPreferenceC
Settings.System.putInt(getActivity().getContentResolver(),
Settings.System.NETWORK_TRAFFIC_FONT_SIZE, width);
return true;
} else if (preference == mNetTrafficFont) {
int netTrafFont = Integer.valueOf((String) objValue);
int index = mNetTrafficFont.findIndexOfValue((String) objValue);
Settings.System.putInt(getActivity().getContentResolver(), Settings.System.
NETWORK_TRAFFIC_FONT_STYLE, netTrafFont);
mNetTrafficFont.setSummary(mNetTrafficFont.getEntries()[index]);
return true;
}
return false;
}

View File

@@ -55,13 +55,9 @@ public class OmniJawsSettings extends SettingsPreferenceFragment implements
private static final String DEFAULT_WEATHER_ICON_PREFIX = "outline";
private static final String WEATHER_SERVICE_PACKAGE = "org.omnirom.omnijaws";
private static final String CHRONUS_ICON_PACK_INTENT = "com.dvtonder.chronus.ICON_PACK";
private static final String LOCK_WEATHER_TEMP_FONTS = "lock_weather_temp_fonts";
private static final String LOCK_WEATHER_CITY_FONTS = "lock_weather_city_fonts";
private PreferenceCategory mWeatherCategory;
private ListPreference mWeatherIconPack;
ListPreference mLockTempFonts;
ListPreference mLockCityFonts;
@Override
public int getMetricsCategory() {
@@ -103,20 +99,6 @@ public class OmniJawsSettings extends SettingsPreferenceFragment implements
mWeatherIconPack.setSummary(mWeatherIconPack.getEntry());
mWeatherIconPack.setOnPreferenceChangeListener(this);
}
// Lockscren Weather Temp Fonts
mLockTempFonts = (ListPreference) findPreference(LOCK_WEATHER_TEMP_FONTS);
mLockTempFonts.setValue(String.valueOf(Settings.System.getInt(
getContentResolver(), Settings.System.LOCK_WEATHER_TEMP_FONTS, 27)));
mLockTempFonts.setSummary(mLockTempFonts.getEntry());
mLockTempFonts.setOnPreferenceChangeListener(this);
// Lockscren Weather City Fonts
mLockCityFonts = (ListPreference) findPreference(LOCK_WEATHER_CITY_FONTS);
mLockCityFonts.setValue(String.valueOf(Settings.System.getInt(
getContentResolver(), Settings.System.LOCK_WEATHER_CITY_FONTS, 27)));
mLockCityFonts.setSummary(mLockCityFonts.getEntry());
mLockCityFonts.setOnPreferenceChangeListener(this);
}
public boolean onPreferenceChange(Preference preference, Object objValue) {
@@ -127,18 +109,6 @@ public class OmniJawsSettings extends SettingsPreferenceFragment implements
int valueIndex = mWeatherIconPack.findIndexOfValue(value);
mWeatherIconPack.setSummary(mWeatherIconPack.getEntries()[valueIndex]);
return true;
} else if (preference == mLockTempFonts) {
Settings.System.putInt(getContentResolver(), Settings.System.LOCK_WEATHER_TEMP_FONTS,
Integer.valueOf((String) objValue));
mLockTempFonts.setValue(String.valueOf(objValue));
mLockTempFonts.setSummary(mLockTempFonts.getEntry());
return true;
} else if (preference == mLockCityFonts) {
Settings.System.putInt(getContentResolver(), Settings.System.LOCK_WEATHER_CITY_FONTS,
Integer.valueOf((String) objValue));
mLockCityFonts.setValue(String.valueOf(objValue));
mLockCityFonts.setSummary(mLockCityFonts.getEntry());
return true;
}
return false;
}