Add VPN settings classes to Settings app.
PATCH SET 2: + Add import com.android.settings.R PATCH SET 3: + Remove @Override interface methods to be compilable by Java 1.5. PATCH SET 4: + Add import android.net.vpn.VpnManager PATCH SET 5: + Add license headers. PATCH SET 6: + Remove Constant.java and move the constants to VpnSettings. + Make AuthenticationActor implement DialogInterface's handlers. + Remove trailing spaces. PATCH SET 7: + Remove default username.
This commit is contained in:
@@ -24,6 +24,7 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.database.Cursor;
|
||||
import android.location.LocationManager;
|
||||
import android.net.vpn.VpnManager;
|
||||
import android.os.Bundle;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.Preference;
|
||||
@@ -160,6 +161,17 @@ public class SecuritySettings extends PreferenceActivity {
|
||||
showPassword.setPersistent(false);
|
||||
passwordsCat.addPreference(showPassword);
|
||||
|
||||
PreferenceScreen vpnPreferences = getPreferenceManager()
|
||||
.createPreferenceScreen(this);
|
||||
vpnPreferences.setTitle(R.string.vpn_settings_category);
|
||||
vpnPreferences.setIntent(new VpnManager(this).createSettingsActivityIntent());
|
||||
|
||||
PreferenceCategory vpnCat = new PreferenceCategory(this);
|
||||
vpnCat.setTitle(R.string.vpn_settings_title);
|
||||
vpnCat.setSummary(R.string.vpn_settings_summary);
|
||||
root.addPreference(vpnCat);
|
||||
vpnCat.addPreference(vpnPreferences);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user