Change how we use provisioning url so post works rel-tegranote-r4-partner daily-2014.02.24.0_rel-tegranote-r4-partner daily-2014.08.05.0_rel-tegranote-r6-partner
Robert Greenwalt [Thu, 17 Oct 2013 19:38:32 +0000 (12:38 -0700)]
Needed to do an http post instead of a get for one carrier.
Do this by putting an auto-submitting form in the data to be
interpreted as a html doc by the browser.  The ACTION_VIEW
intent only works on http uri, but by specifying ACTION_MAIN/
CATEGORY_APP_BROWSER we could use data:text/html.

bug:11168810
Change-Id: Ifd33e1c3c7f9f40b6add39e446e6a7d7cde22549

src/java/com/android/internal/telephony/dataconnection/DcTracker.java

index 2db30f9..15c75b0 100644 (file)
@@ -1505,8 +1505,9 @@ public final class DcTracker extends DcTrackerBase {
                 log("completeConnection: MOBILE_PROVISIONING_ACTION url="
                         + mProvisioningUrl);
             }
-            Intent newIntent =
-                    new Intent(Intent.ACTION_VIEW, Uri.parse(mProvisioningUrl));
+            Intent newIntent = Intent.makeMainSelectorActivity(Intent.ACTION_MAIN,
+                    Intent.CATEGORY_APP_BROWSER);
+            newIntent.setData(Uri.parse(mProvisioningUrl));
             newIntent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
                     Intent.FLAG_ACTIVITY_NEW_TASK);
             try {