diff --git a/.gitmodules b/.gitmodules
index 170a3dec7..7334733a7 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -39,4 +39,4 @@
url = git://git.linphone.org/msamr
[submodule "submodules/externals/libvpx"]
path = submodules/externals/libvpx
- url = git://git.linphone.org/libvpx.git
+ url = http://git.chromium.org/webm/libvpx.git
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9e5ae669a..1c7bdc86f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,7 +1,7 @@
+ android:versionCode="1210" android:versionName="1.2.1" android:installLocation="auto">
@@ -155,17 +155,19 @@
-
-
+
+
-
-
-
-
+
+
+
+
+
+
diff --git a/res/drawable/stat_sys_signal_0.png b/res/drawable/stat_sys_signal_0.png
new file mode 100644
index 000000000..cb7b7b34b
Binary files /dev/null and b/res/drawable/stat_sys_signal_0.png differ
diff --git a/res/drawable/stat_sys_signal_1.png b/res/drawable/stat_sys_signal_1.png
new file mode 100644
index 000000000..5376e9258
Binary files /dev/null and b/res/drawable/stat_sys_signal_1.png differ
diff --git a/res/drawable/stat_sys_signal_2.png b/res/drawable/stat_sys_signal_2.png
new file mode 100644
index 000000000..fd543636c
Binary files /dev/null and b/res/drawable/stat_sys_signal_2.png differ
diff --git a/res/drawable/stat_sys_signal_3.png b/res/drawable/stat_sys_signal_3.png
new file mode 100644
index 000000000..6c4873af3
Binary files /dev/null and b/res/drawable/stat_sys_signal_3.png differ
diff --git a/res/drawable/stat_sys_signal_4.png b/res/drawable/stat_sys_signal_4.png
new file mode 100644
index 000000000..a3320cbb4
Binary files /dev/null and b/res/drawable/stat_sys_signal_4.png differ
diff --git a/res/layout-land/videocall.xml b/res/layout-land/videocall.xml
old mode 100644
new mode 100755
index c73a3f935..2d39b8f84
--- a/res/layout-land/videocall.xml
+++ b/res/layout-land/videocall.xml
@@ -25,5 +25,14 @@ android:layout_alignParentRight="true"
android:layout_marginTop="15dip"
android:layout_marginRight="15dip" >
+
+
+
diff --git a/res/layout/about.xml b/res/layout/about.xml
index 155d9a657..ab2a6883f 100644
--- a/res/layout/about.xml
+++ b/res/layout/about.xml
@@ -9,4 +9,10 @@
android:layout_height="wrap_content" android:text="@string/about_text"
android:autoLink="web" android:gravity="center" android:paddingTop="50sp"
android:textStyle="bold" android:id="@+id/AboutText">
+
diff --git a/res/layout/videocall.xml b/res/layout/videocall.xml
old mode 100644
new mode 100755
index c05381913..268cf08d6
--- a/res/layout/videocall.xml
+++ b/res/layout/videocall.xml
@@ -26,5 +26,13 @@ android:layout_marginBottom="15dip"
android:layout_marginRight="15dip" >
-
+
+
+
\ No newline at end of file
diff --git a/res/layout/wait_service_dialog.xml b/res/layout/wait_service_dialog.xml
new file mode 100644
index 000000000..e69c00152
--- /dev/null
+++ b/res/layout/wait_service_dialog.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/res/values/custom.xml b/res/values/custom.xml
index 0b88d1c01..a5602db26 100644
--- a/res/values/custom.xml
+++ b/res/values/custom.xml
@@ -6,7 +6,6 @@
test.linphone.org
true
-
false
true
@@ -19,5 +18,8 @@
true
Registered to %s
Fails to register to %s
+
+ Linphone %s SIP (rfc 3261) compatible phone under GNU Public License V2\n http://www.linphone.org\n\nInstructions\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications
+ linphone-android@belledonne-communications.com
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 602a9f54a..f715b4e77 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -74,7 +74,12 @@
Codecs
Place a call
Debug
-Linphone %s SIP (rfc 3261) compatible phone under GNU Public License V2\n http://www.linphone.org\n\nInstructions\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications
+Report issue
+Describe problem here
+Error generating bug report
+Logs not found.
+Reading logs, may takes time...
+Send bug report with...
About
Audio
Exit
diff --git a/src/org/linphone/AboutActivity.java b/src/org/linphone/AboutActivity.java
index 1a2df24a5..8fd0c7474 100644
--- a/src/org/linphone/AboutActivity.java
+++ b/src/org/linphone/AboutActivity.java
@@ -15,29 +15,152 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
+ */
package org.linphone;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
import org.linphone.core.Log;
import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
import android.content.pm.PackageManager.NameNotFoundException;
+import android.net.Uri;
import android.os.Bundle;
+import android.os.Handler;
+import android.preference.PreferenceManager;
+import android.view.View;
+import android.view.View.OnClickListener;
import android.widget.TextView;
+import android.widget.Toast;
-public class AboutActivity extends Activity {
- TextView aboutText;
+public class AboutActivity extends Activity implements OnClickListener {
+
+ private Handler mHandler = new Handler();
+
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.about);
- aboutText = (TextView) findViewById(R.id.AboutText);
+
+ TextView aboutText = (TextView) findViewById(R.id.AboutText);
try {
aboutText.setText(String.format(getString(R.string.about_text), getPackageManager().getPackageInfo(getPackageName(), 0).versionName));
} catch (NameNotFoundException e) {
Log.e(e, "cannot get version name");
}
- }
-
+
+ SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
+ if (pref.getBoolean(getString(R.string.pref_debug_key), false)) {
+ View issue = findViewById(R.id.about_report_issue);
+ issue.setOnClickListener(this);
+ issue.setVisibility(View.VISIBLE);
+ }
+ }
+
+ private Thread thread;
+ @Override
+ public void onClick(View v) {
+ if (thread != null) return;
+ Toast.makeText(this, getString(R.string.about_reading_logs), Toast.LENGTH_LONG).show();
+ thread = new ReadLogThread();
+ thread.start();
+ }
+
+ private void onLogsRead(String logs) {
+ File tempFile;
+ if (logs == null) {
+ Toast.makeText(this, getString(R.string.about_logs_not_found), Toast.LENGTH_SHORT).show();
+ } else {
+
+ try {
+ tempFile = File.createTempFile("bugreport", ".txt");
+ tempFile.deleteOnExit();
+ FileWriter writer = new FileWriter(tempFile);
+ writer.append(logs);
+ } catch (IOException e) {
+ Toast.makeText(this, getString(R.string.about_error_generating_bugreport_attachement), Toast.LENGTH_LONG).show();
+ Log.e(e, "couldn't write to temporary file");
+ return;
+ } finally {
+ thread = null;
+ }
+
+
+ Intent intent = new Intent(Intent.ACTION_SEND);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.setType("plain/text");
+ intent.putExtra(Intent.EXTRA_EMAIL, new String[]{getString(R.string.about_bugreport_email)});
+ intent.putExtra(Intent.EXTRA_SUBJECT,"Bug report " + getString(R.string.app_name) + "-android");
+ intent.putExtra(Intent.EXTRA_TEXT, getString(R.string.about_bugreport_email_text));
+ intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(tempFile));
+ intent = Intent.createChooser(intent,getString(R.string.about_mailer_chooser_text));
+ startActivityForResult(intent, 0);
+ }
+ }
+
+
+ private class ReadLogThread extends Thread {
+ @Override
+ public void run() {
+ final String logs = readLogs();
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ onLogsRead(logs);
+ }
+ });
+ super.run();
+ }
+ }
+
+ private String readLogs() {
+ StringBuilder sb1 = null;
+ StringBuilder sb2 = null;
+ BufferedReader br = null;
+ Process p = null;
+
+ try {
+ p = Runtime.getRuntime().exec(new String[] {"logcat", "-d"});
+ br = new BufferedReader(new InputStreamReader(p.getInputStream()), 1024);
+
+ String line;
+ while ((line = br.readLine()) != null) {
+ if (line.contains(LinphoneService.START_LINPHONE_LOGS)) {
+ if (sb1 != null) {
+ sb2 = sb1;
+ }
+ sb1 = new StringBuilder();
+ }
+ if (sb1 != null) {
+ sb1.append(line).append('\n');
+ }
+ }
+
+ if (sb1 == null) return null;
+ if (sb2 != null) {
+ sb1.append(sb2);
+ }
+ return sb1.toString();
+ } catch (IOException e) {
+ Log.e(e, "Error while reading logs");
+ return null;
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {}
+ }
+ if (p != null) {
+ p.destroy();
+ }
+ }
+ }
+
}
diff --git a/src/org/linphone/DialerActivity.java b/src/org/linphone/DialerActivity.java
index 9b0b7b165..3aa7d2cd9 100644
--- a/src/org/linphone/DialerActivity.java
+++ b/src/org/linphone/DialerActivity.java
@@ -62,7 +62,7 @@ import android.widget.Toast;
*
*
*/
-public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiListener, NewOutgoingCallUiListener {
+public class DialerActivity extends LinphoneManagerWaitActivity implements LinphoneGuiListener, NewOutgoingCallUiListener {
private TextView mStatus;
private View mHangup;
@@ -89,7 +89,7 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
private static final String CURRENT_ADDRESS = "org.linphone.current-address";
private static final String CURRENT_DISPLAYNAME = "org.linphone.current-displayname";
- private static final int INCOMING_CALL_DIALOG_ID = 1;
+ private static final int incomingCallDialogId = 1;
/**
* @return null if not ready yet
@@ -146,19 +146,20 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
checkIfOutgoingCallIntentReceived();
- if (LinphoneService.isReady()) {
- LinphoneCore lc = LinphoneManager.getLc();
- if (lc.isIncall()) {
- if(lc.isInComingInvitePending()) {
- callPending(lc.getCurrentCall());
- } else {
- enterIncallMode(lc);
- }
- }
- }
instance = this;
}
+ @Override
+ protected void onLinphoneManagerAvailable(LinphoneManager m) {
+ LinphoneCore lc = LinphoneManager.getLc();
+ if (lc.isIncall()) {
+ if(lc.isInComingInvitePending()) {
+ callPending(lc.getCurrentCall());
+ } else {
+ enterIncallMode(lc);
+ }
+ }
+ }
@@ -268,7 +269,7 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
private void exitCallMode() {
// Remove dialog if existing
try {
- dismissDialog(INCOMING_CALL_DIALOG_ID);
+ dismissDialog(incomingCallDialogId);
} catch (Throwable e) {/* Exception if never created */}
if (useIncallActivity) {
@@ -301,50 +302,57 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
private void callPending(final LinphoneCall call) {
- showDialog(INCOMING_CALL_DIALOG_ID);
+ showDialog(incomingCallDialogId);
}
@Override
protected void onPrepareDialog(int id, Dialog dialog) {
+ if (id == incomingCallDialogId) {
String from = LinphoneManager.getInstance().extractIncomingRemoteName();
String msg = String.format(getString(R.string.incoming_call_dialog_title), from);
((AlertDialog) dialog).setMessage(msg);
+ } else {
super.onPrepareDialog(id, dialog);
+ }
}
@Override
protected Dialog onCreateDialog(int id) {
- View incomingCallView = getLayoutInflater().inflate(R.layout.incoming_call, null);
+ if (id == incomingCallDialogId) {
+ View incomingCallView = getLayoutInflater().inflate(R.layout.incoming_call, null);
- final Dialog dialog = new AlertDialog.Builder(this)
- .setMessage("")
- .setCancelable(false)
- .setView(incomingCallView).create();
-
-
- ((CallButton) incomingCallView.findViewById(R.id.Call)).setExternalClickListener(new OnClickListener() {
- public void onClick(View v) {
- dialog.dismiss();
- if (Version.isVideoCapable()) {
- LinphoneManager.getInstance().resetCameraFromPreferences();
-
- // Privacy setting to not share the user camera by default
- boolean prefVideoEnable = LinphoneManager.getInstance().isVideoEnabled();
- int key = R.string.pref_video_automatically_share_my_video_key;
- boolean prefAutoShareMyCamera = mPref.getBoolean(getString(key), false);
- boolean videoMuted = !(prefVideoEnable && prefAutoShareMyCamera);
-
- LinphoneManager.getLc().getCurrentCall().enableCamera(prefAutoShareMyCamera);
+ final Dialog dialog = new AlertDialog.Builder(this)
+ .setMessage("")
+ .setCancelable(false)
+ .setView(incomingCallView).create();
+
+
+ ((CallButton) incomingCallView.findViewById(R.id.Call)).setExternalClickListener(new OnClickListener() {
+ public void onClick(View v) {
+ dialog.dismiss();
+ if (Version.isVideoCapable()) {
+ LinphoneManager.getInstance().resetCameraFromPreferences();
+
+ // Privacy setting to not share the user camera by default
+ boolean prefVideoEnable = LinphoneManager.getInstance().isVideoEnabled();
+ int key = R.string.pref_video_automatically_share_my_video_key;
+ boolean prefAutoShareMyCamera = mPref.getBoolean(getString(key), false);
+ boolean videoMuted = !(prefVideoEnable && prefAutoShareMyCamera);
+
+ LinphoneManager.getLc().getCurrentCall().enableCamera(prefAutoShareMyCamera);
+ }
}
- }
- });
- ((HangCallButton) incomingCallView.findViewById(R.id.Decline)).setExternalClickListener(new OnClickListener() {
- public void onClick(View v) {dialog.dismiss();}
- });
-
- return dialog;
+ });
+ ((HangCallButton) incomingCallView.findViewById(R.id.Decline)).setExternalClickListener(new OnClickListener() {
+ public void onClick(View v) {dialog.dismiss();}
+ });
+
+ return dialog;
+ } else {
+ return super.onCreateDialog(id);
+ }
}
-
+
public void newOutgoingCall(Intent intent) {
@@ -416,7 +424,7 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
enterIncallMode(lc);
}
}else if (state==LinphoneCall.State.Error){
- if (lc.getCurrentCall()==call){
+ if (lc.getCurrentCall() == null || lc.getCurrentCall()==call){
if (mWakeLock.isHeld()) mWakeLock.release();
showToast(R.string.call_error, message);
exitCallMode();
diff --git a/src/org/linphone/LinphoneManagerWaitActivity.java b/src/org/linphone/LinphoneManagerWaitActivity.java
new file mode 100644
index 000000000..3899aefb3
--- /dev/null
+++ b/src/org/linphone/LinphoneManagerWaitActivity.java
@@ -0,0 +1,103 @@
+/*
+LinphoneManagerWaitActivity.java
+Copyright (C) 2011 Belledonne Communications, Grenoble, France
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.linphone;
+
+import org.linphone.core.Log;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.View;
+
+/**
+ * Activity requiring access to LinphoneManager should inherit from this class.
+ *
+ * @author Guillaume Beraudo
+ *
+ */
+public abstract class LinphoneManagerWaitActivity extends SoftVolumeActivity {
+
+ private final int waitServiceDialogId = 314159265;
+ private Handler mHandler = new Handler();
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ if (LinphoneService.isReady()) {
+ onLinphoneManagerAvailable(LinphoneManager.getInstance());
+ } else {
+ showDialog(waitServiceDialogId);
+ thread = new ServiceWaitThread();
+ thread.start();
+ }
+ }
+
+ private ServiceWaitThread thread;
+
+ @Override
+ protected void onDestroy() {
+ if (thread != null) thread.interrupt();
+ super.onDestroy();
+ }
+
+ @Override
+ protected Dialog onCreateDialog(int id) {
+ if (id == waitServiceDialogId) {
+ View v = getLayoutInflater().inflate((R.layout.wait_service_dialog), null);
+ return new AlertDialog.Builder(this).setView(v).setCancelable(false).create();
+ }
+ return super.onCreateDialog(id);
+ }
+
+ protected abstract void onLinphoneManagerAvailable(LinphoneManager m);
+
+ private void dismissDialogFromThread(final int id) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ dismissDialog(id);
+ } catch (Throwable e) {
+ // Discarding exception which may be thrown if the dialog wasn't showing.
+ }
+ }
+ });
+ }
+
+ private class ServiceWaitThread extends Thread {
+ @Override
+ public void run() {
+ while (!LinphoneService.isReady()) {
+ try {
+ sleep(30);
+ } catch (InterruptedException e) {
+ Log.e("waiting thread sleep() has been interrupted, exiting as requested");
+ dismissDialogFromThread(waitServiceDialogId); // FIXME, may not be the best thing to do
+ return;
+ }
+ }
+ onLinphoneManagerAvailable(LinphoneManager.getInstance());
+ dismissDialogFromThread(waitServiceDialogId);
+ super.run();
+ }
+ }
+
+}
diff --git a/src/org/linphone/LinphoneManagerWaitHelper.java b/src/org/linphone/LinphoneManagerWaitHelper.java
new file mode 100644
index 000000000..107a520c3
--- /dev/null
+++ b/src/org/linphone/LinphoneManagerWaitHelper.java
@@ -0,0 +1,154 @@
+/*
+LinphoneManagerWaitActivity.java
+Copyright (C) 2011 Belledonne Communications, Grenoble, France
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+package org.linphone;
+
+import org.linphone.core.Log;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.os.Handler;
+import android.view.View;
+
+/**
+ * Activity requiring access to LinphoneManager should use this helper class.
+ *
+ * @author Guillaume Beraudo
+ *
+ */
+public final class LinphoneManagerWaitHelper {
+
+ public static final int DIALOG_ID = 314159265;
+ private Handler mHandler = new Handler();
+ private LinphoneManagerReadyListener listener;
+ private Activity activity;
+ private boolean dialogIsShowing;
+ private boolean notifyOnCreate;
+ private boolean notifyOnResume;
+ static boolean disabled;
+
+ public LinphoneManagerWaitHelper(Activity activity, LinphoneManagerReadyListener listener) {
+ this.listener = listener;
+ this.activity = activity;
+ }
+
+ private ServiceWaitThread thread;
+
+ public Dialog createWaitDialog() {
+ View v = activity.getLayoutInflater().inflate((R.layout.wait_service_dialog), null);
+ return new AlertDialog.Builder(activity).setView(v).setCancelable(false).create();
+ }
+
+
+ public synchronized void doManagerDependentOnCreate() {
+ if (disabled || LinphoneService.isReady()) {
+ listener.onCreateWhenManagerReady();
+ return;
+ }
+ if (thread != null) {
+ throw new RuntimeException("already waiting for Manager");
+ }
+
+ notifyOnCreate = true;
+
+ thread = new ServiceWaitThread();
+ thread.start();
+
+ if (!dialogIsShowing) {
+ activity.showDialog(LinphoneManagerWaitHelper.DIALOG_ID);
+ }
+ }
+
+ public synchronized void doManagerDependentOnResume() {
+ if (disabled || LinphoneService.isReady()) {
+ listener.onResumeWhenManagerReady();
+ return;
+ }
+ notifyOnResume = true;
+ if (thread == null) {
+ thread = new ServiceWaitThread();
+ thread.start();
+ }
+ if (!dialogIsShowing) {
+ activity.showDialog(LinphoneManagerWaitHelper.DIALOG_ID);
+ }
+ }
+
+ private void dismissDialogFromThread(final int id) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ activity.dismissDialog(id);
+ } catch (Throwable e) {
+ // Discarding exception which may be thrown if the dialog wasn't showing.
+ }
+ }
+ });
+ }
+
+ private class ServiceWaitThread extends Thread {
+ private void onCreateWhenManagerReady() {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ listener.onCreateWhenManagerReady();
+ }
+ });
+ }
+ private void onResumeWhenManagerReady() {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ listener.onResumeWhenManagerReady();
+ }
+ });
+ }
+ @Override
+ public void run() {
+ while (!LinphoneService.isReady()) {
+ try {
+ sleep(30);
+ } catch (InterruptedException e) {
+ Log.e("waiting thread sleep() has been interrupted, exiting as requested");
+ dismissDialogFromThread(DIALOG_ID); // FIXME, may not be the best thing to do
+ thread = null;
+ return;
+ }
+ }
+ if (notifyOnCreate) {
+ onCreateWhenManagerReady();
+ notifyOnCreate=false;
+ }
+ if (notifyOnResume) {
+ onResumeWhenManagerReady();
+ notifyOnResume=false;
+ }
+ thread = null;
+ dismissDialogFromThread(DIALOG_ID);
+ super.run();
+ }
+ }
+
+ public interface LinphoneManagerReadyListener {
+ void onCreateWhenManagerReady();
+ void onResumeWhenManagerReady();
+ }
+
+}
diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java
index 2acc250b9..b06b66025 100644
--- a/src/org/linphone/LinphoneService.java
+++ b/src/org/linphone/LinphoneService.java
@@ -24,11 +24,11 @@ import org.linphone.LinphoneManager.LinphoneServiceListener;
import org.linphone.LinphoneManager.NewOutgoingCallUiListener;
import org.linphone.core.LinphoneCall;
import org.linphone.core.Log;
+import org.linphone.core.OnlineStatus;
import org.linphone.core.LinphoneCall.State;
import org.linphone.core.LinphoneCore.GlobalState;
import org.linphone.core.LinphoneCore.RegistrationState;
import org.linphone.mediastream.Version;
-import org.linphone.mediastream.video.capture.hwconf.Hacks;
import android.app.Notification;
import android.app.NotificationManager;
@@ -41,6 +41,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.media.MediaPlayer;
import android.media.RingtoneManager;
import android.net.Uri;
+import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.preference.PreferenceManager;
@@ -99,7 +100,6 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
@Override
public void onCreate() {
super.onCreate();
- instance = this;
// In case restart after a crash. Main in LinphoneActivity
LinphonePreferenceManager.getInstance(this);
@@ -111,7 +111,8 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
notificationTitle = getString(R.string.app_name);
// Dump some debugging information to the logs
- Hacks.dumpDeviceInformation();
+ Log.i(START_LINPHONE_LOGS);
+ dumpDeviceInformation();
dumpInstalledLinphoneInformation();
mNotificationMgr = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
@@ -126,10 +127,24 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
LinphoneManager.createAndStart(this, this);
+ LinphoneManager.getLc().setPresenceInfo(0, null, OnlineStatus.Online);
+ instance = this; // instance is ready once linphone manager has been created
}
+ public static final String START_LINPHONE_LOGS = " ==== Phone information dump ====";
+ private void dumpDeviceInformation() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("DEVICE=").append(Build.DEVICE).append("\n");
+ sb.append("MODEL=").append(Build.MODEL).append("\n");
+ //MANUFACTURER doesn't exist in android 1.5.
+ //sb.append("MANUFACTURER=").append(Build.MANUFACTURER).append("\n");
+ sb.append("SDK=").append(Build.VERSION.SDK);
+ Log.i(sb.toString());
+ }
+
+
private void dumpInstalledLinphoneInformation() {
PackageInfo info = null;
@@ -168,10 +183,10 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
@Override
public void onDestroy() {
super.onDestroy();
+ LinphoneManager.getLcIfManagerNotDestroyedOrNull().setPresenceInfo(0, null, OnlineStatus.Offline);
LinphoneManager.destroy(this);
mNotificationMgr.cancel(NOTIF_ID);
-
instance=null;
}
diff --git a/src/org/linphone/SoftVolumeActivity.java b/src/org/linphone/SoftVolumeActivity.java
index 8f8d6dddb..af3cb5b25 100644
--- a/src/org/linphone/SoftVolumeActivity.java
+++ b/src/org/linphone/SoftVolumeActivity.java
@@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.linphone;
+import org.linphone.core.Log;
import org.linphone.mediastream.video.capture.hwconf.Hacks;
import android.app.Activity;
@@ -35,9 +36,12 @@ public class SoftVolumeActivity extends Activity {
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)
- && (Hacks.needSoftvolume() || LinphonePreferenceManager.getInstance().useSoftvolume())) {
+ && (Hacks.needSoftvolume() || LinphonePreferenceManager.getInstance(this).useSoftvolume())) {
- if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
+ if (!LinphoneService.isReady()) {
+ Log.i("Couldn't change softvolume has service is not running");
+ return true;
+ } else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
LinphoneManager.getInstance().adjustSoftwareVolume(1);
} else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
LinphoneManager.getInstance().adjustSoftwareVolume(-1);
diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java
old mode 100644
new mode 100755
index 34e387f78..9474ada03
--- a/src/org/linphone/VideoCallActivity.java
+++ b/src/org/linphone/VideoCallActivity.java
@@ -23,11 +23,15 @@ package org.linphone;
import org.linphone.core.LinphoneCall;
import org.linphone.core.Log;
import org.linphone.mediastream.video.AndroidVideoWindowImpl;
+import org.linphone.mediastream.video.capture.AndroidVideoApi5JniWrapper;
import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration;
import android.content.Context;
+import android.hardware.Camera;
+import android.hardware.Camera.CameraInfo;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
+import android.os.Handler;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.view.Menu;
@@ -36,6 +40,8 @@ import android.view.MenuItem;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.ImageView;
/**
* For Android SDK >= 5
@@ -47,6 +53,7 @@ public class VideoCallActivity extends SoftVolumeActivity {
private SurfaceView mVideoCaptureViewReady;
public static boolean launched = false;
private WakeLock mWakeLock;
+ private Handler refreshHandler = new Handler();
AndroidVideoWindowImpl androidVideoWindowImpl;
@@ -111,6 +118,54 @@ public class VideoCallActivity extends SoftVolumeActivity {
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK|PowerManager.ON_AFTER_RELEASE,Log.TAG);
mWakeLock.acquire();
+
+ Runnable runnable = new Runnable() {
+ public void run() {
+ while (launched && LinphoneManager.getLc().isIncall())
+ {
+ refreshHandler.post(new Runnable() {
+ public void run() {
+ int oldQuality = 0;
+ float newQuality = LinphoneManager.getLc().getCurrentCall().getCurrentQuality();
+ if ((int) newQuality != oldQuality)
+ updateQualityOfSignalIcon(newQuality);
+ }
+ });
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ };
+ new Thread(runnable).start();
+ }
+
+ void updateQualityOfSignalIcon(float quality)
+ {
+ ImageView qos = (ImageView) findViewById(R.id.QoS);
+ if (quality >= 4) // Good Quality
+ {
+ qos.setImageDrawable(getResources().getDrawable(R.drawable.stat_sys_signal_4));
+ }
+ else if (quality >= 3) // Average quality
+ {
+ qos.setImageDrawable(getResources().getDrawable(R.drawable.stat_sys_signal_3));
+ }
+ else if (quality >= 2) // Low quality
+ {
+ qos.setImageDrawable(getResources().getDrawable(R.drawable.stat_sys_signal_2));
+ }
+ else if (quality >= 1) // Very low quality
+ {
+ qos.setImageDrawable(getResources().getDrawable(R.drawable.stat_sys_signal_1));
+ }
+ else // Worst quality
+ {
+ qos.setImageDrawable(getResources().getDrawable(R.drawable.stat_sys_signal_0));
+ }
}
void updatePreview(boolean cameraCaptureEnabled) {
diff --git a/src/org/linphone/core/LinphoneCoreFactoryImpl.java b/src/org/linphone/core/LinphoneCoreFactoryImpl.java
index 19b0282f3..1591a8b4e 100644
--- a/src/org/linphone/core/LinphoneCoreFactoryImpl.java
+++ b/src/org/linphone/core/LinphoneCoreFactoryImpl.java
@@ -19,21 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
package org.linphone.core;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-import java.security.cert.PKIXParameters;
-import java.security.cert.TrustAnchor;
-import java.security.cert.X509Certificate;
-import java.util.Iterator;
-
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-import javax.net.ssl.X509TrustManager;
import org.linphone.mediastream.Version;
diff --git a/src/org/linphone/core/LinphoneCoreImpl.java b/src/org/linphone/core/LinphoneCoreImpl.java
index a45bad1c7..92eb4a43c 100644
--- a/src/org/linphone/core/LinphoneCoreImpl.java
+++ b/src/org/linphone/core/LinphoneCoreImpl.java
@@ -23,9 +23,6 @@ import java.io.IOException;
import java.util.List;
import java.util.Vector;
-import org.linphone.LinphoneManager;
-import org.linphone.mediastream.video.AndroidVideoWindowImpl;
-
class LinphoneCoreImpl implements LinphoneCore {
diff --git a/submodules/externals/build/libvpx/Android.mk b/submodules/externals/build/libvpx/Android.mk
index 64836bfe3..631a67d3d 100755
--- a/submodules/externals/build/libvpx/Android.mk
+++ b/submodules/externals/build/libvpx/Android.mk
@@ -4,215 +4,233 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libvpx
+LOCAL_CFLAGS := -O3 -fPIC -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith -Wtype-limits -Wcast-qual -Wno-unused-function
+
LOCAL_ARM_MODE := arm
-ASM := s
+ASM := .s
-# vpx subfolder [vpx_codec.mk]
-LOCAL_SRC_FILES = \
- vpx/src/vpx_decoder.c \
- vpx/src/vpx_decoder_compat.c \
- vpx/src/vpx_encoder.c \
- vpx/src/vpx_codec.c \
- vpx/src/vpx_image.c
-# vp8 subfolder [vp8_common.mk]
-LOCAL_SRC_FILES += \
- vp8/common/alloccommon.c \
- vp8/common/blockd.c \
- vp8/common/debugmodes.c \
- vp8/common/defaultcoefcounts.c \
- vp8/common/entropy.c \
- vp8/common/entropymode.c \
- vp8/common/entropymv.c \
- vp8/common/extend.c \
- vp8/common/filter.c \
- vp8/common/findnearmv.c \
- vp8/common/generic/systemdependent.c \
- vp8/common/idctllm.c \
- vp8/common/invtrans.c \
- vp8/common/loopfilter.c \
- vp8/common/loopfilter_filters.c \
- vp8/common/mbpitch.c \
- vp8/common/modecont.c \
- vp8/common/modecontext.c \
- vp8/common/quant_common.c \
- vp8/common/recon.c \
- vp8/common/reconinter.c \
- vp8/common/reconintra.c \
- vp8/common/reconintra4x4.c \
- vp8/common/setupintrarecon.c \
- vp8/common/swapyv12buffer.c \
- vp8/common/treecoder.c \
- vp8/common/asm_com_offsets.c \
- vp8/common/arm/arm_systemdependent.c \
- vp8/common/arm/bilinearfilter_arm.c \
- vp8/common/arm/filter_arm.c \
- vp8/common/arm/loopfilter_arm.c \
- vp8/common/arm/reconintra_arm.c \
- vp8/common/arm/neon/recon_neon.c.neon
+### vpx_mem.mk
+MEM_SRCS = vpx_mem/vpx_mem.c
-ASM_FILES = \
- vp8/common/arm/armv6/bilinearfilter_v6.$(ASM) \
- vp8/common/arm/armv6/copymem8x4_v6.$(ASM) \
- vp8/common/arm/armv6/copymem8x8_v6.$(ASM) \
- vp8/common/arm/armv6/copymem16x16_v6.$(ASM) \
- vp8/common/arm/armv6/dc_only_idct_add_v6.$(ASM) \
- vp8/common/arm/armv6/iwalsh_v6.$(ASM) \
- vp8/common/arm/armv6/filter_v6.$(ASM) \
- vp8/common/arm/armv6/idct_v6.$(ASM) \
- vp8/common/arm/armv6/loopfilter_v6.$(ASM) \
- vp8/common/arm/armv6/recon_v6.$(ASM) \
- vp8/common/arm/armv6/simpleloopfilter_v6.$(ASM) \
- vp8/common/arm/armv6/sixtappredict8x4_v6.$(ASM) \
- vp8/common/arm/neon/bilinearpredict4x4_neon.$(ASM).neon \
- vp8/common/arm/neon/bilinearpredict8x4_neon.$(ASM).neon \
- vp8/common/arm/neon/bilinearpredict8x8_neon.$(ASM).neon \
- vp8/common/arm/neon/bilinearpredict16x16_neon.$(ASM).neon \
- vp8/common/arm/neon/copymem8x4_neon.$(ASM).neon \
- vp8/common/arm/neon/copymem8x8_neon.$(ASM).neon \
- vp8/common/arm/neon/copymem16x16_neon.$(ASM).neon \
- vp8/common/arm/neon/dc_only_idct_add_neon.$(ASM).neon \
- vp8/common/arm/neon/iwalsh_neon.$(ASM).neon \
- vp8/common/arm/neon/loopfilter_neon.$(ASM).neon \
- vp8/common/arm/neon/loopfiltersimplehorizontaledge_neon.$(ASM).neon \
- vp8/common/arm/neon/loopfiltersimpleverticaledge_neon.$(ASM).neon \
- vp8/common/arm/neon/mbloopfilter_neon.$(ASM).neon \
- vp8/common/arm/neon/recon2b_neon.$(ASM).neon \
- vp8/common/arm/neon/recon4b_neon.$(ASM).neon \
- vp8/common/arm/neon/reconb_neon.$(ASM).neon \
- vp8/common/arm/neon/shortidct4x4llm_1_neon.$(ASM).neon \
- vp8/common/arm/neon/shortidct4x4llm_neon.$(ASM).neon \
- vp8/common/arm/neon/sixtappredict4x4_neon.$(ASM).neon \
- vp8/common/arm/neon/sixtappredict8x4_neon.$(ASM).neon \
- vp8/common/arm/neon/sixtappredict8x8_neon.$(ASM).neon \
- vp8/common/arm/neon/sixtappredict16x16_neon.$(ASM).neon \
- vp8/common/arm/neon/recon16x16mb_neon.$(ASM).neon \
- vp8/common/arm/neon/buildintrapredictorsmby_neon.$(ASM).neon \
- vp8/common/arm/neon/save_neon_reg.$(ASM).neon \
+### vpx_scale
+SCALE_SRCS = vpx_scale/generic/vpxscale.c
+SCALE_SRCS += vpx_scale/generic/yv12config.c
+SCALE_SRCS += vpx_scale/generic/yv12extend.c
+SCALE_SRCS += vpx_scale/generic/gen_scalers.c
-# vp8 subfolder [vp8cx.mk]
-LOCAL_SRC_FILES += \
- vp8/vp8_cx_iface.c \
- vp8/encoder/asm_enc_offsets.c \
- vp8/encoder/bitstream.c \
- vp8/encoder/dct.c \
- vp8/encoder/encodeframe.c \
- vp8/encoder/encodeintra.c \
- vp8/encoder/encodemb.c \
- vp8/encoder/encodemv.c \
- vp8/encoder/ethreading.c \
- vp8/encoder/generic/csystemdependent.c \
- vp8/encoder/lookahead.c \
- vp8/encoder/mcomp.c \
- vp8/encoder/modecosts.c \
- vp8/encoder/onyx_if.c \
- vp8/encoder/pickinter.c \
- vp8/encoder/picklpf.c \
- vp8/encoder/psnr.c \
- vp8/encoder/quantize.c \
- vp8/encoder/ratectrl.c \
- vp8/encoder/rdopt.c \
- vp8/encoder/sad_c.c \
- vp8/encoder/segmentation.c \
- vp8/encoder/tokenize.c \
- vp8/encoder/treewriter.c \
- vp8/encoder/variance_c.c
+#arm
+SCALE_SRCS += vpx_scale/arm/scalesystemdependent.c
-# vp8 subfolder [vp8cx_arm.mk]
-LOCAL_SRC_FILES += \
- vp8/encoder/arm/arm_csystemdependent.c \
- vp8/encoder/arm/quantize_arm.c \
- vp8/encoder/arm/picklpf_arm.c \
- vp8/encoder/arm/dct_arm.c \
- vp8/encoder/arm/variance_arm.c \
- vp8/encoder/arm/boolhuff_arm.c
+#neon
+SCALE_SRCS += vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM).neon
+SCALE_SRCS += vpx_scale/arm/neon/vp8_vpxyv12_copyframeyonly_neon$(ASM).neon
+SCALE_SRCS += vpx_scale/arm/neon/vp8_vpxyv12_copysrcframe_func_neon$(ASM).neon
+SCALE_SRCS += vpx_scale/arm/neon/vp8_vpxyv12_extendframeborders_neon$(ASM).neon
+SCALE_SRCS += vpx_scale/arm/neon/yv12extend_arm.c
-ASM_FILES += \
- vp8/encoder/arm/armv5te/boolhuff_armv5te.$(ASM) \
- vp8/encoder/arm/armv5te/vp8_packtokens_armv5.$(ASM) \
- vp8/encoder/arm/armv5te/vp8_packtokens_mbrow_armv5.$(ASM) \
- vp8/encoder/arm/armv5te/vp8_packtokens_partitions_armv5.$(ASM) \
- vp8/encoder/arm/armv6/vp8_subtract_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_fast_fdct4x4_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_fast_quantize_b_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_sad16x16_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_variance16x16_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_mse16x16_armv6.$(ASM) \
- vp8/encoder/arm/armv6/vp8_variance8x8_armv6.$(ASM) \
- vp8/encoder/arm/armv6/walsh_v6.$(ASM) \
- vp8/encoder/arm/neon/fastfdct4x4_neon.$(ASM).neon \
- vp8/encoder/arm/neon/fastfdct8x4_neon.$(ASM).neon \
- vp8/encoder/arm/neon/fastquantizeb_neon.$(ASM).neon \
- vp8/encoder/arm/neon/sad8_neon.$(ASM).neon \
- vp8/encoder/arm/neon/sad16_neon.$(ASM).neon \
- vp8/encoder/arm/neon/shortfdct_neon.$(ASM).neon \
- vp8/encoder/arm/neon/subtract_neon.$(ASM).neon \
- vp8/encoder/arm/neon/variance_neon.$(ASM).neon \
- vp8/encoder/arm/neon/vp8_mse16x16_neon.$(ASM).neon \
- vp8/encoder/arm/neon/vp8_subpixelvariance8x8_neon.$(ASM).neon \
- vp8/encoder/arm/neon/vp8_subpixelvariance16x16_neon.$(ASM).neon \
- vp8/encoder/arm/neon/vp8_subpixelvariance16x16s_neon.$(ASM).neon \
- vp8/encoder/arm/neon/vp8_memcpy_neon.$(ASM).neon \
- vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.$(ASM).neon \
+### vp8cx_arm
+#File list for arm
+# encoder
+VP8_CX_SRCS = vp8/encoder/arm/arm_csystemdependent.c
-# vp8 subfolder [vp8dx.mk]
-LOCAL_SRC_FILES += \
- vp8/vp8_dx_iface.c \
- vp8/decoder/dboolhuff.c \
- vp8/decoder/decodemv.c \
- vp8/decoder/decodframe.c \
- vp8/decoder/dequantize.c \
- vp8/decoder/detokenize.c \
- vp8/decoder/error_concealment.c \
- vp8/decoder/generic/dsystemdependent.c \
- vp8/decoder/onyxd_if.c \
- vp8/decoder/idct_blk.c \
- vp8/decoder/threading.c \
- vp8/decoder/reconintra_mt.c
+VP8_CX_SRCS += vp8/encoder/arm/dct_arm.c
+VP8_CX_SRCS += vp8/encoder/arm/quantize_arm.c
+VP8_CX_SRCS += vp8/encoder/arm/variance_arm.c
-# vp8 subfolder [vp8dx_arm.mk]
-LOCAL_SRC_FILES += \
- vp8/decoder/arm/arm_dsystemdependent.c \
- vp8/decoder/asm_dec_offsets.c \
- vp8/decoder/arm/dequantize_arm.c \
- vp8/decoder/arm/neon/idct_blk_neon.c.neon \
- vp8/decoder/arm/armv6/idct_blk_v6.c
+#File list for armv5te
+# encoder
+VP8_CX_SRCS += vp8/encoder/arm/boolhuff_arm.c
+VP8_CX_SRCS += vp8/encoder/arm/armv5te/boolhuff_armv5te$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv5te/vp8_packtokens_armv5$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv5te/vp8_packtokens_mbrow_armv5$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv5te/vp8_packtokens_partitions_armv5$(ASM)
-ASM_FILES += \
- vp8/decoder/arm/neon/idct_dequant_dc_full_2x_neon.$(ASM).neon \
- vp8/decoder/arm/neon/idct_dequant_dc_0_2x_neon.$(ASM).neon \
- vp8/decoder/arm/neon/dequant_idct_neon.$(ASM).neon \
- vp8/decoder/arm/neon/idct_dequant_full_2x_neon.$(ASM).neon \
- vp8/decoder/arm/neon/idct_dequant_0_2x_neon.$(ASM).neon \
- vp8/decoder/arm/neon/dequantizeb_neon.$(ASM).neon \
- vp8/decoder/arm/armv6/dequant_dc_idct_v6.$(ASM) \
- vp8/decoder/arm/armv6/dequant_idct_v6.$(ASM) \
- vp8/decoder/arm/armv6/dequantize_v6.$(ASM)
+#File list for armv6
+# encoder
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_subtract_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_fast_quantize_b_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_sad16x16_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance16x16_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_mse16x16_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance8x8_armv6$(ASM)
+VP8_CX_SRCS += vp8/encoder/arm/armv6/walsh_v6$(ASM)
-# vpx_mem subfolder [vpx_mem.mk]
-LOCAL_SRC_FILES += vpx_mem/vpx_mem.c
+#File list for neon
+# encoder
+VP8_CX_SRCS += vp8/encoder/arm/neon/fastquantizeb_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/picklpf_arm.c.neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/sad8_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/sad16_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/shortfdct_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/subtract_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/variance_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_mse16x16_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_subpixelvariance8x8_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_subpixelvariance16x16_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_subpixelvariance16x16s_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_memcpy_neon$(ASM).neon
+VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon$(ASM).neon
-# vpx_scale subfolder [vpx_scale.mk]
-LOCAL_SRC_FILES += \
- vpx_scale/generic/vpxscale.c \
- vpx_scale/generic/yv12config.c \
- vpx_scale/generic/yv12extend.c \
- vpx_scale/arm/scalesystemdependent.c \
- vpx_scale/arm/yv12extend_arm.c \
- vpx_scale/generic/scalesystemdependent.c
-ASM_FILES += \
- vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon.$(ASM).neon \
- vpx_scale/arm/neon/vp8_vpxyv12_copyframeyonly_neon.$(ASM).neon \
- vpx_scale/arm/neon/vp8_vpxyv12_copysrcframe_func_neon.$(ASM).neon \
- vpx_scale/arm/neon/vp8_vpxyv12_extendframeborders_neon.$(ASM).neon \
+### vp8_cx
+VP8_CX_SRCS += vp8/vp8_cx_iface.c
+
+VP8_CX_SRCS += vp8/encoder/asm_enc_offsets.c
+VP8_CX_SRCS += vp8/encoder/bitstream.c
+VP8_CX_SRCS += vp8/encoder/dct.c
+VP8_CX_SRCS += vp8/encoder/encodeframe.c
+VP8_CX_SRCS += vp8/encoder/encodeintra.c
+VP8_CX_SRCS += vp8/encoder/encodemb.c
+VP8_CX_SRCS += vp8/encoder/encodemv.c
+#VP8_CX_SRCS += vp8/encoder/ethreading.c
+VP8_CX_SRCS += vp8/encoder/generic/csystemdependent.c
+VP8_CX_SRCS += vp8/encoder/lookahead.c
+VP8_CX_SRCS += vp8/encoder/mcomp.c
+VP8_CX_SRCS += vp8/encoder/modecosts.c
+VP8_CX_SRCS += vp8/encoder/onyx_if.c
+VP8_CX_SRCS += vp8/encoder/pickinter.c
+VP8_CX_SRCS += vp8/encoder/picklpf.c
+VP8_CX_SRCS += vp8/encoder/psnr.c
+VP8_CX_SRCS += vp8/encoder/quantize.c
+VP8_CX_SRCS += vp8/encoder/ratectrl.c
+VP8_CX_SRCS += vp8/encoder/rdopt.c
+VP8_CX_SRCS += vp8/encoder/sad_c.c
+VP8_CX_SRCS += vp8/encoder/segmentation.c
+VP8_CX_SRCS += vp8/encoder/tokenize.c
+VP8_CX_SRCS += vp8/encoder/treewriter.c
+VP8_CX_SRCS += vp8/encoder/variance_c.c
+
+### vp8_common
+VP8_COMMON_SRCS = vp8/common/alloccommon.c
+VP8_COMMON_SRCS += vp8/common/asm_com_offsets.c
+VP8_COMMON_SRCS += vp8/common/blockd.c
+VP8_COMMON_SRCS += vp8/common/debugmodes.c
+VP8_COMMON_SRCS += vp8/common/entropy.c
+VP8_COMMON_SRCS += vp8/common/entropymode.c
+VP8_COMMON_SRCS += vp8/common/entropymv.c
+VP8_COMMON_SRCS += vp8/common/extend.c
+VP8_COMMON_SRCS += vp8/common/filter.c
+VP8_COMMON_SRCS += vp8/common/findnearmv.c
+VP8_COMMON_SRCS += vp8/common/generic/systemdependent.c
+VP8_COMMON_SRCS += vp8/common/idctllm.c
+VP8_COMMON_SRCS += vp8/common/invtrans.c
+VP8_COMMON_SRCS += vp8/common/loopfilter.c
+VP8_COMMON_SRCS += vp8/common/loopfilter_filters.c
+VP8_COMMON_SRCS += vp8/common/mbpitch.c
+VP8_COMMON_SRCS += vp8/common/modecont.c
+VP8_COMMON_SRCS += vp8/common/modecontext.c
+VP8_COMMON_SRCS += vp8/common/quant_common.c
+VP8_COMMON_SRCS += vp8/common/recon.c
+VP8_COMMON_SRCS += vp8/common/reconinter.c
+VP8_COMMON_SRCS += vp8/common/reconintra.c
+VP8_COMMON_SRCS += vp8/common/reconintra4x4.c
+VP8_COMMON_SRCS += vp8/common/setupintrarecon.c
+VP8_COMMON_SRCS += vp8/common/swapyv12buffer.c
+VP8_COMMON_SRCS += vp8/common/treecoder.c
+
+# common (c)
+VP8_COMMON_SRCS += vp8/common/arm/arm_systemdependent.c
+VP8_COMMON_SRCS += vp8/common/arm/bilinearfilter_arm.c
+VP8_COMMON_SRCS += vp8/common/arm/filter_arm.c
+VP8_COMMON_SRCS += vp8/common/arm/loopfilter_arm.c
+VP8_COMMON_SRCS += vp8/common/arm/reconintra_arm.c
+
+# common (armv6)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/bilinearfilter_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/copymem8x4_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/copymem8x8_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/copymem16x16_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/dc_only_idct_add_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/iwalsh_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/filter_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/idct_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/loopfilter_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/recon_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/simpleloopfilter_v6$(ASM)
+VP8_COMMON_SRCS += vp8/common/arm/armv6/sixtappredict8x4_v6$(ASM)
+
+# common (neon)
+VP8_COMMON_SRCS += vp8/common/arm/neon/bilinearpredict4x4_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/bilinearpredict8x4_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/bilinearpredict8x8_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/bilinearpredict16x16_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/copymem8x4_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/copymem8x8_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/copymem16x16_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/dc_only_idct_add_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/iwalsh_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/loopfilter_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/loopfiltersimplehorizontaledge_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/loopfiltersimpleverticaledge_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/mbloopfilter_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/recon2b_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/recon4b_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/reconb_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/shortidct4x4llm_1_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/shortidct4x4llm_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict4x4_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict8x4_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict8x8_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict16x16_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/recon16x16mb_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/buildintrapredictorsmby_neon$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/save_neon_reg$(ASM).neon
+VP8_COMMON_SRCS += vp8/common/arm/neon/recon_neon.c.neon
+
+### vp8dx_arm
+VP8_DX_SRCS = vp8/decoder/arm/arm_dsystemdependent.c
+VP8_DX_SRCS += vp8/decoder/arm/dequantize_arm.c
+
+#File list for armv6
+VP8_DX_SRCS += vp8/decoder/arm/armv6/dequant_dc_idct_v6$(ASM)
+VP8_DX_SRCS += vp8/decoder/arm/armv6/dequant_idct_v6$(ASM)
+VP8_DX_SRCS += vp8/decoder/arm/armv6/dequantize_v6$(ASM)
+VP8_DX_SRCS += vp8/decoder/arm/armv6/idct_blk_v6.c
+
+#File list for neon
+VP8_DX_SRCS += vp8/decoder/arm/neon/idct_dequant_dc_full_2x_neon$(ASM).neon
+VP8_DX_SRCS += vp8/decoder/arm/neon/idct_dequant_dc_0_2x_neon$(ASM).neon
+VP8_DX_SRCS += vp8/decoder/arm/neon/dequant_idct_neon$(ASM).neon
+VP8_DX_SRCS += vp8/decoder/arm/neon/idct_dequant_full_2x_neon$(ASM).neon
+VP8_DX_SRCS += vp8/decoder/arm/neon/idct_dequant_0_2x_neon$(ASM).neon
+VP8_DX_SRCS += vp8/decoder/arm/neon/dequantizeb_neon$(ASM).neon
+VP8_DX_SRCS += vp8/decoder/arm/neon/idct_blk_neon.c.neon
+
+### vp8dx
+VP8_DX_SRCS += vp8/vp8_dx_iface.c
+VP8_DX_SRCS += vp8/decoder/asm_dec_offsets.c
+VP8_DX_SRCS += vp8/decoder/dboolhuff.c
+VP8_DX_SRCS += vp8/decoder/decodemv.c
+VP8_DX_SRCS += vp8/decoder/decodframe.c
+VP8_DX_SRCS += vp8/decoder/dequantize.c
+VP8_DX_SRCS += vp8/decoder/detokenize.c
+VP8_DX_SRCS += vp8/decoder/error_concealment.c
+VP8_DX_SRCS += vp8/decoder/generic/dsystemdependent.c
+VP8_DX_SRCS += vp8/decoder/onyxd_if.c
+#VP8_DX_SRCS += vp8/decoder/threading.c
+VP8_DX_SRCS += vp8/decoder/idct_blk.c
+#VP8_DX_SRCS += vp8/decoder/reconintra_mt.c
+
+### vpx_codec
+API_SRCS = vpx/src/vpx_decoder.c
+API_SRCS += vpx/src/vpx_decoder_compat.c
+API_SRCS += vpx/src/vpx_encoder.c
+API_SRCS += vpx/src/vpx_codec.c
+API_SRCS += vpx/src/vpx_image.c
+
+LOCAL_SRC_FILES = $(MEM_SRCS)
+LOCAL_SRC_FILES += $(SCALE_SRCS)
+LOCAL_SRC_FILES += $(VP8_CX_SRCS)
+LOCAL_SRC_FILES += $(VP8_COMMON_SRCS)
+LOCAL_SRC_FILES += $(VP8_DX_SRCS)
+LOCAL_SRC_FILES += $(API_SRCS)
LOCAL_SRC_FILES += vpx_ports/arm_cpudetect.c
-LOCAL_SRC_FILES += $(ASM_FILES)
-
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_C_INCLUDES += \
diff --git a/submodules/externals/build/libvpx/vpx_config.h b/submodules/externals/build/libvpx/vpx_config.h
index 8cecad7e6..421b189e9 100644
--- a/submodules/externals/build/libvpx/vpx_config.h
+++ b/submodules/externals/build/libvpx/vpx_config.h
@@ -1,7 +1,7 @@
/* This file automatically generated by configure. Do not edit! */
#ifndef VPX_CONFIG_H
#define VPX_CONFIG_H
-#define RESTRICT
+#define RESTRICT
#define ARCH_ARM 1
#define ARCH_MIPS 0
#define ARCH_X86 0
@@ -51,7 +51,7 @@
#define CONFIG_DC_RECON 0
#define CONFIG_RUNTIME_CPU_DETECT 1
#define CONFIG_POSTPROC 0
-#define CONFIG_MULTITHREAD 1
+#define CONFIG_MULTITHREAD 0
#define CONFIG_INTERNAL_STATS 0
#define CONFIG_VP8_ENCODER 1
#define CONFIG_VP8_DECODER 1
@@ -63,6 +63,7 @@
#define CONFIG_REALTIME_ONLY 1
#define CONFIG_ERROR_CONCEALMENT 1
#define CONFIG_SHARED 0
+#define CONFIG_STATIC 1
#define CONFIG_SMALL 0
#define CONFIG_POSTPROC_VISUALIZER 0
#define CONFIG_OS_SUPPORT 1
diff --git a/submodules/externals/build/libvpx/vpx_version.h b/submodules/externals/build/libvpx/vpx_version.h
index 1d8ba965d..5a34d627d 100644
--- a/submodules/externals/build/libvpx/vpx_version.h
+++ b/submodules/externals/build/libvpx/vpx_version.h
@@ -1,7 +1,7 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 9
-#define VERSION_PATCH 6
-#define VERSION_EXTRA ""
+#define VERSION_PATCH 7
+#define VERSION_EXTRA "p1-55-g6f9457e"
#define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH))
-#define VERSION_STRING_NOSP "v0.9.6"
-#define VERSION_STRING " v0.9.6"
+#define VERSION_STRING_NOSP "v0.9.7-p1-55-g6f9457e"
+#define VERSION_STRING " v0.9.7-p1-55-g6f9457e"
diff --git a/submodules/externals/libvpx b/submodules/externals/libvpx
index b84e8f20c..6f9457ec1 160000
--- a/submodules/externals/libvpx
+++ b/submodules/externals/libvpx
@@ -1 +1 @@
-Subproject commit b84e8f20c3aca0f2a65265cf704cc7c15a2c93d4
+Subproject commit 6f9457ec12a98b3aceefbcb79783c084268d0b36
diff --git a/submodules/libilbc-rfc3951 b/submodules/libilbc-rfc3951
index 5b6ac8974..af32518af 160000
--- a/submodules/libilbc-rfc3951
+++ b/submodules/libilbc-rfc3951
@@ -1 +1 @@
-Subproject commit 5b6ac8974d1a5f8059b964b329c565d4afe06358
+Subproject commit af32518af41f97caee07070234a3475409b9a27d