<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source 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.
-->

<PreferenceScreen
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:settings="http://schemas.android.com/apk/res-auto"
        android:title="@string/provider_internet_settings"
        settings:keywords="@string/keywords_wifi">

    <!-- Resetting your internet description -->
    <com.android.settingslib.widget.LayoutPreference
        android:key="resetting_your_internet"
        android:title="@string/resetting_internet_text"
        android:selectable="false"
        android:layout="@layout/resetting_internet"
        settings:allowDividerBelow="true"/>

    <!-- Airplane mode message -->
    <com.android.settingslib.widget.LayoutPreference
        android:key="airplane_mode_message"
        android:title="@string/condition_airplane_title"
        android:selectable="false"
        android:layout="@layout/airplane_mode_message_preference"
        settings:searchable="false"
        settings:allowDividerBelow="true"/>

    <com.android.settingslib.widget.UntitledPreferenceCategory
        android:key="ethernet_interfaces"
        settings:isPreferenceVisible="false">
        <com.android.settingslib.RestrictedSwitchPreference
            android:key="main_toggle_ethernet"
            android:title="@string/ethernet"
            settings:restrictedSwitchSummary="@string/not_allowed_by_ent"
            settings:allowDividerAbove="true"/>
    </com.android.settingslib.widget.UntitledPreferenceCategory>

    <com.android.settingslib.widget.UntitledPreferenceCategory
        android:key="connected_ethernet_category"
        settings:isPreferenceVisible="false">
        <Preference
            android:key="connected_ethernet_network"
            android:title="@string/ethernet"
            android:summary="@string/to_switch_networks_disconnect_ethernet"
            android:icon="@drawable/ic_settings_ethernet"/>
    </com.android.settingslib.widget.UntitledPreferenceCategory>

    <PreferenceCategory
        android:key="provider_model_mobile_network"
        android:title="@string/mobile_data_settings_title"
        settings:isPreferenceVisible="@bool/config_show_sim_info"
        settings:controller="com.android.settings.network.NetworkMobileProviderController"/>

    <PreferenceCategory
        android:key="wifi_category"
        android:title="@string/wifi_settings">
        <com.android.settingslib.RestrictedSwitchPreference
            android:key="main_toggle_wifi"
            android:title="@string/wifi_settings_primary_switch_title"
            settings:keywords="@string/keywords_wifi"
            settings:restrictedSwitchSummary="@string/not_allowed_by_ent"/>
    </PreferenceCategory>

    <PreferenceCategory
        android:key="access_points"
        android:title="@string/wifi_networks_category">

        <com.android.settings.wifi.AddWifiNetworkPreference
            android:key="add_wifi_network"
            android:title="@string/wifi_add_network"
            android:icon="@drawable/ic_add_24dp"/>
    </PreferenceCategory>


    <com.android.settingslib.widget.UntitledPreferenceCategory
        android:key="wifi_ext_category">
      <Preference
          android:key="configure_network_settings"
          android:title="@string/network_and_internet_preferences_title"
          settings:allowDividerAbove="true"
          android:fragment="com.android.settings.wifi.ConfigureWifiSettings"/>

      <Preference
          android:key="saved_networks"
          android:title="@string/wifi_saved_access_points_label"
          android:fragment="com.android.settings.wifi.savedaccesspoints2.SavedAccessPointsWifiSettings2"/>

      <com.android.settings.datausage.DataUsagePreference
          android:key="non_carrier_data_usage"
          android:title="@string/non_carrier_data_usage"/>
    </com.android.settingslib.widget.UntitledPreferenceCategory>

    <com.android.settingslib.widget.FooterPreference
        android:key="wifi_status_message_footer"
        settings:allowDividerAbove="false"
        settings:searchable="false"/>
</PreferenceScreen>
