[android] fix: Do not show "Download current country"notification if not migrated yet.

This commit is contained in:
Alexander Marchuk 2016-01-27 12:10:44 +03:00 committed by Sergey Yershov
parent aa0711a5ac
commit 164aaf7be4

View file

@ -29,7 +29,7 @@ public class WorkerService extends IntentService
*
* @see IntentService
*/
public static void startActionCheckUpdate(Context context)
static void startActionCheckUpdate(Context context)
{
Intent intent = new Intent(context, WorkerService.class);
intent.setAction(ACTION_CHECK_UPDATE);
@ -42,7 +42,7 @@ public class WorkerService extends IntentService
*
* @see IntentService
*/
public static void startActionDownload(Context context)
static void startActionDownload(Context context)
{
final Intent intent = new Intent(context, WorkerService.class);
intent.setAction(WorkerService.ACTION_DOWNLOAD_COUNTRY);
@ -94,6 +94,9 @@ public class WorkerService extends IntentService
private void handleActionCheckLocation()
{
if (ActiveCountryTree.isLegacyMode())
return;
final long delayMillis = 60000; // 60 seconds
boolean isLocationValid = processLocation();
if (!isLocationValid)
@ -131,7 +134,7 @@ public class WorkerService extends IntentService
/**
* Adds notification with download country suggest.
*/
private void placeDownloadNotification(Location l)
private static void placeDownloadNotification(Location l)
{
final String country = Framework.nativeGetCountryNameIfAbsent(l.getLatitude(), l.getLongitude());
if (!TextUtils.isEmpty(country))