forked from organicmaps/organicmaps
[android] Fixed review notes
This commit is contained in:
parent
e300e80c54
commit
8ba105a2ba
6 changed files with 4 additions and 36 deletions
|
@ -440,13 +440,6 @@
|
|||
android:label="@string/subtittle_opt_out"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize">
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name="com.mapswithme.util.push.GcmRouterJobIntentService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:exported="false">
|
||||
</service>
|
||||
|
||||
<receiver
|
||||
android:name="com.mapswithme.maps.background.ConnectivityChangedReceiver"
|
||||
android:enabled="true"
|
||||
|
|
|
@ -374,7 +374,6 @@ public class MwmApplication extends Application
|
|||
if (BuildConfig.PW_APPID.equals(PW_EMPTY_APP_ID))
|
||||
return;
|
||||
|
||||
|
||||
Pushwoosh pushManager = Pushwoosh.getInstance();
|
||||
pushManager.registerForPushNotifications();
|
||||
|
||||
|
|
|
@ -279,6 +279,7 @@ public class UGC
|
|||
{
|
||||
if (foreground)
|
||||
return;
|
||||
|
||||
WorkerService.startActionUploadUGC(mContext);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
package com.mapswithme.util.push;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.JobIntentService;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.android.gms.gcm.GcmListenerService;
|
||||
import com.mapswithme.maps.BuildConfig;
|
||||
import com.mapswithme.util.log.Logger;
|
||||
import com.mapswithme.util.log.LoggerFactory;
|
||||
import com.pushwoosh.internal.utils.NotificationRegistrarHelper;
|
||||
import ru.mail.libnotify.api.NotificationFactory;
|
||||
|
||||
// It's temporary class, it may be deleted along with Pushwoosh sdk.
|
||||
|
@ -37,7 +36,7 @@ public class GCMListenerRouterService extends GcmListenerService
|
|||
|
||||
String pwProjectId = getPWProjectId(getApplicationContext());
|
||||
if (!TextUtils.isEmpty(pwProjectId) && pwProjectId.contains(from)) {
|
||||
dispatchMessage(data);
|
||||
NotificationRegistrarHelper.handleMessage(data);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -63,12 +62,4 @@ public class GCMListenerRouterService extends GcmListenerService
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void dispatchMessage(@NonNull Bundle data) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtras(data);
|
||||
intent.setAction("com.google.android.c2dm.intent.RECEIVE");
|
||||
int jobId = GcmRouterJobIntentService.class.hashCode();
|
||||
JobIntentService.enqueueWork(this, GcmRouterJobIntentService.class, jobId, intent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class GcmInstanceIDRouterListenerService extends InstanceIDListenerServic
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOGGER.d(TAG, String.valueOf(e));
|
||||
LOGGER.e(TAG, "Failed to obtained refreshed token: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package com.mapswithme.util.push;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.JobIntentService;
|
||||
|
||||
import com.pushwoosh.internal.utils.NotificationRegistrarHelper;
|
||||
|
||||
public class GcmRouterJobIntentService extends JobIntentService
|
||||
{
|
||||
@Override
|
||||
protected void onHandleWork(@NonNull Intent intent)
|
||||
{
|
||||
NotificationRegistrarHelper.handleMessage(intent.getExtras());
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue