|
|
@@ -15,7 +15,7 @@ import java.util.Map;
|
|
|
|
|
|
public class ReactUtil {
|
|
|
/**
|
|
|
- * 是否进入rn调试模式
|
|
|
+ * 是否进入调试模式
|
|
|
*/
|
|
|
public static final boolean isSmallDebug() {
|
|
|
File sdDir = null;
|
|
|
@@ -26,86 +26,6 @@ public class ReactUtil {
|
|
|
}
|
|
|
return sdDir != null && new File(sdDir, "smallSheep.debug").exists();
|
|
|
}
|
|
|
- /**
|
|
|
- * 是否进入rn调试模式
|
|
|
- */
|
|
|
- public static final boolean isRnDebug() {
|
|
|
- File sdDir = null;
|
|
|
- boolean sdCardExist = Environment.getExternalStorageState()
|
|
|
- .equals(android.os.Environment.MEDIA_MOUNTED); //判断sd卡是否存在
|
|
|
- if (sdCardExist) {
|
|
|
- sdDir = Environment.getExternalStorageDirectory();//获取跟目录
|
|
|
- }
|
|
|
- return sdDir != null && new File(sdDir, "duanduanReactNative.debug").exists();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 是否加载rn
|
|
|
- */
|
|
|
- public static final boolean isLoadRn() {
|
|
|
- File sdDir = null;
|
|
|
- boolean sdCardExist = Environment.getExternalStorageState()
|
|
|
- .equals(android.os.Environment.MEDIA_MOUNTED); //判断sd卡是否存在
|
|
|
- if (sdCardExist) {
|
|
|
- sdDir = Environment.getExternalStorageDirectory();//获取跟目录
|
|
|
- }
|
|
|
- return sdDir != null && new File(sdDir, "duanduanReactNative.load").exists();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 是否加载rn_BorrowPlay
|
|
|
- */
|
|
|
- public static final boolean isLoadRn_BorrowPlay() {
|
|
|
- File sdDir = null;
|
|
|
- boolean sdCardExist = Environment.getExternalStorageState()
|
|
|
- .equals(android.os.Environment.MEDIA_MOUNTED); //判断sd卡是否存在
|
|
|
- if (sdCardExist) {
|
|
|
- sdDir = Environment.getExternalStorageDirectory();//获取跟目录
|
|
|
- }
|
|
|
- return sdDir != null && new File(sdDir, "duanduanReactNative.load_bp").exists();
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 是否包含用户名密码文件
|
|
|
- */
|
|
|
- public static final boolean isHasUserFile() {
|
|
|
- File sdDir = null;
|
|
|
- boolean sdCardExist = Environment.getExternalStorageState()
|
|
|
- .equals(android.os.Environment.MEDIA_MOUNTED); //判断sd卡是否存在
|
|
|
- if (sdCardExist) {
|
|
|
- sdDir = Environment.getExternalStorageDirectory();//获取跟目录
|
|
|
- }
|
|
|
- return sdDir != null && new File(sdDir, "duanduan.zh").exists();
|
|
|
- }
|
|
|
-
|
|
|
- public static Map<String, String> MAP_PWD;
|
|
|
-
|
|
|
- public static List<String> initArr() {
|
|
|
- File sdDir = null;
|
|
|
- boolean sdCardExist = Environment.getExternalStorageState()
|
|
|
- .equals(android.os.Environment.MEDIA_MOUNTED); //判断sd卡是否存在
|
|
|
- if (sdCardExist) {
|
|
|
- sdDir = Environment.getExternalStorageDirectory();//获取跟目录
|
|
|
- }
|
|
|
- if (sdDir != null && new File(sdDir, "duanduan.zh").exists()) {
|
|
|
- List<String> list = FileUtil.readLines(new File(sdDir, "duanduan.zh").getAbsolutePath());
|
|
|
- if (list != null && !list.isEmpty()) {
|
|
|
- List<String> arr = new ArrayList<>();
|
|
|
- MAP_PWD = new HashMap<>(list.size());
|
|
|
- int i = 0;
|
|
|
- for (String line : list) {
|
|
|
- if (line.contains("\t")) {
|
|
|
- String[] items = line.split("\t");
|
|
|
- arr.add(items[0]);
|
|
|
- MAP_PWD.put(items[0], items[1]);
|
|
|
- }
|
|
|
- i++;
|
|
|
- }
|
|
|
- return arr;
|
|
|
- }
|
|
|
- }
|
|
|
- return new ArrayList<>();
|
|
|
- }
|
|
|
|
|
|
|
|
|
|