| From 3a41da783fcb9fa53e1e88c304509fadebc8a999 Mon Sep 17 00:00:00 2001 |
| From: Pierre-Hugues Husson <phh@phh.me> |
| Date: Mon, 20 Aug 2018 22:39:39 +0200 |
| Subject: [PATCH] Allow LocaleTracker to work even if wifi is not up (FDE) |
| |
| Change-Id: Ie6a83af047bfcefb2588a9f6e31ac64e76c070a8 |
| --- |
| src/java/com/android/internal/telephony/LocaleTracker.java | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/src/java/com/android/internal/telephony/LocaleTracker.java b/src/java/com/android/internal/telephony/LocaleTracker.java |
| index 9d730d440..17b899cd1 100644 |
| --- a/src/java/com/android/internal/telephony/LocaleTracker.java |
| +++ b/src/java/com/android/internal/telephony/LocaleTracker.java |
| @@ -409,8 +409,8 @@ public class LocaleTracker extends Handler { |
| // country of the carrier we see. If we can't see any, reset to 0 so we don't |
| // broadcast on forbidden channels. |
| if (mPhone.getContext().getSystemService(Context.WIFI_SERVICE) != null) |
| - ((WifiManager) mPhone.getContext().getSystemService(Context.WIFI_SERVICE)) |
| - .setCountryCode(countryIso); |
| + WifiManager wifi = (WifiManager)mPhone.getContext().getSystemService(Context.WIFI_SERVICE); |
| + if(wifi != null) wifi.setCountryCode(countryIso); |
| } |
| } |
| |
| -- |
| 2.17.1 |
| |