summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/location
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-05-23 08:59:53 -0700
committerEric Erfanian <erfanian@google.com>2017-05-23 08:59:53 -0700
commit3ed0c281a143789ea8187dba60dba6c6b5db9009 (patch)
tree7357fa879e16bf83416bc032ebeb80c1e3dc2f88 /java/com/android/dialer/location
parentfb63fc2c6b774b54957466729f17108ffcf22c4b (diff)
Update Dialer to v10 RC39
This release was created following the instructions at: go/dialer-aosp-release Subsequent dialer releases will follow as O bugs are fixed, until we reach our final RC. Version: 10 Candidate: RC39 Branch: dialer-android_release_branch/153304843.1 dialer-android_20170416.00/dialer-android_20170416.00_RC39 This release contains the following bug fixes since RC32: Bug: 38137349 38249439 38299262 38329114 Test: make Change-Id: I65f695db8aa20902fa60835d58b41cfdfe42704b
Diffstat (limited to 'java/com/android/dialer/location')
-rw-r--r--java/com/android/dialer/location/CountryDetector.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/java/com/android/dialer/location/CountryDetector.java b/java/com/android/dialer/location/CountryDetector.java
index fd93b6ae9..a90febf2b 100644
--- a/java/com/android/dialer/location/CountryDetector.java
+++ b/java/com/android/dialer/location/CountryDetector.java
@@ -28,6 +28,7 @@ import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.VisibleForTesting;
+import android.support.v4.os.UserManagerCompat;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.android.dialer.common.Assert;
@@ -159,8 +160,11 @@ public class CountryDetector {
}
/** @return the geocoded country code detected by the {@link LocationManager}. */
+ @Nullable
private String getLocationBasedCountryIso() {
- if (!Geocoder.isPresent() || !PermissionsUtil.hasLocationPermissions(appContext)) {
+ if (!Geocoder.isPresent()
+ || !PermissionsUtil.hasLocationPermissions(appContext)
+ || !UserManagerCompat.isUserUnlocked(appContext)) {
return null;
}
return PreferenceManager.getDefaultSharedPreferences(appContext)