Have device back button behave like one in top bar
This commit is contained in:
parent
3d1f4a69c4
commit
60b4265aef
1 changed files with 9 additions and 0 deletions
|
@ -22,6 +22,7 @@ package org.linphone.assistant;
|
|||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.EditText;
|
||||
|
@ -90,6 +91,14 @@ public abstract class AssistantActivity extends LinphoneGenericActivity
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (!mBack.isEnabled()) return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
public AccountCreator getAccountCreator() {
|
||||
return LinphoneManager.getInstance().getAccountCreator();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue