Fix settings issues

This commit is contained in:
Sylvain Berfini 2012-08-02 10:13:32 +02:00
parent 35aa663567
commit 4964264bea
5 changed files with 52 additions and 47 deletions

View file

@ -53,7 +53,7 @@
<activity android:name="org.linphone.LinphoneActivity" <activity android:name="org.linphone.LinphoneActivity"
android:theme="@android:style/Theme.NoTitleBar" android:theme="@android:style/Theme.NoTitleBar"
android:screenOrientation="nosensor" android:screenOrientation="nosensor"
android:launchMode="singleInstance"> android:launchMode="singleTask">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
</intent-filter> </intent-filter>

View file

@ -49,7 +49,6 @@ import android.widget.LinearLayout;
/** /**
* @author Sylvain Berfini * @author Sylvain Berfini
*/ */
//TODO Prevent controls from being hidden while user is using numpad
public class InCallActivity extends FragmentActivity implements public class InCallActivity extends FragmentActivity implements
LinphoneOnCallStateChangedListener, LinphoneOnCallStateChangedListener,
LinphoneOnCallEncryptionChangedListener, LinphoneOnCallEncryptionChangedListener,
@ -382,6 +381,11 @@ public class InCallActivity extends FragmentActivity implements
} }
} }
resetControlsHidingCallBack();
}
}
public void resetControlsHidingCallBack() {
if (controlsHandler != null && mControls != null) { if (controlsHandler != null && mControls != null) {
controlsHandler.removeCallbacks(mControls); controlsHandler.removeCallbacks(mControls);
} }
@ -424,7 +428,6 @@ public class InCallActivity extends FragmentActivity implements
} }
}, SECONDS_BEFORE_HIDING_CONTROLS); }, SECONDS_BEFORE_HIDING_CONTROLS);
} }
}
public void setCallControlsVisibleAndRemoveCallbacks() { public void setCallControlsVisibleAndRemoveCallbacks() {
if (controlsHandler != null && mControls != null) { if (controlsHandler != null && mControls != null) {

View file

@ -103,6 +103,7 @@ public class LinphonePreferencesActivity extends PreferenceActivity implements O
// If we were on a LinphonePreferences sub activity, and we came back because of a change of tab, we propagate the event // If we were on a LinphonePreferences sub activity, and we came back because of a change of tab, we propagate the event
setResult(RESULT_FIRST_USER, data); setResult(RESULT_FIRST_USER, data);
finish(); finish();
return;
} }
} }

View file

@ -178,6 +178,8 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
} }
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == ADD_SIP_ACCOUNT) { if (requestCode == ADD_SIP_ACCOUNT) {
//Verify if last created account is filled //Verify if last created account is filled
SharedPreferences prefs = getPreferenceManager().getSharedPreferences(); SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
@ -198,8 +200,6 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
} }
createDynamicAccountsPreferences(); createDynamicAccountsPreferences();
} }
super.onActivityResult(requestCode, resultCode, data);
} }
private void addWizardPreferenceButton() { private void addWizardPreferenceButton() {

View file

@ -46,6 +46,7 @@ class LinphoneCoreImpl implements LinphoneCore {
private native int getNumberOfCallLogs(long nativePtr); private native int getNumberOfCallLogs(long nativePtr);
private native void delete(long nativePtr); private native void delete(long nativePtr);
private native void setNetworkStateReachable(long nativePtr,boolean isReachable); private native void setNetworkStateReachable(long nativePtr,boolean isReachable);
private native boolean isNetworkStateReachable(long nativePtr);
private native void setPlaybackGain(long nativeptr, float gain); private native void setPlaybackGain(long nativeptr, float gain);
private native float getPlaybackGain(long nativeptr); private native float getPlaybackGain(long nativeptr);
private native void muteMic(long nativePtr,boolean isMuted); private native void muteMic(long nativePtr,boolean isMuted);
@ -109,7 +110,6 @@ class LinphoneCoreImpl implements LinphoneCore {
private native void removeCallLog(long nativePtr, long callLogPtr); private native void removeCallLog(long nativePtr, long callLogPtr);
private native int getMissedCallsCount(long nativePtr); private native int getMissedCallsCount(long nativePtr);
private native void resetMissedCallsCount(long nativePtr); private native void resetMissedCallsCount(long nativePtr);
private native boolean isNetworkReachable(long nativePtr);
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException { LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
mListener=listener; mListener=listener;
@ -442,8 +442,9 @@ class LinphoneCoreImpl implements LinphoneCore {
return codecs; return codecs;
} }
public synchronized boolean isNetworkReachable() { public synchronized boolean isNetworkReachable() {
return isNetworkReachable(nativePtr); return isNetworkStateReachable(nativePtr);
} }
public synchronized void enableKeepAlive(boolean enable) { public synchronized void enableKeepAlive(boolean enable) {
enableKeepAlive(nativePtr,enable); enableKeepAlive(nativePtr,enable);