Add L2TP secret, L2TP/IPSec PSK support. Fix screen orientation.

* Changes
  + Add L2tpActor, L2tpEditor, L2tpIpsecPskActor.
  + Make L2tpIpsecEditor extend L2tpEditor.
  + Revise the code for saving username. Make
    VpnSettings.saveProfileToStorage() static.
  + Fix support for screen orientation change in both VpnSettings and
    VpnEditor.

  Patch Set 2:
  + Remove Util.isNullOrEmpty(). Use TextUtils.isEmpty() instead.
  + Remove unused imports. Wrap lines longer than 80 chars.

  Patch Set 3:
  + Fix all the strings according to UI feedback.
  + Remove all the added actor subclasses and move password to editor.
  + Remove VPN entry in Security & location.

  Patch Set 4:
  + Misc string fixes.

  Patch Set 5:
  + Add strings for credential storage settings.
  + Changed the error dialog icon.
  + Fix "Remember me" indentation in connect dialog.

  Patch Set 6:
  + resolve res/values/strings.xml
This commit is contained in:
Hung-ying Tyan
2009-06-26 14:24:50 +08:00
parent 386278a338
commit e7565f3c48
15 changed files with 660 additions and 369 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2007 The Android Open Source Project
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,10 +59,6 @@ class Util {
createErrorDialog(c, message, listener).show();
}
static boolean isNullOrEmpty(String message) {
return ((message == null) || (message.length() == 0));
}
static String base64Encode(byte[] bytes) {
return new String(Base64.encodeBase64(bytes));
}
@@ -132,7 +128,8 @@ class Util {
private static AlertDialog createErrorDialog(Context c, String message,
DialogInterface.OnClickListener okListener) {
AlertDialog.Builder b = new AlertDialog.Builder(c)
.setTitle(R.string.vpn_error_title)
.setTitle(android.R.string.dialog_alert_title)
.setIcon(android.R.drawable.ic_dialog_alert)
.setMessage(message);
if (okListener != null) {
b.setPositiveButton(R.string.vpn_back_button, okListener);