Restrict Wi-Fi configuration if settings UI is restricted
- Don't launch W-Fi configuration settings if the settings UI is restricted (including guest users).
Bug: 246301667
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest
Merged-In: Id82498f41765f955e01bb311bb221d26f9574f31
Change-Id: Id82498f41765f955e01bb311bb221d26f9574f31
(cherry picked from commit aaa65fc6f0
)
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user