Commit Graph

46 Commits

Author SHA1 Message Date
Hung-ying Tyan
adc83d8312 Fix alert dialogs in VpnSettings.
+ Don't check mDialogFragment.isVisible() in SettingsPreferenceFragment.removeDialog()
  as mDialogFragment may not be visible in parent fragment's onResume().
+ Replace mConnectDialog with mConnectDialogShowing and remove
  removeConnectDialog().
+ Dismiss alert dialogs in onPause() so that we don't need to maintain extra
  states during pause-resume cycle.

In addition, fix a NPE when startVpnTypeSelection().

Bug: 3381434
Bug: 3289365

Change-Id: Ic4aa87c7a618d95e86e45d6617f2ad7dab35f019
2011-01-26 15:50:33 +08:00
Hung-ying Tyan
0ee51e04fb Allow OnCancelListener and OnDismissListener in Settings app
for the framework-managed dialogs.

DialogFragment acts as both listeners so the application cannot set both
listeners in the embedded dialog. New hooks are added in SettingsDialogFragment
so that settings apps can do so for the framework-managed dialogs.

Bug: 3386670
Change-Id: I144e7c4ccf7f86c61f6079fa86d830c709335af1
2011-01-25 17:31:26 +08:00
Amith Yamasani
476d795667 NPE check in VpnSettings.
Bug: 3368545

Also fix a couple of bugs in TetherSettings:

Bug: 3090156 - view was being reused without removing from old dialog
Bug: 3368493 - preference being removed a second time

Change-Id: I8fe513d41e1f3af6994783be5ead69b6bd205711
2011-01-21 11:27:29 -08:00
Chung-yih Wang
a4491eafd4 Fix the vpnsetting NPE crash.
The bug is triggered by rotating the screen after restoring the
vpn setting which was showing the connect dialog from the recent tasks.

Change-Id: I2562b208fa28f9b6ffa8acba1ab14e0f83b3a0c6
2011-01-20 18:31:26 +08:00
Hung-ying Tyan
62cc79ef96 Make VpnSettings use new synchronous VpnService API.
Change-Id: Ib400c968981f9f8642a1452011faaade0d5bde57
2011-01-20 12:48:53 +08:00
Chung-yih Wang
a256b7c3b4 Fix the re-entrance of VpnSetting issue.
bug:3292801
Change-Id: I77c57d789754f175ce9e43ad77ff2edb711c2316
2011-01-14 16:53:36 +08:00
Chung-yih Wang
af5137bcac Fix the NPE bug due to the process/activity restart.
The active profile and its state were not stored if the setting process
was killed due to the resource. Here we add the state persistence
mechanism to fix this bug.

bug:3293236

Change-Id: I8b8068972237bde06ca4b3f73ecc48c02c4f0833
2011-01-05 10:40:31 +08:00
Amith Yamasani
c9fdfa8a72 Handle fragment breadcrumbs for deep-linked settings launches.
This adds meta-data to the manifest for specifying the parent fragment and enabling a link
in the breadcrumbs to navigate "up" a level even if the parent is not in the back-stack.

Bug: 3236568

Fix a monkey issue in VpnSettings.
2010-12-14 14:58:06 -08:00
Chung-yih Wang
844c54d11e Fix the retry the vpn connection issue.
Fix the issue of vpn connection retry if back button is pressed
and the profile state is still in connecting.

bug: 3278489
Change-Id: I8b51fdd65b2fdd8cbe4fb43afd916f1966b77b67
2010-12-13 17:34:35 +08:00
Dianne Hackborn
14ffda6f24 Fix issue #3163240: Blank running services screen after returning
from any specific service

Also get rid of async Vpn thing since the framework problem is fixed.

Change-Id: Ic7aafd666ea11b036e3e42c55332620db1fdf154
2010-11-16 10:51:36 -08:00
Amith Yamasani
928e78acea Fix VPN settings flow.
Bug: 3053019
2010-11-12 10:37:20 -08:00
Daisuke Miyakawa
b5647c5720 Fragmentize VpnSettings and relevant Activities.
Add startFragment() to SettingsFragmentPreference.

Change-Id: Ifab93b2e68892d5f6da559f337c94d62629780c8
2010-09-15 16:48:25 -07:00
Jiehua.Dai
20108e2ed6 Fix window leak problems in settings.
There were window leak in the settings application.
These leak happens when an AlertDialog displays, rotate the phone,
then it would cause window leak.

Change-Id: I914897bf657933efea72eeea66076dc288098420
2010-07-14 11:10:00 +02:00
The Android Open Source Project
4811287623 merge from open-source master
Change-Id: Id9c258165d9bb326271218a562d782fa52608213
2010-05-19 09:12:47 -07:00
Christian Mehlmauer
0193bf8b3d Removed Calls to deprecated APIs and unused imports
Change-Id: Ibaaf3418ec2c97a99495eca7ea546af415370c3e
2010-05-17 21:25:15 +02:00
Hung-ying Tyan
488dc08b0b Fix VPN profile path in settings.
http://b/issue?id=2485656

...and eliminate multiple Settings instances in history stack

Change-Id: I076b78781ee7ce458f82e6d9659a94ce64841a0e
2010-03-09 12:25:01 +08:00
Hung-ying Tyan
fad4a4c07a Add L2tpIpsec case in VpnSettings.processSecrets() 2009-10-06 16:15:42 +08:00
Hung-ying Tyan
8fd062e1a5 Use the new VpnType.getDescriptionId(). 2009-09-30 17:57:56 +08:00
Chia-chi Yeh
c00b656196 Settings: revise VpnSettings. 2009-09-22 03:05:50 +08:00
Hung-ying Tyan
a3aaf19e09 Fix setting passwd string and vpn checkbox titles.
* Add min length requirement in setting passwd string.
* Do not change vpn checkbox title with state changes.
2009-09-14 11:54:29 +08:00
Hung-ying Tyan
f71c8b40b5 Add install-cert-from-sdcard in Security settings
Also:
* Resume keystore states in SecuritySettings.onResume().
* Use action strings defined in CertTool and Keystore.
2009-09-10 12:50:10 +08:00
Hung-ying Tyan
7ca3655dcb Handle two new err codes:
REMOTE_PPP_HUNG_UP and PPP_NEGOTIATION_FAILED.
Also refactor the dialog creation code to directly use the err code as
the dialog id and make it easier to tell which type of dialog (reconnect
or edit) is invoked for which err code.
2009-08-28 11:25:44 +08:00
Hung-ying Tyan
11dd7d5fb3 Fix the state machine for CONNECTING/DISCONNECTING states. 2009-08-27 11:03:46 +08:00
Hung-ying Tyan
09cda9cfaf Add VPN connection lost dialog. 2009-08-03 16:26:47 +08:00
Hung-ying Tyan
7be218e7f7 Add encryption option to PPTP UI.
Also add new error dialogs for L2TP challenge error and remote server
hanging up error.
2009-07-30 19:54:13 +08:00
Hung-ying Tyan
c157aadf56 Add error dialog when secrets are missing. 2009-07-29 15:08:50 +08:00
Hung-ying Tyan
6120ddd786 Capitalize the first letter of a VPN name. 2009-07-26 00:05:21 +08:00
Hung-ying Tyan
38a9daffa5 Fix secret EditText display and other fixes.
+ Now it shows shadowed "(unchanged)" (as in wifi settings) and "(not set)"
  instead of two dots.

Patch Set 2:
+ Show cancellation confirmation dialog only when there's change in
  profile.

Patch Set 3:
+ Re-enable profile preferences when the reconnect dialog is cancelled.
2009-07-25 05:37:42 +08:00
Hung-ying Tyan
19dc9e690f Implement the Back button handler to save a VPN. 2009-07-22 05:47:33 +08:00
Hung-ying Tyan
bfaa90725d Disable suggestion for certain types of text boxes.
+ Disable suggestion for password, server name and domain suffices.
+ Use a shorter string to indicate that a secret is set.
2009-07-22 05:13:51 +08:00
Hung-ying Tyan
ba127f57ae Improve VpnSettings start-up time.
* Changes
  + add orientation and keyboard config change in the manifest file.
  + remove state saving code
  + improve status checking time by doing it in one server connection.
2009-07-18 10:33:24 +08:00
Hung-ying Tyan
fe0b0178cb Fix VpnSettings.StatusChecker.start()
to avoid multiple threads checking status at the same time.
2009-07-13 17:23:32 +08:00
Hung-ying Tyan
1ddccd07f7 Fix dialog handling.
* Changes
  + VpnSettings:
    + Add reconnect dialog to showDialog() framework for handling screen
      rotation.
    + Dismiss other alert dialogs in onDestroy()
    + Remove onPrepareDialog() from VpnSettings.
    + Remove updateConnectDialog() from VpnProfileActor.
    + Add authentication error dialog.
    + Add unknown server dialog.
  + SecuritySettings:
    + Make cstor dialogs cancelable.
    + Add cancelable listener.
  Patch Set 6:
  + VpnSettings:
    + Disable preferences when connecting/disconnecting.
    + Fix state broadcast when binding a VpnService goes wrong.
2009-07-13 12:14:32 +08:00
Hung-ying Tyan
e02f206e11 Focus the password box when username is saved. 2009-07-09 18:39:04 +08:00
Hung-ying Tyan
386668b792 Fix saving secrets to keystore from vpn settings. 2009-07-08 18:00:03 +08:00
Hung-ying Tyan
33ababd1bd String fixes for the credential storage and vpn settings.
* Changes
  + Shorten the messages for both set-password and enter-password dialogs
    when other activities access the credential storage.
  Patch Set 2:
  + Fix the capital issue in the vpn error messages.
    + Add separate strings for terms used in the error messages.
    + Modify related src files that use those terms.
2009-07-07 11:37:54 +08:00
Hung-ying Tyan
0a59b50014 Integrate VPN with new keystore and misc fixes.
* Changes
  + Pass intent to keystore when needed and hooks to resume from it.
  + Generate random, unique ID for profile instead of base64 from its
    name.
  + Add VPN to "Wirless controls" description.
  + Add credential storage to "Security & location" description.
  + More hints to set password and unlock dialogs in credential storage
    settings for actions that come from other processes.
  + Sort VPN profiles according to the names.
  + Replace Keystore with CertTool in L2tpIpsecEditor
2009-07-06 18:47:47 +08:00
Hung-ying Tyan
7031ab0d75 Add credential storage settings.
* Changes
  + Initial implementation of credential storage settings.
  + Use alert icon on delete and reconnect dialogs in VpnSettings.
    (piggy-backed)
  Patch Set 12:
  + Add password length and no-space verification.
  + Simplify dialog view xml files.
2009-07-03 23:00:53 +08:00
Hung-ying Tyan
e5b9e4bddf Add L2tpIpsecPskEditor.
* Changes
  + Add L2tpIpsecPskEditor.java.
  + Save profile name in VpnEditor to be used in saveSecrets().
2009-07-01 11:06:45 +08:00
Hung-ying Tyan
e7565f3c48 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
2009-06-26 14:24:50 +08:00
Hung-ying Tyan
d22da2096b Add save-username checkbox in the connect dialog.
* changes
  + Add checkbox to layout file and handling code in related classes.
  + Add new methods to VpnProfileActor.
  + Move dialog handling to VpnSettings from AuthenticatorActor in order
    to support screen orientation change.
  + Hide "Connect" in the context menu if the profile is connecting.
  + Enable connecting profile in case it was disabled in last call.
2009-06-20 11:36:16 +08:00
Chung-yih Wang
19e134e494 Use new Keystore APIs in vpn profile editor. 2009-06-17 18:36:13 +08:00
Hung-ying Tyan
ff393bf90b Remove SingleServerProfile import. 2009-06-15 19:37:38 +08:00
Hung-ying Tyan
84cfb0dc9b Remove use of SingleServerProfile.
* changes
  + mv SingleServerEditor.java VpnProfileEditor.java
  + Add loadExtraPreferecesTo() to VpnProfileEditor
  + Make L2tpIpsecEditor extend VpnProfileEditor and use loadExtraPreferencesTo()
  + Modify VpnEditor.getEditor() accordingly
2009-06-15 12:58:58 +08:00
Hung-ying Tyan
a55ae92a13 Remove isCustomized() check as the API is not used for now. 2009-06-15 11:17:30 +08:00
Hung-ying Tyan
1617706d25 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.
2009-06-12 15:44:49 +08:00