瀏覽代碼

北美关闭 roming

liuzhenxing1118 1 年之前
父節點
當前提交
13c75edeed

+ 5 - 4
app/src/main/java/com/xplora/xpsettings/Activity/ConnectionsActivity.java

@@ -40,12 +40,13 @@ public class ConnectionsActivity extends BaseActivity {
 
     private void initData() {
         String[] stringList = ResUtils.getStringArray("connections_title_array_", 4);
-        //by lzx, 根据需求,去掉votle
-        int count = Macros.FUNCTION_VOLTE ? stringList.length : stringList.length -1;
-        for (int i = 0; i < count; i++) {
+        for (int i = 0; i < stringList.length; i++) {
             BaseModel model = new BaseModel();
             model.title = stringList[i].trim();
-            model.cellType = (i == 1 && DataManager.getIsDisableWifi()) ? Constant.CellType.GONE : Constant.CellType.XPSTYLE;
+
+            //by lzx, 根据需求,去掉votle
+            boolean isDisable = (i == 1 && DataManager.getIsDisableWifi()) || (i == 2 && DataManager.getIsDisableRoming()) || (i == 3);
+            model.cellType = isDisable ? Constant.CellType.GONE : Constant.CellType.XPSTYLE;
             mDataList.add(model);
         }
     }

+ 4 - 0
app/src/main/java/com/xplora/xpsettings/Data/DataManager.java

@@ -567,6 +567,10 @@ public class DataManager extends Application {
         return SystemProperties.getBoolean("persist.operator.disable.wifi", false);
     }
 
+    public static boolean getIsDisableRoming() {
+        return SystemProperties.getBoolean("persist.operator.disable.wifi", false);
+    }
+
     public static List<ApnModel> getApnList() {
         List<ApnModel> apnModelList = new ArrayList<>();
         if (Macros.DEBUG) {

+ 0 - 2
app/src/main/java/com/xplora/xpsettings/Utils/Macros.java

@@ -10,6 +10,4 @@ public class Macros {
     public static boolean DEBUG_RESTART = false; //以后会改成广播通知carlos server,处理关机
 
     public static boolean DEBUG_RINGTONG_NEW = false; //ringtong下载流程
-
-    public static boolean FUNCTION_VOLTE = false; //是否开启volte功能
 }