diff --git a/sflphone-android/AndroidManifest.xml b/sflphone-android/AndroidManifest.xml index 9bcb5e7e380ed833b0d805407c97b643dd967eee..51c0f0bfdd6a62b12aff5944102604142e510417 100644 --- a/sflphone-android/AndroidManifest.xml +++ b/sflphone-android/AndroidManifest.xml @@ -45,7 +45,7 @@ as that of the covered work. <uses-sdk android:minSdkVersion="14" - android:targetSdkVersion="19" /> + android:targetSdkVersion="20" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> @@ -87,7 +87,6 @@ as that of the covered work. <application android:allowBackup="true" - android:debuggable="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity diff --git a/sflphone-android/jni/jni_interface.i b/sflphone-android/jni/jni_interface.i index 6bb64faddfdf9dc486cb5cf802cde8a261380515..eccdd25529164a16becdd791040f3ca6e4b55727 100644 --- a/sflphone-android/jni/jni_interface.i +++ b/sflphone-android/jni/jni_interface.i @@ -72,14 +72,10 @@ namespace std { %} - /* parsed by SWIG to generate all the glue */ /* %include "../managerimpl.h" */ /* %include <client/callmanager.h> */ -//%constant struct sflph_call_ev_handlers* WRAPPER_CALLMANAGERCALLBACK_STRUCT = &wrapper_callback_struct; -//%constant struct sflph_config_ev_handlers* WRAPPER_CONFIGCALLBACK_STRUCT = &wrapper_configurationcallback_struct; - %include "managerimpl.i" %include "callmanager.i" %include "configurationmanager.i" diff --git a/sflphone-android/res/values-fr/strings.xml b/sflphone-android/res/values-fr/strings.xml index e256208cd732e1d779812799c7bc99c41f4ff352..07e9914290f7e1479af2a308bb36dc38604b2042 100644 --- a/sflphone-android/res/values-fr/strings.xml +++ b/sflphone-android/res/values-fr/strings.xml @@ -32,14 +32,14 @@ as that of the covered work. <resources> - <string name="app_name">SFLphone</string> + <string name="app_name">Ring</string> <!-- SFLPhoneActivity --> <string name="close_msg">Appuyer de nouveau pour quitter</string> <string name="title_section0">Numéroter</string> <string name="title_section1">Appeler</string> <string name="title_section2">Historique</string> - <string name="title_activity_sflphone_home">SFLphone</string> + <string name="title_activity_sflphone_home">Ring</string> <string name="create_new_account_dialog_title">Aucun compte SIP enregistré</string> <string name="create_new_account_dialog">Voulez-vous enregistrer un compte maintenant?</string> <string name="cannot_pass_sipcall_title">Compte SIP indisponible</string> diff --git a/sflphone-android/res/values/strings.xml b/sflphone-android/res/values/strings.xml index fc213ab9cbb123419c1811dc0e2f4c6cace6c8dc..950c66a218d262642fdb9ea5dc205e025b0def9f 100644 --- a/sflphone-android/res/values/strings.xml +++ b/sflphone-android/res/values/strings.xml @@ -32,14 +32,14 @@ as that of the covered work. <resources> - <string name="app_name">SFLphone</string> + <string name="app_name">Ring</string> <!-- SFLPhoneActivity --> <string name="close_msg">Press back again to leave</string> <string name="title_section0">Dial</string> <string name="title_section1">Call</string> <string name="title_section2">History</string> - <string name="title_activity_sflphone_home">SFLphone</string> + <string name="title_activity_sflphone_home">Ring</string> <string name="create_new_account_dialog_title">No Account Registered</string> <string name="create_new_account_dialog">Would you like to register an account now?</string> <string name="cannot_pass_sipcall_title">SIP account not available</string> diff --git a/sflphone-android/src/org/sflphone/model/CallTimer.java b/sflphone-android/src/org/sflphone/model/CallTimer.java deleted file mode 100644 index 6e9c9bf10ae72cbc421ce641207f1a64b9c2c8ce..0000000000000000000000000000000000000000 --- a/sflphone-android/src/org/sflphone/model/CallTimer.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2004-2014 Savoir-Faire Linux Inc. - * - * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com> - * - * 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 3 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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Additional permission under GNU GPL version 3 section 7: - * - * If you modify this program, or any covered work, by linking or - * combining it with the OpenSSL project's OpenSSL library (or a - * modified version of that library), containing parts covered by the - * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. - * grants you additional permission to convey the resulting work. - * Corresponding Source for a non-source form of such a combination - * shall include the source code for the parts of OpenSSL used as well - * as that of the covered work. - */ - -package org.sflphone.model; - -import java.util.Observable; - -import android.util.Log; - -public class CallTimer extends Observable implements Runnable { - - boolean stop = false; - private static final String TAG = CallTimer.class.getSimpleName(); - - @Override - public void run() { - - while (!stop) { - try { - synchronized (this) { - this.wait(1000); - } - } catch (InterruptedException e) { - e.printStackTrace(); - } - Log.i(TAG, "update!"); - notifyObservers(); - } - - } - - @Override - public boolean hasChanged() { - return true; - } - -} diff --git a/sflphone-android/src/org/sflphone/service/OpenSlParams.java b/sflphone-android/src/org/sflphone/service/OpenSlParams.java index 7701ab31db3828985494301dda6c24cd12fcf3c1..c9a71eabb6299700bb5eb46f14020db64e563d05 100644 --- a/sflphone-android/src/org/sflphone/service/OpenSlParams.java +++ b/sflphone-android/src/org/sflphone/service/OpenSlParams.java @@ -69,7 +69,7 @@ public abstract class OpenSlParams { public int getBufferSize() { return bufferSize; } - }; + } // Default factory for Jelly Bean or older. private static class DefaultOpenSlParams extends OpenSlParams { diff --git a/sflphone-android/src/org/sflphone/utils/SwigNativeConverter.java b/sflphone-android/src/org/sflphone/utils/SwigNativeConverter.java index d12e976a5d42898ee2b156947d77a2c929bd0965..8014523c6be880003dd672935e36336fcf032508 100644 --- a/sflphone-android/src/org/sflphone/utils/SwigNativeConverter.java +++ b/sflphone-android/src/org/sflphone/utils/SwigNativeConverter.java @@ -69,14 +69,11 @@ public class SwigNativeConverter { ArrayList<HashMap<String, String>> todecode = (ArrayList<HashMap<String, String>>) creds; VectMap toReturn = new VectMap(); - HashMap<String, String> nativeEntry; - - for (int i = 0; i < todecode.size(); ++i) { - nativeEntry = todecode.get(i); + for (HashMap<String, String> aTodecode : todecode) { StringMap entry = new StringMap(); - entry.set(AccountDetailBasic.CONFIG_ACCOUNT_PASSWORD, nativeEntry.get(AccountDetailBasic.CONFIG_ACCOUNT_PASSWORD)); - entry.set(AccountDetailBasic.CONFIG_ACCOUNT_USERNAME, nativeEntry.get(AccountDetailBasic.CONFIG_ACCOUNT_USERNAME)); - entry.set(AccountDetailBasic.CONFIG_ACCOUNT_REALM, nativeEntry.get(AccountDetailBasic.CONFIG_ACCOUNT_REALM)); + entry.set(AccountDetailBasic.CONFIG_ACCOUNT_PASSWORD, aTodecode.get(AccountDetailBasic.CONFIG_ACCOUNT_PASSWORD)); + entry.set(AccountDetailBasic.CONFIG_ACCOUNT_USERNAME, aTodecode.get(AccountDetailBasic.CONFIG_ACCOUNT_USERNAME)); + entry.set(AccountDetailBasic.CONFIG_ACCOUNT_REALM, aTodecode.get(AccountDetailBasic.CONFIG_ACCOUNT_REALM)); toReturn.add(entry); } return toReturn; @@ -174,7 +171,7 @@ public class SwigNativeConverter { ArrayList<HashMap<String, String>> toReturn = new ArrayList<HashMap<String, String>>(); for (int i = 0; i < map.size(); ++i) { - StringMap entry = new StringMap(); + StringMap entry; HashMap<String, String> nativeEntry = new HashMap<String, String>(); entry = map.get(i); nativeEntry.put(AccountDetailBasic.CONFIG_ACCOUNT_PASSWORD, entry.get(AccountDetailBasic.CONFIG_ACCOUNT_PASSWORD)); diff --git a/sflphone-android/src/org/sflphone/utils/bluetooth/BluetoothUtils14.java b/sflphone-android/src/org/sflphone/utils/bluetooth/BluetoothUtils14.java index d7d681c5a90b8539eef3bcdbe1caa8f6f8e810a4..c0bcced7d5200ad1c9c7e5ddfff53f6ec5de77fa 100644 --- a/sflphone-android/src/org/sflphone/utils/bluetooth/BluetoothUtils14.java +++ b/sflphone-android/src/org/sflphone/utils/bluetooth/BluetoothUtils14.java @@ -44,10 +44,7 @@ public class BluetoothUtils14 extends BluetoothWrapper { @Override public boolean isBTHeadsetConnected() { - if(bluetoothAdapter != null) { - return (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothAdapter.STATE_CONNECTED); - } - return false; + return bluetoothAdapter != null && (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothAdapter.STATE_CONNECTED); } diff --git a/sflphone-android/src/org/sflphone/utils/bluetooth/BluetoothWrapper.java b/sflphone-android/src/org/sflphone/utils/bluetooth/BluetoothWrapper.java index 90478b4cfafcf28aa80b2634d754a8033971e218..ad39054fbb6f4991972c86a018332343baaba47f 100644 --- a/sflphone-android/src/org/sflphone/utils/bluetooth/BluetoothWrapper.java +++ b/sflphone-android/src/org/sflphone/utils/bluetooth/BluetoothWrapper.java @@ -25,42 +25,46 @@ import android.content.Context; public abstract class BluetoothWrapper { - + public interface BluetoothChangeListener { void onBluetoothStateChanged(int status); } - - - private static BluetoothWrapper instance; + + + private static BluetoothWrapper instance; protected Context context; - + protected BluetoothChangeListener btChangesListener; - - public static BluetoothWrapper getInstance(Context context) { - if(instance == null) { - instance = new BluetoothUtils14(); - if(instance != null) { - instance.setContext(context); - } - } - - return instance; - } - - protected BluetoothWrapper() {} - - protected void setContext(Context ctxt) { - context = ctxt; - } - - public void setBluetoothChangeListener(BluetoothChangeListener l) { - btChangesListener = l; - } - - public abstract boolean canBluetooth(); - public abstract void setBluetoothOn(boolean on); - public abstract boolean isBluetoothOn(); - public abstract void register(); - public abstract void unregister(); - public abstract boolean isBTHeadsetConnected(); + + public static BluetoothWrapper getInstance(Context context) { + if (instance == null) { + instance = new BluetoothUtils14(); + instance.setContext(context); + } + + return instance; + } + + protected BluetoothWrapper() { + } + + protected void setContext(Context ctxt) { + context = ctxt; + } + + public void setBluetoothChangeListener(BluetoothChangeListener l) { + btChangesListener = l; + } + + public abstract boolean canBluetooth(); + + public abstract void setBluetoothOn(boolean on); + + public abstract boolean isBluetoothOn(); + + public abstract void register(); + + public abstract void unregister(); + + public abstract boolean isBTHeadsetConnected(); }