From 0d3599f7453899a38f8648cff5a920938ed56b92 Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Fri, 6 Oct 2017 10:20:59 +0200 Subject: [PATCH] Clean headers --- .../linphone/mini/LinphoneMiniActivity.java | 18 ++--- .../linphone/mini/LinphoneMiniManager.java | 68 ++++++++--------- .../org/linphone/mini/LinphoneMiniUtils.java | 12 ++- src/android/org/linphone/AboutFragment.java | 21 +++--- .../org/linphone/AccountEnableReceiver.java | 9 +-- .../linphone/AccountPreferencesFragment.java | 5 +- .../org/linphone/BandwidthManager.java | 9 ++- .../org/linphone/BluetoothManager.java | 6 +- src/android/org/linphone/BootReceiver.java | 5 +- src/android/org/linphone/CallActivity.java | 7 +- .../org/linphone/CallAudioFragment.java | 6 +- .../org/linphone/CallIncomingActivity.java | 5 +- src/android/org/linphone/CallManager.java | 30 ++++---- .../org/linphone/CallOutgoingActivity.java | 5 +- .../org/linphone/CallVideoFragment.java | 75 +++++++++---------- src/android/org/linphone/ChatFragment.java | 3 +- .../org/linphone/ChatListFragment.java | 7 +- .../org/linphone/ContactDetailsFragment.java | 7 +- .../org/linphone/ContactEditorFragment.java | 3 +- .../org/linphone/ContactsListFragment.java | 8 +- src/android/org/linphone/ContactsManager.java | 6 +- src/android/org/linphone/DialerFragment.java | 7 +- src/android/org/linphone/DozeReceiver.java | 19 +++++ src/android/org/linphone/EmptyFragment.java | 8 +- .../org/linphone/FragmentsAvailable.java | 7 +- .../org/linphone/HistoryDetailFragment.java | 7 +- .../org/linphone/HistoryListFragment.java | 7 +- src/android/org/linphone/HookReceiver.java | 19 +++++ .../org/linphone/KeepAliveReceiver.java | 5 +- .../org/linphone/LinphoneActivity.java | 5 +- src/android/org/linphone/LinphoneContact.java | 8 +- .../org/linphone/LinphoneException.java | 5 +- .../org/linphone/LinphoneGenericActivity.java | 19 +++++ .../linphone/LinphoneLauncherActivity.java | 9 +-- src/android/org/linphone/LinphoneManager.java | 21 +++++- .../org/linphone/LinphoneNumberOrAddress.java | 23 +++--- .../org/linphone/LinphonePreferences.java | 5 +- src/android/org/linphone/LinphoneService.java | 10 +-- src/android/org/linphone/LinphoneUtils.java | 7 +- src/android/org/linphone/NetworkManager.java | 9 +-- .../org/linphone/OutgoingCallReceiver.java | 18 +++++ .../linphone/PhoneStateChangedReceiver.java | 8 +- .../org/linphone/PreferencesMigrator.java | 5 +- .../org/linphone/SettingsFragment.java | 5 +- src/android/org/linphone/StatusFragment.java | 5 +- .../org/linphone/UIThreadDispatcher.java | 7 +- .../linphone/assistant/AssistantActivity.java | 5 +- .../assistant/AssistantFragmentsEnum.java | 6 +- .../assistant/CodecDownloaderFragment.java | 5 +- .../assistant/CountryListFragment.java | 19 +++++ .../CreateAccountActivationFragment.java | 6 +- .../CreateAccountCodeActivationFragment.java | 2 +- .../assistant/CreateAccountFragment.java | 5 +- .../EchoCancellerCalibrationFragment.java | 9 +-- .../assistant/LinphoneLoginFragment.java | 5 +- .../org/linphone/assistant/LoginFragment.java | 6 +- .../assistant/RemoteProvisioningActivity.java | 9 +-- .../assistant/RemoteProvisioningFragment.java | 12 +-- .../RemoteProvisioningLoginActivity.java | 17 ++--- .../linphone/assistant/WelcomeFragment.java | 5 +- .../linphone/compatibility/ApiElevenPlus.java | 4 +- .../compatibility/ApiNineteenPlus.java | 4 +- .../compatibility/ApiSixteenPlus.java | 4 +- .../compatibility/ApiTwentyOnePlus.java | 4 +- .../compatibility/ApiTwentySixPlus.java | 3 - .../compatibility/ApiTwentyThreePlus.java | 4 +- .../linphone/compatibility/Compatibility.java | 4 +- .../CompatibilityScaleGestureDetector.java | 33 ++++++-- .../CompatibilityScaleGestureListener.java | 18 +++++ .../linphone/firebase/FirebaseIdService.java | 4 +- .../linphone/firebase/FirebaseMessaging.java | 8 +- src/android/org/linphone/gcm/GCMReceiver.java | 6 +- src/android/org/linphone/gcm/GCMService.java | 5 +- .../purchase/InAppPurchaseActivity.java | 13 ++-- .../purchase/InAppPurchaseFragment.java | 4 +- .../purchase/InAppPurchaseHelper.java | 71 +++++++++--------- .../purchase/InAppPurchaseListFragment.java | 2 +- .../purchase/InAppPurchaseListener.java | 15 ++-- .../purchase/InAppPurchaseListenerBase.java | 33 ++++++-- .../org/linphone/purchase/Purchasable.java | 21 +++--- .../linphone/sync/AuthenticationService.java | 2 +- .../org/linphone/sync/Authenticator.java | 2 +- .../org/linphone/sync/SyncAdapter.java | 2 +- .../org/linphone/sync/SyncService.java | 2 +- .../tutorials/AndroidTutorialNotifier.java | 13 ++-- .../tutorials/TutorialCardDavSync.java | 19 +++++ .../tutorials/TutorialChatRoomActivity.java | 17 ++--- .../tutorials/TutorialLauncherActivity.java | 15 ++-- .../TutorialRegistrationActivity.java | 17 ++--- src/android/org/linphone/ui/AddressAware.java | 11 +-- src/android/org/linphone/ui/AddressText.java | 23 +++--- src/android/org/linphone/ui/CallButton.java | 14 ++-- src/android/org/linphone/ui/Digit.java | 27 +++---- .../org/linphone/ui/LedPreference.java | 7 +- .../org/linphone/ui/LinphoneOverlay.java | 19 +++++ .../org/linphone/ui/LinphoneScrollView.java | 5 +- .../org/linphone/ui/LinphoneSliders.java | 33 ++++---- src/android/org/linphone/ui/Numpad.java | 9 +-- .../linphone/ui/PreferencesListFragment.java | 54 ++++++------- .../org/linphone/ui/ScrollViewListener.java | 6 +- .../org/linphone/xmlrpc/XmlRpcHelper.java | 63 ++++++++++------ .../org/linphone/xmlrpc/XmlRpcListener.java | 19 +++++ .../linphone/xmlrpc/XmlRpcListenerBase.java | 49 ++++++++---- .../org/linphone/AccountAssistant.java | 22 +++++- .../org/linphone/AccountManagement.java | 23 +++++- .../org/linphone/AinitTestEnv.java | 22 +++++- src/androidTest/org/linphone/CallsAudio.java | 22 +++++- src/androidTest/org/linphone/CallsVideo.java | 22 +++++- src/androidTest/org/linphone/Chat.java | 23 +++++- .../org/linphone/ConferenceAndMultiCall.java | 26 +++++-- src/androidTest/org/linphone/Contacts.java | 22 +++++- src/androidTest/org/linphone/History.java | 22 +++++- .../org/linphone/LinphoneTestManager.java | 19 +++++ src/androidTest/org/linphone/SampleTest.java | 22 +++++- src/androidTest/org/linphone/Transfer.java | 19 +++++ 115 files changed, 967 insertions(+), 659 deletions(-) diff --git a/sample/src/org/linphone/mini/LinphoneMiniActivity.java b/sample/src/org/linphone/mini/LinphoneMiniActivity.java index 3c3e32e4b..2c69ecd91 100644 --- a/sample/src/org/linphone/mini/LinphoneMiniActivity.java +++ b/sample/src/org/linphone/mini/LinphoneMiniActivity.java @@ -1,7 +1,8 @@ package org.linphone.mini; + /* LinphoneMiniActivity.java -Copyright (C) 2014 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -21,33 +22,30 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import android.app.Activity; import android.os.Bundle; -/** - * @author Sylvain Berfini - */ public class LinphoneMiniActivity extends Activity { private LinphoneMiniManager mManager; - + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - + mManager = new LinphoneMiniManager(this); } - + @Override protected void onResume() { super.onResume(); } - + @Override protected void onPause() { super.onPause(); } - + @Override protected void onDestroy() { mManager.destroy(); - + super.onDestroy(); } } diff --git a/sample/src/org/linphone/mini/LinphoneMiniManager.java b/sample/src/org/linphone/mini/LinphoneMiniManager.java index ed085f06e..24b480488 100644 --- a/sample/src/org/linphone/mini/LinphoneMiniManager.java +++ b/sample/src/org/linphone/mini/LinphoneMiniManager.java @@ -1,7 +1,8 @@ package org.linphone.mini; + /* LinphoneMiniManager.java -Copyright (C) 2014 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -51,25 +52,22 @@ import org.linphone.mediastream.video.capture.hwconf.AndroidCameraConfiguration. import android.content.Context; import android.content.pm.PackageManager.NameNotFoundException; -/** - * @author Sylvain Berfini - */ public class LinphoneMiniManager implements LinphoneCoreListener { private static LinphoneMiniManager mInstance; private Context mContext; private LinphoneCore mLinphoneCore; private Timer mTimer; - + public LinphoneMiniManager(Context c) { mContext = c; LinphoneCoreFactory.instance().setDebugMode(true, "Linphone Mini"); - + try { String basePath = mContext.getFilesDir().getAbsolutePath(); copyAssetsFromPackage(basePath); mLinphoneCore = LinphoneCoreFactory.instance().createLinphoneCore(this, basePath + "/.linphonerc", basePath + "/linphonerc", null, mContext); initLinphoneCoreValues(basePath); - + setUserAgent(); setFrontCamAsDefault(); startIterate(); @@ -79,11 +77,11 @@ public class LinphoneMiniManager implements LinphoneCoreListener { } catch (IOException e) { } } - + public static LinphoneMiniManager getInstance() { return mInstance; } - + public void destroy() { try { mTimer.cancel(); @@ -96,7 +94,7 @@ public class LinphoneMiniManager implements LinphoneCoreListener { mInstance = null; } } - + private void startIterate() { TimerTask lTask = new TimerTask() { @Override @@ -104,12 +102,12 @@ public class LinphoneMiniManager implements LinphoneCoreListener { mLinphoneCore.iterate(); } }; - + /*use schedule instead of scheduleAtFixedRate to avoid iterate from being call in burst after cpu wake up*/ mTimer = new Timer("LinphoneMini scheduler"); - mTimer.schedule(lTask, 0, 20); + mTimer.schedule(lTask, 0, 20); } - + private void setUserAgent() { try { String versionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName; @@ -120,7 +118,7 @@ public class LinphoneMiniManager implements LinphoneCoreListener { } catch (NameNotFoundException e) { } } - + private void setFrontCamAsDefault() { int camId = 0; AndroidCamera[] cameras = AndroidCameraConfiguration.retrieveCameras(); @@ -130,7 +128,7 @@ public class LinphoneMiniManager implements LinphoneCoreListener { } mLinphoneCore.setVideoDevice(camId); } - + private void copyAssetsFromPackage(String basePath) throws IOException { LinphoneMiniUtils.copyIfNotExist(mContext, R.raw.oldphone_mono, basePath + "/oldphone_mono.wav"); LinphoneMiniUtils.copyIfNotExist(mContext, R.raw.ringback, basePath + "/ringback.wav"); @@ -140,21 +138,21 @@ public class LinphoneMiniManager implements LinphoneCoreListener { LinphoneMiniUtils.copyIfNotExist(mContext, R.raw.lpconfig, basePath + "/lpconfig.xsd"); LinphoneMiniUtils.copyIfNotExist(mContext, R.raw.rootca, basePath + "/rootca.pem"); } - + private void initLinphoneCoreValues(String basePath) { mLinphoneCore.setContext(mContext); mLinphoneCore.setRing(null); mLinphoneCore.setRootCA(basePath + "/rootca.pem"); mLinphoneCore.setPlayFile(basePath + "/toy_mono.wav"); mLinphoneCore.setChatDatabasePath(basePath + "/linphone-history.db"); - + int availableCores = Runtime.getRuntime().availableProcessors(); mLinphoneCore.setCpuCount(availableCores); } - + @Override public void authInfoRequested(LinphoneCore lc, String realm, String username) { - + } @Override @@ -171,13 +169,13 @@ public class LinphoneMiniManager implements LinphoneCoreListener { @Override public void callStatsUpdated(LinphoneCore lc, LinphoneCall call, LinphoneCallStats stats) { - + } @Override public void callEncryptionChanged(LinphoneCore lc, LinphoneCall call, boolean encrypted, String authenticationToken) { - + } @Override @@ -189,18 +187,18 @@ public class LinphoneMiniManager implements LinphoneCoreListener { @Override public void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf, String url) { - + } @Override public void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf) { - + } @Override public void textReceived(LinphoneCore lc, LinphoneChatRoom cr, LinphoneAddress from, String message) { - + } @Override @@ -216,37 +214,37 @@ public class LinphoneMiniManager implements LinphoneCoreListener { @Override public void dtmfReceived(LinphoneCore lc, LinphoneCall call, int dtmf) { - + } @Override public void ecCalibrationStatus(LinphoneCore lc, EcCalibratorStatus status, int delay_ms, Object data) { - + } @Override public void notifyReceived(LinphoneCore lc, LinphoneCall call, LinphoneAddress from, byte[] event) { - + } @Override public void transferState(LinphoneCore lc, LinphoneCall call, State new_call_state) { - + } @Override public void infoReceived(LinphoneCore lc, LinphoneCall call, LinphoneInfoMessage info) { - + } @Override public void subscriptionStateChanged(LinphoneCore lc, LinphoneEvent ev, SubscriptionState state) { - + } @Override @@ -258,7 +256,7 @@ public class LinphoneMiniManager implements LinphoneCoreListener { @Override public void publishStateChanged(LinphoneCore lc, LinphoneEvent ev, PublishState state) { - + } @Override @@ -269,22 +267,22 @@ public class LinphoneMiniManager implements LinphoneCoreListener { @Override public void show(LinphoneCore lc) { - + } @Override public void displayStatus(LinphoneCore lc, String message) { - + } @Override public void displayMessage(LinphoneCore lc, String message) { - + } @Override public void displayWarning(LinphoneCore lc, String message) { - + } } diff --git a/sample/src/org/linphone/mini/LinphoneMiniUtils.java b/sample/src/org/linphone/mini/LinphoneMiniUtils.java index 0fe163a50..41f35c256 100644 --- a/sample/src/org/linphone/mini/LinphoneMiniUtils.java +++ b/sample/src/org/linphone/mini/LinphoneMiniUtils.java @@ -1,7 +1,8 @@ package org.linphone.mini; + /* LinphoneMiniUtils.java -Copyright (C) 2014 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -25,19 +26,16 @@ import java.io.InputStream; import android.content.Context; -/** - * @author Sylvain Berfini - */ public class LinphoneMiniUtils { public static void copyIfNotExist(Context context, int ressourceId, String target) throws IOException { File lFileToCopy = new File(target); if (!lFileToCopy.exists()) { - copyFromPackage(context, ressourceId, lFileToCopy.getName()); + copyFromPackage(context, ressourceId, lFileToCopy.getName()); } } - + public static void copyFromPackage(Context context, int ressourceId, String target) throws IOException { - FileOutputStream lOutputStream = context.openFileOutput (target, 0); + FileOutputStream lOutputStream = context.openFileOutput (target, 0); InputStream lInputStream = context.getResources().openRawResource(ressourceId); int readByte; byte[] buff = new byte[8048]; diff --git a/src/android/org/linphone/AboutFragment.java b/src/android/org/linphone/AboutFragment.java index 09114cc97..20c4a369c 100644 --- a/src/android/org/linphone/AboutFragment.java +++ b/src/android/org/linphone/AboutFragment.java @@ -1,7 +1,7 @@ package org.linphone; /* AboutFragment.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -40,9 +40,6 @@ import android.view.WindowManager; import android.widget.ImageView; import android.widget.TextView; -/** - * @author Sylvain Berfini - */ public class AboutFragment extends Fragment implements OnClickListener { View sendLogButton = null; View resetLogButton = null; @@ -74,12 +71,12 @@ public class AboutFragment extends Fragment implements OnClickListener { resetLogButton = view.findViewById(R.id.reset_log); resetLogButton.setOnClickListener(this); resetLogButton.setVisibility(LinphonePreferences.instance().isDebugEnabled() ? View.VISIBLE : View.GONE); - + mListener = new LinphoneCoreListenerBase() { @Override public void uploadProgressIndication(LinphoneCore lc, int offset, int total) { } - + @Override public void uploadStateChanged(LinphoneCore lc, LogCollectionUploadState state, String info) { if (state == LogCollectionUploadState.LogCollectionUploadStateInProgress) { @@ -96,13 +93,13 @@ public class AboutFragment extends Fragment implements OnClickListener { return view; } - + private void displayUploadLogsInProgress() { if (uploadInProgress) { return; } uploadInProgress = true; - + progress = ProgressDialog.show(LinphoneActivity.instance(), null, null); Drawable d = new ColorDrawable(ContextCompat.getColor(getActivity(), R.color.colorE)); d.setAlpha(200); @@ -134,7 +131,7 @@ public class AboutFragment extends Fragment implements OnClickListener { if (lc != null) { lc.removeListener(mListener); } - + super.onPause(); } @@ -144,11 +141,11 @@ public class AboutFragment extends Fragment implements OnClickListener { if (lc != null) { lc.addListener(mListener); } - + if (LinphoneActivity.isInstanciated()) { LinphoneActivity.instance().selectMenu(FragmentsAvailable.ABOUT); } - + super.onResume(); } @@ -169,7 +166,7 @@ public class AboutFragment extends Fragment implements OnClickListener { } } } - + @Override public void onDestroy() { super.onDestroy(); diff --git a/src/android/org/linphone/AccountEnableReceiver.java b/src/android/org/linphone/AccountEnableReceiver.java index 708b07d5d..de9af4c07 100644 --- a/src/android/org/linphone/AccountEnableReceiver.java +++ b/src/android/org/linphone/AccountEnableReceiver.java @@ -1,7 +1,8 @@ package org.linphone; + /* -RemoteProvisioningActivity.java -Copyright (C) 2014 Belledonne Communications, Grenoble, France +AccountEnableReceiver.java +Copyright (C) 2017 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 @@ -18,15 +19,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; -/** - * @author Graham Barnett - */ public class AccountEnableReceiver extends BroadcastReceiver { private static final String TAG = "AccountEnableReceiver"; private static final String FIELD_ID = "id"; diff --git a/src/android/org/linphone/AccountPreferencesFragment.java b/src/android/org/linphone/AccountPreferencesFragment.java index 6cc70d078..846748cee 100644 --- a/src/android/org/linphone/AccountPreferencesFragment.java +++ b/src/android/org/linphone/AccountPreferencesFragment.java @@ -1,7 +1,7 @@ package org.linphone; /* AccountPreferencesFragment.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -53,9 +53,6 @@ import android.view.WindowManager; import android.widget.CheckBox; import android.widget.EditText; -/** - * @author Sylvain Berfini - */ public class AccountPreferencesFragment extends PreferencesListFragment implements LinphoneAccountCreator.LinphoneAccountCreatorListener { private int n; private boolean isNewAccount=false; diff --git a/src/android/org/linphone/BandwidthManager.java b/src/android/org/linphone/BandwidthManager.java index 706052617..3a4daf6bd 100644 --- a/src/android/org/linphone/BandwidthManager.java +++ b/src/android/org/linphone/BandwidthManager.java @@ -1,6 +1,8 @@ +package org.linphone; + /* BandwithManager.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import org.linphone.core.LinphoneCallParams; import org.linphone.core.LinphoneCore; @@ -28,7 +29,7 @@ public class BandwidthManager { public static final int LOW_BANDWIDTH = 2; private static BandwidthManager instance; - + private int currentProfile = HIGH_RESOLUTION; public int getCurrentProfile() {return currentProfile;} @@ -41,7 +42,7 @@ public class BandwidthManager { private BandwidthManager() { // FIXME register a listener on NetworkManager to get notified of network state // FIXME register a listener on Preference to get notified of change in video enable value - + // FIXME initially get those values } diff --git a/src/android/org/linphone/BluetoothManager.java b/src/android/org/linphone/BluetoothManager.java index b41a3aea9..414c9813c 100644 --- a/src/android/org/linphone/BluetoothManager.java +++ b/src/android/org/linphone/BluetoothManager.java @@ -1,7 +1,7 @@ package org.linphone; /* BluetoothManager.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +17,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import java.util.List; import org.linphone.mediastream.Log; @@ -34,9 +35,6 @@ import android.content.IntentFilter; import android.media.AudioManager; import android.os.Build; -/** - * @author Sylvain Berfini - */ @TargetApi(Build.VERSION_CODES.HONEYCOMB) public class BluetoothManager extends BroadcastReceiver { public int PLANTRONICS_BUTTON_PRESS = 1; diff --git a/src/android/org/linphone/BootReceiver.java b/src/android/org/linphone/BootReceiver.java index 51f1b8282..3ec7f2148 100644 --- a/src/android/org/linphone/BootReceiver.java +++ b/src/android/org/linphone/BootReceiver.java @@ -1,6 +1,8 @@ +package org.linphone; + /* BootReceiver.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import org.linphone.core.LinphoneCoreFactory; import org.linphone.core.LpConfig; diff --git a/src/android/org/linphone/CallActivity.java b/src/android/org/linphone/CallActivity.java index 72c4a5721..1bbdf2c17 100644 --- a/src/android/org/linphone/CallActivity.java +++ b/src/android/org/linphone/CallActivity.java @@ -1,7 +1,8 @@ package org.linphone; + /* CallActivity.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import android.Manifest; import android.app.Activity; import android.app.Dialog; @@ -84,9 +86,6 @@ import java.util.List; import java.util.Timer; import java.util.TimerTask; -/** - * @author Sylvain Berfini - */ public class CallActivity extends LinphoneGenericActivity implements OnClickListener, ActivityCompat.OnRequestPermissionsResultCallback { private final static int SECONDS_BEFORE_HIDING_CONTROLS = 4000; private final static int SECONDS_BEFORE_DENYING_CALL_UPDATE = 30000; diff --git a/src/android/org/linphone/CallAudioFragment.java b/src/android/org/linphone/CallAudioFragment.java index edadd57ea..1c9fefe13 100644 --- a/src/android/org/linphone/CallAudioFragment.java +++ b/src/android/org/linphone/CallAudioFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* CallAudioFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -25,9 +26,6 @@ import android.view.View; import android.view.View.OnTouchListener; import android.view.ViewGroup; -/** - * @author Sylvain Berfini - */ public class CallAudioFragment extends Fragment { private CallActivity incallActvityInstance; diff --git a/src/android/org/linphone/CallIncomingActivity.java b/src/android/org/linphone/CallIncomingActivity.java index aa519650c..6fce96d4e 100644 --- a/src/android/org/linphone/CallIncomingActivity.java +++ b/src/android/org/linphone/CallIncomingActivity.java @@ -1,6 +1,8 @@ +package org.linphone; + /* CallIncomingActivity.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import android.Manifest; import android.content.pm.ActivityInfo; diff --git a/src/android/org/linphone/CallManager.java b/src/android/org/linphone/CallManager.java index f095cb9d3..1aaad0392 100644 --- a/src/android/org/linphone/CallManager.java +++ b/src/android/org/linphone/CallManager.java @@ -1,6 +1,8 @@ +package org.linphone; + /* CallManager.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import org.linphone.core.LinphoneAddress; import org.linphone.core.LinphoneCall; @@ -28,30 +29,27 @@ import org.linphone.mediastream.Log; /** * Handle call updating, reinvites. - * - * @author Guillaume Beraudo - * */ public class CallManager { private static CallManager instance; - + private CallManager() {} public static final synchronized CallManager getInstance() { if (instance == null) instance = new CallManager(); return instance; } - + private BandwidthManager bm() { return BandwidthManager.getInstance(); } - - - + + + public void inviteAddress(LinphoneAddress lAddress, boolean videoEnabled, boolean lowBandwidth) throws LinphoneCoreException { LinphoneCore lc = LinphoneManager.getLc(); - + LinphoneCallParams params = lc.createCallParams(null); bm().updateWithProfileSettings(lc, params); @@ -60,7 +58,7 @@ public class CallManager { } else { params.setVideoEnabled(false); } - + if (lowBandwidth) { params.enableLowBandwidth(true); Log.d("Low bandwidth enabled in call params"); @@ -71,7 +69,7 @@ public class CallManager { - + /** * Add video to a currently running voice only call. * No re-invite is sent if the current call is already video @@ -88,7 +86,7 @@ public class CallManager { LinphoneCallParams params = lc.createCallParams(lCall); if (params.getVideoEnabled()) return false; - + // Check if video possible regarding bandwidth limitations bm().updateWithProfileSettings(lc, params); @@ -104,7 +102,7 @@ public class CallManager { } - + /** * Re-invite with parameters updated from profile. */ @@ -136,5 +134,5 @@ public class CallManager { bm().updateWithProfileSettings(lc, params); lc.updateCall(lCall, null); } - + } diff --git a/src/android/org/linphone/CallOutgoingActivity.java b/src/android/org/linphone/CallOutgoingActivity.java index 87a2ce203..bb1e3767c 100644 --- a/src/android/org/linphone/CallOutgoingActivity.java +++ b/src/android/org/linphone/CallOutgoingActivity.java @@ -1,6 +1,8 @@ +package org.linphone; + /* CallOutgoingActivity.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import java.util.ArrayList; import java.util.List; diff --git a/src/android/org/linphone/CallVideoFragment.java b/src/android/org/linphone/CallVideoFragment.java index 6767a9b84..ebc0d20c8 100644 --- a/src/android/org/linphone/CallVideoFragment.java +++ b/src/android/org/linphone/CallVideoFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* CallVideoFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import org.linphone.compatibility.Compatibility; import org.linphone.compatibility.CompatibilityScaleGestureDetector; import org.linphone.compatibility.CompatibilityScaleGestureListener; @@ -39,9 +41,6 @@ import android.view.View.OnTouchListener; import android.view.ViewGroup; import android.widget.RelativeLayout; -/** - * @author Sylvain Berfini - */ public class CallVideoFragment extends Fragment implements OnGestureListener, OnDoubleTapListener, CompatibilityScaleGestureListener { private SurfaceView mVideoView; private SurfaceView mCaptureView; @@ -52,24 +51,24 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On private CompatibilityScaleGestureDetector mScaleDetector; private CallActivity inCallActivity; private int previewX, previewY; - + @SuppressWarnings("deprecation") // Warning useless because value is ignored and automatically set by new APIs. @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { View view; if (LinphoneManager.getLc().hasCrappyOpenGL()) { view = inflater.inflate(R.layout.video_no_opengl, container, false); } else { view = inflater.inflate(R.layout.video, container, false); } - + mVideoView = (SurfaceView) view.findViewById(R.id.videoSurface); mCaptureView = (SurfaceView) view.findViewById(R.id.videoCaptureSurface); mCaptureView.getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); // Warning useless because value is ignored and automatically set by new APIs. fixZOrder(mVideoView, mCaptureView); - + androidVideoWindowImpl = new AndroidVideoWindowImpl(mVideoView, mCaptureView, new AndroidVideoWindowImpl.VideoWindowListener() { public void onVideoRenderingSurfaceReady(AndroidVideoWindowImpl vw, SurfaceView surface) { mVideoView = surface; @@ -77,7 +76,7 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On } public void onVideoRenderingSurfaceDestroyed(AndroidVideoWindowImpl vw) { - + } public void onVideoPreviewSurfaceReady(AndroidVideoWindowImpl vw, SurfaceView surface) { @@ -86,16 +85,16 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On } public void onVideoPreviewSurfaceDestroyed(AndroidVideoWindowImpl vw) { - + } }); - + mVideoView.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (mScaleDetector != null) { mScaleDetector.onTouchEvent(event); } - + mGestureDetector.onTouchEvent(event); if (inCallActivity != null) { inCallActivity.displayVideoCallControlsIfHidden(); @@ -103,7 +102,7 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On return true; } }); - + mCaptureView.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { @@ -130,7 +129,7 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On }); return view; } - + @Override public void onStart() { super.onStart(); @@ -145,14 +144,14 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On preview.setZOrderOnTop(true); preview.setZOrderMediaOverlay(true); // Needed to be able to display control layout over } - + public void switchCamera() { try { 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 (mCaptureView != null) { @@ -162,11 +161,11 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On Log.e("Cannot swtich camera : no camera"); } } - + @Override - public void onResume() { + public void onResume() { super.onResume(); - + if (LinphonePreferences.instance().isOverlayEnabled()) { LinphoneService.instance().destroyOverlay(); } @@ -175,13 +174,13 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On LinphoneManager.getLc().setVideoWindow(androidVideoWindowImpl); } } - - mGestureDetector = new GestureDetector(inCallActivity, this); + + mGestureDetector = new GestureDetector(inCallActivity, this); mScaleDetector = Compatibility.getScaleGestureDetector(inCallActivity, this); } @Override - public void onPause() { + public void onPause() { if (androidVideoWindowImpl != null) { synchronized (androidVideoWindowImpl) { /* @@ -194,10 +193,10 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On if (LinphonePreferences.instance().isOverlayEnabled()) { LinphoneService.instance().createOverlay(); } - + super.onPause(); } - + public boolean onScale(CompatibilityScaleGestureDetector detector) { mZoomFactor *= detector.getScaleFactor(); // Don't let the object get too small or too large. @@ -230,7 +229,7 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On } else if(distanceY > 0 && mZoomCenterY > 0) { mZoomCenterY -= 0.01; } - + if (mZoomCenterX > 1) mZoomCenterX = 1; if (mZoomCenterX < 0) @@ -239,12 +238,12 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On mZoomCenterY = 1; if (mZoomCenterY < 0) mZoomCenterY = 0; - + LinphoneManager.getLc().getCurrentCall().zoomVideo(mZoomFactor, mZoomCenterX, mZoomCenterY); return true; } } - + return false; } @@ -256,17 +255,17 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On float portraitZoomFactor = ((float) mVideoView.getHeight()) / (float) ((3 * mVideoView.getWidth()) / 4); // Zoom to make the video fill the screen horizontally float landscapeZoomFactor = ((float) mVideoView.getWidth()) / (float) ((3 * mVideoView.getHeight()) / 4); - + mZoomFactor = Math.max(portraitZoomFactor, landscapeZoomFactor); } else { resetZoom(); } - + LinphoneManager.getLc().getCurrentCall().zoomVideo(mZoomFactor, mZoomCenterX, mZoomCenterY); return true; } - + return false; } @@ -274,17 +273,17 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On mZoomFactor = 1.f; mZoomCenterX = mZoomCenterY = 0.5f; } - + @Override public void onDestroy() { inCallActivity = null; - + mCaptureView = null; if (mVideoView != null) { mVideoView.setOnTouchListener(null); mVideoView = null; } - if (androidVideoWindowImpl != null) { + if (androidVideoWindowImpl != null) { // Prevent linphone from crashing if correspondent hang up while you are rotating androidVideoWindowImpl.release(); androidVideoWindowImpl = null; @@ -297,10 +296,10 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On mScaleDetector.destroy(); mScaleDetector = null; } - + super.onDestroy(); } - + @Override public boolean onDown(MotionEvent e) { return true; // Needed to make the GestureDetector working @@ -324,12 +323,12 @@ public class CallVideoFragment extends Fragment implements OnGestureListener, On @Override public void onLongPress(MotionEvent e) { - + } @Override public void onShowPress(MotionEvent e) { - + } @Override diff --git a/src/android/org/linphone/ChatFragment.java b/src/android/org/linphone/ChatFragment.java index 7792b9cea..90c49d7e9 100644 --- a/src/android/org/linphone/ChatFragment.java +++ b/src/android/org/linphone/ChatFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* ChatFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 diff --git a/src/android/org/linphone/ChatListFragment.java b/src/android/org/linphone/ChatListFragment.java index a87392698..f388760bc 100644 --- a/src/android/org/linphone/ChatListFragment.java +++ b/src/android/org/linphone/ChatListFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* ChatListFragment.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import android.app.Dialog; import android.app.Fragment; import android.graphics.Typeface; @@ -54,9 +56,6 @@ import java.util.List; import static org.linphone.FragmentsAvailable.CHAT_LIST; -/** - * @author Sylvain Berfini - */ public class ChatListFragment extends Fragment implements OnClickListener, OnItemClickListener, ContactsUpdatedListener, ChatUpdatedListener { private LayoutInflater mInflater; private List mConversations; diff --git a/src/android/org/linphone/ContactDetailsFragment.java b/src/android/org/linphone/ContactDetailsFragment.java index 5061680d4..1018218d2 100644 --- a/src/android/org/linphone/ContactDetailsFragment.java +++ b/src/android/org/linphone/ContactDetailsFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* ContactDetailsFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import org.linphone.core.LinphoneProxyConfig; import android.annotation.SuppressLint; @@ -32,9 +34,6 @@ import android.widget.ImageView; import android.widget.TableLayout; import android.widget.TextView; -/** - * @author Sylvain Berfini - */ public class ContactDetailsFragment extends Fragment implements OnClickListener { private LinphoneContact contact; private ImageView editContact, deleteContact, back; diff --git a/src/android/org/linphone/ContactEditorFragment.java b/src/android/org/linphone/ContactEditorFragment.java index b44332209..8d3edadbb 100644 --- a/src/android/org/linphone/ContactEditorFragment.java +++ b/src/android/org/linphone/ContactEditorFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* ContactEditorFragment.java - Copyright (C) 2012 Belledonne Communications, Grenoble, France + Copyright (C) 2017 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 diff --git a/src/android/org/linphone/ContactsListFragment.java b/src/android/org/linphone/ContactsListFragment.java index a60255e9b..146bd6d67 100644 --- a/src/android/org/linphone/ContactsListFragment.java +++ b/src/android/org/linphone/ContactsListFragment.java @@ -1,6 +1,8 @@ +package org.linphone; + /* ContactsListFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,7 +19,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import android.app.Dialog; import android.app.Fragment; @@ -51,9 +52,6 @@ import java.util.Map; import static org.linphone.FragmentsAvailable.CONTACTS_LIST; -/** - * @author Sylvain Berfini - */ public class ContactsListFragment extends Fragment implements OnClickListener, OnItemClickListener, ContactsUpdatedListener { private LayoutInflater mInflater; private ListView contactsList; diff --git a/src/android/org/linphone/ContactsManager.java b/src/android/org/linphone/ContactsManager.java index bce9fc7fc..cefe9547c 100644 --- a/src/android/org/linphone/ContactsManager.java +++ b/src/android/org/linphone/ContactsManager.java @@ -1,6 +1,8 @@ +package org.linphone; + /* ContactsManager.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,8 +19,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; - import android.accounts.Account; import android.accounts.AccountManager; import android.content.ContentProviderOperation; diff --git a/src/android/org/linphone/DialerFragment.java b/src/android/org/linphone/DialerFragment.java index e5f6dca71..c7cd468ea 100644 --- a/src/android/org/linphone/DialerFragment.java +++ b/src/android/org/linphone/DialerFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* DialerFragment.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import android.app.Fragment; import android.content.Intent; import android.content.res.Configuration; @@ -36,9 +38,6 @@ import org.linphone.ui.AddressText; import org.linphone.ui.CallButton; import org.linphone.ui.EraseButton; -/** - * @author Sylvain Berfini - */ public class DialerFragment extends Fragment { private static DialerFragment instance; private static boolean isCallTransferOngoing = false; diff --git a/src/android/org/linphone/DozeReceiver.java b/src/android/org/linphone/DozeReceiver.java index 717e7a002..67e7b2770 100644 --- a/src/android/org/linphone/DozeReceiver.java +++ b/src/android/org/linphone/DozeReceiver.java @@ -1,5 +1,24 @@ package org.linphone; +/* +DozeReceiver.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCoreFactory; import org.linphone.mediastream.Log; diff --git a/src/android/org/linphone/EmptyFragment.java b/src/android/org/linphone/EmptyFragment.java index 66ca6baa0..91cd899b4 100644 --- a/src/android/org/linphone/EmptyFragment.java +++ b/src/android/org/linphone/EmptyFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* -AboutFragment.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +EmptyFragment.java +Copyright (C) 2017 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 @@ -24,9 +25,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -/** - * @author Sylvain Berfini - */ public class EmptyFragment extends Fragment { @Override diff --git a/src/android/org/linphone/FragmentsAvailable.java b/src/android/org/linphone/FragmentsAvailable.java index cebeabcb8..4ce332838 100644 --- a/src/android/org/linphone/FragmentsAvailable.java +++ b/src/android/org/linphone/FragmentsAvailable.java @@ -1,7 +1,8 @@ package org.linphone; + /* FragmentsAvailable.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,9 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ + public enum FragmentsAvailable { UNKNOW, DIALER, diff --git a/src/android/org/linphone/HistoryDetailFragment.java b/src/android/org/linphone/HistoryDetailFragment.java index 06b10e77b..9bee76883 100644 --- a/src/android/org/linphone/HistoryDetailFragment.java +++ b/src/android/org/linphone/HistoryDetailFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* HistoryDetailFragment.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import android.app.Fragment; import android.net.Uri; import android.os.Bundle; @@ -32,9 +34,6 @@ import org.linphone.core.LinphoneCoreException; import org.linphone.core.LinphoneCoreFactory; import org.linphone.mediastream.Log; -/** - * @author Sylvain Berfini - */ public class HistoryDetailFragment extends Fragment implements OnClickListener { private ImageView dialBack, chat, addToContacts, goToContact, back; private View view; diff --git a/src/android/org/linphone/HistoryListFragment.java b/src/android/org/linphone/HistoryListFragment.java index bde01bbd8..01e4ead15 100644 --- a/src/android/org/linphone/HistoryListFragment.java +++ b/src/android/org/linphone/HistoryListFragment.java @@ -1,7 +1,8 @@ package org.linphone; + /* HistoryListFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; @@ -52,9 +54,6 @@ import android.widget.TextView; import static org.linphone.FragmentsAvailable.HISTORY_LIST; -/** - * @author Sylvain Berfini - */ public class HistoryListFragment extends Fragment implements OnClickListener, OnItemClickListener, ContactsUpdatedListener { private ListView historyList; private LayoutInflater mInflater; diff --git a/src/android/org/linphone/HookReceiver.java b/src/android/org/linphone/HookReceiver.java index a5068ffbe..436026075 100644 --- a/src/android/org/linphone/HookReceiver.java +++ b/src/android/org/linphone/HookReceiver.java @@ -1,5 +1,24 @@ package org.linphone; +/* +HookReceiver.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; diff --git a/src/android/org/linphone/KeepAliveReceiver.java b/src/android/org/linphone/KeepAliveReceiver.java index 7595377e6..76e1695c0 100644 --- a/src/android/org/linphone/KeepAliveReceiver.java +++ b/src/android/org/linphone/KeepAliveReceiver.java @@ -1,6 +1,8 @@ +package org.linphone; + /* KeepAliveReceiver.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import org.linphone.compatibility.Compatibility; import org.linphone.core.LinphoneCore; diff --git a/src/android/org/linphone/LinphoneActivity.java b/src/android/org/linphone/LinphoneActivity.java index 8f653681d..151f01cc3 100644 --- a/src/android/org/linphone/LinphoneActivity.java +++ b/src/android/org/linphone/LinphoneActivity.java @@ -2,7 +2,7 @@ package org.linphone; /* LinphoneActivity.java - Copyright (C) 2012 Belledonne Communications, Grenoble, France + Copyright (C) 2017 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 @@ -103,9 +103,6 @@ import java.util.List; import static org.linphone.LinphoneActivity.ChatRoomContainer.createChatroomContainer; -/** - * @author Sylvain Berfini - */ public class LinphoneActivity extends LinphoneGenericActivity implements OnClickListener, ContactPicked, ActivityCompat.OnRequestPermissionsResultCallback { public static final String PREF_FIRST_LAUNCH = "pref_first_launch"; private static final int SETTINGS_ACTIVITY = 123; diff --git a/src/android/org/linphone/LinphoneContact.java b/src/android/org/linphone/LinphoneContact.java index 3065c35a4..9f0635924 100644 --- a/src/android/org/linphone/LinphoneContact.java +++ b/src/android/org/linphone/LinphoneContact.java @@ -1,6 +1,8 @@ +package org.linphone; + /* LinphoneContact.java -Copyright (C) 2016 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import java.io.Serializable; import java.util.ArrayList; @@ -44,9 +45,6 @@ import android.provider.ContactsContract; import android.provider.ContactsContract.CommonDataKinds; public class LinphoneContact implements Serializable, Comparable { - /** - * - */ private static final long serialVersionUID = 9015568163905205244L; private transient LinphoneFriend friend; diff --git a/src/android/org/linphone/LinphoneException.java b/src/android/org/linphone/LinphoneException.java index 3a56084f3..4e4e65ad2 100644 --- a/src/android/org/linphone/LinphoneException.java +++ b/src/android/org/linphone/LinphoneException.java @@ -1,6 +1,8 @@ +package org.linphone; + /* LinphoneCoreException.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; @SuppressWarnings("serial") public class LinphoneException extends Exception { diff --git a/src/android/org/linphone/LinphoneGenericActivity.java b/src/android/org/linphone/LinphoneGenericActivity.java index 3ae268c1a..916569f7e 100644 --- a/src/android/org/linphone/LinphoneGenericActivity.java +++ b/src/android/org/linphone/LinphoneGenericActivity.java @@ -1,5 +1,24 @@ package org.linphone; +/* +LinphoneGenericActivity.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import android.app.Activity; import android.os.Bundle; diff --git a/src/android/org/linphone/LinphoneLauncherActivity.java b/src/android/org/linphone/LinphoneLauncherActivity.java index 24ca01738..142d7e7f7 100644 --- a/src/android/org/linphone/LinphoneLauncherActivity.java +++ b/src/android/org/linphone/LinphoneLauncherActivity.java @@ -1,6 +1,8 @@ +package org.linphone; + /* LinphoneLauncherActivity.java -Copyright (C) 2011 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import android.app.Activity; import android.content.Intent; @@ -33,11 +34,7 @@ import org.linphone.tutorials.TutorialLauncherActivity; import static android.content.Intent.ACTION_MAIN; /** - * * Launch Linphone main activity when Service is ready. - * - * @author Guillaume Beraudo - * */ public class LinphoneLauncherActivity extends Activity { diff --git a/src/android/org/linphone/LinphoneManager.java b/src/android/org/linphone/LinphoneManager.java index ccfecb2aa..7aca759d8 100644 --- a/src/android/org/linphone/LinphoneManager.java +++ b/src/android/org/linphone/LinphoneManager.java @@ -18,6 +18,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.linphone; +/* +LinphoneManager.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.app.AlertDialog; @@ -128,8 +147,6 @@ import static android.media.AudioManager.STREAM_VOICE_CALL; * * Add Service Listener to react to Linphone state changes. * - * @author Guillaume Beraudo - * */ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessage.LinphoneChatMessageListener, SensorEventListener, LinphoneAccountCreator.LinphoneAccountCreatorListener { diff --git a/src/android/org/linphone/LinphoneNumberOrAddress.java b/src/android/org/linphone/LinphoneNumberOrAddress.java index c31ea91eb..9572161aa 100644 --- a/src/android/org/linphone/LinphoneNumberOrAddress.java +++ b/src/android/org/linphone/LinphoneNumberOrAddress.java @@ -1,6 +1,8 @@ +package org.linphone; + /* LinphoneNumberOrAddress.java -Copyright (C) 2016 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,30 +19,25 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; - import java.io.Serializable; public class LinphoneNumberOrAddress implements Serializable, Comparable { - /** - * - */ private static final long serialVersionUID = -2301689469730072896L; - + private boolean isSIPAddress; private String value, oldValueForUpdatePurpose; - + public LinphoneNumberOrAddress(String v, boolean isSIP) { value = v; isSIPAddress = isSIP; oldValueForUpdatePurpose = null; } - + public LinphoneNumberOrAddress(String v, boolean isSip, String old) { this(v, isSip); oldValueForUpdatePurpose = old; } - + @Override public int compareTo(LinphoneNumberOrAddress noa) { if (noa.isSIPAddress() == isSIPAddress()) { @@ -53,7 +50,7 @@ public class LinphoneNumberOrAddress implements Serializable, Comparable * * Roles include:
    @@ -71,10 +71,6 @@ import android.view.WindowManager; *
  • Starting C libLinphone through LinphoneManager
  • *
  • Reacting to LinphoneManager state changes
  • *
  • Delegating GUI state change actions to GUI listener
  • - * - * - * @author Guillaume Beraudo - * */ public final class LinphoneService extends Service { /* Listener needs to be implemented in the Service as it calls diff --git a/src/android/org/linphone/LinphoneUtils.java b/src/android/org/linphone/LinphoneUtils.java index 28249e1ab..aa7b39f07 100644 --- a/src/android/org/linphone/LinphoneUtils.java +++ b/src/android/org/linphone/LinphoneUtils.java @@ -1,6 +1,8 @@ +package org.linphone; + /* SoftVolume.java -Copyright (C) 2011 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import android.app.Activity; import android.app.AlertDialog; @@ -93,8 +94,6 @@ import static android.view.View.VISIBLE; /** * Helpers. - * @author Guillaume Beraudo - * */ public final class LinphoneUtils { private static Context context = null; diff --git a/src/android/org/linphone/NetworkManager.java b/src/android/org/linphone/NetworkManager.java index 4348cd0da..bb0895a24 100644 --- a/src/android/org/linphone/NetworkManager.java +++ b/src/android/org/linphone/NetworkManager.java @@ -1,6 +1,8 @@ +package org.linphone; + /* ContactPickerActivity.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,17 +18,14 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; - - /** - * + * * Intercept network state changes and update linphone core through LinphoneManager. * */ diff --git a/src/android/org/linphone/OutgoingCallReceiver.java b/src/android/org/linphone/OutgoingCallReceiver.java index 8a984fb4f..526b14a11 100644 --- a/src/android/org/linphone/OutgoingCallReceiver.java +++ b/src/android/org/linphone/OutgoingCallReceiver.java @@ -1,5 +1,23 @@ package org.linphone; +/* +OutgoingCallReceiver.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ import android.content.BroadcastReceiver; import android.content.Context; diff --git a/src/android/org/linphone/PhoneStateChangedReceiver.java b/src/android/org/linphone/PhoneStateChangedReceiver.java index 19b811d96..e266374a8 100644 --- a/src/android/org/linphone/PhoneStateChangedReceiver.java +++ b/src/android/org/linphone/PhoneStateChangedReceiver.java @@ -1,6 +1,8 @@ +package org.linphone; + /* PhoneStateReceiver.java -Copyright (C) 2011 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import android.content.BroadcastReceiver; import android.content.Context; @@ -25,9 +26,6 @@ import android.telephony.TelephonyManager; /** * Pause current SIP calls when GSM phone rings or is active. - * - * @author Guillaume Beraudo - * */ public class PhoneStateChangedReceiver extends BroadcastReceiver { @Override diff --git a/src/android/org/linphone/PreferencesMigrator.java b/src/android/org/linphone/PreferencesMigrator.java index b42eafc40..cc42dee3a 100644 --- a/src/android/org/linphone/PreferencesMigrator.java +++ b/src/android/org/linphone/PreferencesMigrator.java @@ -2,7 +2,7 @@ package org.linphone; /* PreferencesMigrator.java -Copyright (C) 2013 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -32,9 +32,6 @@ import android.content.SharedPreferences.Editor; import android.content.res.Resources; import android.preference.PreferenceManager; -/** - * @author Sylvain Berfini - */ public class PreferencesMigrator { private LinphonePreferences mNewPrefs; private SharedPreferences mOldPrefs; diff --git a/src/android/org/linphone/SettingsFragment.java b/src/android/org/linphone/SettingsFragment.java index 4ab28b6ef..55a86fb94 100644 --- a/src/android/org/linphone/SettingsFragment.java +++ b/src/android/org/linphone/SettingsFragment.java @@ -2,7 +2,7 @@ package org.linphone; /* SettingsFragment.java -Copyright (C) 2013 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -61,9 +61,6 @@ import android.preference.PreferenceCategory; import android.preference.PreferenceScreen; import android.provider.Settings; -/** - * @author Sylvain Berfini - */ public class SettingsFragment extends PreferencesListFragment { private LinphonePreferences mPrefs; private Handler mHandler = new Handler(); diff --git a/src/android/org/linphone/StatusFragment.java b/src/android/org/linphone/StatusFragment.java index 169db023c..c5845aa86 100644 --- a/src/android/org/linphone/StatusFragment.java +++ b/src/android/org/linphone/StatusFragment.java @@ -1,7 +1,7 @@ package org.linphone; /* StatusFragment.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -48,9 +48,6 @@ import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; -/** - * @author Sylvain Berfini - */ public class StatusFragment extends Fragment { private Handler refreshHandler = new Handler(); private TextView statusText, voicemailCount; diff --git a/src/android/org/linphone/UIThreadDispatcher.java b/src/android/org/linphone/UIThreadDispatcher.java index 90eba431c..d3e6d36a4 100644 --- a/src/android/org/linphone/UIThreadDispatcher.java +++ b/src/android/org/linphone/UIThreadDispatcher.java @@ -1,6 +1,8 @@ +package org.linphone; + /* UIThreadDispatcher.java -Copyright (C) 2014 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,14 +18,13 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone; import android.os.Handler; import android.os.Looper; public class UIThreadDispatcher { private static Handler mHandler = new Handler(Looper.getMainLooper()); - + public static void dispatch(Runnable r) { mHandler.post(r); } diff --git a/src/android/org/linphone/assistant/AssistantActivity.java b/src/android/org/linphone/assistant/AssistantActivity.java index 0fa653f0e..d32ad79a2 100644 --- a/src/android/org/linphone/assistant/AssistantActivity.java +++ b/src/android/org/linphone/assistant/AssistantActivity.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* AssistantActivity.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -81,9 +81,6 @@ import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; -/** - * @author Sylvain Berfini - */ public class AssistantActivity extends Activity implements OnClickListener, ActivityCompat.OnRequestPermissionsResultCallback, LinphoneAccountCreator.LinphoneAccountCreatorListener { private static AssistantActivity instance; private ImageView back, cancel; diff --git a/src/android/org/linphone/assistant/AssistantFragmentsEnum.java b/src/android/org/linphone/assistant/AssistantFragmentsEnum.java index ae0d42ff5..52fcdd38a 100644 --- a/src/android/org/linphone/assistant/AssistantFragmentsEnum.java +++ b/src/android/org/linphone/assistant/AssistantFragmentsEnum.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* AssistantFragmentsEnum.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,9 +17,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ + public enum AssistantFragmentsEnum { WELCOME, CREATE_ACCOUNT, diff --git a/src/android/org/linphone/assistant/CodecDownloaderFragment.java b/src/android/org/linphone/assistant/CodecDownloaderFragment.java index 41b8598ea..0937347f2 100644 --- a/src/android/org/linphone/assistant/CodecDownloaderFragment.java +++ b/src/android/org/linphone/assistant/CodecDownloaderFragment.java @@ -2,7 +2,7 @@ package org.linphone.assistant; /* CodecDownloaderFragment.java -Copyright (C) 2016 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -37,9 +37,6 @@ import android.widget.Button; import android.widget.ProgressBar; import android.widget.TextView; -/** - * @author Erwan CROZE - */ public class CodecDownloaderFragment extends Fragment { private Handler mHandler = new Handler(); private TextView question; diff --git a/src/android/org/linphone/assistant/CountryListFragment.java b/src/android/org/linphone/assistant/CountryListFragment.java index 294cf80c7..e4bcf4a52 100644 --- a/src/android/org/linphone/assistant/CountryListFragment.java +++ b/src/android/org/linphone/assistant/CountryListFragment.java @@ -1,5 +1,24 @@ package org.linphone.assistant; +/* +CountryListFragment.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import org.linphone.R; import org.linphone.core.DialPlan; diff --git a/src/android/org/linphone/assistant/CreateAccountActivationFragment.java b/src/android/org/linphone/assistant/CreateAccountActivationFragment.java index 21d286303..8a2a086e7 100644 --- a/src/android/org/linphone/assistant/CreateAccountActivationFragment.java +++ b/src/android/org/linphone/assistant/CreateAccountActivationFragment.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* CreateAccountActivationFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -33,9 +33,7 @@ import org.linphone.R; import org.linphone.core.LinphoneAccountCreator; import org.linphone.core.LinphoneAccountCreator.LinphoneAccountCreatorListener; import org.linphone.core.LinphoneCoreFactory; -/** - * @author Sylvain Berfini - */ + public class CreateAccountActivationFragment extends Fragment implements OnClickListener, LinphoneAccountCreatorListener { private String username, password; private Button checkAccount; diff --git a/src/android/org/linphone/assistant/CreateAccountCodeActivationFragment.java b/src/android/org/linphone/assistant/CreateAccountCodeActivationFragment.java index 994132cd9..382494f69 100644 --- a/src/android/org/linphone/assistant/CreateAccountCodeActivationFragment.java +++ b/src/android/org/linphone/assistant/CreateAccountCodeActivationFragment.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* CreateAccountCodeActivationFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 diff --git a/src/android/org/linphone/assistant/CreateAccountFragment.java b/src/android/org/linphone/assistant/CreateAccountFragment.java index f44022025..592a37cd8 100644 --- a/src/android/org/linphone/assistant/CreateAccountFragment.java +++ b/src/android/org/linphone/assistant/CreateAccountFragment.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* CreateAccountFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -58,9 +58,6 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; -/** - * @author Sylvain Berfini - */ public class CreateAccountFragment extends Fragment implements CompoundButton.OnCheckedChangeListener , OnClickListener, LinphoneAccountCreatorListener { private EditText phoneNumberEdit, usernameEdit, passwordEdit, passwordConfirmEdit diff --git a/src/android/org/linphone/assistant/EchoCancellerCalibrationFragment.java b/src/android/org/linphone/assistant/EchoCancellerCalibrationFragment.java index 7bcbbbb7e..94d3986d2 100644 --- a/src/android/org/linphone/assistant/EchoCancellerCalibrationFragment.java +++ b/src/android/org/linphone/assistant/EchoCancellerCalibrationFragment.java @@ -2,7 +2,7 @@ package org.linphone.assistant; /* EchoCancellerCalibrationFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -41,9 +41,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -/** - * @author Ghislain MARY - */ public class EchoCancellerCalibrationFragment extends Fragment implements LinphoneXmlRpcRequestListener { private Handler mHandler = new Handler(); private boolean mSendEcCalibrationResult = false; @@ -56,7 +53,7 @@ public class EchoCancellerCalibrationFragment extends Fragment implements Linpho public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.assistant_ec_calibration, container, false); - + mListener = new LinphoneCoreListenerBase(){ @Override public void ecCalibrationStatus(LinphoneCore lc, LinphoneCore.EcCalibratorStatus status, int delay_ms, Object data) { @@ -73,7 +70,7 @@ public class EchoCancellerCalibrationFragment extends Fragment implements Linpho AssistantActivity.instance().isEchoCalibrationFinished(); } }; - + xmlRpcSession = new LinphoneXmlRpcSessionImpl(LinphoneManager.getLcIfManagerNotDestroyedOrNull(), LinphonePreferences.instance().getXmlrpcUrl()); xmlRpcRequest = new LinphoneXmlRpcRequestImpl("add_ec_calibration_result", LinphoneXmlRpcRequest.ArgType.None); xmlRpcRequest.setListener(this); diff --git a/src/android/org/linphone/assistant/LinphoneLoginFragment.java b/src/android/org/linphone/assistant/LinphoneLoginFragment.java index 783e16cb3..3fe9b8ec5 100644 --- a/src/android/org/linphone/assistant/LinphoneLoginFragment.java +++ b/src/android/org/linphone/assistant/LinphoneLoginFragment.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* LinphoneLoginFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -50,9 +50,6 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; -/** - * @author Sylvain Berfini - */ public class LinphoneLoginFragment extends Fragment implements CompoundButton.OnCheckedChangeListener, OnClickListener, TextWatcher, LinphoneAccountCreator.LinphoneAccountCreatorListener { private EditText login, password, phoneNumberEdit, dialCode; private Button apply, selectCountry; diff --git a/src/android/org/linphone/assistant/LoginFragment.java b/src/android/org/linphone/assistant/LoginFragment.java index f60e68b2b..4842bbc39 100644 --- a/src/android/org/linphone/assistant/LoginFragment.java +++ b/src/android/org/linphone/assistant/LoginFragment.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* LoginFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -32,9 +32,7 @@ import android.widget.Button; import android.widget.EditText; import android.widget.RadioGroup; import android.widget.Toast; -/** - * @author Sylvain Berfini - */ + public class LoginFragment extends Fragment implements OnClickListener, TextWatcher { private EditText login, userid, password, domain; private RadioGroup transports; diff --git a/src/android/org/linphone/assistant/RemoteProvisioningActivity.java b/src/android/org/linphone/assistant/RemoteProvisioningActivity.java index ac7b341dc..cfc104955 100644 --- a/src/android/org/linphone/assistant/RemoteProvisioningActivity.java +++ b/src/android/org/linphone/assistant/RemoteProvisioningActivity.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* RemoteProvisioningActivity.java -Copyright (C) 2014 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -43,21 +43,18 @@ import android.view.View; import android.widget.ProgressBar; import android.widget.Toast; -/** - * @author Sylvain Berfini - */ public class RemoteProvisioningActivity extends Activity { private Handler mHandler = new Handler(); private String configUriParam = null; private ProgressBar spinner; private LinphoneCoreListenerBase mListener; - + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.remote_provisioning); spinner = (ProgressBar) findViewById(R.id.spinner); - + mListener = new LinphoneCoreListenerBase(){ @Override public void configuringStatus(LinphoneCore lc, final RemoteProvisioningState state, String message) { diff --git a/src/android/org/linphone/assistant/RemoteProvisioningFragment.java b/src/android/org/linphone/assistant/RemoteProvisioningFragment.java index c85244982..d547cbb55 100644 --- a/src/android/org/linphone/assistant/RemoteProvisioningFragment.java +++ b/src/android/org/linphone/assistant/RemoteProvisioningFragment.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* RemoteProvisioningFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -37,25 +37,25 @@ import android.widget.EditText; public class RemoteProvisioningFragment extends Fragment implements OnClickListener, TextWatcher{ private EditText remoteProvisioningUrl; private Button apply; - + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.assistant_remote_provisioning, container, false); - + remoteProvisioningUrl = (EditText) view.findViewById(R.id.assistant_remote_provisioning_url); remoteProvisioningUrl.addTextChangedListener(this); apply = (Button) view.findViewById(R.id.assistant_apply); apply.setEnabled(false); apply.setOnClickListener(this); - + return view; } - + @Override public void onClick(View v) { int id = v.getId(); - + if (id == R.id.assistant_apply) { String url = remoteProvisioningUrl.getText().toString(); AssistantActivity.instance().displayRemoteProvisioningInProgressDialog(); diff --git a/src/android/org/linphone/assistant/RemoteProvisioningLoginActivity.java b/src/android/org/linphone/assistant/RemoteProvisioningLoginActivity.java index 3e442400a..80cf0dda4 100644 --- a/src/android/org/linphone/assistant/RemoteProvisioningLoginActivity.java +++ b/src/android/org/linphone/assistant/RemoteProvisioningLoginActivity.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* RemoteProvisioningLoginActivity.java -Copyright (C) 2014 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -34,9 +34,6 @@ import android.widget.Button; import android.widget.EditText; import android.widget.Toast; -/** - * @author Sylvain Berfini - */ public class RemoteProvisioningLoginActivity extends Activity implements OnClickListener { private EditText login, password, domain; private Button connect; @@ -46,7 +43,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.assistant_remote_provisioning_login); - + login = (EditText) findViewById(R.id.assistant_username); password = (EditText) findViewById(R.id.assistant_password); domain = (EditText) findViewById(R.id.assistant_domain); @@ -71,7 +68,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick } }; } - + private void cancelWizard(boolean bypassCheck) { if (bypassCheck || getResources().getBoolean(R.bool.allow_cancel_remote_provisioning_login_activity)) { LinphonePreferences.instance().disableProvisioningLoginView(); @@ -79,7 +76,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick finish(); } } - + private boolean storeAccount(String username, String password, String domain) { XmlRpcHelper xmlRpcHelper = new XmlRpcHelper(); xmlRpcHelper.getRemoteProvisioningFilenameAsync(new XmlRpcListenerBase() { @@ -102,10 +99,10 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick Log.e(e); return false; } - + LinphoneAuthInfo authInfo = LinphoneCoreFactory.instance().createAuthInfo(username, null, password, null, null, domain); lc.addAuthInfo(authInfo); - + if (LinphonePreferences.instance().getAccountCount() == 1) lc.setDefaultProxyConfig(prxCfg); */ @@ -133,7 +130,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick @Override public void onClick(View v) { int id = v.getId(); - + if (id == R.id.cancel) { cancelWizard(false); } diff --git a/src/android/org/linphone/assistant/WelcomeFragment.java b/src/android/org/linphone/assistant/WelcomeFragment.java index 730e58c69..2dc7ca5cc 100644 --- a/src/android/org/linphone/assistant/WelcomeFragment.java +++ b/src/android/org/linphone/assistant/WelcomeFragment.java @@ -1,7 +1,7 @@ package org.linphone.assistant; /* WelcomeFragment.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -27,9 +27,6 @@ import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; -/** - * @author Sylvain Berfini - */ public class WelcomeFragment extends Fragment implements OnClickListener { private Button createAccount, logLinphoneAccount, logGenericAccount, remoteProvisioning; diff --git a/src/android/org/linphone/compatibility/ApiElevenPlus.java b/src/android/org/linphone/compatibility/ApiElevenPlus.java index a5fef0d1b..cdfcaa8d2 100644 --- a/src/android/org/linphone/compatibility/ApiElevenPlus.java +++ b/src/android/org/linphone/compatibility/ApiElevenPlus.java @@ -38,9 +38,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ + @TargetApi(11) public class ApiElevenPlus { diff --git a/src/android/org/linphone/compatibility/ApiNineteenPlus.java b/src/android/org/linphone/compatibility/ApiNineteenPlus.java index ad6253c73..278224221 100644 --- a/src/android/org/linphone/compatibility/ApiNineteenPlus.java +++ b/src/android/org/linphone/compatibility/ApiNineteenPlus.java @@ -21,9 +21,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ + @TargetApi(19) public class ApiNineteenPlus { public static void scheduleAlarm(AlarmManager alarmManager, int type, long triggerAtMillis, PendingIntent operation) { diff --git a/src/android/org/linphone/compatibility/ApiSixteenPlus.java b/src/android/org/linphone/compatibility/ApiSixteenPlus.java index 5305ed09e..f9d0c1184 100644 --- a/src/android/org/linphone/compatibility/ApiSixteenPlus.java +++ b/src/android/org/linphone/compatibility/ApiSixteenPlus.java @@ -27,9 +27,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ + @TargetApi(16) public class ApiSixteenPlus { diff --git a/src/android/org/linphone/compatibility/ApiTwentyOnePlus.java b/src/android/org/linphone/compatibility/ApiTwentyOnePlus.java index ad7696b43..8215d4e0d 100644 --- a/src/android/org/linphone/compatibility/ApiTwentyOnePlus.java +++ b/src/android/org/linphone/compatibility/ApiTwentyOnePlus.java @@ -28,9 +28,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ + @TargetApi(21) public class ApiTwentyOnePlus { diff --git a/src/android/org/linphone/compatibility/ApiTwentySixPlus.java b/src/android/org/linphone/compatibility/ApiTwentySixPlus.java index 853d8bb60..53453cbdb 100644 --- a/src/android/org/linphone/compatibility/ApiTwentySixPlus.java +++ b/src/android/org/linphone/compatibility/ApiTwentySixPlus.java @@ -31,9 +31,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Erwan Croze - */ @TargetApi(26) public class ApiTwentySixPlus { diff --git a/src/android/org/linphone/compatibility/ApiTwentyThreePlus.java b/src/android/org/linphone/compatibility/ApiTwentyThreePlus.java index 9de44cae7..fb3db0484 100644 --- a/src/android/org/linphone/compatibility/ApiTwentyThreePlus.java +++ b/src/android/org/linphone/compatibility/ApiTwentyThreePlus.java @@ -21,9 +21,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ + @TargetApi(23) public class ApiTwentyThreePlus { public static void setTextAppearance(TextView textview, int style) { diff --git a/src/android/org/linphone/compatibility/Compatibility.java b/src/android/org/linphone/compatibility/Compatibility.java index 34c5209eb..171bf5444 100644 --- a/src/android/org/linphone/compatibility/Compatibility.java +++ b/src/android/org/linphone/compatibility/Compatibility.java @@ -32,9 +32,7 @@ import android.text.Spanned; import android.view.ViewTreeObserver; import android.view.ViewTreeObserver.OnGlobalLayoutListener; import android.widget.TextView; -/** - * @author Sylvain Berfini - */ + public class Compatibility { public static void CreateChannel(Context context) { if (Version.sdkAboveOrEqual(Version.API26_O_80)) { diff --git a/src/android/org/linphone/compatibility/CompatibilityScaleGestureDetector.java b/src/android/org/linphone/compatibility/CompatibilityScaleGestureDetector.java index 68dc99b79..a8e315896 100644 --- a/src/android/org/linphone/compatibility/CompatibilityScaleGestureDetector.java +++ b/src/android/org/linphone/compatibility/CompatibilityScaleGestureDetector.java @@ -1,5 +1,24 @@ package org.linphone.compatibility; +/* +CompatibilityScaleGestureDetector.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import android.annotation.TargetApi; import android.content.Context; import android.view.MotionEvent; @@ -9,32 +28,32 @@ import android.view.ScaleGestureDetector; public class CompatibilityScaleGestureDetector extends ScaleGestureDetector.SimpleOnScaleGestureListener { private ScaleGestureDetector detector; private CompatibilityScaleGestureListener listener; - + public CompatibilityScaleGestureDetector(Context context) { detector = new ScaleGestureDetector(context, this); } - + public void setOnScaleListener(CompatibilityScaleGestureListener newListener) { listener = newListener; } - + public boolean onTouchEvent(MotionEvent event) { return detector.onTouchEvent(event); } - + @Override public boolean onScale(ScaleGestureDetector detector) { if (listener == null) { return false; } - + return listener.onScale(this); } - + public float getScaleFactor() { return detector.getScaleFactor(); } - + public void destroy() { listener = null; detector = null; diff --git a/src/android/org/linphone/compatibility/CompatibilityScaleGestureListener.java b/src/android/org/linphone/compatibility/CompatibilityScaleGestureListener.java index 67ffcfc57..48ec9b17b 100644 --- a/src/android/org/linphone/compatibility/CompatibilityScaleGestureListener.java +++ b/src/android/org/linphone/compatibility/CompatibilityScaleGestureListener.java @@ -1,5 +1,23 @@ package org.linphone.compatibility; +/* +CompatibilityScaleGestureListener.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ public interface CompatibilityScaleGestureListener { public boolean onScale(CompatibilityScaleGestureDetector detector); diff --git a/src/android/org/linphone/firebase/FirebaseIdService.java b/src/android/org/linphone/firebase/FirebaseIdService.java index d75b9f399..0c1b01976 100644 --- a/src/android/org/linphone/firebase/FirebaseIdService.java +++ b/src/android/org/linphone/firebase/FirebaseIdService.java @@ -25,9 +25,7 @@ import com.google.firebase.iid.FirebaseInstanceIdService; import org.linphone.LinphonePreferences; import org.linphone.UIThreadDispatcher; -/** - * @author Erwan Croze - */ + public class FirebaseIdService extends FirebaseInstanceIdService { @Override public void onTokenRefresh() { diff --git a/src/android/org/linphone/firebase/FirebaseMessaging.java b/src/android/org/linphone/firebase/FirebaseMessaging.java index 472e1e1ad..c3141f4cc 100644 --- a/src/android/org/linphone/firebase/FirebaseMessaging.java +++ b/src/android/org/linphone/firebase/FirebaseMessaging.java @@ -1,3 +1,5 @@ +package org.linphone.firebase; + /* FirebaseMessaging.java Copyright (C) 2017 Belledonne Communications, Grenoble, France @@ -17,8 +19,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.firebase; - import android.content.Intent; import com.google.firebase.messaging.FirebaseMessagingService; @@ -29,9 +29,7 @@ import org.linphone.LinphoneService; import org.linphone.UIThreadDispatcher; import static android.content.Intent.ACTION_MAIN; -/** - * @author Erwan Croze - */ + public class FirebaseMessaging extends FirebaseMessagingService { public FirebaseMessaging() { } diff --git a/src/android/org/linphone/gcm/GCMReceiver.java b/src/android/org/linphone/gcm/GCMReceiver.java index a1dbf0271..75b38602b 100644 --- a/src/android/org/linphone/gcm/GCMReceiver.java +++ b/src/android/org/linphone/gcm/GCMReceiver.java @@ -1,7 +1,7 @@ package org.linphone.gcm; /* GCMReceiver.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -22,9 +22,7 @@ import android.content.Context; import com.google.android.gcm.GCMBroadcastReceiver; -/** - * @author Sylvain Berfini - */ + public class GCMReceiver extends GCMBroadcastReceiver { @Override protected String getGCMIntentServiceClassName(Context context) { diff --git a/src/android/org/linphone/gcm/GCMService.java b/src/android/org/linphone/gcm/GCMService.java index c21f082fb..00b6abb09 100644 --- a/src/android/org/linphone/gcm/GCMService.java +++ b/src/android/org/linphone/gcm/GCMService.java @@ -1,7 +1,7 @@ package org.linphone.gcm; /* GCMService.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -33,9 +33,6 @@ import android.content.Intent; import com.google.android.gcm.GCMBaseIntentService; -/** - * @author Sylvain Berfini - */ // Warning ! Do not rename the service ! public class GCMService extends GCMBaseIntentService { diff --git a/src/android/org/linphone/purchase/InAppPurchaseActivity.java b/src/android/org/linphone/purchase/InAppPurchaseActivity.java index 44e7af4ff..5061c3de8 100644 --- a/src/android/org/linphone/purchase/InAppPurchaseActivity.java +++ b/src/android/org/linphone/purchase/InAppPurchaseActivity.java @@ -1,7 +1,7 @@ package org.linphone.purchase; /* InAppPurchaseListener.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -39,9 +39,6 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.Toast; -/** - * @author Sylvain Berfini - */ public class InAppPurchaseActivity extends Activity implements InAppPurchaseListener, OnClickListener { private static InAppPurchaseActivity instance; private InAppPurchaseHelper inAppPurchaseHelper; @@ -128,12 +125,12 @@ public class InAppPurchaseActivity extends Activity implements InAppPurchaseList public static InAppPurchaseActivity instance() { return instance; } - + @Override public void onServiceAvailableForQueries() { //email.setText(inAppPurchaseHelper.getGmailAccount()); //email.setEnabled(false); - + //inAppPurchaseHelper.getPurchasedItemsAsync(); inAppPurchaseHelper.getAvailableItemsForPurchaseAsync(); } @@ -189,7 +186,7 @@ public class InAppPurchaseActivity extends Activity implements InAppPurchaseList onBackPressed(); } } - + @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { inAppPurchaseHelper.parseAndVerifyPurchaseItemResultAsync(requestCode, resultCode, data); @@ -206,7 +203,7 @@ public class InAppPurchaseActivity extends Activity implements InAppPurchaseList @Override public void run() { inProgress.setVisibility(View.GONE); - Toast.makeText(InAppPurchaseActivity.this, error, Toast.LENGTH_LONG).show(); + Toast.makeText(InAppPurchaseActivity.this, error, Toast.LENGTH_LONG).show(); } }); } diff --git a/src/android/org/linphone/purchase/InAppPurchaseFragment.java b/src/android/org/linphone/purchase/InAppPurchaseFragment.java index 685ddeecd..083095e30 100644 --- a/src/android/org/linphone/purchase/InAppPurchaseFragment.java +++ b/src/android/org/linphone/purchase/InAppPurchaseFragment.java @@ -1,7 +1,7 @@ package org.linphone.purchase; /* InAppPurchaseFragment.java -Copyright (C) 2016 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -50,7 +50,7 @@ public class InAppPurchaseFragment extends Fragment implements View.OnClickListe @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - + super.onCreate(savedInstanceState); View view = inflater.inflate(R.layout.in_app_store, container, false); diff --git a/src/android/org/linphone/purchase/InAppPurchaseHelper.java b/src/android/org/linphone/purchase/InAppPurchaseHelper.java index 62a584b06..1d7285ca7 100644 --- a/src/android/org/linphone/purchase/InAppPurchaseHelper.java +++ b/src/android/org/linphone/purchase/InAppPurchaseHelper.java @@ -1,7 +1,7 @@ package org.linphone.purchase; /* InAppPurchaseHelper.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -45,23 +45,20 @@ import android.util.Patterns; import com.android.vending.billing.IInAppBillingService; -/** - * @author Sylvain Berfini - */ public class InAppPurchaseHelper { public static final int API_VERSION = 3; public static final int ACTIVITY_RESULT_CODE_PURCHASE_ITEM = 11089; - + public static final String SKU_DETAILS_ITEM_LIST = "ITEM_ID_LIST"; public static final String SKU_DETAILS_LIST = "DETAILS_LIST"; public static final String SKU_DETAILS_PRODUCT_ID = "productId"; public static final String SKU_DETAILS_PRICE = "price"; public static final String SKU_DETAILS_TITLE = "title"; public static final String SKU_DETAILS_DESC = "description"; - + public static final String ITEM_TYPE_INAPP = "inapp"; public static final String ITEM_TYPE_SUBS = "subs"; - + public static final int RESPONSE_RESULT_OK = 0; public static final int RESULT_USER_CANCELED = 1; public static final int RESULT_SERVICE_UNAVAILABLE = 2; @@ -71,7 +68,7 @@ public class InAppPurchaseHelper { public static final int RESULT_ERROR = 6; public static final int RESULT_ITEM_ALREADY_OWNED = 7; public static final int RESULT_ITEM_NOT_OWNED = 8; - + public static final String RESPONSE_CODE = "RESPONSE_CODE"; public static final String RESPONSE_BUY_INTENT = "BUY_INTENT"; public static final String RESPONSE_INAPP_PURCHASE_DATA = "INAPP_PURCHASE_DATA"; @@ -80,7 +77,7 @@ public class InAppPurchaseHelper { public static final String RESPONSE_INAPP_PURCHASE_DATA_LIST = "INAPP_PURCHASE_DATA_LIST"; public static final String RESPONSE_INAPP_SIGNATURE_LIST = "INAPP_DATA_SIGNATURE_LIST"; public static final String RESPONSE_INAPP_CONTINUATION_TOKEN = "INAPP_CONTINUATION_TOKEN"; - + public static final String PURCHASE_DETAILS_PRODUCT_ID = "productId"; public static final String PURCHASE_DETAILS_ORDER_ID = "orderId"; public static final String PURCHASE_DETAILS_AUTO_RENEWING = "autoRenewing"; @@ -88,18 +85,18 @@ public class InAppPurchaseHelper { public static final String PURCHASE_DETAILS_PURCHASE_STATE = "purchaseState"; public static final String PURCHASE_DETAILS_PAYLOAD = "developerPayload"; public static final String PURCHASE_DETAILS_PURCHASE_TOKEN = "purchaseToken"; - + public static final String CLIENT_ERROR_SUBSCRIPTION_PURCHASE_NOT_AVAILABLE = "SUBSCRIPTION_PURCHASE_NOT_AVAILABLE"; public static final String CLIENT_ERROR_BIND_TO_BILLING_SERVICE_FAILED = "BIND_TO_BILLING_SERVICE_FAILED"; public static final String CLIENT_ERROR_BILLING_SERVICE_UNAVAILABLE = "BILLING_SERVICE_UNAVAILABLE"; - + private Context mContext; private InAppPurchaseListener mListener; private IInAppBillingService mService; private ServiceConnection mServiceConn; private Handler mHandler = new Handler(); private String mGmailAccount; - + private String responseCodeToErrorMessage(int responseCode) { switch (responseCode) { case RESULT_USER_CANCELED: @@ -121,7 +118,7 @@ public class InAppPurchaseHelper { } return "UNKNOWN_RESPONSE_CODE"; } - + public InAppPurchaseHelper(Activity context, InAppPurchaseListener listener) { mContext = context; mListener = listener; @@ -169,13 +166,13 @@ public class InAppPurchaseHelper { mListener.onError(CLIENT_ERROR_BILLING_SERVICE_UNAVAILABLE); } } - + private ArrayList getAvailableItemsForPurchase() { ArrayList products = new ArrayList(); ArrayList skuList = LinphonePreferences.instance().getInAppPurchasables(); Bundle querySkus = new Bundle(); querySkus.putStringArrayList(SKU_DETAILS_ITEM_LIST, skuList); - + Bundle skuDetails = null; try { skuDetails = mService.getSkuDetails(API_VERSION, mContext.getPackageName(), ITEM_TYPE_SUBS, querySkus); @@ -194,7 +191,7 @@ public class InAppPurchaseHelper { String price = object.getString(SKU_DETAILS_PRICE); String title = object.getString(SKU_DETAILS_TITLE); String desc = object.getString(SKU_DETAILS_DESC); - + Purchasable purchasable = new Purchasable(id).setTitle(title).setDescription(desc).setPrice(price); Log.w("Purchasable item " + purchasable.getDescription()); products.add(purchasable); @@ -207,10 +204,10 @@ public class InAppPurchaseHelper { mListener.onError(responseCodeToErrorMessage(response)); } } - + return products; } - + public void getAvailableItemsForPurchaseAsync() { new Thread(new Runnable() { public void run() { @@ -225,11 +222,11 @@ public class InAppPurchaseHelper { } }).start(); } - + public void getPurchasedItemsAsync() { new Thread(new Runnable() { public void run() { - + final ArrayList items = new ArrayList(); String continuationToken = null; do { @@ -239,19 +236,19 @@ public class InAppPurchaseHelper { } catch (RemoteException e) { Log.e(e); } - + if (purchasedItems != null) { int response = purchasedItems.getInt(RESPONSE_CODE); if (response == RESPONSE_RESULT_OK) { ArrayList purchaseDataList = purchasedItems.getStringArrayList(RESPONSE_INAPP_PURCHASE_DATA_LIST); ArrayList signatureList = purchasedItems.getStringArrayList(RESPONSE_INAPP_SIGNATURE_LIST); continuationToken = purchasedItems.getString(RESPONSE_INAPP_CONTINUATION_TOKEN); - + for (int i = 0; i < purchaseDataList.size(); ++i) { String purchaseData = purchaseDataList.get(i); String signature = signatureList.get(i); Log.d("[In-app purchase] " + purchaseData); - + Purchasable item = verifySignature(purchaseData, signature); if (item != null) { items.add(item); @@ -263,7 +260,7 @@ public class InAppPurchaseHelper { } } } while (continuationToken != null); - + if (mHandler != null && mListener != null) { mHandler.post(new Runnable() { public void run() { @@ -274,7 +271,7 @@ public class InAppPurchaseHelper { } }).start(); } - + public void parseAndVerifyPurchaseItemResultAsync(int requestCode, int resultCode, Intent data) { if (requestCode == ACTIVITY_RESULT_CODE_PURCHASE_ITEM) { int responseCode = data.getIntExtra(RESPONSE_CODE, 0); @@ -286,7 +283,7 @@ public class InAppPurchaseHelper { Purchasable item = LinphonePreferences.instance().getInAppPurchasedItem(); item.setPayloadAndSignature(payload, signature); LinphonePreferences.instance().setInAppPurchasedItem(item); - + XmlRpcHelper xmlRpcHelper = new XmlRpcHelper(); xmlRpcHelper.verifySignatureAsync(new XmlRpcListenerBase() { @Override @@ -297,7 +294,7 @@ public class InAppPurchaseHelper { } } } - + private void purchaseItem(String productId, String sipIdentity) { Bundle buyIntentBundle = null; try { @@ -305,7 +302,7 @@ public class InAppPurchaseHelper { } catch (RemoteException e) { Log.e(e); } - + if (buyIntentBundle != null) { PendingIntent pendingIntent = buyIntentBundle.getParcelable(RESPONSE_BUY_INTENT); if (pendingIntent != null) { @@ -317,7 +314,7 @@ public class InAppPurchaseHelper { } } } - + public void purchaseItemAsync(final String productId, final String sipIdentity) { new Thread(new Runnable() { public void run() { @@ -325,29 +322,29 @@ public class InAppPurchaseHelper { } }).start(); } - + public void destroy() { mContext.unbindService(mServiceConn); } - + public String getGmailAccount() { Account[] accounts = AccountManager.get(mContext).getAccountsByType("com.google"); - + for (Account account: accounts) { if (isEmailCorrect(account.name)) { String possibleEmail = account.name; return possibleEmail; } } - + return null; } - + private boolean isEmailCorrect(String email) { Pattern emailPattern = Patterns.EMAIL_ADDRESS; return emailPattern.matcher(email).matches(); } - + private Purchasable verifySignature(String payload, String signature) { // TODO FIXME rework to be async /*XmlRpcHelper helper = new XmlRpcHelper(); @@ -355,7 +352,7 @@ public class InAppPurchaseHelper { try { JSONObject json = new JSONObject(payload); String productId = json.getString(PURCHASE_DETAILS_PRODUCT_ID); - Purchasable item = new Purchasable(productId); + Purchasable item = new Purchasable(productId); item.setPayloadAndSignature(payload, signature); return item; } catch (JSONException e) { @@ -364,7 +361,7 @@ public class InAppPurchaseHelper { }*/ return null; } - + interface VerifiedSignatureListener { void onParsedAndVerifiedSignatureQueryFinished(Purchasable item); } diff --git a/src/android/org/linphone/purchase/InAppPurchaseListFragment.java b/src/android/org/linphone/purchase/InAppPurchaseListFragment.java index 5d696922b..c4de79cbb 100644 --- a/src/android/org/linphone/purchase/InAppPurchaseListFragment.java +++ b/src/android/org/linphone/purchase/InAppPurchaseListFragment.java @@ -2,7 +2,7 @@ package org.linphone.purchase; /* InAppPurchaseListFragment.java -Copyright (C) 2016 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 diff --git a/src/android/org/linphone/purchase/InAppPurchaseListener.java b/src/android/org/linphone/purchase/InAppPurchaseListener.java index 43ea62832..6105b0639 100644 --- a/src/android/org/linphone/purchase/InAppPurchaseListener.java +++ b/src/android/org/linphone/purchase/InAppPurchaseListener.java @@ -1,7 +1,7 @@ package org.linphone.purchase; /* InAppPurchaseListener.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -20,27 +20,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import java.util.ArrayList; -/** - * @author Sylvain Berfini - */ public interface InAppPurchaseListener { /** * Callback called when the in-app purchase listener is connected and available for queries */ void onServiceAvailableForQueries(); - + /** * Callback called when the query for items available for purchase is done * @param items the list of items that can be purchased (also contains the ones already bought) */ void onAvailableItemsForPurchaseQueryFinished(ArrayList items); - + /** * Callback called when the query for items bought by the user is done * @param items the list of items already purchased by the user */ void onPurchasedItemsQueryFinished(ArrayList items); - + /** * Callback called when the purchase has been validated by our external server * @param success true if ok, false otherwise @@ -52,13 +49,13 @@ public interface InAppPurchaseListener { * @param success true if the recover has been successful, false otherwise */ void onRecoverAccountSuccessful(boolean success); - + /** * Callback called when the account has been activated (or not) * @param success true if the activation has been successful, false otherwise */ void onActivateAccountSuccessful(boolean success); - + /** * Callback called when an error occurred. * @param error the error that occurred diff --git a/src/android/org/linphone/purchase/InAppPurchaseListenerBase.java b/src/android/org/linphone/purchase/InAppPurchaseListenerBase.java index b99a97ddc..8917f9c4e 100644 --- a/src/android/org/linphone/purchase/InAppPurchaseListenerBase.java +++ b/src/android/org/linphone/purchase/InAppPurchaseListenerBase.java @@ -1,47 +1,66 @@ package org.linphone.purchase; +/* +InAppPurchaseListenerBase.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import java.util.ArrayList; public class InAppPurchaseListenerBase implements InAppPurchaseListener { @Override public void onServiceAvailableForQueries() { // TODO Auto-generated method stub - + } @Override public void onAvailableItemsForPurchaseQueryFinished(ArrayList items) { // TODO Auto-generated method stub - + } @Override public void onPurchasedItemsQueryFinished(ArrayList items) { // TODO Auto-generated method stub - + } @Override public void onPurchasedItemConfirmationQueryFinished(boolean success) { // TODO Auto-generated method stub - + } @Override public void onRecoverAccountSuccessful(boolean success) { // TODO Auto-generated method stub - + } @Override public void onActivateAccountSuccessful(boolean success) { // TODO Auto-generated method stub - + } @Override public void onError(String error) { // TODO Auto-generated method stub - + } } diff --git a/src/android/org/linphone/purchase/Purchasable.java b/src/android/org/linphone/purchase/Purchasable.java index 44156b520..f4eb9eaac 100644 --- a/src/android/org/linphone/purchase/Purchasable.java +++ b/src/android/org/linphone/purchase/Purchasable.java @@ -7,7 +7,7 @@ import java.util.Locale; /* Purchasable.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -24,15 +24,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ public class Purchasable { private String id, title, description, price; private long expire; - private String purchasePayload, purchasePayloadSignature; + private String purchasePayload, purchasePayloadSignature; private String userData; - + public Purchasable(String id) { this.id = id; } @@ -71,7 +68,7 @@ public class Purchasable { public long getExpire() { return expire; } - + public String getExpireDate() { DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.getDefault()); Date date = new Date(expire); @@ -82,26 +79,26 @@ public class Purchasable { this.expire = expire; return this; } - + public Purchasable setPayloadAndSignature(String payload, String signature) { this.purchasePayload = payload; this.purchasePayloadSignature = signature; return this; } - + public String getPayload() { return this.purchasePayload; } - + public String getPayloadSignature() { return this.purchasePayloadSignature; } - + public Purchasable setUserData(String data) { this.userData = data; return this; } - + public String getUserData() { return this.userData; } diff --git a/src/android/org/linphone/sync/AuthenticationService.java b/src/android/org/linphone/sync/AuthenticationService.java index b999966d8..1b329f2fa 100644 --- a/src/android/org/linphone/sync/AuthenticationService.java +++ b/src/android/org/linphone/sync/AuthenticationService.java @@ -2,7 +2,7 @@ package org.linphone.sync; /* AuthenticationService.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 diff --git a/src/android/org/linphone/sync/Authenticator.java b/src/android/org/linphone/sync/Authenticator.java index fc0ffc4d5..5b6e705c1 100644 --- a/src/android/org/linphone/sync/Authenticator.java +++ b/src/android/org/linphone/sync/Authenticator.java @@ -2,7 +2,7 @@ package org.linphone.sync; /* Authenticator.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 diff --git a/src/android/org/linphone/sync/SyncAdapter.java b/src/android/org/linphone/sync/SyncAdapter.java index 291f5b448..95ae63940 100755 --- a/src/android/org/linphone/sync/SyncAdapter.java +++ b/src/android/org/linphone/sync/SyncAdapter.java @@ -2,7 +2,7 @@ package org.linphone.sync; /* SyncAdapter.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 diff --git a/src/android/org/linphone/sync/SyncService.java b/src/android/org/linphone/sync/SyncService.java index 6bec5b043..7caddd1d7 100755 --- a/src/android/org/linphone/sync/SyncService.java +++ b/src/android/org/linphone/sync/SyncService.java @@ -2,7 +2,7 @@ package org.linphone.sync; /* SyncService.java -Copyright (C) 2015 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 diff --git a/src/android/org/linphone/tutorials/AndroidTutorialNotifier.java b/src/android/org/linphone/tutorials/AndroidTutorialNotifier.java index 739bcaed1..c5b55a720 100644 --- a/src/android/org/linphone/tutorials/AndroidTutorialNotifier.java +++ b/src/android/org/linphone/tutorials/AndroidTutorialNotifier.java @@ -1,6 +1,8 @@ +package org.linphone.tutorials; + /* AndroidTutorialNotifier.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.tutorials; import org.linphone.core.tutorials.TutorialNotifier; @@ -26,21 +27,19 @@ import android.widget.TextView; /** * Write notifications to a TextView widget. * This is an helper class, not a test activity. - * - * @author Guillaume Beraudo * */ class AndroidTutorialNotifier extends TutorialNotifier { private Handler mHandler; private TextView outputTextView; - + public AndroidTutorialNotifier(Handler mHandler, final TextView outputTextView) { this.mHandler = mHandler; this.outputTextView = outputTextView; } - - + + @Override public void notify(final String s) { mHandler.post(new Runnable() { diff --git a/src/android/org/linphone/tutorials/TutorialCardDavSync.java b/src/android/org/linphone/tutorials/TutorialCardDavSync.java index 660be41a2..3474b5fbb 100644 --- a/src/android/org/linphone/tutorials/TutorialCardDavSync.java +++ b/src/android/org/linphone/tutorials/TutorialCardDavSync.java @@ -1,5 +1,24 @@ package org.linphone.tutorials; +/* +TutorialCardDavSync.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import java.nio.ByteBuffer; import java.util.Timer; import java.util.TimerTask; diff --git a/src/android/org/linphone/tutorials/TutorialChatRoomActivity.java b/src/android/org/linphone/tutorials/TutorialChatRoomActivity.java index 23a9153e7..c93e2cd0a 100644 --- a/src/android/org/linphone/tutorials/TutorialChatRoomActivity.java +++ b/src/android/org/linphone/tutorials/TutorialChatRoomActivity.java @@ -1,6 +1,8 @@ +package org.linphone.tutorials; + /* TutorialChatRoomActivity.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.tutorials; import org.linphone.R; import org.linphone.core.LinphoneCoreException; @@ -34,8 +35,6 @@ import android.widget.TextView; /** * Activity for displaying and starting the chatroom example on Android phone. * - * @author Guillaume Beraudo - * */ public class TutorialChatRoomActivity extends Activity { @@ -56,12 +55,12 @@ public class TutorialChatRoomActivity extends Activity { final TextView outputText = (TextView) findViewById(R.id.OutputText); final TutorialNotifier notifier = new AndroidTutorialNotifier(mHandler, outputText); - + // Create HelloWorld object tutorial = new TutorialChatRoom(notifier); - - + + // Assign call action to call button buttonCall = (Button) findViewById(R.id.CallButton); buttonCall.setOnClickListener(new View.OnClickListener() { @@ -80,8 +79,8 @@ public class TutorialChatRoomActivity extends Activity { } }); } - - + + private class TutorialLaunchingThread extends Thread { @Override public void run() { diff --git a/src/android/org/linphone/tutorials/TutorialLauncherActivity.java b/src/android/org/linphone/tutorials/TutorialLauncherActivity.java index b3668e635..1323ec529 100644 --- a/src/android/org/linphone/tutorials/TutorialLauncherActivity.java +++ b/src/android/org/linphone/tutorials/TutorialLauncherActivity.java @@ -1,7 +1,7 @@ package org.linphone.tutorials; /* TutorialLauncherActivity.java -Copyright (C) 2013 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -25,32 +25,29 @@ import android.content.Intent; import android.os.Bundle; import android.view.View; -/** - * @author Sylvain Berfini - */ public class TutorialLauncherActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tutorials); } - + public void startHelloWorldTutorial(View v) { startActivity(new Intent().setClass(TutorialLauncherActivity.this, TutorialHelloWorldActivity.class)); } - + public void startRegistrationTutorial(View v) { startActivity(new Intent().setClass(TutorialLauncherActivity.this, TutorialRegistrationActivity.class)); } - + public void startChatRoomTutorial(View v) { startActivity(new Intent().setClass(TutorialLauncherActivity.this, TutorialChatRoomActivity.class)); } - + public void startBuddyStatusTutorial(View v) { startActivity(new Intent().setClass(TutorialLauncherActivity.this, TutorialBuddyStatusActivity.class)); } - + public void startCardDavSyncTutorial(View v) { startActivity(new Intent().setClass(TutorialLauncherActivity.this, TutorialCardDavSync.class)); } diff --git a/src/android/org/linphone/tutorials/TutorialRegistrationActivity.java b/src/android/org/linphone/tutorials/TutorialRegistrationActivity.java index da95f7fb4..a781bc624 100644 --- a/src/android/org/linphone/tutorials/TutorialRegistrationActivity.java +++ b/src/android/org/linphone/tutorials/TutorialRegistrationActivity.java @@ -1,6 +1,8 @@ +package org.linphone.tutorials; + /* TutorialRegistrationActivity.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.tutorials; import org.linphone.R; import org.linphone.core.LinphoneCoreException; @@ -32,8 +33,6 @@ import android.widget.TextView; /** * Activity for displaying and starting the registration example on Android phone. - * - * @author Guillaume Beraudo * */ public class TutorialRegistrationActivity extends TutorialHelloWorldActivity { @@ -62,12 +61,12 @@ public class TutorialRegistrationActivity extends TutorialHelloWorldActivity { outputText = (TextView) findViewById(R.id.OutputText); final TutorialNotifier notifier = new AndroidTutorialNotifier(mHandler, outputText); - + // Create Tutorial object tutorial = new TutorialRegistration(notifier); - - + + // Assign call action to call button buttonCall = (Button) findViewById(R.id.CallButton); buttonCall.setText("Register"); @@ -87,8 +86,8 @@ public class TutorialRegistrationActivity extends TutorialHelloWorldActivity { } }); } - - + + private class TutorialLaunchingThread extends Thread { @Override public void run() { diff --git a/src/android/org/linphone/ui/AddressAware.java b/src/android/org/linphone/ui/AddressAware.java index fe2f792c1..b5515d8c7 100644 --- a/src/android/org/linphone/ui/AddressAware.java +++ b/src/android/org/linphone/ui/AddressAware.java @@ -1,6 +1,8 @@ +package org.linphone.ui; + /* AddressAwareWidget.java -Copyright (C) 2011 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,14 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.ui; - - -/** - * @author Guillaume Beraudo - * - */ public interface AddressAware { void setAddressWidget(AddressText address); diff --git a/src/android/org/linphone/ui/AddressText.java b/src/android/org/linphone/ui/AddressText.java index 8be3649e5..e453fc010 100644 --- a/src/android/org/linphone/ui/AddressText.java +++ b/src/android/org/linphone/ui/AddressText.java @@ -1,6 +1,8 @@ +package org.linphone.ui; + /* AddressView.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.ui; import org.linphone.DialerFragment; import org.linphone.LinphoneManager.AddressType; @@ -29,17 +30,13 @@ import android.util.AttributeSet; import android.util.TypedValue; import android.widget.EditText; -/** - * @author Guillaume Beraudo - * - */ public class AddressText extends EditText implements AddressType { private String displayedName; private Uri pictureUri; private Paint mTestPaint; private DialerFragment dialer; - + public void setPictureUri(Uri uri) { pictureUri = uri; } @@ -71,7 +68,7 @@ public class AddressText extends EditText implements AddressType { public void setDisplayedName(String displayedName) { this.displayedName = displayedName; } - + private String getHintText() { String resizedText = getContext().getString(R.string.address_bar_hint); if (getHint() != null) { @@ -87,7 +84,7 @@ public class AddressText extends EditText implements AddressType { pictureUri = null; refitText(getWidth(), getHeight()); - + if (dialer != null) { dialer.enableDisableAddContact(); } @@ -101,7 +98,7 @@ public class AddressText extends EditText implements AddressType { refitText(getWidth(), getHeight()); } } - + private float getOptimizedTextSize(String text, int textWidth, int textHeight) { int targetWidth = textWidth - getPaddingLeft() - getPaddingRight(); int targetHeight = textHeight - getPaddingTop() - getPaddingBottom(); @@ -121,7 +118,7 @@ public class AddressText extends EditText implements AddressType { lo = size; } } - + return lo; } @@ -129,7 +126,7 @@ public class AddressText extends EditText implements AddressType { if (textWidth <= 0) { return; } - + float size = getOptimizedTextSize(getHintText(), textWidth, textHeight); float entrySize = getOptimizedTextSize(getText().toString(), textWidth, textHeight); if (entrySize < size) @@ -141,7 +138,7 @@ public class AddressText extends EditText implements AddressType { super.onMeasure(widthMeasureSpec, heightMeasureSpec); int parentWidth = MeasureSpec.getSize(widthMeasureSpec); int height = getMeasuredHeight(); - + refitText(parentWidth, height); setMeasuredDimension(parentWidth, height); } diff --git a/src/android/org/linphone/ui/CallButton.java b/src/android/org/linphone/ui/CallButton.java index 493769ee9..b5d9b58ae 100644 --- a/src/android/org/linphone/ui/CallButton.java +++ b/src/android/org/linphone/ui/CallButton.java @@ -1,6 +1,8 @@ +package org.linphone.ui; + /* CallButton.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.ui; import org.linphone.LinphoneManager; import org.linphone.LinphonePreferences; @@ -33,9 +34,6 @@ import android.view.View.OnClickListener; import android.widget.ImageView; import android.widget.Toast; -/** - * @author Guillaume Beraudo - */ public class CallButton extends ImageView implements OnClickListener, AddressAware { private AddressText mAddress; @@ -52,7 +50,7 @@ public class CallButton extends ImageView implements OnClickListener, AddressAwa public void onClick(View v) { try { if (!LinphoneManager.getInstance().acceptCallIfIncomingPending()) { - if (mAddress.getText().length() > 0) { + if (mAddress.getText().length() > 0) { LinphoneManager.getInstance().newOutgoingCall(mAddress); } else { if (LinphonePreferences.instance().isBisFeatureEnabled()) { @@ -67,7 +65,7 @@ public class CallButton extends ImageView implements OnClickListener, AddressAwa if (log == null) { return; } - + LinphoneProxyConfig lpc = LinphoneManager.getLc().getDefaultProxyConfig(); if (lpc != null && log.getTo().getDomain().equals(lpc.getDomain())) { mAddress.setText(log.getTo().getUserName()); @@ -84,7 +82,7 @@ public class CallButton extends ImageView implements OnClickListener, AddressAwa onWrongDestinationAddress(); } } - + protected void onWrongDestinationAddress() { Toast.makeText(getContext() ,String.format(getResources().getString(R.string.warning_wrong_destination_address),mAddress.getText().toString()) diff --git a/src/android/org/linphone/ui/Digit.java b/src/android/org/linphone/ui/Digit.java index 15c9282a9..5581266ce 100644 --- a/src/android/org/linphone/ui/Digit.java +++ b/src/android/org/linphone/ui/Digit.java @@ -1,6 +1,8 @@ +package org.linphone.ui; + /* Digit.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.ui; import org.linphone.CallActivity; import org.linphone.LinphoneManager; @@ -52,7 +53,7 @@ public class Digit extends Button implements AddressAware { protected void onTextChanged(CharSequence text, int start, int before, int after) { super.onTextChanged(text, start, before, after); - + if (text == null || text.length() < 1) { return; } @@ -60,21 +61,21 @@ public class Digit extends Button implements AddressAware { DialKeyListener lListener = new DialKeyListener(); setOnClickListener(lListener); setOnTouchListener(lListener); - + if ("0+".equals(text)) { setOnLongClickListener(lListener); } - + if ("1".equals(text)) { setOnLongClickListener(lListener); } } - + public Digit(Context context, AttributeSet attrs, int style) { super(context, attrs, style); setLongClickable(true); } - + public Digit(Context context, AttributeSet attrs) { super(context, attrs); setLongClickable(true); @@ -112,7 +113,7 @@ public class Digit extends Button implements AddressAware { lc.sendDtmf(mKeyCode); } } - + if (mAddress != null) { int lBegin = mAddress.getSelectionStart(); if (lBegin == -1) { @@ -169,7 +170,7 @@ public class Digit extends Button implements AddressAware { if (CallActivity.isInstanciated()) { CallActivity.instance().resetControlsHidingCallBack(); } - + LinphoneCore lc = LinphoneManager.getLc(); if (event.getAction() == MotionEvent.ACTION_DOWN && !mIsDtmfStarted) { LinphoneManager.getInstance().playDtmf(getContext().getContentResolver(), mKeyCode); @@ -182,7 +183,7 @@ public class Digit extends Button implements AddressAware { } return false; } - + public boolean onLongClick(View v) { int id = v.getId(); LinphoneCore lc = LinphoneManager.getLc(); @@ -192,7 +193,7 @@ public class Digit extends Button implements AddressAware { // Called if "0+" dtmf lc.stopDtmf(); } - + if(id == R.id.Digit1 && lc.getCalls().length == 0){ String voiceMail = LinphonePreferences.instance().getVoiceMailUri(); mAddress.getEditableText().clear(); @@ -202,8 +203,8 @@ public class Digit extends Button implements AddressAware { } return true; } - - + + if (mAddress == null) return true; int lBegin = mAddress.getSelectionStart(); diff --git a/src/android/org/linphone/ui/LedPreference.java b/src/android/org/linphone/ui/LedPreference.java index 7aebe57a6..df67e128d 100644 --- a/src/android/org/linphone/ui/LedPreference.java +++ b/src/android/org/linphone/ui/LedPreference.java @@ -2,7 +2,7 @@ package org.linphone.ui; /* LedPreference.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -26,13 +26,10 @@ import android.preference.Preference; import android.view.View; import android.widget.ImageView; -/** - * @author Sylvain Berfini - */ public class LedPreference extends Preference { private int ledDrawable; - + public LedPreference(Context context) { super(context); ledDrawable = R.drawable.led_disconnected; diff --git a/src/android/org/linphone/ui/LinphoneOverlay.java b/src/android/org/linphone/ui/LinphoneOverlay.java index 1a71ec66a..9924a6ded 100644 --- a/src/android/org/linphone/ui/LinphoneOverlay.java +++ b/src/android/org/linphone/ui/LinphoneOverlay.java @@ -1,5 +1,24 @@ package org.linphone.ui; +/* +LinphoneOverlay.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import org.linphone.LinphoneActivity; import org.linphone.LinphoneManager; import org.linphone.LinphoneService; diff --git a/src/android/org/linphone/ui/LinphoneScrollView.java b/src/android/org/linphone/ui/LinphoneScrollView.java index 997c8abf0..0ff59fe9a 100644 --- a/src/android/org/linphone/ui/LinphoneScrollView.java +++ b/src/android/org/linphone/ui/LinphoneScrollView.java @@ -1,7 +1,7 @@ package org.linphone.ui; /* LinphoneScrollView.java -Copyright (C) 2013 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -21,9 +21,6 @@ import android.content.Context; import android.util.AttributeSet; import android.widget.ScrollView; -/** - * @author Sylvain Berfini - */ public class LinphoneScrollView extends ScrollView { private ScrollViewListener scrollViewListener = null; diff --git a/src/android/org/linphone/ui/LinphoneSliders.java b/src/android/org/linphone/ui/LinphoneSliders.java index 4f6062b9b..656fde902 100644 --- a/src/android/org/linphone/ui/LinphoneSliders.java +++ b/src/android/org/linphone/ui/LinphoneSliders.java @@ -11,7 +11,7 @@ import android.view.View; /* LinphoneSliders.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -28,9 +28,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ public class LinphoneSliders extends View implements OnGestureListener { private Drawable leftSliderImg, rightSliderImg; private int leftSliderX, rightSliderX; @@ -39,36 +36,36 @@ public class LinphoneSliders extends View implements OnGestureListener { private LinphoneSliderTriggered mTriggerListener; private boolean slidingLeftHandle, slidingRightHandle; private static final double mCoeff = 0.5; - + public LinphoneSliders(Context context, AttributeSet attrs) { super(context, attrs); mGestures = new GestureDetector(getContext(), this); //leftSliderImg = getResources().getDrawable(R.drawable.slider_left); //rightSliderImg = getResources().getDrawable(R.drawable.slider_right); - + slidersHeight = leftSliderImg.getIntrinsicHeight(); slidersWidth = leftSliderImg.getIntrinsicWidth(); - + leftSliderX = 0; rightSliderX = 0; slidingLeftHandle = slidingRightHandle = false; } - + @Override protected void onDraw(Canvas canvas) { rightSliderImg.setBounds(getWidth() - slidersWidth - rightSliderX, getHeight() - slidersHeight, getWidth(), getHeight()); rightSliderImg.draw(canvas); - + leftSliderImg.setBounds(0, getHeight() - slidersHeight, slidersWidth + leftSliderX, getHeight()); leftSliderImg.draw(canvas); - + if (slidingLeftHandle && Math.abs(leftSliderX) >= mCoeff * getWidth()) { mTriggerListener.onLeftHandleTriggered(); } else if (slidingRightHandle && rightSliderX >= mCoeff * getWidth()) { mTriggerListener.onRightHandleTriggered(); } } - + @Override public boolean onTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_UP) { @@ -77,8 +74,8 @@ public class LinphoneSliders extends View implements OnGestureListener { slidingLeftHandle = slidingRightHandle = false; invalidate(); } - - return mGestures.onTouchEvent(event); + + return mGestures.onTouchEvent(event); } @Override @@ -94,7 +91,7 @@ public class LinphoneSliders extends View implements OnGestureListener { @Override public void onLongPress(MotionEvent e) { - + } @Override @@ -103,7 +100,7 @@ public class LinphoneSliders extends View implements OnGestureListener { if (e1.getY() < getHeight() - slidersHeight) { return false; } - + if (e1.getX() < getWidth() / 2) { leftSliderX -= distanceX; slidingLeftHandle = true; @@ -112,20 +109,20 @@ public class LinphoneSliders extends View implements OnGestureListener { slidingRightHandle = true; } invalidate(); - + return true; } @Override public void onShowPress(MotionEvent e) { - + } @Override public boolean onSingleTapUp(MotionEvent e) { return false; } - + public void setOnTriggerListener(LinphoneSliderTriggered listener) { mTriggerListener = listener; } diff --git a/src/android/org/linphone/ui/Numpad.java b/src/android/org/linphone/ui/Numpad.java index 9c751dd8e..0af6032a4 100644 --- a/src/android/org/linphone/ui/Numpad.java +++ b/src/android/org/linphone/ui/Numpad.java @@ -1,6 +1,8 @@ +package org.linphone.ui; + /* NumpadView.java -Copyright (C) 2010 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -16,7 +18,6 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.linphone.ui; import java.util.ArrayList; import java.util.Collection; @@ -31,10 +32,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; -/** - * @author Guillaume Beraudo - * - */ public class Numpad extends LinearLayout implements AddressAware { private boolean mPlayDtmf; diff --git a/src/android/org/linphone/ui/PreferencesListFragment.java b/src/android/org/linphone/ui/PreferencesListFragment.java index 71b828d98..6719b48e9 100644 --- a/src/android/org/linphone/ui/PreferencesListFragment.java +++ b/src/android/org/linphone/ui/PreferencesListFragment.java @@ -1,7 +1,8 @@ package org.linphone.ui; + /* PreferencesListFragment.java -Copyright (C) 2012 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -17,6 +18,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import java.lang.reflect.Constructor; import java.lang.reflect.Method; @@ -45,13 +47,13 @@ import android.widget.RelativeLayout; @SuppressLint("ValidFragment") public class PreferencesListFragment extends ListFragment { private PreferenceManager mPreferenceManager; - + /** * The starting request code given out to preference framework. */ private static final int FIRST_REQUEST_CODE = 100; private static final int MSG_BIND_PREFERENCES = 0; - + private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { @@ -64,33 +66,33 @@ public class PreferencesListFragment extends ListFragment { }; private ListView preferencesList; private int xmlResID; - + public PreferencesListFragment(int xmlId) { this.xmlResID = xmlId; } - + // Must be provided public PreferencesListFragment() { - + } - + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle b) { // Hack to correctly display preferences View view = inflater.inflate(R.layout.settings, null); - + ViewParent p = preferencesList.getParent(); if (p != null) { ((ViewGroup)p).removeView(preferencesList); } - + RelativeLayout layout = (RelativeLayout) view.findViewById(R.id.topLayout); layout.addView(preferencesList); - + postBindPreferences(); return view; } - + @Override public void onDestroyView(){ super.onDestroyView(); @@ -103,11 +105,11 @@ public class PreferencesListFragment extends ListFragment { @Override public void onCreate(Bundle bundle) { super.onCreate(bundle); - + if (bundle != null) { xmlResID = bundle.getInt("xml"); } - + mPreferenceManager = onCreatePreferenceManager(); preferencesList = (ListView) LayoutInflater.from(getActivity()).inflate(R.layout.preference_list_content, null); preferencesList.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); @@ -168,17 +170,17 @@ public class PreferencesListFragment extends ListFragment { if (mHandler.hasMessages(MSG_BIND_PREFERENCES)) return; mHandler.obtainMessage(MSG_BIND_PREFERENCES).sendToTarget(); } - + private void bindPreferences() { final PreferenceScreen preferenceScreen = getPreferenceScreen(); if (preferenceScreen != null && preferencesList != null) { preferenceScreen.bind(preferencesList); } } - + /** * Creates the {@link PreferenceManager}. - * + * * @return The {@link PreferenceManager} used by this activity. */ private PreferenceManager onCreatePreferenceManager() { @@ -192,7 +194,7 @@ public class PreferencesListFragment extends ListFragment { return null; } } - + /** * Returns the {@link PreferenceManager} used by this activity. * @return The {@link PreferenceManager}. @@ -203,7 +205,7 @@ public class PreferencesListFragment extends ListFragment { /** * Sets the root of the preference hierarchy that this activity is showing. - * + * * @param preferenceScreen The root {@link PreferenceScreen} of the preference hierarchy. */ public void setPreferenceScreen(PreferenceScreen preferenceScreen) { @@ -218,10 +220,10 @@ public class PreferencesListFragment extends ListFragment { Log.e("[PreferencesListFragment] setPreferenceScreen " + e); } } - + /** * Gets the root of the preference hierarchy that this activity is showing. - * + * * @return The {@link PreferenceScreen} that is the root of the preference * hierarchy. */ @@ -233,17 +235,17 @@ public class PreferencesListFragment extends ListFragment { } catch(Exception e) { Log.e("[PreferencesListFragment] getPreferenceScreen " + e); } - + return null; } - + /** * Inflates the given XML resource and adds the preference hierarchy to the current * preference hierarchy. - * + * * @param preferencesResId The XML resource ID to inflate. */ - public void addPreferencesFromResource(int preferencesResId) { + public void addPreferencesFromResource(int preferencesResId) { try { Method m = PreferenceManager.class.getDeclaredMethod("inflateFromResource", Context.class, int.class, PreferenceScreen.class); m.setAccessible(true); @@ -253,10 +255,10 @@ public class PreferencesListFragment extends ListFragment { Log.e("[PreferencesListFragment] addPreferencesFromResource " + e); } } - + /** * Finds a {@link Preference} based on its key. - * + * * @param key The key of the preference to retrieve. * @return The {@link Preference} with the key, or null. * @see PreferenceGroup#findPreference(CharSequence) diff --git a/src/android/org/linphone/ui/ScrollViewListener.java b/src/android/org/linphone/ui/ScrollViewListener.java index 980e09771..e4f278cf0 100644 --- a/src/android/org/linphone/ui/ScrollViewListener.java +++ b/src/android/org/linphone/ui/ScrollViewListener.java @@ -1,7 +1,8 @@ package org.linphone.ui; + /* ScrollViewListener.java -Copyright (C) 2013 Belledonne Communications, Grenoble, France +Copyright (C) 2017 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 @@ -18,9 +19,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @author Sylvain Berfini - */ public interface ScrollViewListener { void OnScrollToTop(int previousHeight); } diff --git a/src/android/org/linphone/xmlrpc/XmlRpcHelper.java b/src/android/org/linphone/xmlrpc/XmlRpcHelper.java index 30b025e56..0ed15a41e 100644 --- a/src/android/org/linphone/xmlrpc/XmlRpcHelper.java +++ b/src/android/org/linphone/xmlrpc/XmlRpcHelper.java @@ -1,5 +1,24 @@ package org.linphone.xmlrpc; +/* +XmlRpcHelper.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import org.linphone.LinphoneManager; import org.linphone.LinphonePreferences; import org.linphone.core.LinphoneXmlRpcRequest; @@ -20,7 +39,7 @@ public class XmlRpcHelper { public static final String SERVER_ERROR_SIGNATURE_VERIFICATION_FAILED = "ERROR_SIGNATURE_VERIFICATION_FAILED"; public static final String SERVER_ERROR_ACCOUNT_ALREADY_EXISTS = "ERROR_ACCOUNT_ALREADY_EXISTS"; public static final String SERVER_ERROR_UNKNOWN_ERROR = "ERROR_UNKNOWN_ERROR"; - + public static final String CLIENT_ERROR_INVALID_SERVER_URL = "INVALID_SERVER_URL"; public static final String CLIENT_ERROR_SERVER_NOT_REACHABLE = "SERVER_NOT_REACHABLE"; @@ -29,7 +48,7 @@ public class XmlRpcHelper { public XmlRpcHelper() { xmlRpcSession = new LinphoneXmlRpcSessionImpl(LinphoneManager.getLcIfManagerNotDestroyedOrNull(), LinphonePreferences.instance().getInAppPurchaseValidatingServerUrl()); } - + public void createAccountAsync(final XmlRpcListener listener, String username, String email, String password) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("create_account", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -54,7 +73,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(password == null ? "" : password); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void getAccountExpireAsync(final XmlRpcListener listener, String username, String password) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("get_account_expiration", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -78,7 +97,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(password); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void updateAccountExpireAsync(final XmlRpcListener listener, String username, String password, String domain, String payload, String signature) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("update_expiration_date", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -105,7 +124,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(signature); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void activateAccountAsync(final XmlRpcListener listener, String username, String password) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("activate_account", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -129,7 +148,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(password); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void isAccountActivatedAsync(final XmlRpcListener listener, String username) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("check_account_activated", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -154,7 +173,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(username); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void isTrialAccountAsync(final XmlRpcListener listener, String username, String password) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("is_account_trial", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -176,7 +195,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(password); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void isAccountAsync(final XmlRpcListener listener, String username) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("check_account_activated", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -201,7 +220,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(username); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void changeAccountEmailAsync(final XmlRpcListener listener, String username, String password, String newEmail) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("change_email", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -214,7 +233,7 @@ public class XmlRpcHelper { listener.onError(result); return; } - + listener.onAccountEmailChanged(result); } else if (request.getStatus() == LinphoneXmlRpcRequest.Status.Failed) { Log.e(result); @@ -227,7 +246,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(newEmail); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void changeAccountPasswordAsync(final XmlRpcListener listener, String username, String oldPassword, String newPassword) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("change_password", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -240,7 +259,7 @@ public class XmlRpcHelper { listener.onError(result); return; } - + listener.onAccountPasswordChanged(result); } else if (request.getStatus() == LinphoneXmlRpcRequest.Status.Failed) { Log.e(result); @@ -253,7 +272,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(newPassword); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void changeAccountHashPasswordAsync(final XmlRpcListener listener, String username, String oldPassword, String newPassword) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("change_hash", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -266,7 +285,7 @@ public class XmlRpcHelper { listener.onError(result); return; } - + listener.onAccountPasswordChanged(result); } else if (request.getStatus() == LinphoneXmlRpcRequest.Status.Failed) { Log.e(result); @@ -279,7 +298,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(newPassword); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void sendRecoverPasswordLinkByEmailAsync(final XmlRpcListener listener, String usernameOrEmail) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("send_reset_account_password_email", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -292,7 +311,7 @@ public class XmlRpcHelper { listener.onError(result); return; } - + listener.onRecoverPasswordLinkSent(result); } else if (request.getStatus() == LinphoneXmlRpcRequest.Status.Failed) { Log.e(result); @@ -303,7 +322,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(usernameOrEmail); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void sendActivateAccountLinkByEmailAsync(final XmlRpcListener listener, String usernameOrEmail) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("resend_activation_email", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -316,7 +335,7 @@ public class XmlRpcHelper { listener.onError(result); return; } - + listener.onActivateAccountLinkSent(result); } else if (request.getStatus() == LinphoneXmlRpcRequest.Status.Failed) { Log.e(result); @@ -327,7 +346,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(usernameOrEmail); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void sendUsernameByEmailAsync(final XmlRpcListener listener, String email) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("recover_username_from_email", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -340,7 +359,7 @@ public class XmlRpcHelper { listener.onError(result); return; } - + listener.onUsernameSent(result); } else if (request.getStatus() == LinphoneXmlRpcRequest.Status.Failed) { Log.e(result); @@ -351,7 +370,7 @@ public class XmlRpcHelper { xmlRpcRequest.addStringArg(email); xmlRpcSession.sendRequest(xmlRpcRequest); } - + public void verifySignatureAsync(final XmlRpcListener listener, String payload, String signature) { LinphoneXmlRpcRequest xmlRpcRequest = new LinphoneXmlRpcRequestImpl("check_payload_signature", LinphoneXmlRpcRequest.ArgType.String); xmlRpcRequest.setListener(new LinphoneXmlRpcRequestListener() { @@ -365,7 +384,7 @@ public class XmlRpcHelper { listener.onError(result); return; } - + listener.onSignatureVerified("OK".equals(result)); } else if (request.getStatus() == LinphoneXmlRpcRequest.Status.Failed) { Log.e(result); diff --git a/src/android/org/linphone/xmlrpc/XmlRpcListener.java b/src/android/org/linphone/xmlrpc/XmlRpcListener.java index 976ad9316..47fe718d2 100644 --- a/src/android/org/linphone/xmlrpc/XmlRpcListener.java +++ b/src/android/org/linphone/xmlrpc/XmlRpcListener.java @@ -1,5 +1,24 @@ package org.linphone.xmlrpc; +/* +XmlRpcListener.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + public interface XmlRpcListener { public void onError(String error); public void onAccountCreated(String result); diff --git a/src/android/org/linphone/xmlrpc/XmlRpcListenerBase.java b/src/android/org/linphone/xmlrpc/XmlRpcListenerBase.java index d849f40b5..1d0d86422 100644 --- a/src/android/org/linphone/xmlrpc/XmlRpcListenerBase.java +++ b/src/android/org/linphone/xmlrpc/XmlRpcListenerBase.java @@ -1,90 +1,109 @@ package org.linphone.xmlrpc; +/* +XmlRpcListenerBase.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + public class XmlRpcListenerBase implements XmlRpcListener { @Override public void onError(String error) { // TODO Auto-generated method stub - + } @Override public void onAccountCreated(String result) { // TODO Auto-generated method stub - + } @Override public void onAccountExpireFetched(String result) { // TODO Auto-generated method stub - + } @Override public void onAccountActivated(String result) { // TODO Auto-generated method stub - + } @Override public void onAccountActivatedFetched(boolean isActivated) { // TODO Auto-generated method stub - + } @Override public void onTrialAccountFetched(boolean isTrial) { // TODO Auto-generated method stub - + } @Override public void onAccountFetched(boolean isExisting) { // TODO Auto-generated method stub - + } @Override public void onAccountEmailChanged(String result) { // TODO Auto-generated method stub - + } @Override public void onAccountPasswordChanged(String result) { // TODO Auto-generated method stub - + } @Override public void onRecoverPasswordLinkSent(String result) { // TODO Auto-generated method stub - + } @Override public void onActivateAccountLinkSent(String result) { // TODO Auto-generated method stub - + } @Override public void onAccountExpireUpdated(String result) { // TODO Auto-generated method stub - + } @Override public void onSignatureVerified(boolean success) { // TODO Auto-generated method stub - + } @Override public void onUsernameSent(String result) { // TODO Auto-generated method stub - + } - + @Override public void onRemoteProvisioningFilenameSent(String result) { // TODO Auto-generated method stub diff --git a/src/androidTest/org/linphone/AccountAssistant.java b/src/androidTest/org/linphone/AccountAssistant.java index af3397cff..c48997b4a 100644 --- a/src/androidTest/org/linphone/AccountAssistant.java +++ b/src/androidTest/org/linphone/AccountAssistant.java @@ -1,5 +1,24 @@ package org.linphone; +/* +AccountAssistant.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; import org.linphone.assistant.AssistantActivity; @@ -14,9 +33,6 @@ import android.widget.EditText; import android.widget.TextView; import android.widget.Button; -/** - * @author Sylvain Berfini - */ public class AccountAssistant extends SampleTest { @SmallTest diff --git a/src/androidTest/org/linphone/AccountManagement.java b/src/androidTest/org/linphone/AccountManagement.java index b87a2f2f0..c21eaf453 100644 --- a/src/androidTest/org/linphone/AccountManagement.java +++ b/src/androidTest/org/linphone/AccountManagement.java @@ -1,5 +1,24 @@ package org.linphone; +/* +AccountManagement.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; import org.linphone.FragmentsAvailable; @@ -9,9 +28,7 @@ import org.linphone.LinphonePreferences; import org.linphone.core.LinphoneProxyConfig; import android.test.suitebuilder.annotation.LargeTest; -/** - * @author Sylvain Berfini - */ + public class AccountManagement extends SampleTest { @LargeTest diff --git a/src/androidTest/org/linphone/AinitTestEnv.java b/src/androidTest/org/linphone/AinitTestEnv.java index 1ec9a6dfc..1daa95d39 100644 --- a/src/androidTest/org/linphone/AinitTestEnv.java +++ b/src/androidTest/org/linphone/AinitTestEnv.java @@ -1,14 +1,30 @@ package org.linphone; +/* +AinitTestEnv.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; -/** - * @author Sylvain Berfini - */ public class AinitTestEnv extends SampleTest { @SmallTest diff --git a/src/androidTest/org/linphone/CallsAudio.java b/src/androidTest/org/linphone/CallsAudio.java index f8a6f5494..39d8da491 100644 --- a/src/androidTest/org/linphone/CallsAudio.java +++ b/src/androidTest/org/linphone/CallsAudio.java @@ -1,5 +1,24 @@ package org.linphone; +/* +CallsAudio.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; import org.linphone.core.LinphoneCall; @@ -18,9 +37,6 @@ import static android.test.TouchUtils.dragViewToX; import static android.view.Gravity.CENTER_HORIZONTAL; import static android.view.Gravity.CENTER_VERTICAL; -/** - * @author Sylvain Berfini - */ public class CallsAudio extends SampleTest { @SmallTest diff --git a/src/androidTest/org/linphone/CallsVideo.java b/src/androidTest/org/linphone/CallsVideo.java index 1c1ea1953..5eaa257f1 100644 --- a/src/androidTest/org/linphone/CallsVideo.java +++ b/src/androidTest/org/linphone/CallsVideo.java @@ -1,5 +1,24 @@ package org.linphone; +/* +CallsVideo.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; import org.linphone.CallActivity; @@ -24,9 +43,6 @@ import static android.test.TouchUtils.dragViewToX; import static android.view.Gravity.CENTER_HORIZONTAL; import static android.view.Gravity.CENTER_VERTICAL; -/** - * @author Sylvain Berfini - */ public class CallsVideo extends SampleTest { @SmallTest diff --git a/src/androidTest/org/linphone/Chat.java b/src/androidTest/org/linphone/Chat.java index 5f8d6abd8..7b8bdd4dc 100644 --- a/src/androidTest/org/linphone/Chat.java +++ b/src/androidTest/org/linphone/Chat.java @@ -1,5 +1,24 @@ package org.linphone; +/* +Chat.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; import org.linphone.LinphoneActivity; @@ -16,10 +35,6 @@ import android.test.suitebuilder.annotation.SmallTest; import android.widget.EditText; import android.widget.AutoCompleteTextView; - -/** - * @author Sylvain Berfini - */ public class Chat extends SampleTest { @SmallTest diff --git a/src/androidTest/org/linphone/ConferenceAndMultiCall.java b/src/androidTest/org/linphone/ConferenceAndMultiCall.java index 7f8def150..b70c6aeb0 100644 --- a/src/androidTest/org/linphone/ConferenceAndMultiCall.java +++ b/src/androidTest/org/linphone/ConferenceAndMultiCall.java @@ -1,13 +1,27 @@ package org.linphone; -import java.util.ArrayList; +/* +ConferenceAndMultiCall.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ import junit.framework.Assert; -import org.linphone.CallActivity; -import org.linphone.CallIncomingActivity; -import org.linphone.LinphoneActivity; -import org.linphone.LinphoneManager; + import org.linphone.core.LinphoneCall; import org.linphone.core.LinphoneCoreException; import org.linphone.mediastream.Log; @@ -15,9 +29,7 @@ import org.linphone.mediastream.Log; import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; -import android.util.DisplayMetrics; import android.view.Gravity; -import android.view.View; import static android.test.TouchUtils.dragViewToX; diff --git a/src/androidTest/org/linphone/Contacts.java b/src/androidTest/org/linphone/Contacts.java index f6b862624..c0a8ddde8 100644 --- a/src/androidTest/org/linphone/Contacts.java +++ b/src/androidTest/org/linphone/Contacts.java @@ -1,5 +1,24 @@ package org.linphone; +/* +Contacts.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; @@ -7,9 +26,6 @@ import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; -/** - * @author Sylvain Berfini - */ public class Contacts extends SampleTest { @MediumTest diff --git a/src/androidTest/org/linphone/History.java b/src/androidTest/org/linphone/History.java index d1d52b305..1a82dca17 100644 --- a/src/androidTest/org/linphone/History.java +++ b/src/androidTest/org/linphone/History.java @@ -1,5 +1,24 @@ package org.linphone; +/* +History.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; import org.linphone.CallActivity; @@ -10,9 +29,6 @@ import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; -/** - * @author Sylvain Berfini - */ public class History extends SampleTest { @SmallTest diff --git a/src/androidTest/org/linphone/LinphoneTestManager.java b/src/androidTest/org/linphone/LinphoneTestManager.java index 628676013..a662980f5 100644 --- a/src/androidTest/org/linphone/LinphoneTestManager.java +++ b/src/androidTest/org/linphone/LinphoneTestManager.java @@ -1,5 +1,24 @@ package org.linphone; +/* +LinphoneTestManager.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import java.nio.ByteBuffer; import java.util.Timer; import java.util.TimerTask; diff --git a/src/androidTest/org/linphone/SampleTest.java b/src/androidTest/org/linphone/SampleTest.java index 27f420aa3..cd400106f 100644 --- a/src/androidTest/org/linphone/SampleTest.java +++ b/src/androidTest/org/linphone/SampleTest.java @@ -1,5 +1,24 @@ package org.linphone; +/* +SampleTest.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import org.linphone.core.LinphoneCall; import org.linphone.core.LinphoneCall.State; import org.linphone.core.LinphoneCore; @@ -13,9 +32,6 @@ import android.widget.ListView; import com.robotium.solo.Condition; import com.robotium.solo.Solo; -/** - * @author Sylvain Berfini - */ public abstract class SampleTest extends ActivityInstrumentationTestCase2{ protected final int STRING_LENGTH_MAX = 20; diff --git a/src/androidTest/org/linphone/Transfer.java b/src/androidTest/org/linphone/Transfer.java index 7a41cfba0..ee2487cd1 100644 --- a/src/androidTest/org/linphone/Transfer.java +++ b/src/androidTest/org/linphone/Transfer.java @@ -1,5 +1,24 @@ package org.linphone; +/* +Transfer.java +Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + import junit.framework.Assert; import org.linphone.CallActivity;