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.
master
Greyson Parrelli 2018-10-24 10:43:46 -07:00
parent 2b14c98eb0
commit bf452dfa92
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ public class GcmBroadcastReceiver extends WakefulBroadcastReceiver implements In
new Thread("GcmForegroundServiceTimer") {
@Override
public void run() {
Util.sleep(5000);
Util.sleep(4500);
synchronized (foregroundLock) {
if (!taskCompleted.get() && !foregroundRunning.getAndSet(true)) {
Log.i(TAG, "Starting a foreground task because the job is running long.");