Enable the call setting when the VoIP feature is supported.

If the VoIP feature is included, the user need to be able to
configure the internet call settings even if it is in airplan mode.

Change-Id: I00d73fb0d9213162b8a9887cad0f800418446787
This commit is contained in:
Chung-yih Wang
2010-09-11 10:24:46 +08:00
parent be45f642ca
commit e5e4282af1

View File

@@ -16,6 +16,7 @@
package com.android.settings; package com.android.settings;
import android.net.sip.SipManager;
import android.os.Bundle; import android.os.Bundle;
import android.preference.Preference; import android.preference.Preference;
import android.preference.PreferenceActivity; import android.preference.PreferenceActivity;
@@ -51,7 +52,9 @@ public class Settings extends PreferenceActivity {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
findPreference(KEY_CALL_SETTINGS).setEnabled(!AirplaneModeEnabler.isAirplaneModeOn(this)); findPreference(KEY_CALL_SETTINGS).setEnabled(
!AirplaneModeEnabler.isAirplaneModeOn(this)
|| SipManager.isVoipSupported(this));
} }
} }