Merge remote-tracking branch 'public/master' into bellesip
Conflicts: Makefile src/org/linphone/KeepAliveHandler.java submodules/linphone
This commit is contained in:
commit
8381de339a
13 changed files with 54 additions and 22 deletions
2
Makefile
2
Makefile
|
@ -31,6 +31,8 @@ ifneq ($(CHECK_MSG),)
|
||||||
endif
|
endif
|
||||||
include check_tools.mk
|
include check_tools.mk
|
||||||
|
|
||||||
|
NDK_BUILD_OPTIONS=NDK_DEBUG=$(NDK_DEBUG) LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_UPNP=$(BUILD_UPNP) BUILD_REMOTE_PROVISIONING=$(BUILD_REMOTE_PROVISIONING) BUILD_X264=$(BUILD_X264) BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_FOR_X86=$(BUILD_FOR_X86) USE_JAVAH=$(USE_JAVAH) -j$(NUMCPUS)
|
||||||
|
|
||||||
all: update-project prepare-sources generate-apk
|
all: update-project prepare-sources generate-apk
|
||||||
|
|
||||||
install: install-apk run-linphone
|
install: install-apk run-linphone
|
||||||
|
|
2
README
2
README
|
@ -34,3 +34,5 @@ BUILD_TUNNEL 0 (don't build tunnel), 1 (build tunnel) [requires a tunne
|
||||||
BUILD_WEBRTC_AECM 0 (don't build echo canceler), 1 (build echo canceler) | 1
|
BUILD_WEBRTC_AECM 0 (don't build echo canceler), 1 (build echo canceler) | 1
|
||||||
USE_JAVAH 0 (don't generate header), 1 (generate header for linphone_core_jni) [used to check errors at liblinphone compilation] | 1
|
USE_JAVAH 0 (don't generate header), 1 (generate header for linphone_core_jni) [used to check errors at liblinphone compilation] | 1
|
||||||
BUILD_FOR_X86 0 (don't generate liblinphone libraries for x86 architecture), 1 (build liblinphone libraries for x86 architecture) | 1
|
BUILD_FOR_X86 0 (don't generate liblinphone libraries for x86 architecture), 1 (build liblinphone libraries for x86 architecture) | 1
|
||||||
|
|
||||||
|
If you encounter troubles with the make clean target and you are using the 8e android ndk, the solution can be found here: https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/3wIbb-h3nDU
|
||||||
|
|
|
@ -106,7 +106,6 @@ public class LinphoneActivity extends FragmentActivity implements
|
||||||
private FragmentsAvailable currentFragment, nextFragment;
|
private FragmentsAvailable currentFragment, nextFragment;
|
||||||
private Fragment dialerFragment, messageListenerFragment, messageListFragment, friendStatusListenerFragment;
|
private Fragment dialerFragment, messageListenerFragment, messageListFragment, friendStatusListenerFragment;
|
||||||
private SavedState dialerSavedState;
|
private SavedState dialerSavedState;
|
||||||
private ChatStorage chatStorage;
|
|
||||||
private boolean preferLinphoneContacts = false, isAnimationDisabled = false, isContactPresenceDisabled = true;
|
private boolean preferLinphoneContacts = false, isAnimationDisabled = false, isContactPresenceDisabled = true;
|
||||||
private Handler mHandler = new Handler();
|
private Handler mHandler = new Handler();
|
||||||
private List<Contact> contactList, sipContactList;
|
private List<Contact> contactList, sipContactList;
|
||||||
|
@ -1170,10 +1169,10 @@ public class LinphoneActivity extends FragmentActivity implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChatStorage getChatStorage() {
|
public ChatStorage getChatStorage() {
|
||||||
if (chatStorage == null) {
|
if (LinphoneManager.getInstance().chatStorage == null) {
|
||||||
chatStorage = new ChatStorage(this);
|
return new ChatStorage(this);
|
||||||
}
|
}
|
||||||
return chatStorage;
|
return LinphoneManager.getInstance().chatStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addContact(String displayName, String sipUri)
|
public void addContact(String displayName, String sipUri)
|
||||||
|
@ -1255,11 +1254,6 @@ public class LinphoneActivity extends FragmentActivity implements
|
||||||
|
|
||||||
prepareContactsInBackground();
|
prepareContactsInBackground();
|
||||||
|
|
||||||
if (chatStorage != null) {
|
|
||||||
chatStorage.close();
|
|
||||||
}
|
|
||||||
chatStorage = new ChatStorage(this);
|
|
||||||
|
|
||||||
updateMissedChatCount();
|
updateMissedChatCount();
|
||||||
|
|
||||||
displayMissedCalls(LinphoneManager.getLc().getMissedCallsCount());
|
displayMissedCalls(LinphoneManager.getLc().getMissedCallsCount());
|
||||||
|
@ -1285,11 +1279,6 @@ public class LinphoneActivity extends FragmentActivity implements
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
LinphoneManager.removeListener(this);
|
LinphoneManager.removeListener(this);
|
||||||
|
|
||||||
if (chatStorage != null) {
|
|
||||||
chatStorage.close();
|
|
||||||
chatStorage = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mOrientationHelper != null) {
|
if (mOrientationHelper != null) {
|
||||||
mOrientationHelper.disable();
|
mOrientationHelper.disable();
|
||||||
mOrientationHelper = null;
|
mOrientationHelper = null;
|
||||||
|
|
|
@ -49,6 +49,7 @@ import org.linphone.LinphoneSimpleListener.LinphoneOnAudioChangedListener.AudioS
|
||||||
import org.linphone.LinphoneSimpleListener.LinphoneOnDTMFReceivedListener;
|
import org.linphone.LinphoneSimpleListener.LinphoneOnDTMFReceivedListener;
|
||||||
import org.linphone.LinphoneSimpleListener.LinphoneOnMessageReceivedListener;
|
import org.linphone.LinphoneSimpleListener.LinphoneOnMessageReceivedListener;
|
||||||
import org.linphone.LinphoneSimpleListener.LinphoneServiceListener;
|
import org.linphone.LinphoneSimpleListener.LinphoneServiceListener;
|
||||||
|
import org.linphone.compatibility.Compatibility;
|
||||||
import org.linphone.core.CallDirection;
|
import org.linphone.core.CallDirection;
|
||||||
import org.linphone.core.LinphoneAddress;
|
import org.linphone.core.LinphoneAddress;
|
||||||
import org.linphone.core.LinphoneAuthInfo;
|
import org.linphone.core.LinphoneAuthInfo;
|
||||||
|
@ -158,6 +159,8 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
public boolean isBluetoothScoConnected;
|
public boolean isBluetoothScoConnected;
|
||||||
public boolean isUsingBluetoothAudioRoute;
|
public boolean isUsingBluetoothAudioRoute;
|
||||||
|
|
||||||
|
public ChatStorage chatStorage;
|
||||||
|
|
||||||
private static List<LinphoneSimpleListener> simpleListeners = new ArrayList<LinphoneSimpleListener>();
|
private static List<LinphoneSimpleListener> simpleListeners = new ArrayList<LinphoneSimpleListener>();
|
||||||
public static void addListener(LinphoneSimpleListener listener) {
|
public static void addListener(LinphoneSimpleListener listener) {
|
||||||
if (!simpleListeners.contains(listener)) {
|
if (!simpleListeners.contains(listener)) {
|
||||||
|
@ -188,6 +191,8 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
mPowerManager = (PowerManager) c.getSystemService(Context.POWER_SERVICE);
|
mPowerManager = (PowerManager) c.getSystemService(Context.POWER_SERVICE);
|
||||||
mConnectivityManager = (ConnectivityManager) c.getSystemService(Context.CONNECTIVITY_SERVICE);
|
mConnectivityManager = (ConnectivityManager) c.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
mR = c.getResources();
|
mR = c.getResources();
|
||||||
|
|
||||||
|
chatStorage = new ChatStorage(mServiceContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int LINPHONE_VOLUME_STREAM = STREAM_VOICE_CALL;
|
private static final int LINPHONE_VOLUME_STREAM = STREAM_VOICE_CALL;
|
||||||
|
@ -907,7 +912,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
boolean useRandomPort = getPrefBoolean(R.string.pref_transport_use_random_ports_key, mR.getBoolean(R.bool.pref_transport_use_random_ports_default));
|
boolean useRandomPort = getPrefBoolean(R.string.pref_transport_use_random_ports_key, mR.getBoolean(R.bool.pref_transport_use_random_ports_default));
|
||||||
int lPreviousPort = tryToParseIntValue(getPrefString(R.string.pref_sip_port_key, getString(R.string.pref_sip_port_default)), 5060);
|
int lPreviousPort = tryToParseIntValue(getPrefString(R.string.pref_sip_port_key, getString(R.string.pref_sip_port_default)), 5060);
|
||||||
if (lPreviousPort>0xFFFF || useRandomPort) {
|
if (lPreviousPort>0xFFFF || useRandomPort) {
|
||||||
lPreviousPort=(0xDFFF & (int)Math.random())+1024;
|
lPreviousPort=(int)(Math.random() * (0xFFFF - 1024)) + 1024;
|
||||||
Log.w("Using random port " + lPreviousPort);
|
Log.w("Using random port " + lPreviousPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -975,6 +980,11 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
private void doDestroy() {
|
private void doDestroy() {
|
||||||
|
if (chatStorage != null) {
|
||||||
|
chatStorage.close();
|
||||||
|
chatStorage = null;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30))
|
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30))
|
||||||
mBluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, mBluetoothHeadset);
|
mBluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, mBluetoothHeadset);
|
||||||
|
@ -1115,7 +1125,6 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
LinphoneAddress from = message.getFrom();
|
LinphoneAddress from = message.getFrom();
|
||||||
ChatStorage chatStorage = new ChatStorage(mServiceContext);
|
|
||||||
|
|
||||||
String textMessage = message.getText();
|
String textMessage = message.getText();
|
||||||
String url = message.getExternalBodyUrl();
|
String url = message.getExternalBodyUrl();
|
||||||
|
@ -1515,9 +1524,11 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
if (nearby) {
|
if (nearby) {
|
||||||
params.screenBrightness = 0.1f;
|
params.screenBrightness = 0.1f;
|
||||||
view.setVisibility(View.INVISIBLE);
|
view.setVisibility(View.INVISIBLE);
|
||||||
|
Compatibility.hideNavigationBar(activity);
|
||||||
} else {
|
} else {
|
||||||
params.screenBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE;
|
params.screenBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE;
|
||||||
view.setVisibility(View.VISIBLE);
|
view.setVisibility(View.VISIBLE);
|
||||||
|
Compatibility.showNavigationBar(activity);
|
||||||
}
|
}
|
||||||
window.setAttributes(params);
|
window.setAttributes(params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.linphone;
|
package org.linphone;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
|
@ -38,11 +39,14 @@ public class RemoteProvisioning {
|
||||||
byte[] contents = new byte[1024];
|
byte[] contents = new byte[1024];
|
||||||
|
|
||||||
int bytesRead = 0;
|
int bytesRead = 0;
|
||||||
String strFileContents = "";
|
ByteArrayOutputStream fileContents = new ByteArrayOutputStream();
|
||||||
while( (bytesRead = bis.read(contents)) != -1){
|
while( (bytesRead = bis.read(contents)) != -1) {
|
||||||
strFileContents = new String(contents, 0, bytesRead);
|
fileContents.write(contents, 0, bytesRead);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String strFileContents = fileContents.toString();
|
||||||
Log.i("Download Success");
|
Log.i("Download Success");
|
||||||
|
Log.i(strFileContents);
|
||||||
|
|
||||||
// Initialize converter
|
// Initialize converter
|
||||||
LpConfig lp = LinphoneCoreFactory.instance().createLpConfig(mLocalLP);
|
LpConfig lp = LinphoneCoreFactory.instance().createLpConfig(mLocalLP);
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package org.linphone.compatibility;
|
package org.linphone.compatibility;
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
|
import android.app.Activity;
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
import android.preference.TwoStatePreference;
|
import android.preference.TwoStatePreference;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ApiFourteenPlus.java
|
ApiFourteenPlus.java
|
||||||
|
@ -35,4 +37,12 @@ public class ApiFourteenPlus {
|
||||||
public static boolean isPreferenceChecked(Preference preference) {
|
public static boolean isPreferenceChecked(Preference preference) {
|
||||||
return ((TwoStatePreference) preference).isChecked();
|
return ((TwoStatePreference) preference).isChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void hideNavigationBar(Activity activity) {
|
||||||
|
activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void showNavigationBar(Activity activity) {
|
||||||
|
activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,10 +248,24 @@ public class Compatibility {
|
||||||
|
|
||||||
|
|
||||||
public static void removeGlobalLayoutListener(ViewTreeObserver viewTreeObserver, OnGlobalLayoutListener keyboardListener) {
|
public static void removeGlobalLayoutListener(ViewTreeObserver viewTreeObserver, OnGlobalLayoutListener keyboardListener) {
|
||||||
if (Version.sdkAboveOrEqual(16)) {
|
if (Version.sdkAboveOrEqual(Version.API16_JELLY_BEAN_41)) {
|
||||||
ApiSixteenPlus.removeGlobalLayoutListener(viewTreeObserver, keyboardListener);
|
ApiSixteenPlus.removeGlobalLayoutListener(viewTreeObserver, keyboardListener);
|
||||||
} else {
|
} else {
|
||||||
ApiFivePlus.removeGlobalLayoutListener(viewTreeObserver, keyboardListener);
|
ApiFivePlus.removeGlobalLayoutListener(viewTreeObserver, keyboardListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void hideNavigationBar(Activity activity)
|
||||||
|
{
|
||||||
|
if (Version.sdkAboveOrEqual(Version.API14_ICE_CREAM_SANDWICH_40)) {
|
||||||
|
ApiFourteenPlus.hideNavigationBar(activity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void showNavigationBar(Activity activity)
|
||||||
|
{
|
||||||
|
if (Version.sdkAboveOrEqual(Version.API14_ICE_CREAM_SANDWICH_40)) {
|
||||||
|
ApiFourteenPlus.showNavigationBar(activity);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4aa1a81145039018194efe70d0718cf928406ff7
|
Subproject commit db7440f29b1f632df236170f9b796f903df12e3b
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8e124bc7f8dce5555d74c66bc60424678faa0b13
|
Subproject commit 25f44cc7c90bcde78f97d51f489e91f5094827f1
|
Binary file not shown.
Binary file not shown.
BIN
tests/libs/robotium-solo-4.1-javadoc.jar
Normal file
BIN
tests/libs/robotium-solo-4.1-javadoc.jar
Normal file
Binary file not shown.
BIN
tests/libs/robotium-solo-4.1.jar
Normal file
BIN
tests/libs/robotium-solo-4.1.jar
Normal file
Binary file not shown.
Loading…
Reference in a new issue