summaryrefslogtreecommitdiffstats
path: root/packages/CaptivePortalLogin/src
diff options
context:
space:
mode:
authorRamswaroop Ghanshyam Somani <rsomani@cyngn.com>2016-02-19 17:03:25 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-02-29 16:34:39 -0800
commit620a025c1bfdad254616d223c83cfa232988d0b7 (patch)
tree914bab949ce59e0fb198356a7e2108df081a44dc /packages/CaptivePortalLogin/src
parent01a268587abfddd45751008e14dc09572569e4d6 (diff)
downloadframeworks_base-620a025c1bfdad254616d223c83cfa232988d0b7.zip
frameworks_base-620a025c1bfdad254616d223c83cfa232988d0b7.tar.gz
frameworks_base-620a025c1bfdad254616d223c83cfa232988d0b7.tar.bz2
Make CaptivePortalLoginActivity compatible with setupwizard.
Cyanogenmod setupwizard sends a token to validate when the result is sent. Handle this token. Issue-id: CYNGNOS-2048 Change-Id: I7b76e0df32288bf2efd60c495d6e726065353435
Diffstat (limited to 'packages/CaptivePortalLogin/src')
-rw-r--r--packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
index ed95bff..ed9c111 100644
--- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
+++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
@@ -76,6 +76,7 @@ public class CaptivePortalLoginActivity extends Activity {
private ConnectivityManager mCm;
private boolean mLaunchBrowser = false;
private MyWebViewClient mWebViewClient;
+ private String mResponseToken;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -92,6 +93,7 @@ public class CaptivePortalLoginActivity extends Activity {
setResult(Activity.RESULT_CANCELED);
done(Result.WANTED_AS_IS);
}
+ mResponseToken = getIntent().getStringExtra(Intent.EXTRA_TEXT);
mNetwork = getIntent().getParcelableExtra(ConnectivityManager.EXTRA_NETWORK);
mCaptivePortal = getIntent().getParcelableExtra(ConnectivityManager.EXTRA_CAPTIVE_PORTAL);
@@ -196,7 +198,9 @@ public class CaptivePortalLoginActivity extends Activity {
mCaptivePortal.useNetwork();
break;
}
- setResult(Activity.RESULT_OK);
+ Intent intent = new Intent();
+ intent.putExtra(Intent.EXTRA_TEXT, mResponseToken);
+ setResult(Activity.RESULT_OK, intent);
finish();
}