Disable incall video button if disabled in settings.
This commit is contained in:
parent
9d7c8c85d5
commit
f3d2c01f2f
1 changed files with 7 additions and 0 deletions
|
@ -27,6 +27,7 @@ import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
@ -62,6 +63,11 @@ public class IncallActivity extends Activity implements OnClickListener {
|
||||||
hangButton = (HangCallButton) findViewById(R.id.incallHang);
|
hangButton = (HangCallButton) findViewById(R.id.incallHang);
|
||||||
hangButton.setOnClickListener(this);
|
hangButton.setOnClickListener(this);
|
||||||
|
|
||||||
|
if (!PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
.getBoolean(getString(R.string.pref_video_enable_key), false)) {
|
||||||
|
findViewById(R.id.AddVideo).setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
TextView contact = (TextView) findViewById(R.id.incallContactName);
|
TextView contact = (TextView) findViewById(R.id.incallContactName);
|
||||||
if (getIntent().getExtras() != null) {
|
if (getIntent().getExtras() != null) {
|
||||||
contact.setText(getIntent().getExtras().getCharSequence(CONTACT_KEY));
|
contact.setText(getIntent().getExtras().getCharSequence(CONTACT_KEY));
|
||||||
|
@ -72,6 +78,7 @@ public class IncallActivity extends Activity implements OnClickListener {
|
||||||
elapsedTime = (TextView) findViewById(R.id.incallElapsedTime);
|
elapsedTime = (TextView) findViewById(R.id.incallElapsedTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v == numpadClose) {
|
if (v == numpadClose) {
|
||||||
numpad.setVisibility(View.GONE);
|
numpad.setVisibility(View.GONE);
|
||||||
|
|
Loading…
Reference in a new issue