From 9d72939d959506ef4f99ffac4337849b9242f939 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Mon, 11 Apr 2022 19:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java b/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java index 2e4af99..875c0ff 100644 --- a/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java +++ b/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java @@ -354,7 +354,7 @@ public class LiveUtils { } public static boolean getLiveState(int roomId) { - return liveStateMap.get(roomId); + return liveStateMap.getOrDefault(roomId, false); } public static void reloadLiveState(int roomId) { @@ -363,7 +363,7 @@ public class LiveUtils { try { liveStateMap.put(roomId, json.getJSONObject("data").getInteger("live_status") == 1); } catch (Exception e) { - System.out.println("json = " + json); + Log.i("live state = "+json.toString()); } } }