Commit b4611929 by Lee Munkyeong

協業中のフラグ修正。

parent 763dba65
...@@ -138,6 +138,7 @@ public class MeetingManager extends Observable { ...@@ -138,6 +138,7 @@ public class MeetingManager extends Observable {
private int status = STATUS_READY; // ws通信ステータス private int status = STATUS_READY; // ws通信ステータス
private boolean isOwner; // オーナーか否か private boolean isOwner; // オーナーか否か
private boolean paused; // 一時停止状態 private boolean paused; // 一時停止状態
private boolean isCollaboration = false;
private ArrayList<MeetingDto> meetingList; private ArrayList<MeetingDto> meetingList;
private BlockingQueue<Object> messageQueue; private BlockingQueue<Object> messageQueue;
...@@ -337,7 +338,7 @@ public class MeetingManager extends Observable { ...@@ -337,7 +338,7 @@ public class MeetingManager extends Observable {
joinedMeetingId = NO_MEETING_ID; joinedMeetingId = NO_MEETING_ID;
status = STATUS_READY; status = STATUS_READY;
paused = false; paused = false;
isCollaboration = false;
if (messageHandlingThread != null) { if (messageHandlingThread != null) {
messageHandlingThread.terminate(); messageHandlingThread.terminate();
messageHandlingThread = null; messageHandlingThread = null;
...@@ -794,6 +795,14 @@ public class MeetingManager extends Observable { ...@@ -794,6 +795,14 @@ public class MeetingManager extends Observable {
} }
} }
public void setCollaboration(boolean isCollaboration) {
this.isCollaboration = isCollaboration;
}
public boolean isCollaboration() {
return isCollaboration;
}
public String getJoinedMeetingPassword() { public String getJoinedMeetingPassword() {
return joinedMeetingPassword; return joinedMeetingPassword;
} }
......
...@@ -154,11 +154,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -154,11 +154,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ChatWebViewActivity chatWebViewActivity = ActivityHandlingHelper.getInstance().getActivity(ChatWebViewActivity.class);
if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) {
isCollaboration = true;
}
Intent intent = getIntent(); Intent intent = getIntent();
contentId = intent.getLongExtra(ABookKeys.CONTENT_ID, 0); contentId = intent.getLongExtra(ABookKeys.CONTENT_ID, 0);
contentType = intent.getStringExtra(ABookKeys.CONTENT_TYPE); contentType = intent.getStringExtra(ABookKeys.CONTENT_TYPE);
...@@ -203,6 +198,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -203,6 +198,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 遠隔連動 // 遠隔連動
meetingManager = MeetingManager.getInstance(); meetingManager = MeetingManager.getInstance();
isCollaboration = meetingManager.isCollaboration();
mContentDir = getIntent().getStringExtra(FILEPATH); mContentDir = getIntent().getStringExtra(FILEPATH);
......
...@@ -1536,6 +1536,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1536,6 +1536,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
} }
meetingId = meetingManager.createMeeting(mSkey, "Collaboration_"+roomId, roomId.toString()); meetingId = meetingManager.createMeeting(mSkey, "Collaboration_"+roomId, roomId.toString());
meetingManager.join(meetingId, mSkey, roomId.toString(), true); meetingManager.join(meetingId, mSkey, roomId.toString(), true);
meetingManager.setCollaboration(true);
} catch (Exception e) { } catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');"); mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
} }
...@@ -1553,6 +1554,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1553,6 +1554,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
connectMeetingServer(); connectMeetingServer();
List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey); List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey);
meetingManager.join(joinMeetingId, mSkey, roomId.toString(), false); meetingManager.join(joinMeetingId, mSkey, roomId.toString(), false);
meetingManager.setCollaboration(true);
} catch (Exception e) { } catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');"); mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
} }
...@@ -1568,6 +1570,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity { ...@@ -1568,6 +1570,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
connectMeetingServer(); connectMeetingServer();
List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey); List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey);
meetingManager.join(joinMeetingId, mSkey, roomId.toString(), false); meetingManager.join(joinMeetingId, mSkey, roomId.toString(), false);
meetingManager.setCollaboration(true);
} catch (Exception e) { } catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');"); mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
} }
......
...@@ -120,7 +120,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -120,7 +120,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
private long lastDisconnect; private long lastDisconnect;
private static Dialog meetingAlertDialog; private static Dialog meetingAlertDialog;
private ABVUIActivity previousOfSettingActivity; private ABVUIActivity previousOfSettingActivity;
private boolean isCollaboration; private boolean isCollaboration = false;
// Chat // Chat
private ParentWebViewActivity previousOfSettingActivity2; private ParentWebViewActivity previousOfSettingActivity2;
...@@ -886,10 +886,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -886,10 +886,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
final String cmd = json.getString(MeetingManager.CMD); final String cmd = json.getString(MeetingManager.CMD);
final long contentId = JsonUtil.getLong(json, MeetingManager.CONTENTID); final long contentId = JsonUtil.getLong(json, MeetingManager.CONTENTID);
final int pageNumber = JsonUtil.getInt(json, MeetingManager.PAGE_NUMBER); final int pageNumber = JsonUtil.getInt(json, MeetingManager.PAGE_NUMBER);
isCollaboration = false; if (meetingManager != null) {
ChatWebViewActivity chatWebViewActivity = getActivity(ChatWebViewActivity.class); isCollaboration = meetingManager.isCollaboration();
if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) {
isCollaboration = true;
} }
if (cmd.equals(MeetingManager.CMD_MEETINGINFO) && !isCollaboration) { // 入室結果 if (cmd.equals(MeetingManager.CMD_MEETINGINFO) && !isCollaboration) { // 入室結果
showToast(mContext.getString(meetingManager.isOwner() ? R.string.msg_enter_as_publisher : R.string.msg_enter_as_subscriber)); showToast(mContext.getString(meetingManager.isOwner() ? R.string.msg_enter_as_publisher : R.string.msg_enter_as_subscriber));
......
...@@ -712,10 +712,14 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -712,10 +712,14 @@ public class ContentViewActivity extends ABVContentViewActivity {
} }
if (isCollaboration) { if (isCollaboration) {
if (mPageNumberLayout != null) {
mPageNumberLayout.setVisibility(View.GONE); mPageNumberLayout.setVisibility(View.GONE);
}
if (mSeekBarLayout != null) {
mSeekBarLayout.setVisibility(View.GONE); mSeekBarLayout.setVisibility(View.GONE);
} }
} }
}
private void configureSize() { private void configureSize() {
// 画面のサイズを指定 // 画面のサイズを指定
...@@ -1789,9 +1793,11 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -1789,9 +1793,11 @@ public class ContentViewActivity extends ABVContentViewActivity {
} }
if (isCollaboration) { if (isCollaboration) {
bookmark.setVisibility(View.GONE);
if (hasMultiPages) {
mPageNumberLayout.setVisibility(View.GONE); mPageNumberLayout.setVisibility(View.GONE);
mSeekBarLayout.setVisibility(View.GONE); mSeekBarLayout.setVisibility(View.GONE);
bookmark.setVisibility(View.GONE); }
} }
} }
else { else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment