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.

Clean cherry-pick of ag/3750960

Bug: 75279991
Test: Manually associated with captive portals.
Exempt-From-Owner-Approval: Already approved by owner on pi-dev.
Change-Id: Ib9ea7a8a2aa72b8305fa7044df0e369a57d33953
Merged-In: Ie38d6ce6f54336db2f4672746dc7385e0a7979fb
Merged-In: I742bf6be74a9e6953d0a779bdab0c25cf32aa740
This commit is contained in:
Adam Newman
2018-03-16 10:36:35 -07:00
committed by Chalard Jean
parent 626a33cc6d
commit c707509274
2 changed files with 4 additions and 2 deletions

View File

@@ -24,7 +24,8 @@
<uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
<uses-permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS" />
<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

@@ -30,7 +30,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" />