Add conditional check for `READ_WIFI_CREDENTIAL` before calling `getPrivilegedConfiguredNetworks`.

`getPrivilegedConfiguredNetworks` was called by the `wifitrackerlib` library which causes issue for the devices that did not pre-grant `READ_WIFI_CREDENTIAL` permission. Conditionally replacing it with `getConfiguredNetworks` when the permission is not pre-granted.

Test: ran presubmit

Bug: 356925349

Flag: EXEMPT bugfix

Change-Id: I2ce319d6b39aa9977357d0de33a65d236fe13fa6
1 file changed