Skip to content
Commit 65acd234 authored by Eran Messeri's avatar Eran Messeri
Browse files

Private DNS: Fix handling of null mode

Address the case where the Private DNS mode has not been set at all, so
the value obtained from settings when reading it is null.

Java cannot cope with null value in a switch statement, so translate
that case to the default value (from the ConnectivityManager), in the
same way the Settings code does when presenting Private DNS mode to the
user.

Bug: 112982691
Test: Factory reset a device, then atest com.android.cts.devicepolicy.DeviceOwnerTest#testPrivateDnsPolicy
Change-Id: Ife6b5c15b70517f75d8815103a19a9ef72122212
parent a13ea6fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment