From f80a6fa587d5c663111dce9c93673c8069ed92c9 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 4 Jun 2012 15:36:54 +0200 Subject: [PATCH 01/26] clarify help messages --- res/values/strings.xml | 4 ++-- src/org/linphone/LinphonePreferencesSIPAccountActivity.java | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 63a57e0f9..39a44158e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -259,6 +259,6 @@ Confirmation Check -Redirect registrar packets to this server -Redirect all traffic to proxy server +SIP proxy hostname or ip address (optional) +Route all calls through SIP proxy diff --git a/src/org/linphone/LinphonePreferencesSIPAccountActivity.java b/src/org/linphone/LinphonePreferencesSIPAccountActivity.java index 1de114bf8..46c63074b 100644 --- a/src/org/linphone/LinphonePreferencesSIPAccountActivity.java +++ b/src/org/linphone/LinphonePreferencesSIPAccountActivity.java @@ -57,7 +57,8 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity { username.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); username.setTitle(getString(R.string.pref_username)); username.setPersistent(true); - username.setDialogMessage("Example: toto if your account is toto@sip.linphone.org"); + //TODO make it translatable, use john instead of toto. + //username.setDialogMessage("Example: toto if your account is toto@sip.linphone.org"); username.setKey(getString(R.string.pref_username_key) + getAccountNumber(n)); username.setOnPreferenceChangeListener(preferenceChangedListener); @@ -71,7 +72,8 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity { domain.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); domain.setTitle(getString(R.string.pref_domain)); domain.setPersistent(true); - domain.setDialogMessage("Example: sip.linphone.org if your account is toto@sip.linphone.org"); + //TODO make it translatable, use john instead of toto. + //domain.setDialogMessage("Example: sip.linphone.org if your account is toto@sip.linphone.org"); domain.setKey(getString(R.string.pref_domain_key) + getAccountNumber(n)); domain.setOnPreferenceChangeListener(preferenceChangedListener); From 22afd5691fdf90e2d758b7ea52218f1f0205627a Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 5 Jun 2012 13:46:32 +0200 Subject: [PATCH 02/26] Updated help messages + manifest + gitignore --- .gitignore | 3 ++ AndroidManifest.xml | 39 +++++++++---------- res/values/strings.xml | 2 + ...LinphonePreferencesSIPAccountActivity.java | 6 +-- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 83bec1ac8..3a33fd217 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ obj gen bin doc +ant.properties +local.properties +project.properties diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 10c22e27a..930c4dde9 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -3,7 +3,25 @@ package="org.linphone" android:versionCode="1310" android:versionName="1.3.1" android:installLocation="auto"> - + + + + + + + + + + + + + + + + + + + @@ -205,23 +223,4 @@ - - - - - - - - - - - - - - - - - - - diff --git a/res/values/strings.xml b/res/values/strings.xml index 39a44158e..3ee1e4190 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -261,4 +261,6 @@ SIP proxy hostname or ip address (optional) Route all calls through SIP proxy +Example: john if your account is john@sip.linphone.org +sip.linphone.org if your account is john@sip.linphone.org diff --git a/src/org/linphone/LinphonePreferencesSIPAccountActivity.java b/src/org/linphone/LinphonePreferencesSIPAccountActivity.java index 46c63074b..c61762e1d 100644 --- a/src/org/linphone/LinphonePreferencesSIPAccountActivity.java +++ b/src/org/linphone/LinphonePreferencesSIPAccountActivity.java @@ -57,8 +57,7 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity { username.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); username.setTitle(getString(R.string.pref_username)); username.setPersistent(true); - //TODO make it translatable, use john instead of toto. - //username.setDialogMessage("Example: toto if your account is toto@sip.linphone.org"); + username.setDialogMessage(getString(R.string.pref_help_username)); username.setKey(getString(R.string.pref_username_key) + getAccountNumber(n)); username.setOnPreferenceChangeListener(preferenceChangedListener); @@ -72,8 +71,7 @@ public class LinphonePreferencesSIPAccountActivity extends PreferenceActivity { domain.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); domain.setTitle(getString(R.string.pref_domain)); domain.setPersistent(true); - //TODO make it translatable, use john instead of toto. - //domain.setDialogMessage("Example: sip.linphone.org if your account is toto@sip.linphone.org"); + domain.setDialogMessage(getString(R.string.pref_help_domain)); domain.setKey(getString(R.string.pref_domain_key) + getAccountNumber(n)); domain.setOnPreferenceChangeListener(preferenceChangedListener); From d5ce3dc4b87e4baa2536f368e37e1695acd1747e Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 5 Jun 2012 17:23:30 +0200 Subject: [PATCH 03/26] Changes to make project library compatible --- res/layout/simplified_dialer.xml | 2 +- src/org/linphone/AbstractCalleesActivity.java | 11 ++- .../linphone/ConferenceDetailsActivity.java | 12 ++-- src/org/linphone/HistoryActivity.java | 10 ++- src/org/linphone/IncallActivity.java | 72 +++++++++---------- src/org/linphone/LinphoneActivity.java | 15 ++-- src/org/linphone/VideoCallActivity.java | 70 +++++++++--------- 7 files changed, 93 insertions(+), 99 deletions(-) diff --git a/res/layout/simplified_dialer.xml b/res/layout/simplified_dialer.xml index 264caf1df..7159abdb1 100644 --- a/res/layout/simplified_dialer.xml +++ b/res/layout/simplified_dialer.xml @@ -1,6 +1,6 @@ diff --git a/src/org/linphone/AbstractCalleesActivity.java b/src/org/linphone/AbstractCalleesActivity.java index c20fbe4dd..9c2058d8f 100644 --- a/src/org/linphone/AbstractCalleesActivity.java +++ b/src/org/linphone/AbstractCalleesActivity.java @@ -268,19 +268,16 @@ public abstract class AbstractCalleesActivity extends ListActivity implements Li @Override public void onClick(View v) { - switch (v.getId()) { - case R.id.toggleMuteMic: + int id = v.getId(); + if (id == R.id.toggleMuteMic) { lc().muteMic(((Checkable) v).isChecked()); - break; - case R.id.toggleSpeaker: + } + else if (id == R.id.toggleSpeaker) { if (((Checkable) v).isChecked()) { LinphoneManager.getInstance().routeAudioToSpeaker(); } else { LinphoneManager.getInstance().routeAudioToReceiver(); } - break; - default: - break; } } diff --git a/src/org/linphone/ConferenceDetailsActivity.java b/src/org/linphone/ConferenceDetailsActivity.java index a0bb02d8b..f9ebc4763 100644 --- a/src/org/linphone/ConferenceDetailsActivity.java +++ b/src/org/linphone/ConferenceDetailsActivity.java @@ -119,17 +119,17 @@ public class ConferenceDetailsActivity extends AbstractCalleesActivity { this.dialog = dialog; } public void onClick(View v) { - switch (v.getId()) { - case R.id.terminate_call: + int id = v.getId(); + if (id == R.id.terminate_call) { lc().terminateCall(call); - break; - case R.id.remove_from_conference: + } + else if (id == R.id.remove_from_conference) { lc().removeFromConference(call); if (LinphoneUtils.countConferenceCalls(lc()) == 0) { finish(); } - break; - default: + } + else { throw new RuntimeException("unknown id " + v.getId()); } if (dialog != null) dialog.dismiss(); diff --git a/src/org/linphone/HistoryActivity.java b/src/org/linphone/HistoryActivity.java index ffa379697..8be51601e 100644 --- a/src/org/linphone/HistoryActivity.java +++ b/src/org/linphone/HistoryActivity.java @@ -95,15 +95,13 @@ public class HistoryActivity extends ListActivity { @Override public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.menu_clear_history: + int id = item.getItemId(); + if (id == R.id.menu_clear_history) { LinphoneManager.getLc().clearCallLogs(); setListAdapter(new CallHistoryAdapter(this)); - - break; - default: + } + else { Log.e("Unknown menu item [",item,"]"); - break; } return false; diff --git a/src/org/linphone/IncallActivity.java b/src/org/linphone/IncallActivity.java index 3f2c3fdaf..f18a81b3e 100644 --- a/src/org/linphone/IncallActivity.java +++ b/src/org/linphone/IncallActivity.java @@ -332,29 +332,29 @@ public class IncallActivity extends AbstractCalleesActivity implements } public void onClick(View v) { - switch (v.getId()) { - case R.id.addCall: + int id = v.getId(); + if (id == R.id.addCall) { finish(); - break; - case R.id.incallHang: + } + else if (id == R.id.incallHang) { terminateCurrentCallOrConferenceOrAll(); - break; - case R.id.conf_header: + } + else if (id == R.id.conf_header) { boolean enterConf = !lc().isInConference(); enterConferenceAndVirtualConfView(enterConf); - break; - case R.id.conf_header_details: + } + else if (id == R.id.conf_header_details) { onLongClick(v); - break; - case R.id.incallNumpadShow: + } + else if (id == R.id.incallNumpadShow) { showDialog(numpadDialogId); - break; - case R.id.conf_simple_merge: + } + else if (id == R.id.conf_simple_merge) { if (!lc().soundResourcesLocked()) { lc().addAllToConference(); } - break; - case R.id.conf_simple_pause: + } + else if (id == R.id.conf_simple_pause) { LinphoneCall call = lc().getCurrentCall(); if (call != null) { lc().pauseCall(call); @@ -366,8 +366,8 @@ public class IncallActivity extends AbstractCalleesActivity implements lc().resumeCall(callToResume); } } - break; - case R.id.conf_simple_video: + } + else if (id == R.id.conf_simple_video) { LinphoneCall vCall = lc().getCurrentCall(); if (vCall != null) { if (!vCall.cameraEnabled() && vCall.getCurrentParamsCopy().getVideoEnabled()) { @@ -378,8 +378,8 @@ public class IncallActivity extends AbstractCalleesActivity implements LinphoneActivity.instance().startVideoActivity(vCall, 0); } } - break; - default: + } + else { // mic, speaker super.onClick(v); } @@ -431,21 +431,21 @@ public class IncallActivity extends AbstractCalleesActivity implements this.dialog = dialog; } public void onClick(View v) { - switch (v.getId()) { - case R.id.merge_to_conference: + int id =v.getId(); + if (id == R.id.merge_to_conference) { lc().addToConference(call); - break; - case R.id.terminate_call: + } + else if (id == R.id.terminate_call) { lc().terminateCall(call); - break; - case R.id.transfer_existing: + } + else if (id == R.id.transfer_existing) { prepareForTransferingExistingOrNewCall(call); - break; - case R.id.transfer_new: + } + else if (id == R.id.transfer_new) { openUriPicker(UriPickerActivity.EXTRA_PICKER_TYPE_TRANSFER, transferCallId); mCallToTransfer = call; - break; - case R.id.addVideo: + } + else if (id == R.id.addVideo) { if (!call.cameraEnabled() && call.getCurrentParamsCopy().getVideoEnabled()) { // NoWebcam mode, we let it this way LinphoneActivity.instance().startVideoActivity(call, 0); @@ -453,17 +453,17 @@ public class IncallActivity extends AbstractCalleesActivity implements else if (!LinphoneManager.getInstance().addVideo()) { LinphoneActivity.instance().startVideoActivity(call, 0); } - break; - case R.id.set_auth_token_verified: + } + else if (id == R.id.set_auth_token_verified) { call.setAuthenticationTokenVerified(true); - break; - case R.id.set_auth_token_not_verified: + } + else if (id == R.id.set_auth_token_not_verified) { call.setAuthenticationTokenVerified(false); - break; - case R.id.encrypted: + } + else if (id == R.id.encrypted) { call.setAuthenticationTokenVerified(!call.isAuthenticationTokenVerified()); - break; - default: + } + else { throw new RuntimeException("unknown id " + v.getId()); } if (dialog != null) dialog.dismiss(); diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index 628065d67..f422159aa 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -263,21 +263,22 @@ public class LinphoneActivity extends TabActivity implements ContactPicked @Override public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.menu_settings: + int id = item.getItemId(); + if (id == R.id.menu_settings) { startprefActivity(); return true; - case R.id.menu_exit: + } + else if (id == R.id.menu_exit) { finish(); stopService(new Intent(ACTION_MAIN) .setClass(this, LinphoneService.class)); - break; - case R.id.menu_about: + } + else if (id == R.id.menu_about) { startActivity(new Intent(ACTION_MAIN) .setClass(this, AboutActivity.class)); - default: + } + else { Log.e("Unknown menu item [",item,"]"); - break; } return false; diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java index 49e4b1a5d..e707f430f 100755 --- a/src/org/linphone/VideoCallActivity.java +++ b/src/org/linphone/VideoCallActivity.java @@ -260,12 +260,12 @@ public class VideoCallActivity extends Activity implements @Override public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.videocall_menu_back_to_dialer: + int id = item.getItemId(); + if (id == R.id.videocall_menu_back_to_dialer) { finish(); LinphoneActivity.instance().startIncallActivity(); - break; - case R.id.videocall_menu_change_resolution: + } + else if (id == R.id.videocall_menu_change_resolution) { LinphoneManager.getInstance().changeResolution(); // previous call will cause graph reconstruction -> regive preview // window @@ -273,11 +273,11 @@ public class VideoCallActivity extends Activity implements LinphoneManager.getLc() .setPreviewWindow(mVideoCaptureViewReady); rewriteChangeResolutionItem(item); - break; - case R.id.videocall_menu_terminate_call: + } + else if (id == R.id.videocall_menu_terminate_call) { LinphoneManager.getInstance().terminateCall(); - break; - case R.id.videocall_menu_toggle_camera: + } + else if (id == R.id.videocall_menu_toggle_camera) { boolean camEnabled = LinphoneManager.getInstance() .toggleEnableCamera(); updatePreview(camEnabled); @@ -291,21 +291,20 @@ public class VideoCallActivity extends Activity implements mVideoCaptureViewReady); } else LinphoneManager.getLc().setPreviewWindow(null); - break; - case R.id.videocall_menu_switch_camera: - int id = LinphoneManager.getLc().getVideoDevice(); - id = (id + 1) % AndroidCameraConfiguration.retrieveCameras().length; - LinphoneManager.getLc().setVideoDevice(id); + } + else if (id == R.id.videocall_menu_switch_camera) { + int videoDeviceId = LinphoneManager.getLc().getVideoDevice(); + videoDeviceId = (videoDeviceId + 1) % AndroidCameraConfiguration.retrieveCameras().length; + LinphoneManager.getLc().setVideoDevice(videoDeviceId); CallManager.getInstance().updateCall(); // previous call will cause graph reconstruction -> regive preview // window if (mVideoCaptureViewReady != null) LinphoneManager.getLc() .setPreviewWindow(mVideoCaptureViewReady); - break; - default: + } + else { Log.e("Unknown menu item [", item, "]"); - break; } return true; } @@ -500,48 +499,47 @@ public class VideoCallActivity extends Activity implements public void onClick(View v) { resetControlsLayoutExpiration(); - switch (v.getId()) { - case R.id.incallHang: + int id = v.getId(); + if (id == R.id.incallHang) { terminateCurrentCallOrConferenceOrAll(); - break; - case R.id.toggleSpeaker: + } + else if (id == R.id.toggleSpeaker) { if (((Checkable) v).isChecked()) { LinphoneManager.getInstance().routeAudioToSpeaker(); } else { LinphoneManager.getInstance().routeAudioToReceiver(); } - break; - case R.id.incallNumpadShow: + } + else if (id == R.id.incallNumpadShow) { showDialog(numpadDialogId); - break; - case R.id.toggleMuteMic: + } + else if (id == R.id.toggleMuteMic) { LinphoneManager.getLc().muteMic(((Checkable) v).isChecked()); - break; - case R.id.switch_camera: - int id = LinphoneManager.getLc().getVideoDevice(); - id = (id + 1) % AndroidCameraConfiguration.retrieveCameras().length; - LinphoneManager.getLc().setVideoDevice(id); + } + else if (id == R.id.switch_camera) { + int videoDeviceId = LinphoneManager.getLc().getVideoDevice(); + videoDeviceId = (videoDeviceId + 1) % AndroidCameraConfiguration.retrieveCameras().length; + LinphoneManager.getLc().setVideoDevice(videoDeviceId); CallManager.getInstance().updateCall(); // previous call will cause graph reconstruction -> regive preview // window if (mVideoCaptureViewReady != null) LinphoneManager.getLc() .setPreviewWindow(mVideoCaptureViewReady); - break; - case R.id.conf_simple_pause: + } + else if (id == R.id.conf_simple_pause) { finish(); LinphoneActivity.instance().startIncallActivity(); LinphoneManager.getLc().pauseCall(videoCall); - break; - case R.id.conf_simple_video: + } + else if (id == R.id.conf_simple_video) { LinphoneCallParams params = videoCall.getCurrentParamsCopy(); params.setVideoEnabled(false); LinphoneManager.getLc().updateCall(videoCall, params); - break; - case R.id.back: + } + else if (id == R.id.back) { finish(); LinphoneActivity.instance().startIncallActivity(); - break; } } From 334288b1fc5b1f95f69a76e0c570d5662ec7d5ad Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 5 Jun 2012 17:43:49 +0200 Subject: [PATCH 04/26] Allow override of onServiceReady method --- src/org/linphone/LinphoneLauncherActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/linphone/LinphoneLauncherActivity.java b/src/org/linphone/LinphoneLauncherActivity.java index 5de13dbde..e310858be 100644 --- a/src/org/linphone/LinphoneLauncherActivity.java +++ b/src/org/linphone/LinphoneLauncherActivity.java @@ -52,7 +52,7 @@ public class LinphoneLauncherActivity extends Activity { } } - private void onServiceReady() { + protected void onServiceReady() { startActivity(new Intent() .setClass(this, LinphoneActivity.class) .setData(getIntent().getData())); From 4d210420821b21c16d8d105c6a920ed17188650a Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 6 Jun 2012 13:25:04 +0200 Subject: [PATCH 05/26] Add parameter to LinphoneService to choose which activity to launch when incoming call --- .../linphone/LinphoneLauncherActivity.java | 2 ++ src/org/linphone/LinphoneService.java | 21 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/org/linphone/LinphoneLauncherActivity.java b/src/org/linphone/LinphoneLauncherActivity.java index e310858be..36537a443 100644 --- a/src/org/linphone/LinphoneLauncherActivity.java +++ b/src/org/linphone/LinphoneLauncherActivity.java @@ -53,6 +53,8 @@ public class LinphoneLauncherActivity extends Activity { } protected void onServiceReady() { + LinphoneService.instance().setActivityToLaunchOnIncomingReceived(LinphoneActivity.class); + startActivity(new Intent() .setClass(this, LinphoneActivity.class) .setData(getIntent().getData())); diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java index 57d8694a7..1f3230252 100644 --- a/src/org/linphone/LinphoneService.java +++ b/src/org/linphone/LinphoneService.java @@ -35,6 +35,7 @@ import org.linphone.core.Log; import org.linphone.core.OnlineStatus; import org.linphone.mediastream.Version; +import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; @@ -86,7 +87,7 @@ public final class LinphoneService extends Service implements LinphoneServiceLis /** * @throws RuntimeException service not instantiated */ - static LinphoneService instance() { + public static LinphoneService instance() { if (isReady()) return instance; throw new RuntimeException("LinphoneService not instantiated yet"); @@ -242,6 +243,7 @@ public final class LinphoneService extends Service implements LinphoneServiceLis private Object[] mSetForegroundArgs = new Object[1]; private Object[] mStartForegroundArgs = new Object[2]; private Object[] mStopForegroundArgs = new Object[1]; + private Class incomingReceivedActivity = LinphoneActivity.class; void invokeMethod(Method method, Object[] args) { try { @@ -438,7 +440,17 @@ public final class LinphoneService extends Service implements LinphoneServiceLis }); } } - + + public void setActivityToLaunchOnIncomingReceived(Class activity) { + incomingReceivedActivity = activity; + } + + protected void onIncomingReceived() { + //wakeup linphone + startActivity(new Intent() + .setClass(this, incomingReceivedActivity) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); + } public void onCallStateChanged(final LinphoneCall call, final State state, final String message) { if (instance == null) { @@ -446,10 +458,7 @@ public final class LinphoneService extends Service implements LinphoneServiceLis return; } if (state == LinphoneCall.State.IncomingReceived) { - //wakeup linphone - startActivity(new Intent() - .setClass(this, LinphoneActivity.class) - .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); + onIncomingReceived(); } if (state == State.CallUpdatedByRemote) { From fc93e7e661097135a3a1baf8f0f65f12e2f26cf8 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 6 Jun 2012 13:53:28 +0200 Subject: [PATCH 06/26] Link right activity to launch via the notification --- src/org/linphone/LinphoneService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java index 1f3230252..09240f529 100644 --- a/src/org/linphone/LinphoneService.java +++ b/src/org/linphone/LinphoneService.java @@ -443,6 +443,10 @@ public final class LinphoneService extends Service implements LinphoneServiceLis public void setActivityToLaunchOnIncomingReceived(Class activity) { incomingReceivedActivity = activity; + + Intent notifIntent = new Intent(this, incomingReceivedActivity); + mNotifContentIntent = PendingIntent.getActivity(this, 0, notifIntent, 0); + mNotif.setLatestEventInfo(this, mNotificationTitle,"", mNotifContentIntent); } protected void onIncomingReceived() { From 94e24a52302a74e5adc803ca621b6592e9656f5a Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 6 Jun 2012 15:37:29 +0200 Subject: [PATCH 07/26] Added method to disable Android default ringing --- src/org/linphone/LinphoneManager.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index a82485f53..5ad0303b0 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -1050,11 +1050,21 @@ public final class LinphoneManager implements LinphoneCoreListener { private boolean isRinging; + private boolean disableRinging = false; + + public void disableRinging() { + disableRinging = true; + } + private synchronized void startRinging() { + if (disableRinging ) { + return; + } + if (Hacks.needGalaxySAudioHack()) { mAudioManager.setMode(MODE_RINGTONE); } - + try { if (mAudioManager.shouldVibrate(VIBRATE_TYPE_RINGER) && mVibrator !=null) { long[] patern = {0,1000,1000}; From d5cee9f44dc7265b6f1c0b4df3f94c1055153aff Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 7 Jun 2012 09:35:01 +0200 Subject: [PATCH 08/26] Fix for ICS issue with native libs --- Makefile | 1 - jni/Android.mk | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 256f3606c..78a934236 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,6 @@ prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-sr generate-libs: $(NDK_PATH)/ndk-build BUILD_SILK=1 -j$(NUMCPUS) - rm $(TOPDIR)/libs/armeabi/liblinphone.so update-project: $(SDK_PATH)/android update project --path . diff --git a/jni/Android.mk b/jni/Android.mk index 766543a96..35e56b068 100755 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -116,8 +116,9 @@ ifeq ($(BUILD_SRTP), 1) include $(linphone-root-dir)/submodules/externals/build/srtp/Android.mk endif - +ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) include $(linphone-root-dir)/submodules/linphone/build/android/Android.mk +endif include $(linphone-root-dir)/submodules/linphone/build/android/Android-no-neon.mk _BUILD_AMR=0 From 481454c354b85ee71854a1e6c5eed05e7de7aa6d Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 11 Jun 2012 15:38:03 +0200 Subject: [PATCH 09/26] update libilbc because of certificate issue --- submodules/libilbc-rfc3951 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/libilbc-rfc3951 b/submodules/libilbc-rfc3951 index af32518af..a70714c2e 160000 --- a/submodules/libilbc-rfc3951 +++ b/submodules/libilbc-rfc3951 @@ -1 +1 @@ -Subproject commit af32518af41f97caee07070234a3475409b9a27d +Subproject commit a70714c2e8a1f6f9958450cb612e3dc9895981e7 From 48eeafa0fba4845dadd298cd7b48311a1fbd503a Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 12 Jun 2012 17:16:06 +0200 Subject: [PATCH 10/26] Use deprecated methods to support Android API older than 8 --- src/org/linphone/LinphoneActivity.java | 3 ++- src/org/linphone/VideoCallActivity.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index f422159aa..e8c93441b 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -101,7 +101,8 @@ public class LinphoneActivity extends TabActivity implements ContactPicked instance = this; setContentView(R.layout.main); - int rotation = getWindowManager().getDefaultDisplay().getRotation() * 90; + @SuppressWarnings("deprecation") + int rotation = getWindowManager().getDefaultDisplay().getOrientation(); // Inverse landscape rotation to initiate linphoneCore correctly if (rotation == 270) rotation = 90; diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java index e707f430f..4f54e5cc2 100755 --- a/src/org/linphone/VideoCallActivity.java +++ b/src/org/linphone/VideoCallActivity.java @@ -456,7 +456,7 @@ public class VideoCallActivity extends Activity implements private void resizePreview() { Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay(); - int rotation = display.getRotation(); + int rotation = display.getOrientation(); LayoutParams params; int w, h; From 1f14ee1dc33f3c515c0e3d946dd3d6cfae26ab5a Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 12 Jun 2012 18:19:40 +0200 Subject: [PATCH 11/26] update linphone submodules for bugfixes --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index e2379a670..23d589cec 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit e2379a67051d30fb061ce738cf83e4d81f45bb14 +Subproject commit 23d589cec01361b7c08528cd7433d5b01c0579bb From d2dc3e1cf9a26ecce8d53d9bfd6d721e971fe12c Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 15 Jun 2012 10:15:38 +0200 Subject: [PATCH 12/26] Use the right API for the rotation --- src/org/linphone/LinphoneActivity.java | 3 ++- src/org/linphone/VideoCallActivity.java | 4 +++- .../compatibility/API4Compatibility.java | 10 ++++++++++ .../compatibility/API8Compatibility.java | 10 ++++++++++ .../linphone/compatibility/Compatibility.java | 17 +++++++++++++++++ 5 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 src/org/linphone/compatibility/API4Compatibility.java create mode 100644 src/org/linphone/compatibility/API8Compatibility.java create mode 100644 src/org/linphone/compatibility/Compatibility.java diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index e8c93441b..755b9b0a9 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -22,6 +22,7 @@ package org.linphone; import static android.content.Intent.ACTION_MAIN; import org.linphone.LinphoneSimpleListener.LinphoneOnCallStateChangedListener; +import org.linphone.compatibility.Compatibility; import org.linphone.core.LinphoneCall; import org.linphone.core.LinphoneCall.State; import org.linphone.core.LinphoneCore; @@ -102,7 +103,7 @@ public class LinphoneActivity extends TabActivity implements ContactPicked setContentView(R.layout.main); @SuppressWarnings("deprecation") - int rotation = getWindowManager().getDefaultDisplay().getOrientation(); + int rotation = Compatibility.getRotation(getWindowManager().getDefaultDisplay()); // Inverse landscape rotation to initiate linphoneCore correctly if (rotation == 270) rotation = 90; diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java index 4f54e5cc2..7551bc229 100755 --- a/src/org/linphone/VideoCallActivity.java +++ b/src/org/linphone/VideoCallActivity.java @@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. package org.linphone; import org.linphone.LinphoneSimpleListener.LinphoneOnCallStateChangedListener; +import org.linphone.compatibility.Compatibility; import org.linphone.core.LinphoneCall; import org.linphone.core.LinphoneCall.State; import org.linphone.core.LinphoneCallParams; @@ -456,7 +457,8 @@ public class VideoCallActivity extends Activity implements private void resizePreview() { Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay(); - int rotation = display.getOrientation(); + + int rotation = Compatibility.getRotation(display); LayoutParams params; int w, h; diff --git a/src/org/linphone/compatibility/API4Compatibility.java b/src/org/linphone/compatibility/API4Compatibility.java new file mode 100644 index 000000000..62aad0f7b --- /dev/null +++ b/src/org/linphone/compatibility/API4Compatibility.java @@ -0,0 +1,10 @@ +package org.linphone.compatibility; + +import android.view.Display; + +public class API4Compatibility { + + public static int getRotation(Display display) { + return display.getOrientation(); + } +} diff --git a/src/org/linphone/compatibility/API8Compatibility.java b/src/org/linphone/compatibility/API8Compatibility.java new file mode 100644 index 000000000..07567b09d --- /dev/null +++ b/src/org/linphone/compatibility/API8Compatibility.java @@ -0,0 +1,10 @@ +package org.linphone.compatibility; + +import android.view.Display; + +public class API8Compatibility { + + public static int getRotation(Display display) { + return display.getRotation(); + } +} diff --git a/src/org/linphone/compatibility/Compatibility.java b/src/org/linphone/compatibility/Compatibility.java new file mode 100644 index 000000000..ce05a237d --- /dev/null +++ b/src/org/linphone/compatibility/Compatibility.java @@ -0,0 +1,17 @@ +package org.linphone.compatibility; + +import org.linphone.mediastream.Version; + +import android.view.Display; + +public class Compatibility { + + public static int getRotation(Display display) { + if (Version.sdkStrictlyBelow(8)) { + return API4Compatibility.getRotation(display); + } else { + return API8Compatibility.getRotation(display); + } + } + +} From 74de890a09c16d47da86e935c79aedeb63b3be12 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 15 Jun 2012 11:44:37 +0200 Subject: [PATCH 13/26] Version updated in manifest --- AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 930c4dde9..b9c0546fc 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="1320" android:versionName="1.3.2" android:installLocation="auto"> From c00e54037807b7d54657b42c70a71916bd430609 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 18 Jun 2012 17:00:26 +0200 Subject: [PATCH 14/26] add tunnelSetHttpProxy() --- .../linphone/core/LinphoneCallLogImpl.java | 10 +++++++++ src/org/linphone/core/LinphoneCoreImpl.java | 21 +++++++++++++++++++ submodules/linphone | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/org/linphone/core/LinphoneCallLogImpl.java b/src/org/linphone/core/LinphoneCallLogImpl.java index 1bdb84720..895e27a38 100644 --- a/src/org/linphone/core/LinphoneCallLogImpl.java +++ b/src/org/linphone/core/LinphoneCallLogImpl.java @@ -45,5 +45,15 @@ class LinphoneCallLogImpl implements LinphoneCallLog { public CallStatus getStatus() { throw new RuntimeException("not implemented yet"); } + @Override + public String getStartDate() { + // TODO Auto-generated method stub + return null; + } + @Override + public int getCallDuration() { + // TODO Auto-generated method stub + return 0; + } } diff --git a/src/org/linphone/core/LinphoneCoreImpl.java b/src/org/linphone/core/LinphoneCoreImpl.java index 54f6383a0..d02f69cfb 100644 --- a/src/org/linphone/core/LinphoneCoreImpl.java +++ b/src/org/linphone/core/LinphoneCoreImpl.java @@ -704,4 +704,25 @@ class LinphoneCoreImpl implements LinphoneCore { { setCpuCountNative(count); } + private native void tunnelSetHttpProxyNative(long nativePtr, String proxy_host, int port, String username, String password); + @Override + public void tunnelSetHttpProxy(String proxy_host, int port, + String username, String password) { + tunnelSetHttpProxyNative(nativePtr,proxy_host, port, username, password); + } + @Override + public void removeCallLog(LinphoneCallLog log) { + // TODO Auto-generated method stub + + } + @Override + public int getMissedCallsCount() { + // TODO Auto-generated method stub + return 0; + } + @Override + public void resetMissedCallsCount() { + // TODO Auto-generated method stub + + } } diff --git a/submodules/linphone b/submodules/linphone index 23d589cec..80e4341e0 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 23d589cec01361b7c08528cd7433d5b01c0579bb +Subproject commit 80e4341e05c2410d4b3e64ac8c2b997910ef7075 From 404c11e86dbf67e287ef23c5f12109ed0d2d09fc Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 21 Jun 2012 10:41:02 +0200 Subject: [PATCH 15/26] update linphone submodule for build fix --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 80e4341e0..9e3835ff1 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 80e4341e05c2410d4b3e64ac8c2b997910ef7075 +Subproject commit 9e3835ff16a7f5fdaf02e7e767bb9de01850e487 From fdc2d8ac7345dc52317e13a382932f792096c717 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 26 Jun 2012 11:06:31 +0200 Subject: [PATCH 16/26] submodule linphone updated --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 9e3835ff1..1434b9748 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 9e3835ff16a7f5fdaf02e7e767bb9de01850e487 +Subproject commit 1434b9748e100cdb27a4112c408ae1aaffa73120 From 25823f62a2d2e719962cfc74d56853d998e9c944 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 26 Jun 2012 11:11:38 +0200 Subject: [PATCH 17/26] linphone updated to fix compil issue --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 1434b9748..d93727e87 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 1434b9748e100cdb27a4112c408ae1aaffa73120 +Subproject commit d93727e87c3d872951a74de1681b7475bcfb2614 From e7344cb11fccc029b9be67ee20304743be92f8dc Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 27 Jun 2012 10:19:59 +0200 Subject: [PATCH 18/26] linphone updated + takeSnapshot and zoomVideo implementation added --- src/org/linphone/core/LinphoneCallImpl.java | 10 ++++++++++ submodules/linphone | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/org/linphone/core/LinphoneCallImpl.java b/src/org/linphone/core/LinphoneCallImpl.java index 008b19df4..27ed253ef 100644 --- a/src/org/linphone/core/LinphoneCallImpl.java +++ b/src/org/linphone/core/LinphoneCallImpl.java @@ -155,4 +155,14 @@ class LinphoneCallImpl implements LinphoneCall { public float getPlayVolume() { return getPlayVolume(nativePtr); } + + private native void takeSnapshot(long nativePtr, String path); + public void takeSnapshot(String path) { + takeSnapshot(nativePtr, path); + } + + private native void zoomVideo(long nativePtr, float factor, float cx, float cy); + public void zoomVideo(float factor, float cx, float cy) { + zoomVideo(nativePtr, factor, cx, cy); + } } diff --git a/submodules/linphone b/submodules/linphone index d93727e87..fb9d2bebd 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit d93727e87c3d872951a74de1681b7475bcfb2614 +Subproject commit fb9d2bebd321c5fde40a0d4604bbaea1a6403978 From 3fa3dbf624de28428d7ee330443d3cfe7ea41838 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 27 Jun 2012 10:59:22 +0200 Subject: [PATCH 19/26] Update linphone to fix compilation issue --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index fb9d2bebd..e2510af6a 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit fb9d2bebd321c5fde40a0d4604bbaea1a6403978 +Subproject commit e2510af6ae112852306d58f43967b172faa5c3d4 From 282e3a726bef8542cc3620b4876db9c92ed14928 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 27 Jun 2012 14:46:51 +0200 Subject: [PATCH 20/26] linphone submodule updated --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index e2510af6a..fc2940d52 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit e2510af6ae112852306d58f43967b172faa5c3d4 +Subproject commit fc2940d526e93ea733fcebf4baa28631aa215564 From f4a86fa9de4f9e455fba10a64ecf06d46d7c956f Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 28 Jun 2012 13:36:54 +0200 Subject: [PATCH 21/26] Linphone submodule updated --- src/org/linphone/LinphoneManager.java | 6 ++++++ src/org/linphone/core/LinphoneCoreImpl.java | 24 ++++++++++++--------- submodules/linphone | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 5ad0303b0..a6ebb5315 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -1438,4 +1438,10 @@ public final class LinphoneManager implements LinphoneCoreListener { super(throwable); } } + + @Override + public void notifyReceived(LinphoneCore lc, LinphoneCall call, + LinphoneAddress from, byte[] event) { + + } } diff --git a/src/org/linphone/core/LinphoneCoreImpl.java b/src/org/linphone/core/LinphoneCoreImpl.java index d02f69cfb..4a962e52e 100644 --- a/src/org/linphone/core/LinphoneCoreImpl.java +++ b/src/org/linphone/core/LinphoneCoreImpl.java @@ -20,7 +20,6 @@ package org.linphone.core; import java.io.File; import java.io.IOException; -import java.util.Vector; class LinphoneCoreImpl implements LinphoneCore { @@ -710,19 +709,24 @@ class LinphoneCoreImpl implements LinphoneCore { String username, String password) { tunnelSetHttpProxyNative(nativePtr,proxy_host, port, username, password); } - @Override + + private native void removeCallLog(long nativePtr, LinphoneCallLog log); public void removeCallLog(LinphoneCallLog log) { - // TODO Auto-generated method stub - + removeCallLog(nativePtr, log); } - @Override + + private native int getMissedCallsCount(long nativePtr); public int getMissedCallsCount() { - // TODO Auto-generated method stub - return 0; + return getMissedCallsCount(nativePtr); } - @Override + + private native void resetMissedCallsCount(long nativePtr); public void resetMissedCallsCount() { - // TODO Auto-generated method stub - + resetMissedCallsCount(nativePtr); + } + + private native void refreshRegisters(long nativePtr); + public void refreshRegisters() { + refreshRegisters(nativePtr); } } diff --git a/submodules/linphone b/submodules/linphone index fc2940d52..7d105b10d 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit fc2940d526e93ea733fcebf4baa28631aa215564 +Subproject commit 7d105b10d934e194796bdaaabdfd9f185261d309 From 238b43a92a49e8fc1d5a80a0659ac7edbcb78db2 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 28 Jun 2012 14:39:55 +0200 Subject: [PATCH 22/26] Fix tutorials --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 7d105b10d..5acfbd0ac 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 7d105b10d934e194796bdaaabdfd9f185261d309 +Subproject commit 5acfbd0ac39b1d134860eee554dfdec2c88a818e From d1c6d1fc3eaa69fd35ab333bf68c8c8e23d30d44 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 28 Jun 2012 14:55:32 +0200 Subject: [PATCH 23/26] Added missing JNI method refreshRegisters --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 5acfbd0ac..9f02a12f4 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 5acfbd0ac39b1d134860eee554dfdec2c88a818e +Subproject commit 9f02a12f4641989a225ee77bf6f403cd1c57d9e6 From ae89238ff966ab220cc5cfba2c67ac25745366cb Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 29 Jun 2012 09:53:20 +0200 Subject: [PATCH 24/26] Added MJPEG encoder to ffmepg to be able to take snapshots --- submodules/externals/build/ffmpeg/Android_libavcodec.mk | 1 + submodules/externals/build/ffmpeg/config.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/submodules/externals/build/ffmpeg/Android_libavcodec.mk b/submodules/externals/build/ffmpeg/Android_libavcodec.mk index ef2de0ac0..dab39a7e8 100755 --- a/submodules/externals/build/ffmpeg/Android_libavcodec.mk +++ b/submodules/externals/build/ffmpeg/Android_libavcodec.mk @@ -70,6 +70,7 @@ LOCAL_SRC_FILES = \ libavcodec/jrevdct.c \ libavcodec/mjpeg.c.arm \ libavcodec/mjpegdec.c.arm \ + libavcodec/mjpegenc.c.arm \ libavcodec/motion_est.c.arm \ libavcodec/mpeg12data.c \ libavcodec/mpeg4video.c.arm \ diff --git a/submodules/externals/build/ffmpeg/config.h b/submodules/externals/build/ffmpeg/config.h index 7a9591f6a..86eb0bae3 100644 --- a/submodules/externals/build/ffmpeg/config.h +++ b/submodules/externals/build/ffmpeg/config.h @@ -515,7 +515,7 @@ #define CONFIG_HUFFYUV_ENCODER 0 #define CONFIG_JPEGLS_ENCODER 0 #define CONFIG_LJPEG_ENCODER 0 -#define CONFIG_MJPEG_ENCODER 0 +#define CONFIG_MJPEG_ENCODER 1 #define CONFIG_MPEG1VIDEO_ENCODER 0 #define CONFIG_MPEG2VIDEO_ENCODER 0 #define CONFIG_MPEG4_ENCODER 1 From faf952695b0f75c8b75d5d1ca158d3cfed29fa75 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 3 Jul 2012 13:55:10 +0200 Subject: [PATCH 25/26] build.xml updated --- build.xml | 1080 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 628 insertions(+), 452 deletions(-) diff --git a/build.xml b/build.xml index 5d36bb5e7..c2405aafc 100644 --- a/build.xml +++ b/build.xml @@ -1,92 +1,13 @@ - - - - - - - - - - - - - - - - - - - + + + - - - + + + + + + + + + + + + + + + + + + + - + - + + + @@ -141,41 +94,7 @@ - - - - - - - - - - - - - - - - - + @@ -187,7 +106,9 @@ - + + + @@ -196,16 +117,22 @@ - + + + + + + + @@ -217,8 +144,13 @@ - + + + + + + + @@ -255,7 +187,20 @@ - + + + + + + + + + + + + + @@ -268,7 +213,7 @@ - @{elseText} + @{elseText} @@ -290,7 +235,7 @@ - @{elseText} + @{elseText} @@ -317,7 +262,7 @@ - + @@ -325,9 +270,7 @@ + verbose="${verbose}"> @@ -359,9 +302,9 @@ buildType="${build.is.packaging.debug}/${build.is.signing.debug}"> - + - + @@ -385,7 +328,7 @@ - Running tests ... + Running tests ... @@ -396,7 +339,7 @@ - + @@ -423,7 +366,7 @@ - Uninstalling @{app.package} from the default emulator or device... + Uninstalling @{app.package} from the default emulator or device... @@ -432,88 +375,126 @@ - + + + - - + + + + + + + + + + + + + Project Name: ${ant.project.name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Switching between debug and non debug build: Deleting previous compilation output... + + + + + + + + + + + + + Switching from instrumented to non-instrumented build: Deleting previous compilation output... + + + + + + + + + + + + + + - + - + - + - - - + - - - - - - - - - - - - - - - - - Gathering info for ${ant.project.name}... - - - - - - - - - - - - - + + + + + - + + + + + @@ -525,30 +506,79 @@ - - - - - - + + + + + + + Resolving Build Target for ${ant.project.name}... + + + + + + + ---------- + Creating output directories if needed... + + + + + + + + + + ---------- + Resolving Dependencies for ${ant.project.name}... + - + + + + - Building Libraries - - - ############################################ - **** Back to project ${ant.project.name} **** - ############################################ + + + + + + ---------- + Building Libraries with '${project.libraries.target}'... + + + + + + + @@ -561,53 +591,24 @@ - Building tested project at ${tested.project.absolute.dir} + ---------- + Building tested project at ${tested.project.absolute.dir} with '${tested.project.target}'... - - ############################################ - **** Back to project ${ant.project.name} **** - ############################################ + + + + + + + - - - - - - - - - - - - - - - - - - - - Switching from instrumented to non-instrumented build. - Deleting previous compilation output: - - - - - Creating output directories if needed... - - - - - - - - + + + + + - ---------- - Handling aidl files... - + Handling aidl files... + - ---------- - Handling RenderScript files... + ---------- + Handling RenderScript files... + resFolder="${out.res.absolute.dir}/raw" + targetApi="${project.minSdkVersion}" + optLevel="${renderscript.opt.level}" + buildType="${build.is.packaging.debug}" + previousBuildType="${build.last.is.packaging.debug}"> - ---------- - Handling Resources... + ---------- + Handling Resources... + libraryResFolderPathRefid="project.library.res.folder.path" + libraryPackagesRefid="project.library.packages" + ignoreAssets="${aapt.ignore.assets}" + proguardFile="${out.absolute.dir}/proguard.txt"> + + ---------- + Handling BuildConfig class... + + @@ -660,68 +685,78 @@ - - - - - - - + + + + + + classpathref="project.javac.classpath" + fork="${need.javac.fork}"> - - - + + + + + + Instrumenting classes from ${out.absolute.dir}/classes... + + + + + + + + + + + + + + + + + - Creating library output jar file... + Creating library output jar file... - Custom jar packaging exclusion: ${android.package.excludes} + Custom jar packaging exclusion: ${android.package.excludes} + + + - + - - - - Instrumenting classes from ${out.absolute.dir}/classes... - - - - - - - - @@ -762,7 +797,7 @@ all the jar files separated by a platform path-separator. Each path must be quoted if it contains spaces. --> - + @@ -772,31 +807,43 @@ - + - + - + + + + + + + - @${proguard.config} - -injars ${project.jars} + -include "${proguard.configcmd}" + -include "${out.absolute.dir}/proguard.txt" + -injars ${project.all.classes.value} -outjars "${obfuscated.jar.file}" - -libraryjars ${android.libraryjars} + -libraryjars ${project.target.classpath.value} -dump "${obfuscate.absolute.dir}/dump.txt" -printseeds "${obfuscate.absolute.dir}/seeds.txt" -printusage "${obfuscate.absolute.dir}/usage.txt" @@ -846,33 +893,55 @@ Some custom apk with specific configuration have been declared in default.properties. --> - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -896,25 +965,44 @@ + + + - - + + + + - + - + + + + + + + + + + + + + + @@ -922,6 +1010,9 @@ + + + @@ -930,14 +1021,15 @@ - + - Debug Package: ${out.final.file} + Debug Package: ${out.final.file} + @@ -964,16 +1056,27 @@ - + - - - + + + + + + + + + + + - + + + @@ -993,15 +1096,16 @@ - No key.store and key.alias properties found in build.properties. - Please sign ${out.packaged.file} manually - and run zipalign from the Android SDK tools. + No key.store and key.alias properties found in build.properties. + Please sign ${out.packaged.file} manually + and run zipalign from the Android SDK tools. + proguard.config is ${proguard.config} @@ -1010,6 +1114,7 @@ + Proguard.config is enabled @@ -1020,6 +1125,7 @@ + @@ -1028,12 +1134,15 @@ - + + + ************************************************* @@ -1049,54 +1158,44 @@ - - - - - - - - - - - - - - - + - Signing final apk... - Signing final apk... + + keypass="${key.alias.password}"/> - - Release Package: ${out.final.file} + + Release Package: ${out.final.file} - + + + + + + + @@ -1117,13 +1217,15 @@ - Instrumented Package: ${out.final.file} + Instrumented Package: ${out.final.file} - + + + @@ -1131,43 +1233,67 @@ - - + - + + + + - + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + value="/data/data/${tested.project.app.package}/coverage.ec" /> @@ -1179,30 +1305,37 @@ - Downloading coverage file into project directory... + Downloading coverage file into project directory... - + - Extracting coverage report... + Extracting coverage report... + + + + + + + + + - + - - - - + + - + - Cleaning up temporary files... - - - Saving the report file in ${basedir}/coverage/coverage.html + Cleaning up temporary files... + + + Saving the report file in ${out.absolute.dir}/coverage.html @@ -1211,7 +1344,9 @@ - + + + - + - Installing ${out.final.file} onto default emulator or device... + Installing ${out.final.file} onto default emulator or device... + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1273,45 +1432,50 @@ description="Installs (only) the release package." /> - - - - - - + - + - Could not find application package in manifest. Cannot run 'adb uninstall'. + - + + + + + + + + + + + expression="/manifest/@package" output="tested.project.app.package" /> - + - + - Could not find tested application package in manifest. Cannot run 'adb uninstall'. + @@ -1320,6 +1484,10 @@ + + + + @@ -1330,13 +1498,19 @@ (tested projects and libraries)at the same time using: 'ant all clean' debug: Builds the application and signs it with a debug key. + The 'nodeps' target can be used to only build the + current project and ignore the libraries using: + 'ant nodeps debug' release: Builds the application. The generated apk file must be signed before it is published. + The 'nodeps' target can be used to only build the + current project and ignore the libraries using: + 'ant nodeps release' instrument:Builds an instrumented package and signs it with a debug key. test: Runs the tests. Project must be a test project and must have been built. Typical usage would be: - ant [emma] debug installt test + ant [emma] debug install test emma: Transiently enables code coverage for subsequent targets. install: Installs the newly build package. Must either be used @@ -1348,8 +1522,10 @@ installd: Installs (only) the debug package. installr: Installs (only) the release package. installi: Installs (only) the instrumented package. - installt: Installs (only) the test and tested packages. + installt: Installs (only) the test and tested packages (unless + nodeps is used as well. uninstall: Uninstalls the application from a running emulator or - device. + device. Also uninstall tested package if applicable + unless 'nodeps' is used as well. From 16236cd10664c2dad269a5c0c99c853c8986841a Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 3 Jul 2012 14:31:39 +0200 Subject: [PATCH 26/26] Fix release target in build.xml --- build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index c2405aafc..7a9ce0db0 100644 --- a/build.xml +++ b/build.xml @@ -1188,8 +1188,8 @@ -