diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 058166c808..15b2bee670 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -63,4 +63,4 @@ jobs: ESCAPED="$(cat ${{ github.workspace }}/git_log | gawk '{gsub(/[_*[\]()~`>#+=\|{}.!-]/,"\\\\\\\\&")}1' | sed -e 's|"|\\"|g' -e 's|^[0-9a-z]\+|__&__|' | hexdump -v -e '/1 "%02X"' | sed 's/\(..\)/%\1/g')" cd ${{ github.workspace }} curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${GROUP_ID}&message_thread_id=${MESSAGE_THREAD_ID}&media=%5B%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Fcanary%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22%3A%22${ESCAPED}%22%7D%5D" -F canary="@${CANARY}" - # curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${CHANNEL_ID}&media=%5B%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Fcanary%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22%3A%22${ESCAPED}%22%7D%5D" -F canary="@${CANARY}" + curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${CHANNEL_ID}&media=%5B%7B%22type%22%3A%22document%22%2C%20%22media%22%3A%22attach%3A%2F%2Fcanary%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22%3A%22${ESCAPED}%22%7D%5D" -F canary="@${CANARY}" diff --git a/README.md b/README.md index 747916ae60..983421897c 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ Android 11 ~ 13 的 MIUI 12.5 ~ 14 - [「DexKit」 by LuckyPray](https://github.com/LuckyPray/DexKit) - [「Disable app link verify」 by Xposed-Modules-Repo](https://github.com/Xposed-Modules-Repo/io.github.tehcneko.applinkverify) - [「DisableFlagSecure」 by LSPosed](https://github.com/LSPosed/DisableFlagSecure) +- [「DisableLogRequest」 by QueallyTech](https://github.com/QueallyTech/DisableLogRequest) - [「EzXHelper」 by KyuubiRan](https://github.com/KyuubiRan/EzXHelper) - [「FixMiuiMediaControlPanel」 by qqlittleice](https://github.com/qqlittleice/FixMiuiMediaControlPanel) - [「HideMiuiClipboardDialog」 by zerorooot](https://github.com/zerorooot/HideMiuiClipboardDialog) diff --git a/README_en-US.md b/README_en-US.md index 7e3f80965f..e396c42b83 100644 --- a/README_en-US.md +++ b/README_en-US.md @@ -70,6 +70,7 @@ MIUI 12.5 ~ 14 for Android 11 ~ 13 - [「DexKit」 by LuckyPray](https://github.com/LuckyPray/DexKit) - [「Disable app link verify」 by Xposed-Modules-Repo](https://github.com/Xposed-Modules-Repo/io.github.tehcneko.applinkverify) - [「DisableFlagSecure」 by LSPosed](https://github.com/LSPosed/DisableFlagSecure) +- [「DisableLogRequest」 by QueallyTech](https://github.com/QueallyTech/DisableLogRequest) - [「EzXHelper」 by KyuubiRan](https://github.com/KyuubiRan/EzXHelper) - [「FixMiuiMediaControlPanel」 by qqlittleice](https://github.com/qqlittleice/FixMiuiMediaControlPanel) - [「HideMiuiClipboardDialog」 by zerorooot](https://github.com/zerorooot/HideMiuiClipboardDialog) diff --git a/app/src/main/java/com/sevtinge/cemiuiler/prefs/SeekBarPreferenceEx.java b/app/src/main/java/com/sevtinge/cemiuiler/prefs/SeekBarPreferenceEx.java deleted file mode 100644 index 34254180f3..0000000000 --- a/app/src/main/java/com/sevtinge/cemiuiler/prefs/SeekBarPreferenceEx.java +++ /dev/null @@ -1,248 +0,0 @@ -package com.sevtinge.cemiuiler.prefs; - -import android.content.Context; -import android.content.res.TypedArray; -import android.text.TextUtils; -import android.util.AttributeSet; -import android.view.View; -import android.widget.SeekBar; -import android.widget.TextView; - -import com.sevtinge.cemiuiler.R; - -import java.util.IllegalFormatException; - -import moralnorm.preference.Preference; -import moralnorm.preference.PreferenceViewHolder; - -public class SeekBarPreferenceEx extends Preference { - - private int mDefaultValue; - private int mMinValue; - private int mMaxValue; - private int mStepValue; - private int mNegativeShift; - - private int mDisplayDividerValue; - private boolean mUseDisplayDividerValue; - private boolean mShowPlus; - - private String mFormat; - private String mNote; - private String mDefaultValueText; - - private int mSteppedMinValue; - private int mSteppedMaxValue; - - private TextView mValue; - private SeekBar mSeekBar; - - private SeekBar.OnSeekBarChangeListener mListener; - - public SeekBarPreferenceEx(Context context, AttributeSet attrs) { - this(context, attrs, R.attr.seekBarPreferenceExStyle); - } - - public SeekBarPreferenceEx(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - - mListener = null; - - if (attrs != null) { - TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.SeekBarPreferenceEx); - - mMinValue = a.getInt(R.styleable.SeekBarPreferenceEx_minValue, 0); - mMaxValue = a.getInt(R.styleable.SeekBarPreferenceEx_maxValue, 10); - mStepValue = a.getInt(R.styleable.SeekBarPreferenceEx_stepValue, 1); - mDefaultValue = a.getInt(R.styleable.SeekBarPreferenceEx_android_defaultValue, 0); - mNegativeShift = a.getInt(R.styleable.SeekBarPreferenceEx_negativeShift, 0); - mShowPlus = a.getBoolean(R.styleable.SeekBarPreferenceEx_showPlus, false); - mUseDisplayDividerValue = a.hasValue(R.styleable.SeekBarPreferenceEx_displayDividerValue); - mDisplayDividerValue = mUseDisplayDividerValue ? a.getInt(R.styleable.SeekBarPreferenceEx_displayDividerValue, 1) : 1; - - if (mMinValue < 0) mMinValue = 0; - if (mMaxValue <= mMinValue) mMaxValue = mMinValue + 1; - - if (mDefaultValue < mMinValue) - mDefaultValue = mMinValue; - else if (mDefaultValue > mMaxValue) - mDefaultValue = mMaxValue; - - if (mStepValue <= 0) mStepValue = 1; - - mFormat = a.getString(R.styleable.SeekBarPreferenceEx_format); - mNote = a.getString(R.styleable.SeekBarPreferenceEx_note); - mDefaultValueText = a.getString(R.styleable.SeekBarPreferenceEx_defaultValueText); - a.recycle(); - } else { - mMinValue = 0; - mMaxValue = 10; - mStepValue = 1; - mDefaultValue = 0; - } - - mSteppedMinValue = Math.round((float) mMinValue / mStepValue); - mSteppedMaxValue = Math.round((float) mMaxValue / mStepValue); - } - - @Override - public void onBindViewHolder(PreferenceViewHolder view) { - super.onBindViewHolder(view); - - TextView mNoteView = (TextView) view.findViewById(android.R.id.text2); - if (!TextUtils.isEmpty(mNote)) mNoteView.setText(mNote); - mSeekBar = (SeekBar) view.findViewById(R.id.seekbar); - mValue = (TextView) view.findViewById(R.id.seekbar_value); - - mSeekBar.setMax(mSteppedMaxValue - mSteppedMinValue); - setValue(getPersistedInt(mDefaultValue)); - mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { - @Override - public void onStopTrackingTouch(SeekBar seekBar) { - if (mListener != null) mListener.onStopTrackingTouch(seekBar); - saveValue(); - } - - @Override - public void onStartTrackingTouch(SeekBar seekBar) { - if (mListener != null) mListener.onStartTrackingTouch(seekBar); - } - - @Override - public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { - if (mListener != null) mListener.onProgressChanged(seekBar, getValue(), fromUser); - updateDisplay(progress); - } - }); - view.setDividerAllowedAbove(false); - } - - public void setOnSeekBarChangeListener(SeekBar.OnSeekBarChangeListener listener) { - mListener = listener; - } - - public int getMinValue() { - return mMinValue; - } - - public void setMinValue(int value) { - mMinValue = value; - updateAllValues(); - } - - public int getMaxValue() { - return mMaxValue; - } - - public void setMaxValue(int value) { - mMaxValue = value; - updateAllValues(); - } - - public int getStepValue() { - return mStepValue; - } - - public void setStepValue(int value) { - mStepValue = value; - updateAllValues(); - } - - public String getFormat() { - return mFormat; - } - - private void setFormat(String format) { - mFormat = format; - updateDisplay(); - } - - public void setFormat(int formatResId) { - setFormat(getContext().getResources().getString(formatResId)); - } - - public int getValue() { - return mSeekBar == null ? mDefaultValue : (mSeekBar.getProgress() + mSteppedMinValue) * mStepValue; - } - - public void setValue(int value) { - setValue(value, false); - } - - public void setValue(int value, boolean save) { - value = getBoundedValue(value) - mSteppedMinValue; - mSeekBar.setProgress(value); - updateDisplay(value); - if (save) { - saveValue(); - } - } - - public void setDefaultValue(int value) { - mDefaultValue = value; - } - - private void updateAllValues() { - int currentValue = getValue(); - if (mMaxValue <= mMinValue) mMaxValue = mMinValue + 1; - mSteppedMinValue = Math.round((float) mMinValue / mStepValue); - mSteppedMaxValue = Math.round((float) mMaxValue / mStepValue); - - if (mSeekBar != null) mSeekBar.setMax(mSteppedMaxValue - mSteppedMinValue); - - currentValue = getBoundedValue(currentValue) - mSteppedMinValue; - - if (mSeekBar != null) { - mSeekBar.setProgress(currentValue); - updateDisplay(currentValue); - } - } - - private int getBoundedValue(int value) { - value = Math.round((float) value / mStepValue); - if (value < mSteppedMinValue) value = mSteppedMinValue; - if (value > mSteppedMaxValue) value = mSteppedMaxValue; - return value; - } - - private void updateDisplay() { - updateDisplay(mSeekBar.getProgress()); - } - - private void updateDisplay(int value) { - if (!TextUtils.isEmpty(mFormat)) { - mValue.setVisibility(View.VISIBLE); - value = (value + mSteppedMinValue) * mStepValue; - String text; - if (value == mDefaultValue && mDefaultValueText != null) { - mValue.setText(mDefaultValueText); - return; - } - - if (mNegativeShift > 0) value -= mNegativeShift; - - try { - if (mUseDisplayDividerValue) { - float floatValue = (float) value / (float) mDisplayDividerValue; - text = String.format(mFormat, floatValue); - } else { - text = String.format(mFormat, value); - } - } catch (IllegalFormatException e) { - e.printStackTrace(); - text = Integer.toString(value); - } - if (mShowPlus && value > 0) text = text + "+"; - mValue.setText(text); - } else { - mValue.setVisibility(View.GONE); - } - } - - private void saveValue() { - persistInt(getValue()); - notifyChanged(); - callChangeListener(getValue()); - } - -} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/framework/DisplaySettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/framework/DisplaySettings.java index 19332bbd50..0b9739f81d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/framework/DisplaySettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/framework/DisplaySettings.java @@ -4,7 +4,7 @@ import android.widget.SeekBar; import com.sevtinge.cemiuiler.R; -import com.sevtinge.cemiuiler.prefs.SeekBarPreferenceEx; +import moralnorm.preference.SeekBarPreferenceEx; import com.sevtinge.cemiuiler.ui.base.BaseSettingsActivity; import com.sevtinge.cemiuiler.ui.fragment.base.SettingsPreferenceFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/home/HomeFolderSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/home/HomeFolderSettings.java index 231d1f7c4a..4fe08e32a0 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/home/HomeFolderSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/home/HomeFolderSettings.java @@ -9,15 +9,15 @@ import moralnorm.preference.DropDownPreference; import moralnorm.preference.Preference; -import moralnorm.preference.SeekBarPreference; +import moralnorm.preference.SeekBarPreferenceEx; import moralnorm.preference.SwitchPreference; public class HomeFolderSettings extends SettingsPreferenceFragment { DropDownPreference mFolderShade; - SeekBarPreference mFolderShadeLevel; + SeekBarPreferenceEx mFolderShadeLevel; - SeekBarPreference mFolderColumns; + SeekBarPreferenceEx mFolderColumns; SwitchPreference mFolderWidth; SwitchPreference mFolderSpace; Preference mSmallFolderIconBackgroundCustom; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/sub/CustomBackgroundSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/sub/CustomBackgroundSettings.java index a326dcff0c..25d6117870 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/sub/CustomBackgroundSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/sub/CustomBackgroundSettings.java @@ -8,17 +8,17 @@ import moralnorm.preference.ColorPickerPreference; import moralnorm.preference.Preference; -import moralnorm.preference.SeekBarPreference; +import moralnorm.preference.SeekBarPreferenceEx; import moralnorm.preference.SwitchPreference; public class CustomBackgroundSettings extends SettingsPreferenceFragment implements Preference.OnPreferenceChangeListener { - private SeekBarPreference mBlurRadius; + private SeekBarPreferenceEx mBlurRadius; private SwitchPreference mBlurEnabled; private ColorPickerPreference mColor; - private SeekBarPreference mColorAlpha; - private SeekBarPreference mCornerRadius; + private SeekBarPreferenceEx mColorAlpha; + private SeekBarPreferenceEx mCornerRadius; private String mBlurRadiusKey; private String mBlurEnabledKey; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/ControlCenterSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/ControlCenterSettings.java index 36a97a61a3..a44b52b1f5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/ControlCenterSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/ControlCenterSettings.java @@ -9,7 +9,7 @@ import android.widget.SeekBar; import com.sevtinge.cemiuiler.R; -import com.sevtinge.cemiuiler.prefs.SeekBarPreferenceEx; +import moralnorm.preference.SeekBarPreferenceEx; import com.sevtinge.cemiuiler.ui.base.BaseSettingsActivity; import com.sevtinge.cemiuiler.ui.fragment.base.SettingsPreferenceFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/LockScreenSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/LockScreenSettings.java index 13b1dfc234..95ffc38e3f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/LockScreenSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/LockScreenSettings.java @@ -7,7 +7,7 @@ import android.view.View; import com.sevtinge.cemiuiler.R; -import com.sevtinge.cemiuiler.prefs.SeekBarPreferenceEx; +import moralnorm.preference.SeekBarPreferenceEx; import com.sevtinge.cemiuiler.ui.base.BaseSettingsActivity; import com.sevtinge.cemiuiler.ui.fragment.base.SettingsPreferenceFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/statusbar/IconManageSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/statusbar/IconManageSettings.java index 21979f38ab..d981876c2b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/statusbar/IconManageSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/statusbar/IconManageSettings.java @@ -11,7 +11,7 @@ import moralnorm.preference.DropDownPreference; import moralnorm.preference.Preference; -import moralnorm.preference.SeekBarPreference; +import moralnorm.preference.SeekBarPreferenceEx; import moralnorm.preference.SwitchPreference; public class IconManageSettings extends SettingsPreferenceFragment { @@ -19,8 +19,8 @@ public class IconManageSettings extends SettingsPreferenceFragment { Preference UseNewHD; DropDownPreference IconNewHD; DropDownPreference mAlarmClockIcon; - SeekBarPreference mAlarmClockIconN; - SeekBarPreference mNotificationIconMaximum; + SeekBarPreferenceEx mAlarmClockIconN; + SeekBarPreferenceEx mNotificationIconMaximum; SwitchPreference mBatteryNumber; SwitchPreference mBatteryPercentage; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/statusbar/NetworkSpeedIndicatorSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/statusbar/NetworkSpeedIndicatorSettings.java index f05d27cd0a..2b976d444b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/statusbar/NetworkSpeedIndicatorSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/systemui/statusbar/NetworkSpeedIndicatorSettings.java @@ -8,11 +8,11 @@ import com.sevtinge.cemiuiler.ui.base.BaseSettingsActivity; import com.sevtinge.cemiuiler.ui.fragment.base.SettingsPreferenceFragment; -import moralnorm.preference.SeekBarPreference; +import moralnorm.preference.SeekBarPreferenceEx; public class NetworkSpeedIndicatorSettings extends SettingsPreferenceFragment { - SeekBarPreference mNetworkSpeedWidth; // 固定宽度 + SeekBarPreferenceEx mNetworkSpeedWidth; // 固定宽度 @Override public int getContentResId() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/various/AlertDialogSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/various/AlertDialogSettings.java index afc0c706ca..fa5c16cdaf 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/various/AlertDialogSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/fragment/various/AlertDialogSettings.java @@ -5,13 +5,13 @@ import com.sevtinge.cemiuiler.utils.PrefsUtils; import moralnorm.preference.DropDownPreference; -import moralnorm.preference.SeekBarPreference; +import moralnorm.preference.SeekBarPreferenceEx; public class AlertDialogSettings extends SettingsPreferenceFragment { private DropDownPreference mDialogGravity; - private SeekBarPreference mDialogHorizontalMargin; - private SeekBarPreference mDialogBottomMargin; + private SeekBarPreferenceEx mDialogHorizontalMargin; + private SeekBarPreferenceEx mDialogBottomMargin; @Override public int getContentResId() { diff --git a/app/src/main/res/xml/framework_display.xml b/app/src/main/res/xml/framework_display.xml index 7fd6f7206d..9a9da5afda 100644 --- a/app/src/main/res/xml/framework_display.xml +++ b/app/src/main/res/xml/framework_display.xml @@ -16,7 +16,7 @@ android:dependency="prefs_key_system_control_center_auto_brightness" android:defaultValue="false" /> - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/xml/home_folder.xml b/app/src/main/res/xml/home_folder.xml index ec245ea032..63a6b44eee 100644 --- a/app/src/main/res/xml/home_folder.xml +++ b/app/src/main/res/xml/home_folder.xml @@ -1,9 +1,7 @@ - - - - @@ -54,13 +54,13 @@ android:key="prefs_key_home_layout_workspace_padding_bottom_enable" android:defaultValue="false" /> - @@ -72,13 +72,13 @@ android:key="prefs_key_home_layout_hotseats_height_enable" android:defaultValue="false" /> - @@ -88,13 +88,13 @@ android:key="prefs_key_home_layout_hotseats_margin_top_enable" android:defaultValue="false" /> - @@ -104,13 +104,13 @@ android:key="prefs_key_home_layout_hotseats_margin_bottom_enable" android:defaultValue="false" /> - @@ -123,13 +123,13 @@ android:key="prefs_key_home_layout_searchbar_margin_bottom_enable" android:defaultValue="false" /> - diff --git a/app/src/main/res/xml/home_other.xml b/app/src/main/res/xml/home_other.xml index da955d9975..e7c0222c37 100644 --- a/app/src/main/res/xml/home_other.xml +++ b/app/src/main/res/xml/home_other.xml @@ -35,14 +35,14 @@ android:title="@string/home_other_shortcut_remove_restrictions" android:defaultValue="false" /> - - - - - - - - - diff --git a/app/src/main/res/xml/system_ui_status_bar_battery_styles.xml b/app/src/main/res/xml/system_ui_status_bar_battery_styles.xml index 1a17b20792..6a378ba989 100644 --- a/app/src/main/res/xml/system_ui_status_bar_battery_styles.xml +++ b/app/src/main/res/xml/system_ui_status_bar_battery_styles.xml @@ -18,7 +18,7 @@ android:dependency="prefs_key_system_ui_status_bar_battery_style_enable_custom" android:title="@string/system_ui_statusbar_indicator_bold" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -