Просмотр исходного кода

时间小于等于0则不提交

zengjiebin лет назад: 8
Родитель
Сommit
75d7de5768
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/service/FloatService.java

+ 3 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/service/FloatService.java

@@ -123,6 +123,9 @@ public class FloatService extends Service {
                         runTime +=  System.currentTimeMillis() - SheepApp.getInstance().getLastTime();
                         runTime +=  System.currentTimeMillis() - SheepApp.getInstance().getLastTime();
                         SheepApp.getInstance().setLastTime(System.currentTimeMillis());
                         SheepApp.getInstance().setLastTime(System.currentTimeMillis());
                     }
                     }
+                    if(runTime <= 0){//时间小于等于0则不提交
+                        return;
+                    }
 
 
                     MyDbManager.getInstance().removeAppRecord();
                     MyDbManager.getInstance().removeAppRecord();
                     System.out.println("MonitorAppService runTime = "+runTime);
                     System.out.println("MonitorAppService runTime = "+runTime);