Enable cleartext for captive portal apps

When a user attempts to visit a captive portal the Activity will attempt
to load http://connectivitycheck.gstatic.com/generate_204 and a
walled-garden will typically intercept this and respond with a 302
redirect to a sign-in flow.

The new default of disabling cleartext unless explicitly enabled breaks
captive portal operation. This change enables cleartext for the two
applications that contain a CaptivePortalLoginActivity.

Bug: 75279991
Test: Manually associated with captive portals.
Change-Id: I081dfed067b3a78a81bfd3ec10afaf953b6baf3f
This commit is contained in:
Adam Newman
2018-03-16 10:36:35 -07:00
parent ddbb9d00a2
commit d816a2a8ed
2 changed files with 4 additions and 2 deletions

View File

@@ -23,7 +23,8 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
<application android:label="@string/app_name" >
<application android:label="@string/app_name"
android:usesCleartextTraffic="true">
<activity
android:name="com.android.captiveportallogin.CaptivePortalLoginActivity"
android:label="@string/action_bar_label"

View File

@@ -29,7 +29,8 @@
<application
android:label="@string/app_name"
android:directBootAware="true">
android:directBootAware="true"
android:usesCleartextTraffic="true">
<receiver android:name="com.android.carrierdefaultapp.CarrierDefaultBroadcastReceiver">
<intent-filter>
<action android:name="com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED" />