mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-13 18:18:35 +00:00
Slightly shorten time before we show a foreground notification for pushes.
There's some ANRs, not many, that are likely caused by us riding the 5-second ANR timeout a little too closely. Giving us a little buffer to see if that helps.
This commit is contained in:
parent
2b14c98eb0
commit
bf452dfa92
@ -121,7 +121,7 @@ public class GcmBroadcastReceiver extends WakefulBroadcastReceiver implements In
|
|||||||
new Thread("GcmForegroundServiceTimer") {
|
new Thread("GcmForegroundServiceTimer") {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Util.sleep(5000);
|
Util.sleep(4500);
|
||||||
synchronized (foregroundLock) {
|
synchronized (foregroundLock) {
|
||||||
if (!taskCompleted.get() && !foregroundRunning.getAndSet(true)) {
|
if (!taskCompleted.get() && !foregroundRunning.getAndSet(true)) {
|
||||||
Log.i(TAG, "Starting a foreground task because the job is running long.");
|
Log.i(TAG, "Starting a foreground task because the job is running long.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user