• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


コミットメタ情報

リビジョンd785fbab68342e8ed8b47a8688a2232b3553bc53 (tree)
日時2020-09-15 02:03:13
作者Arc Wang <arcwang@goog...>
コミッターArc Wang

ログメッセージ

[DO NOT MERGE][Wi-Fi] Fix fatal exception in WifiConnectionPreferenceController

WifiConnectionPreferenceController only shows when there are 2 SIMs,
it shows the connected Wi-Fi network.

WifiConnectionPreferenceController does not use WifiPickerTracker
to get a WifiEntry key. It should not launch WifiNetworkDetailsFragment2
which uses a WifiEntry key to find a WifiEntry.

Bug: 168280554
Test: manual

      1. Make MultiNetworkHeaderController available.
      2. Settings -> Network & internet -> click connected Wi-Fi
      3. See Wi-Fi Details

Change-Id: I2acea3564d2d89fe8e120064b33ef342c97edb60

変更サマリ

差分

--- a/src/com/android/settings/wifi/WifiConnectionPreferenceController.java
+++ b/src/com/android/settings/wifi/WifiConnectionPreferenceController.java
@@ -18,7 +18,6 @@ package com.android.settings.wifi;
1818
1919 import android.content.Context;
2020 import android.os.Bundle;
21-import android.util.FeatureFlagUtils;
2221
2322 import androidx.preference.PreferenceGroup;
2423 import androidx.preference.PreferenceScreen;
@@ -26,7 +25,6 @@ import androidx.preference.PreferenceScreen;
2625 import com.android.settings.R;
2726 import com.android.settings.core.SubSettingLauncher;
2827 import com.android.settings.wifi.details.WifiNetworkDetailsFragment;
29-import com.android.settings.wifi.details2.WifiNetworkDetailsFragment2;
3028 import com.android.settingslib.core.AbstractPreferenceController;
3129 import com.android.settingslib.core.lifecycle.Lifecycle;
3230 import com.android.settingslib.wifi.AccessPoint;
@@ -131,31 +129,17 @@ public class WifiConnectionPreferenceController extends AbstractPreferenceContro
131129 mPreference.refresh();
132130 mPreference.setOrder(order);
133131
134- if (FeatureFlagUtils.isEnabled(mPrefContext, FeatureFlagUtils.SETTINGS_WIFITRACKER2)) {
135- mPreference.setOnPreferenceClickListener(pref -> {
136- Bundle args = new Bundle();
137- mPreference.getAccessPoint().saveWifiState(args);
138- new SubSettingLauncher(mPrefContext)
139- .setTitleRes(R.string.pref_title_network_details)
140- .setDestination(WifiNetworkDetailsFragment2.class.getName())
141- .setArguments(args)
142- .setSourceMetricsCategory(mMetricsCategory)
143- .launch();
144- return true;
145- });
146- } else {
147- mPreference.setOnPreferenceClickListener(pref -> {
148- Bundle args = new Bundle();
149- mPreference.getAccessPoint().saveWifiState(args);
150- new SubSettingLauncher(mPrefContext)
151- .setTitleRes(R.string.pref_title_network_details)
152- .setDestination(WifiNetworkDetailsFragment.class.getName())
153- .setArguments(args)
154- .setSourceMetricsCategory(mMetricsCategory)
155- .launch();
156- return true;
157- });
158- }
132+ mPreference.setOnPreferenceClickListener(pref -> {
133+ Bundle args = new Bundle();
134+ mPreference.getAccessPoint().saveWifiState(args);
135+ new SubSettingLauncher(mPrefContext)
136+ .setTitleRes(R.string.pref_title_network_details)
137+ .setDestination(WifiNetworkDetailsFragment.class.getName())
138+ .setArguments(args)
139+ .setSourceMetricsCategory(mMetricsCategory)
140+ .launch();
141+ return true;
142+ });
159143 mPreferenceGroup.addPreference(mPreference);
160144 }
161145 }