Merge "Avoid launching details settings after WifiEntry is forgotten" into main

This commit is contained in:
Treehugger Robot
2024-08-15 05:44:24 +00:00
committed by Android (Google) Code Review
2 changed files with 15 additions and 0 deletions

View File

@@ -1068,6 +1068,10 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
@VisibleForTesting
void launchNetworkDetailsFragment(LongPressWifiEntryPreference pref) {
final WifiEntry wifiEntry = pref.getWifiEntry();
if (!wifiEntry.isSaved()) {
Log.w(TAG, "launchNetworkDetailsFragment: Don't launch because WifiEntry isn't saved!");
return;
}
final Context context = requireContext();
final Bundle bundle = new Bundle();