feat: Fake High Performance Device
This commit is contained in:
parent
81d63a1dd9
commit
8992ffbe39
@ -67,6 +67,7 @@ import tw.nekomimi.nekogram.utils.AlertUtil;
|
|||||||
import tw.nekomimi.nekogram.utils.EnvUtil;
|
import tw.nekomimi.nekogram.utils.EnvUtil;
|
||||||
import tw.nekomimi.nekogram.utils.FileUtil;
|
import tw.nekomimi.nekogram.utils.FileUtil;
|
||||||
import tw.nekomimi.nekogram.utils.UIUtil;
|
import tw.nekomimi.nekogram.utils.UIUtil;
|
||||||
|
import xyz.nextalone.nagram.NaConfig;
|
||||||
|
|
||||||
import static com.v2ray.ang.V2RayConfig.SSR_PROTOCOL;
|
import static com.v2ray.ang.V2RayConfig.SSR_PROTOCOL;
|
||||||
import static com.v2ray.ang.V2RayConfig.SS_PROTOCOL;
|
import static com.v2ray.ang.V2RayConfig.SS_PROTOCOL;
|
||||||
@ -2385,6 +2386,9 @@ public class SharedConfig {
|
|||||||
FileLog.d("device performance info selected_class = " + devicePerformanceClass + " (cpu_count = " + cpuCount + ", freq = " + maxCpuFreq + ", memoryClass = " + memoryClass + ", android version " + androidVersion + ", manufacture " + Build.MANUFACTURER + ")");
|
FileLog.d("device performance info selected_class = " + devicePerformanceClass + " (cpu_count = " + cpuCount + ", freq = " + maxCpuFreq + ", memoryClass = " + memoryClass + ", android version " + androidVersion + ", manufacture " + Build.MANUFACTURER + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (NaConfig.INSTANCE.getFakeHighPerformanceDevice().Bool()) {
|
||||||
|
devicePerformanceClass = PERFORMANCE_CLASS_HIGH;
|
||||||
|
}
|
||||||
|
|
||||||
return devicePerformanceClass;
|
return devicePerformanceClass;
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ public class NekoExperimentalSettingsActivity extends BaseFragment {
|
|||||||
private final AbstractConfigCell audioEnhanceRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getNoiseSuppressAndVoiceEnhance()));
|
private final AbstractConfigCell audioEnhanceRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getNoiseSuppressAndVoiceEnhance()));
|
||||||
private final AbstractConfigCell showRPCErrorRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getShowRPCError()));
|
private final AbstractConfigCell showRPCErrorRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getShowRPCError()));
|
||||||
private final AbstractConfigCell customArtworkApiRow = cellGroup.appendCell(new ConfigCellTextInput(null, NaConfig.INSTANCE.getCustomArtworkApi(), "", null));
|
private final AbstractConfigCell customArtworkApiRow = cellGroup.appendCell(new ConfigCellTextInput(null, NaConfig.INSTANCE.getCustomArtworkApi(), "", null));
|
||||||
|
private final AbstractConfigCell fakeHighPerformanceDeviceRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getFakeHighPerformanceDevice()));
|
||||||
private final AbstractConfigCell divider1 = cellGroup.appendCell(new ConfigCellDivider());
|
private final AbstractConfigCell divider1 = cellGroup.appendCell(new ConfigCellDivider());
|
||||||
|
|
||||||
private UndoView tooltip;
|
private UndoView tooltip;
|
||||||
|
@ -334,6 +334,12 @@ object NaConfig {
|
|||||||
ConfigItem.configTypeBool,
|
ConfigItem.configTypeBool,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
val fakeHighPerformanceDevice =
|
||||||
|
addConfig(
|
||||||
|
"FakeHighPerformanceDevice",
|
||||||
|
ConfigItem.configTypeBool,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
|
||||||
private fun addConfig(
|
private fun addConfig(
|
||||||
k: String,
|
k: String,
|
||||||
|
@ -66,5 +66,6 @@
|
|||||||
<string name="CustomPoor">自定义长按快捷回复词</string>
|
<string name="CustomPoor">自定义长按快捷回复词</string>
|
||||||
<string name="CustomPoorHint">默认破烂</string>
|
<string name="CustomPoorHint">默认破烂</string>
|
||||||
<string name="CustomEditedMessage">自定义已编辑消息提示词</string>
|
<string name="CustomEditedMessage">自定义已编辑消息提示词</string>
|
||||||
<string name="HidePremiumOnlyChannel">隐藏大会员皮套</string>
|
<string name="HidePremiumOnlyChannel">切换皮套隐藏大会员专享</string>
|
||||||
|
<string name="FakeHighPerformanceDevice">伪装高性能设备</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -68,4 +68,5 @@
|
|||||||
<string name="CustomPoorHint">Default pool</string>
|
<string name="CustomPoorHint">Default pool</string>
|
||||||
<string name="CustomEditedMessage">Custom Edited Message word</string>
|
<string name="CustomEditedMessage">Custom Edited Message word</string>
|
||||||
<string name="HidePremiumOnlyChannel">Hide Premium Only Channel</string>
|
<string name="HidePremiumOnlyChannel">Hide Premium Only Channel</string>
|
||||||
|
<string name="FakeHighPerformanceDevice">Fake High Performance Device</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user