Merge remote-tracking branch 'public/master' into bellesip
Conflicts: jni/Application.mk submodules/linphone
|
@ -41,11 +41,9 @@ ifeq ($(BUILD_UPNP),1)
|
|||
include $(linphone-root-dir)/submodules/externals/build/libupnp/Android.mk
|
||||
endif
|
||||
|
||||
#libxml2 + xml2lpc + lpc2xml
|
||||
#libxml2
|
||||
ifeq ($(BUILD_REMOTE_PROVISIONING),1)
|
||||
include $(linphone-root-dir)/submodules/externals/build/libxml2/Android.mk
|
||||
#include $(linphone-root-dir)/submodules/linphone/build/android/xml2lpc.mk
|
||||
include $(linphone-root-dir)/submodules/linphone/build/android/lpc2xml.mk
|
||||
endif
|
||||
|
||||
# Speex
|
||||
|
|
|
@ -13,7 +13,7 @@ endif
|
|||
|
||||
#remote provisioning
|
||||
ifeq ($(BUILD_REMOTE_PROVISIONING),1)
|
||||
APP_MODULES += libxml2
|
||||
APP_MODULES += liblpxml2
|
||||
endif
|
||||
|
||||
#default values
|
||||
|
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 33 KiB |
|
@ -118,11 +118,11 @@
|
|||
<ImageView
|
||||
android:id="@+id/dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.2"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/dialer" />
|
||||
|
||||
<include layout="@layout/menu_about_chat_button" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<RelativeLayout
|
||||
android:id="@+id/chat"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
|
@ -11,7 +11,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/content_description_chat"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/chat" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
android:id="@+id/contacts"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_weight="0.2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
|
@ -12,7 +12,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/contacts" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<RelativeLayout
|
||||
android:id="@+id/history"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
|
@ -11,7 +11,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/history" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
android:id="@+id/settings"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_weight="0.2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
|
@ -12,7 +12,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/content_description_about"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/settings" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -571,7 +571,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
displayMessage(id, message.getText(), String.valueOf(System.currentTimeMillis()), true, null, messagesLayout);
|
||||
displayMessage(id, message.getText(), String.valueOf(message.getTime()), true, null, messagesLayout);
|
||||
}
|
||||
});
|
||||
} else if (message.getExternalBodyUrl() != null) {
|
||||
|
@ -580,7 +580,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
displayImageMessage(id, bm, String.valueOf(System.currentTimeMillis()), true, null, messagesLayout);
|
||||
displayImageMessage(id, bm, String.valueOf(message.getTime()), true, null, messagesLayout);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public class ChatStorage {
|
|||
db.update(TABLE_NAME, values, "id LIKE " + id, null);
|
||||
}
|
||||
|
||||
public int saveMessage(String from, String to, String message) {
|
||||
public int saveMessage(String from, String to, String message, long time) {
|
||||
ContentValues values = new ContentValues();
|
||||
if (from.equals("")) {
|
||||
values.put("localContact", from);
|
||||
|
@ -97,11 +97,11 @@ public class ChatStorage {
|
|||
values.put("status", LinphoneChatMessage.State.Idle.toInt());
|
||||
}
|
||||
values.put("message", message);
|
||||
values.put("time", System.currentTimeMillis());
|
||||
values.put("time", time);
|
||||
return (int) db.insert(TABLE_NAME, null, values);
|
||||
}
|
||||
|
||||
public int saveMessage(String from, String to, Bitmap image) {
|
||||
public int saveMessage(String from, String to, Bitmap image, long time) {
|
||||
if (image == null)
|
||||
return -1;
|
||||
|
||||
|
@ -124,7 +124,7 @@ public class ChatStorage {
|
|||
image.compress(CompressFormat.JPEG, 100, baos);
|
||||
values.put("image", baos.toByteArray());
|
||||
|
||||
values.put("time", System.currentTimeMillis());
|
||||
values.put("time", time);
|
||||
return (int) db.insert(TABLE_NAME, null, values);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.core.LinphoneCoreFactory;
|
||||
import org.linphone.ui.AvatarWithShadow;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
@ -86,11 +88,6 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
|||
}
|
||||
|
||||
private void displayHistory(String status, String callTime, String callDate) {
|
||||
if (pictureUri != null) {
|
||||
LinphoneUtils.setImagePictureFromUri(view.getContext(), contactPicture.getView(), Uri.parse(pictureUri), R.drawable.unknown_small);
|
||||
view.findViewById(R.id.addContactRow).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
contactName.setText(displayName == null ? sipUri : displayName);
|
||||
contactAddress.setText(sipUri);
|
||||
|
||||
|
@ -106,6 +103,13 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
|||
|
||||
time.setText(callTime == null ? "" : callTime);
|
||||
date.setText(timestampToHumanDate(callDate));
|
||||
|
||||
LinphoneAddress lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri);
|
||||
LinphoneUtils.findUriPictureOfContactAndSetDisplayName(lAddress, view.getContext().getContentResolver());
|
||||
String displayName = lAddress.getDisplayName();
|
||||
if (displayName != null) {
|
||||
view.findViewById(R.id.addContactRow).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void changeDisplayedHistory(String sipUri, String displayName, String pictureUri, String status, String callTime, String callDate) {
|
||||
|
|
|
@ -1304,14 +1304,18 @@ public class InCallActivity extends FragmentActivity implements
|
|||
|
||||
private void setContactName(LinearLayout callView, LinphoneAddress lAddress, String sipUri, Resources resources) {
|
||||
TextView contact = (TextView) callView.findViewById(R.id.contactNameOrNumber);
|
||||
if (lAddress.getDisplayName() == null) {
|
||||
|
||||
LinphoneUtils.findUriPictureOfContactAndSetDisplayName(lAddress, callView.getContext().getContentResolver());
|
||||
String displayName = lAddress.getDisplayName();
|
||||
|
||||
if (displayName == null) {
|
||||
if (resources.getBoolean(R.bool.only_display_username_if_unknown) && LinphoneUtils.isSipAddress(sipUri)) {
|
||||
contact.setText(LinphoneUtils.getUsernameFromAddress(sipUri));
|
||||
} else {
|
||||
contact.setText(sipUri);
|
||||
}
|
||||
} else {
|
||||
contact.setText(lAddress.getDisplayName());
|
||||
contact.setText(displayName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -740,12 +740,12 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
|
||||
public int onMessageSent(String to, String message) {
|
||||
getChatStorage().deleteDraft(to);
|
||||
return getChatStorage().saveMessage("", to, message);
|
||||
return getChatStorage().saveMessage("", to, message, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public int onMessageSent(String to, Bitmap image, String imageURL) {
|
||||
getChatStorage().deleteDraft(to);
|
||||
return getChatStorage().saveMessage("", to, image);
|
||||
return getChatStorage().saveMessage("", to, image, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public void onMessageStateChanged(String to, String message, int newState) {
|
||||
|
@ -855,12 +855,12 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
|
||||
@Override
|
||||
public void setAddresGoToDialerAndCall(String number, String name, Uri photo) {
|
||||
Bundle extras = new Bundle();
|
||||
extras.putString("SipUri", number);
|
||||
extras.putString("DisplayName", name);
|
||||
extras.putString("Photo", photo == null ? null : photo.toString());
|
||||
changeCurrentFragment(FragmentsAvailable.DIALER, extras);
|
||||
|
||||
// Bundle extras = new Bundle();
|
||||
// extras.putString("SipUri", number);
|
||||
// extras.putString("DisplayName", name);
|
||||
// extras.putString("Photo", photo == null ? null : photo.toString());
|
||||
// changeCurrentFragment(FragmentsAvailable.DIALER, extras);
|
||||
|
||||
AddressType address = new AddressText(this, null);
|
||||
address.setDisplayedName(name);
|
||||
address.setText(number);
|
||||
|
@ -1437,6 +1437,5 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
|
||||
interface ContactPicked {
|
||||
void setAddresGoToDialerAndCall(String number, String name, Uri photo);
|
||||
|
||||
void goToDialer();
|
||||
}
|
||||
|
|
|
@ -1122,11 +1122,11 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
String notificationText = null;
|
||||
int id = -1;
|
||||
if (textMessage != null && textMessage.length() > 0) {
|
||||
id = chatStorage.saveMessage(from.asStringUriOnly(), "", textMessage);
|
||||
id = chatStorage.saveMessage(from.asStringUriOnly(), "", textMessage, message.getTime());
|
||||
notificationText = textMessage;
|
||||
} else if (url != null && url.length() > 0) {
|
||||
Bitmap bm = ChatFragment.downloadImage(url);
|
||||
id = chatStorage.saveMessage(from.asStringUriOnly(), "", bm);
|
||||
id = chatStorage.saveMessage(from.asStringUriOnly(), "", bm, message.getTime());
|
||||
notificationText = url;
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8bd2630b93b31f0a38fcfc37a5ccd2cb1d2147c2
|
||||
Subproject commit 414af68e2f21ac741b123751c0e1f5ba45354b14
|
11
submodules/externals/build/libxml2/Android.mk
vendored
|
@ -53,17 +53,12 @@ common_C_INCLUDES += \
|
|||
$(LOCAL_PATH)/include \
|
||||
$(LOCAL_PATH)/../build/libxml2 \
|
||||
|
||||
# For the device
|
||||
# =====================================================
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(common_SRC_FILES)
|
||||
LOCAL_C_INCLUDES += $(common_C_INCLUDES)
|
||||
LOCAL_SHARED_LIBRARIES += $(common_SHARED_LIBRARIES)
|
||||
#LOCAL_CFLAGS += -fvisibility=hidden
|
||||
|
||||
LOCAL_MODULE:= libxml2
|
||||
LOCAL_SRC_FILES := $(common_SRC_FILES)
|
||||
|
||||
LOCAL_MODULE:= liblpxml2
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 4a395bfb7280d1c8344e80f76876d2b9275c0fe5
|
||||
Subproject commit 0e9b41562fe6c6f3629be3a3c61d12a2ab07e11e
|