Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'android/src/com/mapswithme/maps/background/NotificationService.java')
-rw-r--r--android/src/com/mapswithme/maps/background/NotificationService.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/android/src/com/mapswithme/maps/background/NotificationService.java b/android/src/com/mapswithme/maps/background/NotificationService.java
index 0ee96c6959..c6b9993906 100644
--- a/android/src/com/mapswithme/maps/background/NotificationService.java
+++ b/android/src/com/mapswithme/maps/background/NotificationService.java
@@ -44,16 +44,19 @@ public class NotificationService extends JobIntentService
private boolean notifyIsNotAuthenticated()
{
+ final boolean isAuthenticated = LightFramework.nativeIsAuthenticated();
+ final int numberUnsentUgc = LightFramework.nativeGetNumberUnsentUGC();
+
if (!PermissionsUtils.isExternalStorageGranted() ||
!NetworkPolicy.getCurrentNetworkUsageStatus() ||
- LightFramework.nativeIsAuthenticated() ||
- LightFramework.nativeGetNumberUnsentUGC() < MIN_COUNT_UNSENT_UGC)
+ isAuthenticated ||
+ numberUnsentUgc < MIN_COUNT_UNSENT_UGC)
{
LOGGER.d(TAG, "Authentication notification is rejected. External storage granted: " +
PermissionsUtils.isExternalStorageGranted() + ". Is user authenticated: " +
- LightFramework.nativeIsAuthenticated() + ". Current network usage status: " +
+ isAuthenticated + ". Current network usage status: " +
NetworkPolicy.getCurrentNetworkUsageStatus() + ". Number of unsent UGC: " +
- LightFramework.nativeGetNumberUnsentUGC());
+ numberUnsentUgc);
return false;
}