Lines Matching defs:country

38  * This class is used to detect the country where the user is. The sources of
39 * country are queried in order of reliability, like
43 * <li>SIM's country</li>
47 * Call the {@link #detectCountry()} to get the available country immediately.
49 * To be notified of the future country change, using the
52 * Using the {@link #stop()} to stop listening to the country change.
54 * The country information will be refreshed every
55 * {@link #LOCATION_REFRESH_INTERVAL} once the location based country is used.
70 * The refresh interval when the location based country was used
85 * List of the most recent country state changes for debugging. This should have
135 public void onCountryDetected(Country country) {
137 mCountryFromLocation = country;
167 * Get the country from different sources in order of the reliability.
188 private void addToLogs(Country country) {
189 if (country == null) {
192 // If the country (ISO and source) are the same as before, then there is no
193 // need to add this country as another entry in the logs. Synchronize access to this
196 if (mLastCountryAddedToLogs != null && mLastCountryAddedToLogs.equals(country)) {
199 mLastCountryAddedToLogs = country;
206 Slog.d(TAG, country.toString());
208 mDebugLogs.add(country);
212 // On CDMA TelephonyManager.getNetworkCountryIso() just returns SIM country. We don't want
213 // to prioritize it over location based country, so ignore it.
220 * @return the country from the mobile network.
234 * @return the cached location based country.
241 * @return the country from SIM card
253 * @return the country from the system's locale.
266 * country
268 * be started if the current country source is less reliable than the location.
272 Country country = getCountry();
273 runAfterDetectionAsync(mCountry != null ? new Country(mCountry) : mCountry, country,
275 mCountry = country;
282 protected void runAfterDetectionAsync(final Country country, final Country detectedCountry,
288 country, detectedCountry, notifyChange, startLocationBasedDetection);
313 void runAfterDetection(final Country country, final Country detectedCountry,
316 notifyIfCountryChanged(country, detectedCountry);
341 // Schedule the location refresh if the country source is
342 // not more reliable than the location or no country is
345 // and start detecting the country.
356 * Find the country from LocationProvider.
392 * Notify the country change.
394 private void notifyIfCountryChanged(final Country country, final Country detectedCountry) {
396 && (country == null || !country.equals(detectedCountry))) {
398 Slog.d(TAG, "" + country + " --> " + detectedCountry);
486 for (Country country : mDebugLogs) {
487 sb.append("\n " + country.toString());