Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bb41a42 authored by fionaxu's avatar fionaxu
Browse files

integrate portal webview to the default app

Based on the UX review feedback, we plan to implement portal webview
function inside the carrier default app instead of reusing the existing
portal app. This will give us more flexibility and control, also will
improve UX flow by getting rid of the some unwanted dialogues.

new added CaptivePortalLoginActivity is a copy paste from
com.android.captiveportallogin/CaptivePortalLoginActivity combined
with logic from deleted LaunchCaptivePortalActivity.
All webview UI was inherited from com.android.captiveportal

Test: Manual
Bug: 36002256
Merged-in: I2627d5a43039ce433006c058bb4f2c1a39113e59
Change-Id: If422fa12c5f24d9b9e2c9380b3edf94df74bb85f
parent 3dee2958
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
    <uses-permission android:name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />

    <application android:label="@string/app_name" >
@@ -34,10 +33,16 @@
                <action android:name="com.android.internal.telephony.CARRIER_SIGNAL_REDIRECTED" />
            </intent-filter>
        </receiver>
        <activity android:name="com.android.carrierdefaultapp.CaptivePortalLaunchActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:excludeFromRecents="true"/>
        <service android:name="com.android.carrierdefaultapp.ProvisionObserver"
                 android:permission="android.permission.BIND_JOB_SERVICE"/>
        <activity
            android:name="com.android.carrierdefaultapp.CaptivePortalLoginActivity"
            android:label="@string/action_bar_label"
            android:theme="@style/AppTheme"
            android:configChanges="keyboardHidden|orientation|screenSize" >
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>
    </application>
</manifest>
+682 B
Loading image diff...
+34 −0
Original line number Diff line number Diff line
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.android.carrierdefaultapp.CaptivePortalLoginActivity"
    tools:ignore="MergeRootFrame">
    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/url_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="20sp"
        android:singleLine="true" />

    <ProgressBar
        android:id="@+id/progress_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="?android:attr/progressBarStyleHorizontal" />

    <WebView
        android:id="@+id/webview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="false"
        android:layout_alignParentRight="false" />

</LinearLayout>
</FrameLayout>
+3 −0
Original line number Diff line number Diff line
<resources>
    <dimen name="glif_icon_size">32dp</dimen>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>
</resources>
+4 −5
Original line number Diff line number Diff line
@@ -6,9 +6,8 @@
    <string name="no_data_notification_id">No Mobile data service</string>
    <string name="portal_notification_detail">Tap to add funds to your %s SIM</string>
    <string name="no_data_notification_detail">Please contact your service provider %s</string>
    <string name="progress_dialogue_network_connection">Connecting to captive portal...</string>
    <string name="alert_dialogue_network_timeout">Network timeout, would you like to retry?</string>
    <string name="alert_dialogue_network_timeout_title">Network unavailable</string>
    <string name="quit">Quit</string>
    <string name="wait">Wait</string>
    <string name="action_bar_label">Sign in to mobile network</string>
    <string name="ssl_error_warning">The network you&#8217;re trying to join has security issues.</string>
    <string name="ssl_error_example">For example, the login page may not belong to the organization shown.</string>
    <string name="ssl_error_continue">Continue anyway via browser</string>
</resources>
Loading