mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-06 03:49:58 +02:00
Merge pull request #3818 from deltachat/adb/tune-down-fetchworker
don't use FetchWorker if we have push notifications
This commit is contained in:
commit
10345ab8c3
1 changed files with 18 additions and 18 deletions
|
@ -197,6 +197,12 @@ public class ApplicationContext extends MultiDexApplication {
|
|||
}
|
||||
}, filter);
|
||||
|
||||
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
|
||||
|
||||
if (Prefs.isPushEnabled(this)) {
|
||||
FcmReceiveService.register(this);
|
||||
} else {
|
||||
Log.i(TAG, "FCM disabled at build time");
|
||||
// MAYBE TODO: i think the ApplicationContext is also created
|
||||
// when the app is stated by FetchWorker timeouts.
|
||||
// in this case, the normal threads shall not be started.
|
||||
|
@ -215,12 +221,6 @@ public class ApplicationContext extends MultiDexApplication {
|
|||
"FetchWorker",
|
||||
ExistingPeriodicWorkPolicy.KEEP,
|
||||
fetchWorkRequest);
|
||||
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
|
||||
|
||||
if (Prefs.isPushEnabled(this)) {
|
||||
FcmReceiveService.register(this);
|
||||
} else {
|
||||
Log.i(TAG, "FCM disabled at build time");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue