summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/location/CountryDetector.java
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-08-31 16:17:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-08-31 16:17:04 +0000
commitc39ea3c55fac807c0b98aabdf56c70dc8a49036c (patch)
treee282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/dialer/location/CountryDetector.java
parent68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff)
parent2ca4318cc1ee57dda907ba2069bd61d162b1baef (diff)
Merge "Update Dialer source to latest internal Google revision."
Diffstat (limited to 'java/com/android/dialer/location/CountryDetector.java')
-rw-r--r--java/com/android/dialer/location/CountryDetector.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/java/com/android/dialer/location/CountryDetector.java b/java/com/android/dialer/location/CountryDetector.java
index a90febf2b..110cf4502 100644
--- a/java/com/android/dialer/location/CountryDetector.java
+++ b/java/com/android/dialer/location/CountryDetector.java
@@ -33,8 +33,8 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
-import com.android.dialer.common.concurrent.DialerExecutors;
import com.android.dialer.common.concurrent.DialerExecutor.Worker;
+import com.android.dialer.common.concurrent.DialerExecutorComponent;
import com.android.dialer.util.PermissionsUtil;
import java.util.List;
import java.util.Locale;
@@ -72,7 +72,7 @@ public class CountryDetector {
// exceedingly rare event that the device does not have a default locale set for some reason.
private static final String DEFAULT_COUNTRY_ISO = "US";
- @VisibleForTesting static CountryDetector sInstance;
+ @VisibleForTesting public static CountryDetector sInstance;
private final TelephonyManager telephonyManager;
private final LocaleProvider localeProvider;
@@ -80,7 +80,7 @@ public class CountryDetector {
private final Context appContext;
@VisibleForTesting
- CountryDetector(
+ public CountryDetector(
Context appContext,
TelephonyManager telephonyManager,
LocationManager locationManager,
@@ -192,7 +192,7 @@ public class CountryDetector {
}
/** Interface for accessing the current locale. */
- interface LocaleProvider {
+ public interface LocaleProvider {
Locale getLocale();
}
@@ -216,7 +216,9 @@ public class CountryDetector {
private static void processLocationUpdate(
Context appContext, Geocoder geocoder, Location location) {
- DialerExecutors.createNonUiTaskBuilder(new GeocodeCountryWorker(geocoder))
+ DialerExecutorComponent.get(appContext)
+ .dialerExecutorFactory()
+ .createNonUiTaskBuilder(new GeocodeCountryWorker(geocoder))
.onSuccess(
country -> {
if (country == null) {