diff options
author | cretin45 <cretin45@gmail.com> | 2016-02-26 12:15:00 -0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2016-02-26 12:15:39 -0800 |
commit | ca63326151df341831cf95c2ffb910c7232c401d (patch) | |
tree | 7f855698c855cab28eb36f7bed2569ada74ab376 /src/com | |
parent | 01e57cdf28511c93c7c3f39505689aba03be5791 (diff) | |
download | packages_apps_SetupWizard-ca63326151df341831cf95c2ffb910c7232c401d.tar.gz packages_apps_SetupWizard-ca63326151df341831cf95c2ffb910c7232c401d.tar.bz2 packages_apps_SetupWizard-ca63326151df341831cf95c2ffb910c7232c401d.zip |
SetupWizard: Modify intent for CaptivePortalLogin
Issue-id: CYNGNOS-2048
Change-Id: I6e9b0ab56c59013aa1bf4d47de2a222c938d53b2
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java index 56beddf..2d8084a 100644 --- a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java @@ -19,11 +19,11 @@ package com.cyanogenmod.setupwizard.setup; import android.app.Activity; import android.app.ActivityOptions; import android.app.FragmentManager; -import android.content.ComponentName; import android.content.Context; import android.content.Intent; +import android.net.CaptivePortal; import android.net.ConnectivityManager; -import android.net.Uri; +import android.net.ICaptivePortal; import android.os.Bundle; import android.os.Handler; import android.provider.Settings; @@ -64,15 +64,18 @@ public class WifiSetupPage extends SetupPage { public void run() { if (mIsCaptivePortal) { try { - int netId = ConnectivityManager.from(mContext) - .getNetworkForType(ConnectivityManager.TYPE_WIFI).netId; mResponseToken = String.valueOf(new Random().nextLong()); - Intent intent = new Intent(); - intent.setData(Uri.fromParts("netid", Integer.toString(netId), - mResponseToken)); - intent.setComponent(new ComponentName("com.android.captiveportallogin", - "com.android.captiveportallogin.CaptivePortalLoginActivity")); - intent.putExtra(Intent.EXTRA_TEXT, String.valueOf(netId)); + final Intent intent = new Intent( + ConnectivityManager.ACTION_CAPTIVE_PORTAL_SIGN_IN); + intent.putExtra(Intent.EXTRA_TEXT, mResponseToken); + intent.putExtra(ConnectivityManager.EXTRA_NETWORK, + ConnectivityManager.from(mContext) + .getNetworkForType(ConnectivityManager.TYPE_WIFI)); + intent.putExtra(ConnectivityManager.EXTRA_CAPTIVE_PORTAL, + new CaptivePortal(new ICaptivePortal.Stub() { + @Override + public void appResponse(int response) {} + })); intent.putExtra("status_bar_color", mContext.getResources().getColor(R.color.primary_dark)); intent.putExtra("action_bar_color", mContext.getResources().getColor( |