Hi all!
I have a crash on Samsung S20 FE Android 12.
When I call
startActivityForReulst(
Intent(Settings.ACTION_WIFI_ADD_NETWORKS).apply {
putExtra(
Settings.EXTRA_WIFI_NETWORK_LIST,
arrayListOf(networkSuggestion),
)
}
)
My Application crashes with system error
FATAL EXCEPTION: main
Process: com.android.settings, PID: 3089
java.lang.IllegalArgumentException: No Wifi icon found for level: -1
at com.android.settingslib.Utils.getWifiIconResource(Utils.java:489)
at com.android.settingslib.Utils.getWifiIconResource(Utils.java:476)
at com.android.settings.wifi.addappnetworks.AddAppNetworksFragment.updateSingleNetworkSignalIcon(AddAppNetworksFragment.java:421)
at com.android.settings.wifi.addappnetworks.AddAppNetworksFragment.updateScanResultsToUi(AddAppNetworksFragment.java:790)
at com.android.settings.wifi.addappnetworks.AddAppNetworksFragment.onWifiEntriesChanged(AddAppNetworksFragment.java:815)
at com.android.wifitrackerlib.WifiPickerTracker$$ExternalSyntheticLambda2.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Phone software information: