Commit b4611929 by Lee Munkyeong

協業中のフラグ修正。

parent 763dba65
......@@ -138,6 +138,7 @@ public class MeetingManager extends Observable {
private int status = STATUS_READY; // ws通信ステータス
private boolean isOwner; // オーナーか否か
private boolean paused; // 一時停止状態
private boolean isCollaboration = false;
private ArrayList<MeetingDto> meetingList;
private BlockingQueue<Object> messageQueue;
......@@ -337,7 +338,7 @@ public class MeetingManager extends Observable {
joinedMeetingId = NO_MEETING_ID;
status = STATUS_READY;
paused = false;
isCollaboration = false;
if (messageHandlingThread != null) {
messageHandlingThread.terminate();
messageHandlingThread = null;
......@@ -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() {
return joinedMeetingPassword;
}
......
......@@ -154,11 +154,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ChatWebViewActivity chatWebViewActivity = ActivityHandlingHelper.getInstance().getActivity(ChatWebViewActivity.class);
if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) {
isCollaboration = true;
}
Intent intent = getIntent();
contentId = intent.getLongExtra(ABookKeys.CONTENT_ID, 0);
contentType = intent.getStringExtra(ABookKeys.CONTENT_TYPE);
......@@ -203,7 +198,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 遠隔連動
meetingManager = MeetingManager.getInstance();
isCollaboration = meetingManager.isCollaboration();
mContentDir = getIntent().getStringExtra(FILEPATH);
// Activity登録
......
......@@ -1536,6 +1536,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
}
meetingId = meetingManager.createMeeting(mSkey, "Collaboration_"+roomId, roomId.toString());
meetingManager.join(meetingId, mSkey, roomId.toString(), true);
meetingManager.setCollaboration(true);
} catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
}
......@@ -1553,6 +1554,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
connectMeetingServer();
List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey);
meetingManager.join(joinMeetingId, mSkey, roomId.toString(), false);
meetingManager.setCollaboration(true);
} catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
}
......@@ -1568,6 +1570,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity {
connectMeetingServer();
List<MeetingDto> meetingList= meetingManager.getMeetingList(mSkey);
meetingManager.join(joinMeetingId, mSkey, roomId.toString(), false);
meetingManager.setCollaboration(true);
} catch (Exception e) {
mChatWebView.loadUrl("javascript:alert('" + "会議室サーバに接続できませんでした。" + "');");
}
......
......@@ -120,7 +120,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
private long lastDisconnect;
private static Dialog meetingAlertDialog;
private ABVUIActivity previousOfSettingActivity;
private boolean isCollaboration;
private boolean isCollaboration = false;
// Chat
private ParentWebViewActivity previousOfSettingActivity2;
......@@ -886,10 +886,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
final String cmd = json.getString(MeetingManager.CMD);
final long contentId = JsonUtil.getLong(json, MeetingManager.CONTENTID);
final int pageNumber = JsonUtil.getInt(json, MeetingManager.PAGE_NUMBER);
isCollaboration = false;
ChatWebViewActivity chatWebViewActivity = getActivity(ChatWebViewActivity.class);
if (chatWebViewActivity != null && chatWebViewActivity.isInPictureInPictureMode()) {
isCollaboration = true;
if (meetingManager != null) {
isCollaboration = meetingManager.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));
......
......@@ -712,8 +712,12 @@ public class ContentViewActivity extends ABVContentViewActivity {
}
if (isCollaboration) {
mPageNumberLayout.setVisibility(View.GONE);
mSeekBarLayout.setVisibility(View.GONE);
if (mPageNumberLayout != null) {
mPageNumberLayout.setVisibility(View.GONE);
}
if (mSeekBarLayout != null) {
mSeekBarLayout.setVisibility(View.GONE);
}
}
}
......@@ -1789,9 +1793,11 @@ public class ContentViewActivity extends ABVContentViewActivity {
}
if (isCollaboration) {
mPageNumberLayout.setVisibility(View.GONE);
mSeekBarLayout.setVisibility(View.GONE);
bookmark.setVisibility(View.GONE);
if (hasMultiPages) {
mPageNumberLayout.setVisibility(View.GONE);
mSeekBarLayout.setVisibility(View.GONE);
}
}
}
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