mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 11:58:09 +00:00
Merge remote-tracking branch 'private/3.0.X' into obiane
Conflicts: src/org/linphone/CallActivity.java
This commit is contained in:
commit
c3072beae1
8 changed files with 79 additions and 11 deletions
BIN
res/drawable-xhdpi/dialer_alt_back_selected.png
Normal file
BIN
res/drawable-xhdpi/dialer_alt_back_selected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1,003 B |
10
res/drawable/call_alt_start_button.xml
Normal file
10
res/drawable/call_alt_start_button.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/call_alt_start_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/call_alt_start" />
|
||||
<item
|
||||
android:drawable="@drawable/call_alt_start" />
|
||||
</selector>
|
||||
|
||||
10
res/drawable/call_back_button.xml
Normal file
10
res/drawable/call_back_button.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/call_back_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/call_back" />
|
||||
<item
|
||||
android:drawable="@drawable/call_back" />
|
||||
</selector>
|
||||
|
||||
9
res/drawable/dialer_back_button.xml
Normal file
9
res/drawable/dialer_back_button.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/dialer_alt_back_selected" />
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/dialer_alt_back_selected" />
|
||||
<item
|
||||
android:drawable="@drawable/dialer_alt_back" />
|
||||
</selector>
|
||||
|
|
@ -20,6 +20,16 @@
|
|||
android:layout_alignParentLeft="true"
|
||||
android:padding="15dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_in_call"
|
||||
android:src="@drawable/call_back"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="15dp"
|
||||
android:visibility="gone"
|
||||
android:layout_toRightOf="@+id/new_discussion"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit"
|
||||
android:src="@drawable/edit_list_button"
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
private ImageView switchCamera;
|
||||
private RelativeLayout mActiveCallHeader, sideMenuContent;
|
||||
private ImageView pause, hangUp, dialer, video, micro, speaker, options, addCall, transfer, conference, conferenceStatus, contactPicture;
|
||||
private ImageView audioRoute, routeSpeaker, routeEarpiece, routeBluetooth, menu;
|
||||
private ImageView audioRoute, routeSpeaker, routeEarpiece, routeBluetooth, menu, chat;
|
||||
private LinearLayout mNoCurrentCall, callInfo, mCallPaused;
|
||||
private ProgressBar videoProgress;
|
||||
private StatusFragment status;
|
||||
|
|
@ -328,6 +328,9 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
numpad = (Numpad) findViewById(R.id.numpad);
|
||||
numpad.getBackground().setAlpha(240);
|
||||
|
||||
chat = (ImageView) findViewById(R.id.chat);
|
||||
chat.setOnClickListener(this);
|
||||
|
||||
//Others
|
||||
|
||||
//Active Call
|
||||
|
|
@ -569,6 +572,9 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
else if (id == R.id.dialer) {
|
||||
hideOrDisplayNumpad();
|
||||
}
|
||||
else if (id == R.id.chat) {
|
||||
goToChatList();
|
||||
}
|
||||
else if (id == R.id.conference) {
|
||||
enterConference();
|
||||
hideOrDisplayCallOptions();
|
||||
|
|
@ -1215,6 +1221,13 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
finish();
|
||||
}
|
||||
|
||||
private void goToChatList() {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("chat", true);
|
||||
setResult(Activity.RESULT_FIRST_USER, intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
public void acceptCallUpdate(boolean accept) {
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
|
|
@ -1429,7 +1442,6 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
|
||||
|
||||
//CALL INFORMATION
|
||||
|
||||
private void displayCurrentCall(LinphoneCall call){
|
||||
//if(!isVideoEnabled(call)){
|
||||
// mActiveCallHeader.setVisibility(View.VISIBLE);
|
||||
|
|
@ -1507,14 +1519,6 @@ public class CallActivity extends Activity implements OnClickListener {
|
|||
return isCallPaused || isInConference;
|
||||
}
|
||||
|
||||
private void displayOrHideContactPicture(LinearLayout callView, Uri pictureUri, Uri thumbnailUri, boolean hide) {
|
||||
/*ImageView contactPicture = (ImageView) callView.findViewById(R.id.contactPicture);
|
||||
if (pictureUri != null) {
|
||||
|
||||
}
|
||||
callView.setVisibility(hide ? View.GONE : View.VISIBLE);*/
|
||||
}
|
||||
|
||||
private void registerCallDurationTimer(View v, LinphoneCall call) {
|
||||
int callDuration = call.getDuration();
|
||||
if (callDuration == 0 && call.getState() != State.StreamsRunning) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
private List<String> mConversations, mDrafts;
|
||||
private ListView chatList;
|
||||
private TextView noChatHistory;
|
||||
private ImageView edit, selectAll, deselectAll, delete, newDiscussion, contactPicture, cancel;
|
||||
private ImageView edit, selectAll, deselectAll, delete, newDiscussion, contactPicture, cancel, backInCall;
|
||||
private RelativeLayout editList, topbar;
|
||||
private boolean isEditMode = false;
|
||||
|
||||
|
|
@ -104,6 +104,9 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
deselectAll = (ImageView) view.findViewById(R.id.deselect_all);
|
||||
deselectAll.setOnClickListener(this);
|
||||
|
||||
backInCall = (ImageView) view.findViewById(R.id.back_in_call);
|
||||
backInCall.setOnClickListener(this);
|
||||
|
||||
delete = (ImageView) view.findViewById(R.id.delete);
|
||||
delete.setOnClickListener(this);
|
||||
return view;
|
||||
|
|
@ -196,6 +199,12 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
if (LinphoneManager.getLc().getCallsNb() > 0) {
|
||||
backInCall.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
backInCall.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(LinphoneActivity.instance());
|
||||
boolean updateNeeded = prefs.getBoolean(getString(R.string.pref_first_time_linphone_chat_storage), true);
|
||||
updateNeeded = updateNeeded && !isVersionUsingNewChatStorage();
|
||||
|
|
@ -266,6 +275,11 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
|
||||
if (id == R.id.back_in_call) {
|
||||
LinphoneActivity.instance().resetClassicMenuLayoutAndGoBackToCallIfStillRunning();
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == R.id.select_all) {
|
||||
deselectAll.setVisibility(View.VISIBLE);
|
||||
selectAll.setVisibility(View.GONE);
|
||||
|
|
|
|||
|
|
@ -602,6 +602,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
preferLinphoneContacts = false;
|
||||
}
|
||||
|
||||
public void displayChatList() {
|
||||
Bundle extras = new Bundle();
|
||||
changeCurrentFragment(FragmentsAvailable.CHATLIST, extras);
|
||||
}
|
||||
|
||||
public void displayContactsForEdition(String sipAddress) {
|
||||
Bundle extras = new Bundle();
|
||||
extras.putBoolean("EditOnClick", true);
|
||||
|
|
@ -872,6 +877,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void displayCustomToast(final String message, final int duration) {
|
||||
LayoutInflater inflater = getLayoutInflater();
|
||||
View layout = inflater.inflate(R.layout.toast, (ViewGroup) findViewById(R.id.toastRoot));
|
||||
|
|
@ -1080,6 +1087,10 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
|||
} else if (resultCode == Activity.RESULT_FIRST_USER && requestCode == CALL_ACTIVITY) {
|
||||
getIntent().putExtra("PreviousActivity", CALL_ACTIVITY);
|
||||
boolean callTransfer = data == null ? false : data.getBooleanExtra("Transfer", false);
|
||||
boolean chat = data == null ? false : data.getBooleanExtra("chat", false);
|
||||
if(chat){
|
||||
displayChatList();
|
||||
}
|
||||
if (LinphoneManager.getLc().getCallsNb() > 0) {
|
||||
initInCallMenuLayout(callTransfer);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue