Currently, when anything changes, the wifi detail status page removes and then redraws all IP address information. This causes the whole screen to flicker. Instead, only add and remove things when they actually change. In order to do this, convert the IPv6 addresses from a list of Preference objects to a single newline-separated text field. This removes the need to keep track of addresses as they are added and deleted, and also looks a bit better. Also, minor correctness fixes: - Get the gateway from the default route, not from the last route with a non-null gateway. - Get the IPv4 subnet mask from the IPv4 address prefix, not from the last route with prefix length > 0. Bug: 62171690 Test: make -j64 RunSettingsRoboTests Test: IP information does not flicker when signal strength changes Change-Id: Ia9f2a277e53a2800407ae327701c5b95a9eec20a
94 lines
3.7 KiB
XML
94 lines
3.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2016 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/com.android.settings" >
|
|
|
|
<!-- Connected Network Header -->
|
|
<Preference
|
|
android:key="connection_detail"
|
|
android:layout="@layout/connection_detail_pref"/>
|
|
|
|
<!-- General Details Category -->
|
|
<PreferenceCategory
|
|
android:key="general_details_category" >
|
|
<!-- Buttons -->
|
|
<com.android.settings.applications.LayoutPreference
|
|
android:key="buttons"
|
|
android:layout="@layout/two_buttons_panel"
|
|
android:selectable="false" />
|
|
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="signal_strength"
|
|
android:title="@string/wifi_signal"
|
|
android:selectable="false"/>
|
|
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="frequency"
|
|
android:icon="@drawable/ic_frequency_antenna"
|
|
android:title="@string/wifi_frequency"
|
|
android:selectable="false"/>
|
|
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="security"
|
|
android:icon="@drawable/ic_security_lock_24dp"
|
|
android:title="@string/wifi_security"
|
|
android:selectable="false"/>
|
|
</PreferenceCategory>
|
|
|
|
<!-- Network Details -->
|
|
<PreferenceCategory
|
|
android:key="ip_details_category"
|
|
android:title="@string/wifi_setup_detail">
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="mac_address"
|
|
android:title="@string/wifi_advanced_mac_address_title"
|
|
android:selectable="false"/>
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="ip_address"
|
|
android:title="@string/wifi_ip_address"
|
|
android:selectable="false"/>
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="gateway"
|
|
android:title="@string/wifi_gateway"
|
|
android:selectable="false"/>
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="subnet_mask"
|
|
android:title="@string/wifi_details_subnet_mask"
|
|
android:selectable="false"/>
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="dns"
|
|
android:title="@string/wifi_details_dns"
|
|
android:selectable="false"/>
|
|
<com.android.settings.wifi.WifiDetailPreference
|
|
android:key="link_speed"
|
|
android:title="@string/wifi_speed"
|
|
android:selectable="false"/>
|
|
</PreferenceCategory>
|
|
|
|
<!-- IPv6 Details -->
|
|
<PreferenceCategory
|
|
android:key="ipv6_category"
|
|
android:title="@string/wifi_details_ipv6_address_header"
|
|
android:selectable="false">
|
|
<Preference
|
|
android:key="ipv6_addresses"
|
|
android:selectable="false"/>
|
|
</PreferenceCategory>
|
|
|
|
</PreferenceScreen>
|