Merge "Restrict Wi-Fi configuration if settings UI is restricted" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-09-28 16:48:10 +00:00
committed by Android (Google) Code Review
2 changed files with 15 additions and 0 deletions

View File

@@ -1324,6 +1324,12 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
@VisibleForTesting
void launchConfigNewNetworkFragment(WifiEntry wifiEntry) {
if (mIsRestricted) {
Log.e(TAG, "Can't configure Wi-Fi because NetworkProviderSettings is restricted.");
EventLog.writeEvent(0x534e4554, "246301667", -1 /* UID */, "Fragment is restricted.");
return;
}
final Bundle bundle = new Bundle();
bundle.putString(WifiNetworkDetailsFragment.KEY_CHOSEN_WIFIENTRY_KEY,
wifiEntry.getKey());