Fix error status bar and progress bar in chat room
This commit is contained in:
parent
7d7b7b7139
commit
c054e6bcf8
3 changed files with 13 additions and 7 deletions
|
@ -66,7 +66,6 @@ import android.text.Editable;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -467,6 +466,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
||||||
|
|
||||||
onSaveInstanceState(getArguments());
|
onSaveInstanceState(getArguments());
|
||||||
|
|
||||||
|
uploadLayout.setVisibility(View.GONE);
|
||||||
|
textLayout.setVisibility(View.VISIBLE);
|
||||||
|
progressBar.setProgress(0);
|
||||||
|
|
||||||
//Hide keybord
|
//Hide keybord
|
||||||
InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.hideSoftInputFromWindow(message.getWindowToken(), 0);
|
imm.hideSoftInputFromWindow(message.getWindowToken(), 0);
|
||||||
|
@ -519,7 +522,6 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
||||||
|
|
||||||
remoteComposing.setVisibility(chatRoom.isRemoteComposing() ? View.VISIBLE : View.GONE);
|
remoteComposing.setVisibility(chatRoom.isRemoteComposing() ? View.VISIBLE : View.GONE);
|
||||||
dispayMessageList();
|
dispayMessageList();
|
||||||
|
|
||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,7 +279,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, LinphoneChatMessage.State state) {
|
public void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, LinphoneChatMessage.State state) {
|
||||||
if (state == LinphoneChatMessage.State.FileTransferDone) {
|
if (state == LinphoneChatMessage.State.FileTransferDone || state == LinphoneChatMessage.State.FileTransferError) {
|
||||||
if(msg.isOutgoing() && mUploadingImageStream != null){
|
if(msg.isOutgoing() && mUploadingImageStream != null){
|
||||||
mUploadPendingFileMessage = null;
|
mUploadPendingFileMessage = null;
|
||||||
mUploadingImageStream = null;
|
mUploadingImageStream = null;
|
||||||
|
|
|
@ -119,10 +119,14 @@ public class StatusFragment extends Fragment {
|
||||||
if (!isAttached || !LinphoneService.isReady()) {
|
if (!isAttached || !LinphoneService.isReady()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (lc.getDefaultProxyConfig().equals(proxy)) {
|
|
||||||
statusLed.setImageResource(getStatusIconResource(state, true));
|
if (lc.getDefaultProxyConfig() != null && lc.getDefaultProxyConfig().equals(proxy)) {
|
||||||
statusText.setText(getStatusIconText(state));
|
statusLed.setImageResource(getStatusIconResource(state, true));
|
||||||
}
|
statusText.setText(getStatusIconText(state));
|
||||||
|
} else if(lc.getDefaultProxyConfig() == null) {
|
||||||
|
statusLed.setImageResource(getStatusIconResource(state, true));
|
||||||
|
statusText.setText(getStatusIconText(state));
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (getResources().getBoolean(R.bool.lock_statusbar)) {
|
if (getResources().getBoolean(R.bool.lock_statusbar)) {
|
||||||
|
|
Loading…
Reference in a new issue