Hide variant switch for x86 devices
This commit is contained in:
parent
53430efbf1
commit
2ca3efec9a
|
|
@ -3,6 +3,7 @@ package io.github.lsposed.manager.ui.activity;
|
|||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
|
@ -25,6 +26,7 @@ import java.nio.file.Paths;
|
|||
import io.github.lsposed.manager.Constants;
|
||||
import io.github.lsposed.manager.R;
|
||||
import io.github.lsposed.manager.databinding.ActivitySettingsBinding;
|
||||
import io.github.lsposed.manager.ui.fragment.StatusDialogBuilder;
|
||||
import io.github.lsposed.manager.ui.widget.IntegerListPreference;
|
||||
|
||||
public class SettingsActivity extends BaseActivity {
|
||||
|
|
@ -129,7 +131,7 @@ public class SettingsActivity extends BaseActivity {
|
|||
|
||||
SimpleMenuPreference prefVariant = findPreference("variant");
|
||||
if (prefVariant != null) {
|
||||
if (requireActivity().getApplicationInfo().uid / 100000 != 0) {
|
||||
if (StatusDialogBuilder.getArch().contains("x86") || requireActivity().getApplicationInfo().uid / 100000 != 0) {
|
||||
prefVariant.setVisible(false);
|
||||
} else {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -27,11 +27,10 @@ import io.github.lsposed.manager.databinding.StatusInstallerBinding;
|
|||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
public class StatusDialogBuilder extends MaterialAlertDialogBuilder {
|
||||
private static String CPU_ABI;
|
||||
private static String CPU_ABI2;
|
||||
private static final String CPU_ABI;
|
||||
private static final String CPU_ABI2;
|
||||
|
||||
public StatusDialogBuilder(@NonNull Context context) {
|
||||
super(context);
|
||||
static {
|
||||
final String[] abiList;
|
||||
if (VMRuntime.getRuntime().is64Bit()) {
|
||||
abiList = Build.SUPPORTED_64_BIT_ABIS;
|
||||
|
|
@ -44,6 +43,10 @@ public class StatusDialogBuilder extends MaterialAlertDialogBuilder {
|
|||
} else {
|
||||
CPU_ABI2 = "";
|
||||
}
|
||||
}
|
||||
|
||||
public StatusDialogBuilder(@NonNull Context context) {
|
||||
super(context);
|
||||
StatusInstallerBinding binding = StatusInstallerBinding.inflate(LayoutInflater.from(context), null, false);
|
||||
|
||||
String installedXposedVersion = Constants.getXposedVersion();
|
||||
|
|
|
|||
Loading…
Reference in New Issue