Skip to content

Commit fc6bf0a

Browse files
committed
修正读取配置错误
1 parent ecff648 commit fc6bf0a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

diycode-app/src/main/java/com/gcssloop/diycode/utils/IntentUtil.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import android.util.Log;
2929

3030
import com.gcssloop.diycode.activity.WebActivity;
31+
import com.gcssloop.diycode_sdk.log.Logger;
3132

3233
public class IntentUtil {
3334

@@ -40,11 +41,17 @@ public class IntentUtil {
4041
* @param url url
4142
*/
4243
public static void openUrl(Context context, String url) {
43-
if (url == null || url.isEmpty()) {
44+
if (null == url || url.isEmpty()) {
4445
Log.i("Diyocde", "Url地址错误");
4546
return;
4647
}
47-
if (Config.getSingleInstance().isUseInsideBrowser()) {
48+
Boolean useInside = true;
49+
try {
50+
useInside = Config.getSingleInstance().isUseInsideBrowser();
51+
} catch (Exception e){
52+
Logger.e("类型转换错误");
53+
}
54+
if (useInside) {
4855
WebActivity.newInstance(context, url);
4956
} else {
5057
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));

0 commit comments

Comments
 (0)