Fix settings issues
This commit is contained in:
parent
35aa663567
commit
4964264bea
5 changed files with 52 additions and 47 deletions
|
@ -53,7 +53,7 @@
|
|||
<activity android:name="org.linphone.LinphoneActivity"
|
||||
android:theme="@android:style/Theme.NoTitleBar"
|
||||
android:screenOrientation="nosensor"
|
||||
android:launchMode="singleInstance">
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
|
|
|
@ -49,7 +49,6 @@ import android.widget.LinearLayout;
|
|||
/**
|
||||
* @author Sylvain Berfini
|
||||
*/
|
||||
//TODO Prevent controls from being hidden while user is using numpad
|
||||
public class InCallActivity extends FragmentActivity implements
|
||||
LinphoneOnCallStateChangedListener,
|
||||
LinphoneOnCallEncryptionChangedListener,
|
||||
|
@ -382,50 +381,54 @@ public class InCallActivity extends FragmentActivity implements
|
|||
}
|
||||
}
|
||||
|
||||
if (controlsHandler != null && mControls != null) {
|
||||
controlsHandler.removeCallbacks(mControls);
|
||||
}
|
||||
|
||||
controlsHandler.postDelayed(mControls = new Runnable() {
|
||||
public void run() {
|
||||
hideNumpad();
|
||||
|
||||
if (InCallActivity.this.getResources().getBoolean(R.bool.disable_animations)) {
|
||||
transfer.setVisibility(View.GONE);
|
||||
addCall.setVisibility(View.GONE);
|
||||
mControlsLayout.setVisibility(View.GONE);
|
||||
switchCamera.setVisibility(View.INVISIBLE);
|
||||
options.setImageResource(R.drawable.options);
|
||||
} else {
|
||||
Animation animation = AnimationUtils.loadAnimation(InCallActivity.this, R.anim.slide_out_top_to_bottom);
|
||||
animation.setAnimationListener(new AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
video.setEnabled(false); // HACK: Used to avoid controls from being hided if video is switched while controls are hiding
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
video.setEnabled(true); // HACK: Used to avoid controls from being hided if video is switched while controls are hiding
|
||||
transfer.setVisibility(View.GONE);
|
||||
addCall.setVisibility(View.GONE);
|
||||
mControlsLayout.setVisibility(View.GONE);
|
||||
switchCamera.setVisibility(View.INVISIBLE);
|
||||
options.setImageResource(R.drawable.options);
|
||||
}
|
||||
});
|
||||
mControlsLayout.startAnimation(animation);
|
||||
switchCamera.startAnimation(AnimationUtils.loadAnimation(InCallActivity.this, R.anim.slide_out_bottom_to_top));
|
||||
}
|
||||
}
|
||||
}, SECONDS_BEFORE_HIDING_CONTROLS);
|
||||
resetControlsHidingCallBack();
|
||||
}
|
||||
}
|
||||
|
||||
public void resetControlsHidingCallBack() {
|
||||
if (controlsHandler != null && mControls != null) {
|
||||
controlsHandler.removeCallbacks(mControls);
|
||||
}
|
||||
|
||||
controlsHandler.postDelayed(mControls = new Runnable() {
|
||||
public void run() {
|
||||
hideNumpad();
|
||||
|
||||
if (InCallActivity.this.getResources().getBoolean(R.bool.disable_animations)) {
|
||||
transfer.setVisibility(View.GONE);
|
||||
addCall.setVisibility(View.GONE);
|
||||
mControlsLayout.setVisibility(View.GONE);
|
||||
switchCamera.setVisibility(View.INVISIBLE);
|
||||
options.setImageResource(R.drawable.options);
|
||||
} else {
|
||||
Animation animation = AnimationUtils.loadAnimation(InCallActivity.this, R.anim.slide_out_top_to_bottom);
|
||||
animation.setAnimationListener(new AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
video.setEnabled(false); // HACK: Used to avoid controls from being hided if video is switched while controls are hiding
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
video.setEnabled(true); // HACK: Used to avoid controls from being hided if video is switched while controls are hiding
|
||||
transfer.setVisibility(View.GONE);
|
||||
addCall.setVisibility(View.GONE);
|
||||
mControlsLayout.setVisibility(View.GONE);
|
||||
switchCamera.setVisibility(View.INVISIBLE);
|
||||
options.setImageResource(R.drawable.options);
|
||||
}
|
||||
});
|
||||
mControlsLayout.startAnimation(animation);
|
||||
switchCamera.startAnimation(AnimationUtils.loadAnimation(InCallActivity.this, R.anim.slide_out_bottom_to_top));
|
||||
}
|
||||
}
|
||||
}, SECONDS_BEFORE_HIDING_CONTROLS);
|
||||
}
|
||||
|
||||
public void setCallControlsVisibleAndRemoveCallbacks() {
|
||||
if (controlsHandler != null && mControls != null) {
|
||||
controlsHandler.removeCallbacks(mControls);
|
||||
|
|
|
@ -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
|
||||
setResult(RESULT_FIRST_USER, data);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,6 +178,8 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
|
|||
}
|
||||
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (requestCode == ADD_SIP_ACCOUNT) {
|
||||
//Verify if last created account is filled
|
||||
SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
|
||||
|
@ -198,8 +200,6 @@ public class PreferencesActivity extends LinphonePreferencesActivity implements
|
|||
}
|
||||
createDynamicAccountsPreferences();
|
||||
}
|
||||
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
private void addWizardPreferenceButton() {
|
||||
|
|
|
@ -46,6 +46,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native int getNumberOfCallLogs(long nativePtr);
|
||||
private native void delete(long nativePtr);
|
||||
private native void setNetworkStateReachable(long nativePtr,boolean isReachable);
|
||||
private native boolean isNetworkStateReachable(long nativePtr);
|
||||
private native void setPlaybackGain(long nativeptr, float gain);
|
||||
private native float getPlaybackGain(long nativeptr);
|
||||
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 int getMissedCallsCount(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 {
|
||||
mListener=listener;
|
||||
|
@ -442,8 +442,9 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
return codecs;
|
||||
}
|
||||
public synchronized boolean isNetworkReachable() {
|
||||
return isNetworkReachable(nativePtr);
|
||||
return isNetworkStateReachable(nativePtr);
|
||||
}
|
||||
|
||||
public synchronized void enableKeepAlive(boolean enable) {
|
||||
enableKeepAlive(nativePtr,enable);
|
||||
|
||||
|
|
Loading…
Reference in a new issue