diff options
author | Geremy Condra <gcondra@google.com> | 2013-07-23 17:55:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-23 17:55:45 +0000 |
commit | 1b6868cc4b8455e8660ba35ccdcc34abbaa43ffa (patch) | |
tree | c04b66c71909dc7943969e4e402f0ee7e112205e /packages | |
parent | a874c6762d0ca381a1eb5788fee39bc1b807d877 (diff) | |
parent | bf6ff2c025405a3af496fe558dfc4468a9b45cc8 (diff) | |
download | frameworks_base-1b6868cc4b8455e8660ba35ccdcc34abbaa43ffa.zip frameworks_base-1b6868cc4b8455e8660ba35ccdcc34abbaa43ffa.tar.gz frameworks_base-1b6868cc4b8455e8660ba35ccdcc34abbaa43ffa.tar.bz2 |
Merge "Support multiple Vpn ManageDialogs"
Diffstat (limited to 'packages')
-rw-r--r-- | packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java b/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java index 96de1b9..42b8cce 100644 --- a/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java +++ b/packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java @@ -65,11 +65,18 @@ public class ManageDialog extends AlertActivity implements } try { - mConfig = getIntent().getParcelableExtra("config"); mService = IConnectivityManager.Stub.asInterface( ServiceManager.getService(Context.CONNECTIVITY_SERVICE)); + mConfig = mService.getVpnConfig(); + + // mConfig can be null if we are a restricted user, in that case don't show this dialog + if (mConfig == null) { + finish(); + return; + } + View view = View.inflate(this, R.layout.manage, null); if (mConfig.session != null) { ((TextView) view.findViewById(R.id.session)).setText(mConfig.session); |