Merge remote-tracking branch 'origin/master' into dev_phonenumber
This commit is contained in:
commit
c39b57d1e0
5 changed files with 45 additions and 9 deletions
BIN
res/drawable-xhdpi/avatar_chat_mask_outgoing.png
Normal file
BIN
res/drawable-xhdpi/avatar_chat_mask_outgoing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
|
@ -27,14 +27,33 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/delete_message"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_picture"
|
||||
android:src="@drawable/avatar"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/avatar_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_picture"
|
||||
android:src="@drawable/avatar"
|
||||
android:contentDescription="@string/content_description_contact_picture"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:adjustViewBounds="true"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/mask"
|
||||
android:src="@drawable/avatar_chat_mask"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:adjustViewBounds="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -111,4 +130,4 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -950,6 +950,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
public Button fileTransferAction;
|
||||
public ImageView messageStatus;
|
||||
public ProgressBar messageSendingInProgress;
|
||||
public ImageView contactPictureMask;
|
||||
|
||||
public ViewHolder(View view) {
|
||||
id = view.getId();
|
||||
|
@ -965,6 +966,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
fileTransferAction = (Button) view.findViewById(R.id.file_transfer_action);
|
||||
messageStatus = (ImageView) view.findViewById(R.id.status);
|
||||
messageSendingInProgress = (ProgressBar) view.findViewById(R.id.inprogress);
|
||||
contactPictureMask = (ImageView) view.findViewById(R.id.mask);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1191,6 +1193,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
Compatibility.setTextAppearance(holder.contactName, getActivity(), R.style.font3);
|
||||
Compatibility.setTextAppearance(holder.fileTransferAction, getActivity(), R.style.font15);
|
||||
holder.fileTransferAction.setBackgroundResource(R.drawable.resizable_confirm_delete_button);
|
||||
holder.contactPictureMask.setImageResource(R.drawable.avatar_chat_mask_outgoing);
|
||||
} else {
|
||||
if (isEditMode) {
|
||||
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
|
||||
|
@ -1203,6 +1206,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
Compatibility.setTextAppearance(holder.contactName, getActivity(), R.style.font9);
|
||||
Compatibility.setTextAppearance(holder.fileTransferAction, getActivity(), R.style.font8);
|
||||
holder.fileTransferAction.setBackgroundResource(R.drawable.resizable_assistant_button);
|
||||
holder.contactPictureMask.setImageResource(R.drawable.avatar_chat_mask);
|
||||
}
|
||||
holder.bubbleLayout.setLayoutParams(layoutParams);
|
||||
|
||||
|
|
|
@ -1116,6 +1116,12 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
routeAudioToReceiver();
|
||||
}
|
||||
}
|
||||
if (mIncallWakeLock != null && mIncallWakeLock.isHeld()) {
|
||||
mIncallWakeLock.release();
|
||||
Log.i("Last call ended: releasing incall (CPU only) wake lock");
|
||||
} else {
|
||||
Log.i("Last call ended: no incall (CPU only) wake lock were held");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (state == State.CallUpdatedByRemote) {
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.linphone.compatibility.Compatibility;
|
|||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.core.LinphoneCall;
|
||||
import org.linphone.core.LinphoneCall.State;
|
||||
import org.linphone.core.LinphoneCallLog.CallStatus;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCore.GlobalState;
|
||||
import org.linphone.core.LinphoneCore.RegistrationState;
|
||||
|
@ -213,6 +214,12 @@ public final class LinphoneService extends Service {
|
|||
if (state == State.CallEnd || state == State.CallReleased || state == State.Error) {
|
||||
destroyOverlay();
|
||||
}
|
||||
|
||||
// Enable the following to have missed call notifications
|
||||
/*if (state == State.CallEnd && call.getCallLog().getStatus() == CallStatus.Missed) {
|
||||
Notification notif = Compatibility.createSimpleNotification(instance, "Missed call", LinphoneManager.getLc().getMissedCallsCount() + " missed call", mNotifContentIntent);
|
||||
notifyWrapper(CUSTOM_NOTIF_ID, notif);
|
||||
}*/
|
||||
|
||||
if (state == State.StreamsRunning) {
|
||||
// Workaround bug current call seems to be updated after state changed to streams running
|
||||
|
|
Loading…
Reference in a new issue