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

Unverified Commit 334cd1bc authored by Michael Bestas's avatar Michael Bestas
Browse files

Changes for new network setup flow

* Remove mobile data/choose data sim pages
* Rename Wi-Fi setup to network setup
* Switch to the new NetworkProviderSettings which contains
  both Wi-Fi and mobile data setup.

Change-Id: I1c618d629628740e39dbed313d468d1efe971ed7
parent 0e9b6ebc
Loading
Loading
Loading
Loading
+4 −30
Original line number Diff line number Diff line
@@ -150,32 +150,6 @@
            </intent-filter>
        </activity>

        <activity android:name=".WifiSetupActivity"
                  android:label="@string/activity_label_empty"
                  android:excludeFromRecents="true"
                  android:configChanges="mcc|mnc"
                  android:immersive="true"
                  android:exported="false"
                  android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="org.lineageos.setupwizard.LINEAGE_WIFI_SETUP" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".CaptivePortalSetupActivity"
                  android:label="@string/activity_label_empty"
                  android:excludeFromRecents="true"
                  android:configChanges="mcc|mnc"
                  android:immersive="true"
                  android:exported="false"
                  android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="org.lineageos.setupwizard.LINEAGE_CAPTIVE_PORTAL_SETUP" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".SimMissingActivity"
                  android:label="@string/activity_label_empty"
                  android:excludeFromRecents="true"
@@ -189,7 +163,7 @@
            </intent-filter>
        </activity>

        <activity android:name=".ChooseDataSimActivity"
        <activity android:name=".NetworkSetupActivity"
                  android:label="@string/activity_label_empty"
                  android:excludeFromRecents="true"
                  android:configChanges="mcc|mnc"
@@ -197,12 +171,12 @@
                  android:exported="false"
                  android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="org.lineageos.setupwizard.LINEAGE_CHOOSE_DATA_SIM" />
                <action android:name="org.lineageos.setupwizard.LINEAGE_NETWORK_SETUP" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".MobileDataActivity"
        <activity android:name=".CaptivePortalSetupActivity"
                  android:label="@string/activity_label_empty"
                  android:excludeFromRecents="true"
                  android:configChanges="mcc|mnc"
@@ -210,7 +184,7 @@
                  android:exported="false"
                  android:windowSoftInputMode="stateAlwaysHidden">
            <intent-filter>
                <action android:name="org.lineageos.setupwizard.LINEAGE_ENABLE_MOBILE_DATA" />
                <action android:name="org.lineageos.setupwizard.LINEAGE_CAPTIVE_PORTAL_SETUP" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
+0 −76
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 The CyanogenMod Project
     Copyright (C) 2017-2021 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<com.google.android.setupdesign.GlifLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/setup_wizard_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        style="@style/SudContentFrame">

        <FrameLayout
            android:id="@+id/page"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1">

            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fillViewport="true">

                <LinearLayout
                    android:id="@+id/page_view"
                    android:orientation="vertical"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:visibility="gone">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        style="@style/SudDescription.Glif"
                        android:text="@string/choose_data_sim_summary" />

                    <include layout="@layout/divider" />

                </LinearLayout>
            </ScrollView>

            <ProgressBar
                android:id="@+id/progress"
                style="?android:attr/progressBarStyleHorizontal"
                android:indeterminateOnly="true"
                android:layout_width="match_parent"
                android:layout_height="8dp"
                android:layout_gravity="top"
                android:visibility="gone" />
        </FrameLayout>

        <org.lineageos.setupwizard.NavigationLayout
            android:id="@+id/navigation_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </LinearLayout>
</com.google.android.setupdesign.GlifLayout>

res/layout/data_sim_row.xml

deleted100644 → 0
+0 −51
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 The CyanogenMod Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:id="@+id/sim_row"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:minHeight="?android:attr/listPreferredItemHeight"
              android:gravity="center_vertical"
              android:paddingLeft="@dimen/content_margin_left"
              android:paddingRight="@dimen/data_switch_margin_right"
              android:background="?android:attr/selectableItemBackground"
              android:clickable="true">

    <ImageView
        android:id="@+id/signal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_signal_0" />

    <TextView
        android:id="@+id/sim_title"
        android:layout_width="0px"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:textSize="14sp"
        android:layout_marginLeft="@dimen/carrier_text_margin_left"
        android:maxLines="4" />

    <CheckBox
        android:id="@+id/enable_check"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:duplicateParentState="true"
        android:clickable="false"/>

</LinearLayout>
+0 −116
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2013 The CyanogenMod Project
     Copyright (C) 2017-2021 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<com.google.android.setupdesign.GlifLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/setup_wizard_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        style="@style/SudContentFrame">

        <ProgressBar
            android:id="@+id/progress"
            style="@style/SudFourColorIndeterminateProgressBar"
            android:indeterminateOnly="true"
            android:layout_width="match_parent"
            android:layout_height="8dp"
            android:visibility="gone" />

        <FrameLayout
            android:id="@+id/page"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1">

            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fillViewport="true">

                <LinearLayout
                    android:id="@+id/page_view"
                    android:orientation="vertical"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:id="@+id/mobile_data_summary"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/enable_mobile_data_summary"
                        style="@style/SudDescription.Glif" />

                    <include layout="@layout/divider" />

                    <LinearLayout
                        android:id="@+id/data"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:minHeight="?android:attr/listPreferredItemHeight"
                        android:gravity="center_vertical"
                        android:paddingLeft="@dimen/content_margin_left"
                        android:paddingRight="@dimen/data_switch_margin_right"
                        android:background="?android:attr/selectableItemBackground"
                        android:clickable="true">

                        <ImageView
                            android:id="@+id/signal"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:src="@drawable/ic_signal_0" />

                        <TextView
                            android:id="@+id/enable_data_title"
                            android:layout_width="0px"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:textSize="14sp"
                            android:layout_marginLeft="@dimen/carrier_text_margin_left"
                            android:text="@string/setup_mobile_data_no_service"
                            android:maxLines="4" />

                        <Switch
                            android:id="@+id/data_switch"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:gravity="center_vertical"
                            android:duplicateParentState="true"
                            android:clickable="false"
                            android:textOff="@string/no"
                            android:textOn="@string/yes"
                            style="@style/SudSwitchStyle" />
                    </LinearLayout>

                    <include layout="@layout/divider" />

                </LinearLayout>
            </ScrollView>
        </FrameLayout>

        <org.lineageos.setupwizard.NavigationLayout
            android:id="@+id/navigation_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </LinearLayout>
</com.google.android.setupdesign.GlifLayout>
+3 −12
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

<!--
     Copyright (C) 2016 The CyanogenMod Project
     Copyright (C) 2017 The LineageOS Project
     Copyright (C) 2017-2021 The LineageOS Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -32,23 +32,14 @@
    </WizardAction>

    <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_DATETIME;end" id="datetime">
        <result wizard:action="wifi_setup" />
    </WizardAction>

    <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_WIFI_SETUP;end" id="wifi_setup">
        <result wizard:action="sim_missing" />
    </WizardAction>

    <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SIM_MISSING;end" id="sim_missing">
        <result wizard:resultCode="1" wizard:action="location_settings" wizard:name="skip_sim" />
        <result wizard:action="choose_data_sim" />
    </WizardAction>

    <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_CHOOSE_DATA_SIM;end" id="choose_data_sim">
        <result wizard:action="enable_mobile_data" />
        <result wizard:action="network_setup" />
    </WizardAction>

    <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_ENABLE_MOBILE_DATA;end" id="enable_mobile_data">
    <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_NETWORK_SETUP;end" id="network_setup">
        <result wizard:action="location_settings" />
    </WizardAction>

Loading