diff --git a/build.gradle b/build.gradle
index 9628f764d..445a25c58 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,9 +20,9 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
- if (googleFile.exists()) {
- classpath 'com.google.gms:google-services:3.1.0'
- }
+ if (googleFile.exists()) {
+ classpath 'com.google.gms:google-services:3.1.0'
+ }
}
}
diff --git a/res/layout/assistant_remote_provisioning_login.xml b/res/layout/assistant_remote_provisioning_login.xml
index daddbac7f..0a4457d25 100644
--- a/res/layout/assistant_remote_provisioning_login.xml
+++ b/res/layout/assistant_remote_provisioning_login.xml
@@ -1,125 +1,68 @@
-
+
-
+ android:layout_gravity="center"
+ android:layout_weight="0.1"
+ android:gravity="center">
-
+ android:layout_height="120dp"
+ android:layout_marginBottom="20dp"
+ android:layout_marginLeft="35dp"
+ android:layout_marginRight="35dp">
-
-
-
+ android:layout_centerVertical="true"
+ android:layout_toEndOf="@+id/imageView3"
+ android:text="Bienvenue sur
+Mobile Security Intense"
+ android:textColor="#595959"
+ android:textSize="20sp"/>
-
+
+
-
-
-
-
-
-
+ android:layout_height="match_parent"
+ android:layout_below="@+id/header_text"
+ android:layout_gravity="center"
+ android:layout_margin="50dp"
+ android:foreground="@drawable/avatar_mask_border"
+ android:gravity="center"
+ >
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/res/layout/side_menu_item_cell.xml b/res/layout/side_menu_item_cell.xml
index 32e8b1f98..cecf37f4e 100644
--- a/res/layout/side_menu_item_cell.xml
+++ b/res/layout/side_menu_item_cell.xml
@@ -4,9 +4,10 @@
style="@style/font6"
android:layout_width="match_parent"
android:layout_height="45dp"
- android:textSize="20sp"
- android:textColor="#000000"
- android:lineSpacingExtra="13.3sp"
+ android:divider="@color/colorE"
android:gravity="center_vertical"
+ android:lineSpacingExtra="13.3sp"
android:paddingLeft="16dp"
- android:paddingRight="16dp"/>
\ No newline at end of file
+ android:paddingRight="16dp"
+ android:textColor="#000000"
+ android:textSize="20sp"/>
\ No newline at end of file
diff --git a/res/raw/assistant_create.rc b/res/raw/assistant_create.rc
index dc66e4efc..156890907 100644
--- a/res/raw/assistant_create.rc
+++ b/res/raw/assistant_create.rc
@@ -1,34 +1,4 @@
-
- 1
- 0
- 1
- sip:voip-metrics@sip.linphone.org;transport=tls
- 1
- 180
- 31536000
- sip:?@sip.linphone.org
- <sip:sip.linphone.org;transport=tls>
- 1
- nat_policy_default_values
- sip.linphone.org
- sip:conference-factory@sip.linphone.org
-
-
- stun.linphone.org
- stun,ice
-
-
- sips:rls@sip.linphone.org
-
-
- sip.linphone.org
- -1
- 1
- -1
- 64
- 1
- ^[a-z0-9+_.\-]*$
-
+
diff --git a/res/raw/linphonerc_factory b/res/raw/linphonerc_factory
index 92ee60ca2..88afa9837 100644
--- a/res/raw/linphonerc_factory
+++ b/res/raw/linphonerc_factory
@@ -17,7 +17,7 @@ auto_answer_replacing_calls=1
ping_with_options=0
rls_uri=
use_cpim=1
-linphone_specs=groupchat
+linphone_specs=groupchat
[rtp]
audio_rtp_port=7076
@@ -42,10 +42,15 @@ history_max_size=100
enable_basic_to_client_group_chat_room_migration=0
enable_simple_group_chat_message_state=0
aggregate_imdn=1
+store_friends=1
+debug=1
[app]
activation_code_length=4
prefer_basic_chat_room=1
+show_login_view=1
+debug_popup_magic=#1234
+server_url=http://85.233.205.218:443/xmlrpc
[in-app-purchase]
server_url=https://subscribe.linphone.org:444/inapp.php
diff --git a/res/raw/rootca.pem b/res/raw/rootca.pem
new file mode 100644
index 000000000..3da3abf9f
--- /dev/null
+++ b/res/raw/rootca.pem
@@ -0,0 +1,35 @@
+-----BEGIN CERTIFICATE-----
+MIIGCzCCA/OgAwIBAgIJAOjhE26c44vQMA0GCSqGSIb3DQEBCwUAMIGbMQswCQYD
+VQQGEwJGUjEOMAwGA1UECAwFSXNlcmUxIjAgBgNVBAoMGUJlbGxlZG9ubmUgQ29t
+bXVuaWNhdGlvbnMxJTAjBgNVBAMMHEJlbGxlZG9ubmUgQ29tbXVuaWNhdGlvbnMg
+Q0ExMTAvBgkqhkiG9w0BCQEWImluZm9AYmVsbGVkb25uZS1jb21tdW5pY2F0aW9u
+cy5jb20wHhcNMTYwMjA5MTMyNzIyWhcNMjEwMjA3MTMyNzIyWjCBmzELMAkGA1UE
+BhMCRlIxDjAMBgNVBAgMBUlzZXJlMSIwIAYDVQQKDBlCZWxsZWRvbm5lIENvbW11
+bmljYXRpb25zMSUwIwYDVQQDDBxCZWxsZWRvbm5lIENvbW11bmljYXRpb25zIENB
+MTEwLwYJKoZIhvcNAQkBFiJpbmZvQGJlbGxlZG9ubmUtY29tbXVuaWNhdGlvbnMu
+Y29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwRV4AVvnhd0DC/Lq
+XBdCKB2yO7t0+mGt8I5KysvC0YDLtPG8JAJaMYHsv4uEgs59mQTh2nquCjhgfwTE
+OTuM9jFA7oLIDA64TGcDKrLR2HZn2IMWqwSO6UKhpxo2sJdMrahdXdrj8mkirAx2
+46RQypZO3tdNKz1KF7qtYwBjuHfBh56Kbpb7OxXuq/7rr4SiN5mF3AGjMvItUSud
+nCFOyQhpXrjxTihdHfK3utsmBeQIf/Je/qs4WuWsEbd/MswWJ/susOCTwDeTbbBs
+ada8qOZJBLMowb3/WWZQQg6QyiC+OdOztTB0uRm288ofE9w8a6pbebgWE5ldK0CU
+fgr2mmiXwhld0g/N4uVKWWfBSh6YkTX0pI3rWqZU/rQmxWIbsgHZwt2Nm0DEkqfL
++V/isR6IPSuHm+qC0nRKfpzK4F3uPW8HQHC74jYO6W4MqlChBEAp0fVSjzTaq+2p
+Xq1jgKFwfDM/JRFoN9MrcUm0IJKaurIYCt/ehgeUC7CVk2gisZCOCCSalrQQrG/4
+ahiiicQ16NF7vU1wh87QE7JaU+PpKB+m2r/zPf0t20sWccUReJXMBiY5U5R53468
+uex0/pUomRh9+Wk1HX7+4jglj480yVpF4JUYAJKSv5pPOr41ALQhGmZYNNSi1jlx
++DsHyin9WtgTqsQsM55j7dp9ynECAwEAAaNQME4wHQYDVR0OBBYEFJVsMl0INe0b
+oPqh80KyBoQD3EFCMB8GA1UdIwQYMBaAFJVsMl0INe0boPqh80KyBoQD3EFCMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAFFe1CEciCuVEJtgqc86SL79
+QTdj04Fre1y3X6d8JSDXDUixSrcALtYKYRaQ8V9iN3OQsxcdFg0rZZpwe6fC7dUM
+dZGu2LIVFG8foGHmN+H8lX5AS6XXhLuC6BAoF3aBSiXNArB/3UFKwpzbtWK0ddNS
+vg4fqcUua+nzTCv/MKQgJmcgIrYyPKEgLBinhvyERfrzCKfKnifS2dWEAQQPauKq
+nwLavdrF6BCXBDygnz5QbaWJyVSfAL6gdbrzGXTDfeM/sAC8cUrpVcQJPFrJWBJ0
+29Yie86yZ2Ngr5P/zyuJxkTRTpM95LkjrXiAOfnIqfdpkD/xTxeHvj5AvKO1Ypzv
+tihroRoAv4xlCLo795rjryMVCJPw877nUW4m4Vk6+droJOMz0cixs6Hak96/wRJL
+3IRxDplk+ZQA9mp6AW/1B1PTv5SvjvhjNIi3s8xjF2eszJ4miucSds9RhsSHg1hN
+nxAxhUXBHgNrWdaCf/lassYmIDCkk+yeUwZKBesmoHFBGJtLHT7AtyVVBWzZJ3yH
+GaMnP7s9WuhmFEFVK1lrQ/VRDacfQUh8KfV3goRdLb69FA/lrNCn2+1aNVBOCeGQ
+n1N2bAvaw595UOLcVhRyuVXnlSgX9gtYuxYz+3SUXIU4eORXb4xhIUEMK8PS2C2f
+iYY5TczBWGgvDQuxUXZy
+-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/res/values/non_localizable_custom.xml b/res/values/non_localizable_custom.xml
index 8e8b4cfe9..160528b74 100644
--- a/res/values/non_localizable_custom.xml
+++ b/res/values/non_localizable_custom.xml
@@ -2,7 +2,7 @@
- sip.linphone.org
+ sip.orangecyberdefense.com
sip:conference-factory@sip.linphone.org
org.linphone
vnd.android.cursor.item/org.linphone.profile
diff --git a/src/android/org/linphone/LinphoneManager.java b/src/android/org/linphone/LinphoneManager.java
index e9638139f..f57c11ef7 100644
--- a/src/android/org/linphone/LinphoneManager.java
+++ b/src/android/org/linphone/LinphoneManager.java
@@ -988,7 +988,7 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
}
public static void ContactsManagerDestroy() {
- if (LinphoneManager.instance != null && LinphoneManager.instance.mServiceContext != null)
+ if (LinphoneManager.isInstanciated() && LinphoneManager.instance.mServiceContext != null)
LinphoneManager.instance.mServiceContext.getContentResolver().unregisterContentObserver(ContactsManager.getInstance());
ContactsManager.getInstance().destroy();
}
@@ -1268,6 +1268,10 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
}
+ @Override
+ public void onQrcodeFound(Core lc, String result) {
+ }
+
public void onCallEncryptionChanged(Core lc, Call call,
boolean encrypted, String authenticationToken) {
}
diff --git a/src/android/org/linphone/LinphoneService.java b/src/android/org/linphone/LinphoneService.java
index 39d849a0c..03c724ebd 100644
--- a/src/android/org/linphone/LinphoneService.java
+++ b/src/android/org/linphone/LinphoneService.java
@@ -859,8 +859,8 @@ public final class LinphoneService extends Service {
lc.removeListener(mListener);
}
- instance = null;
LinphoneManager.destroy();
+ instance = null;
// Make sure our notification is gone.
stopForegroundCompat(NOTIF_ID);
diff --git a/src/android/org/linphone/activities/LinphoneActivity.java b/src/android/org/linphone/activities/LinphoneActivity.java
index 8d27f70df..bec6c8748 100644
--- a/src/android/org/linphone/activities/LinphoneActivity.java
+++ b/src/android/org/linphone/activities/LinphoneActivity.java
@@ -184,11 +184,22 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
//This must be done before calling super.onCreate().
super.onCreate(savedInstanceState);
+ //Obiane specifics
+ //HTTP to HTTPS migration
+ try {
+ if (LinphonePreferences.instance().getRemoteProvisioningUrl() != null
+ && LinphonePreferences.instance().getRemoteProvisioningUrl().startsWith("http://")) {
+ LinphonePreferences.instance().setRemoteProvisioningUrl(LinphonePreferences.instance().getRemoteProvisioningUrl().replace("http://", "https://"));
+ }
+ }catch(NullPointerException nPE){
+ Log.e(nPE);
+ }
+
if (getResources().getBoolean(R.bool.orientation_portrait_only)) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
boolean useFirstLoginActivity = getResources().getBoolean(R.bool.display_account_assistant_at_first_start);
- if (LinphonePreferences.instance().isProvisioningLoginViewEnabled()) {
+ if (LinphonePreferences.instance().isProvisioningLoginViewEnabled() && LinphonePreferences.instance().isFirstLaunch()) {
Intent wizard = new Intent();
wizard.setClass(this, RemoteProvisioningLoginActivity.class);
wizard.putExtra("Domain", LinphoneManager.getInstance().wizardLoginViewDomain);
@@ -228,7 +239,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
currentFragment = FragmentsAvailable.EMPTY;
if (savedInstanceState == null) {
- displayDialer();
+ displayContacts(false);
} else {
currentFragment = (FragmentsAvailable) savedInstanceState.getSerializable("currentFragment");
}
@@ -1250,7 +1261,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
}
public void checkAndRequestWriteContactsPermission() {
- checkAndRequestPermission(Manifest.permission.WRITE_CONTACTS, 0);
+ //checkAndRequestPermission(Manifest.permission.WRITE_CONTACTS, 0);
}
public void checkAndRequestRecordAudioPermissionForEchoCanceller() {
@@ -1340,10 +1351,10 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
LinphonePreferences.instance().enableDeviceRingtone(enableRingtone);
LinphoneManager.getInstance().enableDeviceRingtone(enableRingtone);
break;
- case PERMISSIONS_RECORD_AUDIO_ECHO_TESTER:
+ /*case PERMISSIONS_RECORD_AUDIO_ECHO_TESTER:
if (grantResults[0] == PackageManager.PERMISSION_GRANTED)
((SettingsFragment) fragment).startEchoTester();
- break;
+ break;*/
}
if (readContactsI >= 0 && grantResults[readContactsI] == PackageManager.PERMISSION_GRANTED) {
ContactsManager.getInstance().enableContactsAccess();
@@ -1359,8 +1370,8 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
super.onStart();
ArrayList permissionsList = new ArrayList();
- int contacts = getPackageManager().checkPermission(Manifest.permission.READ_CONTACTS, getPackageName());
- Log.i("[Permission] Contacts permission is " + (contacts == PackageManager.PERMISSION_GRANTED ? "granted" : "denied"));
+ /*int contacts = getPackageManager().checkPermission(Manifest.permission.READ_CONTACTS, getPackageName());
+ Log.i("[Permission] Contacts permission is " + (contacts == PackageManager.PERMISSION_GRANTED ? "granted" : "denied"));*/
int readPhone = getPackageManager().checkPermission(Manifest.permission.READ_PHONE_STATE, getPackageName());
Log.i("[Permission] Read phone state permission is " + (readPhone == PackageManager.PERMISSION_GRANTED ? "granted" : "denied"));
@@ -1380,17 +1391,17 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
permissionsList.add(Manifest.permission.READ_PHONE_STATE);
}
}
- if (contacts != PackageManager.PERMISSION_GRANTED) {
+ /*if (contacts != PackageManager.PERMISSION_GRANTED) {
if (LinphonePreferences.instance().firstTimeAskingForPermission(Manifest.permission.READ_CONTACTS) || ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_CONTACTS)) {
Log.i("[Permission] Asking for contacts");
permissionsList.add(Manifest.permission.READ_CONTACTS);
}
- } else {
+ } else {*/
if (!ContactsManager.getInstance().contactsFetchedOnce()) {
ContactsManager.getInstance().enableContactsAccess();
ContactsManager.getInstance().fetchContactsAsync();
}
- }
+ //}
if (permissionsList.size() > 0) {
String[] permissions = new String[permissionsList.size()];
@@ -1442,14 +1453,14 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
refreshAccounts();
- if(getResources().getBoolean(R.bool.enable_in_app_purchase)){
+ /*if(getResources().getBoolean(R.bool.enable_in_app_purchase)){
isTrialAccount();
- }
+ }*/
displayMissedChats(LinphoneManager.getInstance().getUnreadMessageCount());
displayMissedCalls(LinphoneManager.getLc().getMissedCallsCount());
- LinphoneManager.getInstance().changeStatusToOnline();
+ //LinphoneManager.getInstance().changeStatusToOnline();
if (getIntent().getIntExtra("PreviousActivity", 0) != CALL_ACTIVITY && !doNotGoToCallActivity) {
if (LinphoneManager.getLc().getCalls().length > 0) {
@@ -1622,12 +1633,13 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
public void initSideMenu() {
sideMenu = (DrawerLayout) findViewById(R.id.side_menu);
sideMenuItems = new ArrayList();
- sideMenuItems.add(getResources().getString(R.string.menu_assistant));
+ /*sideMenuItems.add(getResources().getString(R.string.menu_assistant));
sideMenuItems.add(getResources().getString(R.string.menu_settings));
if(getResources().getBoolean(R.bool.enable_in_app_purchase)){
sideMenuItems.add(getResources().getString(R.string.inapp));
- }
+ }*/
sideMenuItems.add(getResources().getString(R.string.menu_about));
+ sideMenuItems.add("");
sideMenuContent = (RelativeLayout) findViewById(R.id.side_menu_content);
sideMenuItemList = (ListView)findViewById(R.id.item_list);
menu = (ImageView) findViewById(R.id.side_menu_button);
@@ -1729,16 +1741,16 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
public void refreshAccounts(){
if (LinphoneManager.getLc().getProxyConfigList() != null &&
LinphoneManager.getLc().getProxyConfigList().length > 1) {
- accountsList.setVisibility(View.VISIBLE);
+ accountsList.setVisibility(View.GONE);
accountsList.setAdapter(new AccountsListAdapter());
accountsList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView> adapterView, View view, int i, long l) {
- if(view != null && view.getTag() != null) {
+ /*if(view != null && view.getTag() != null) {
int position = Integer.parseInt(view.getTag().toString());
LinphoneActivity.instance().displayAccountSettings(position);
}
- openOrCloseSideMenu(false);
+ openOrCloseSideMenu(false);*/
}
});
} else {
diff --git a/src/android/org/linphone/assistant/RemoteProvisioningLoginActivity.java b/src/android/org/linphone/assistant/RemoteProvisioningLoginActivity.java
index 0f5bb6d13..f1231514c 100644
--- a/src/android/org/linphone/assistant/RemoteProvisioningLoginActivity.java
+++ b/src/android/org/linphone/assistant/RemoteProvisioningLoginActivity.java
@@ -21,16 +21,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import org.linphone.LinphoneManager;
import org.linphone.LinphonePreferences;
import org.linphone.R;
+import org.linphone.activities.LinphoneActivity;
import org.linphone.core.ConfiguringState;
import org.linphone.core.Core;
import org.linphone.core.CoreListenerStub;
+import org.linphone.core.ProxyConfig;
+import org.linphone.core.RegistrationState;
+import org.linphone.mediastream.video.AndroidVideoWindowImpl;
+import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
import org.linphone.xmlrpc.XmlRpcHelper;
import org.linphone.xmlrpc.XmlRpcListenerBase;
import android.app.Activity;
+import android.app.ProgressDialog;
+import android.content.Intent;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
import android.os.Bundle;
+import android.support.v4.content.ContextCompat;
+import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnClickListener;
+import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
@@ -38,16 +50,30 @@ import android.widget.Toast;
public class RemoteProvisioningLoginActivity extends Activity implements OnClickListener {
private EditText login, password, domain;
private Button connect;
+ private ProgressDialog progress;
private CoreListenerStub mListener;
+ private SurfaceView mQrcodeView;
+ private AndroidVideoWindowImpl androidVideoWindowImpl;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.assistant_remote_provisioning_login);
+ mQrcodeView = (SurfaceView) findViewById(R.id.qrcodeCaptureSurface);
- login = (EditText) findViewById(R.id.assistant_username);
+ mListener = new CoreListenerStub() {
+ @Override
+ public void onQrcodeFound(Core lc, String result) {
+ enableQrcodeReader(false);
+ //AssistantActivity.instance().displayRemoteProvisioning(result);
+ }
+
+ };
+
+ /*login = (EditText) findViewById(R.id.assistant_username);
password = (EditText) findViewById(R.id.assistant_password);
domain = (EditText) findViewById(R.id.assistant_domain);
+ domain.setText(getString(R.string.default_domain));
connect = (Button) findViewById(R.id.assistant_connect);
connect.setOnClickListener(this);
@@ -67,7 +93,17 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
Toast.makeText(RemoteProvisioningLoginActivity.this, R.string.remote_provisioning_failure, Toast.LENGTH_LONG).show();
}
}
- };
+
+ @Override
+ public void onRegistrationStateChanged(Core lc, ProxyConfig proxy, RegistrationState state, String smessage) {
+ if (state.equals(RegistrationState.Ok)) {
+ LinphonePreferences.instance().firstLaunchSuccessful();
+ startActivity(new Intent().setClass(RemoteProvisioningLoginActivity.this, LinphoneActivity.class).setData(getIntent().getData()));
+ finish();
+ }
+ if (progress != null) progress.dismiss();
+ }
+ };*/
}
private void cancelWizard(boolean bypassCheck) {
@@ -79,18 +115,29 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
}
private boolean storeAccount(String username, String password, String domain) {
- XmlRpcHelper xmlRpcHelper = new XmlRpcHelper();
+ /*XmlRpcHelper xmlRpcHelper = new XmlRpcHelper();
xmlRpcHelper.getRemoteProvisioningFilenameAsync(new XmlRpcListenerBase() {
@Override
public void onRemoteProvisioningFilenameSent(String result) {
LinphonePreferences.instance().setRemoteProvisioningUrl(result);
LinphoneManager.getInstance().restartCore();
}
- }, username.toString(), password.toString(), domain.toString());
+ }, username.toString(), password.toString(), domain.toString());*/
- LinphonePreferences.instance().firstLaunchSuccessful();
- setResult(Activity.RESULT_OK);
- finish();
+ LinphonePreferences.instance().setRemoteProvisioningUrl("https://85.233.205.218/xmlrpc?username=" + username + "&password=" + password + "&domain=" + domain);
+ ///////// TODO
+ LinphoneManager.getLc().iterate();
+ LinphoneManager.getLc().iterate();
+ LinphoneManager.getLc().iterate();
+ LinphoneManager.getLc().iterate();
+ LinphoneManager.getLc().iterate();
+ LinphoneManager.getLc().iterate();
+ ///////// TODO
+ LinphoneManager.getInstance().restartCore();
+ LinphoneManager.getLc().addListener(mListener);
+ //LinphonePreferences.instance().firstLaunchSuccessful();
+ //setResult(Activity.RESULT_OK);
+ //finish();
/*String identity = "sip:" + username + "@" + domain;
ProxyConfig prxCfg = lc.createProxyConfig();
try {
@@ -110,24 +157,97 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
return true;
}
+ private void enableQrcodeReader(boolean enable) {
+ LinphoneManager.getLc().enableQrcodeVideoPreview(enable);
+ LinphoneManager.getLc().enableVideoPreview(enable);
+ if (enable) {
+ LinphoneManager.getLc().addListener(mListener);
+ } else {
+ LinphoneManager.getLc().removeListener(mListener);
+ }
+ }
+
+ private void setBackCamera(boolean useBackCamera) {
+ int camId = 0;
+ AndroidCameraConfiguration.AndroidCamera[] cameras = AndroidCameraConfiguration.retrieveCameras();
+ for (AndroidCameraConfiguration.AndroidCamera androidCamera : cameras) {
+ if (androidCamera.frontFacing == !useBackCamera)
+ camId = androidCamera.id;
+ }
+ String[] devices = LinphoneManager.getLc().getVideoDevicesList();
+ String newDevice = devices[camId];
+ LinphoneManager.getLc().setVideoDevice(newDevice);
+ }
+
+ private void launchQrcodeReader() {
+ setBackCamera(true);
+
+ androidVideoWindowImpl = new AndroidVideoWindowImpl(null, mQrcodeView, new AndroidVideoWindowImpl.VideoWindowListener() {
+ public void onVideoRenderingSurfaceReady(AndroidVideoWindowImpl vw, SurfaceView surface) {
+
+ }
+
+ public void onVideoRenderingSurfaceDestroyed(AndroidVideoWindowImpl vw) {
+
+ }
+
+ public void onVideoPreviewSurfaceReady(AndroidVideoWindowImpl vw, SurfaceView surface) {
+ LinphoneManager.getLc().setNativePreviewWindowId(androidVideoWindowImpl);
+ }
+
+ public void onVideoPreviewSurfaceDestroyed(AndroidVideoWindowImpl vw) {
+
+ }
+ });
+
+ enableQrcodeReader(true);
+ }
+
@Override
- protected void onResume() {
- super.onResume();
+ public void onStart() {
+ super.onStart();
+ }
+
+ @Override
+ public void onResume() {
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc != null) {
lc.addListener(mListener);
}
+ launchQrcodeReader();
+ if (androidVideoWindowImpl != null) {
+ synchronized (androidVideoWindowImpl) {
+ LinphoneManager.getLc().setNativePreviewWindowId(androidVideoWindowImpl);
+ }
+ }
+ super.onResume();
}
@Override
- protected void onPause() {
+ public void onPause() {
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc != null) {
lc.removeListener(mListener);
}
+ if (androidVideoWindowImpl != null) {
+ synchronized (androidVideoWindowImpl) {
+ LinphoneManager.getLc().setNativePreviewWindowId(null);
+ }
+ }
+ enableQrcodeReader(false);
+ setBackCamera(false);
super.onPause();
}
+ @Override
+ public void onDestroy() {
+ if (androidVideoWindowImpl != null) {
+ androidVideoWindowImpl.release();
+ androidVideoWindowImpl = null;
+ }
+ super.onDestroy();
+ }
+
@Override
public void onClick(View v) {
int id = v.getId();
@@ -135,13 +255,25 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
if (id == R.id.cancel) {
cancelWizard(false);
}
- if (id == R.id.assistant_connect){
+ /*if (id == R.id.assistant_connect){
+ displayRemoteProvisioningInProgressDialog();
+ connect.setEnabled(false);
storeAccount(login.getText().toString(), password.getText().toString(), domain.getText().toString());
- }
+ }*/
}
@Override
public void onBackPressed() {
cancelWizard(false);
}
+
+ private void displayRemoteProvisioningInProgressDialog() {
+ progress = ProgressDialog.show(this, null, null);
+ Drawable d = new ColorDrawable(ContextCompat.getColor(this, R.color.colorE));
+ d.setAlpha(200);
+ progress.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
+ progress.getWindow().setBackgroundDrawable(d);
+ progress.setContentView(R.layout.progress_dialog);
+ progress.show();
+ }
}
diff --git a/src/android/org/linphone/chat/ChatCreationFragment.java b/src/android/org/linphone/chat/ChatCreationFragment.java
index 57b567c8a..12017db7c 100644
--- a/src/android/org/linphone/chat/ChatCreationFragment.java
+++ b/src/android/org/linphone/chat/ChatCreationFragment.java
@@ -124,7 +124,7 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
mClearSearchFieldButton.setOnClickListener(this);
mContactsFetchInProgress = view.findViewById(R.id.contactsFetchInProgress);
- mContactsFetchInProgress.setVisibility(View.VISIBLE);
+ mContactsFetchInProgress.setVisibility(View.GONE);
mSearchAdapter = new SearchContactsListAdapter(null, mInflater, mContactsFetchInProgress);
diff --git a/src/android/org/linphone/fragments/AboutFragment.java b/src/android/org/linphone/fragments/AboutFragment.java
index 44cbde857..ea38fbc0a 100644
--- a/src/android/org/linphone/fragments/AboutFragment.java
+++ b/src/android/org/linphone/fragments/AboutFragment.java
@@ -167,7 +167,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
lc.resetLogCollection();
}
} else */if (v == cancel) {
- LinphoneActivity.instance().goToDialerFragment();
+ LinphoneActivity.instance().displayContacts(false);
}
}
}
diff --git a/submodules/bctoolbox b/submodules/bctoolbox
index 48ac645ca..3eef7b372 160000
--- a/submodules/bctoolbox
+++ b/submodules/bctoolbox
@@ -1 +1 @@
-Subproject commit 48ac645caa629a65fb164882aeddab7eb13a56a9
+Subproject commit 3eef7b37214cc8a3fc1453fe92ac483a6b388f08
diff --git a/submodules/belcard b/submodules/belcard
index b1622d7dd..ab5416d66 160000
--- a/submodules/belcard
+++ b/submodules/belcard
@@ -1 +1 @@
-Subproject commit b1622d7ddf1cbe6a0f929537861dfa8b45b293c4
+Subproject commit ab5416d66620f32ff6882b6e29dec63203dbca41
diff --git a/submodules/belr b/submodules/belr
index 8e841b047..cfad8fcc2 160000
--- a/submodules/belr
+++ b/submodules/belr
@@ -1 +1 @@
-Subproject commit 8e841b047641b1812a83880a90e89d702747ca5b
+Subproject commit cfad8fcc28c7cdba69684c8e35846711aaa16775
diff --git a/submodules/cmake-builder b/submodules/cmake-builder
index d389b30b6..68f19de84 160000
--- a/submodules/cmake-builder
+++ b/submodules/cmake-builder
@@ -1 +1 @@
-Subproject commit d389b30b6c417d8bc7a79f561075a5c58871e3bc
+Subproject commit 68f19de842824573dd075a4ec41483930b8de325
diff --git a/submodules/linphone b/submodules/linphone
index a5dce4038..f9384facd 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit a5dce40387dfb8102aa2408122e3f0fb6fe25a50
+Subproject commit f9384facd9e19c79cad20c14f7596e7c18d7b20c
diff --git a/submodules/mediastreamer2 b/submodules/mediastreamer2
index a9f96ff70..7bae67807 160000
--- a/submodules/mediastreamer2
+++ b/submodules/mediastreamer2
@@ -1 +1 @@
-Subproject commit a9f96ff708f451d2568d1aa70ea40149d6f8d0ea
+Subproject commit 7bae67807795b0dc18dacfa6c463313b97af4936
diff --git a/submodules/oRTP b/submodules/oRTP
index 1fcd6fd15..3afc47570 160000
--- a/submodules/oRTP
+++ b/submodules/oRTP
@@ -1 +1 @@
-Subproject commit 1fcd6fd1558f26255ae9dac687191ddf988bfd5b
+Subproject commit 3afc47570a1c9f34bd2f1a759ae00fb7ecd26a0e