在上传文件时闪退,后台日志,应该是启动了后台服务启动了前台应用?
官网下载的2.2.17没有这个问题
2019-11-19 20:24:00.567 10711-20814/? E/WhitePageServiceGrpcCli: Error making Grpc request.
2019-11-19 20:24:01.077 20320-20320/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.seafile.seadroid2, PID: 20320
java.lang.SecurityException: Permission Denial: startForeground from pid=20320, uid=10086 requires android.permission.FOREGROUND_SERVICE
at android.os.Parcel.createException(Parcel.java:2071)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6212)
at android.app.Service.startForeground(Service.java:707)
at com.seafile.seadroid2.notification.UploadNotificationProvider.notifyStarted(UploadNotificationProvider.java:82)
at com.seafile.seadroid2.notification.BaseNotificationProvider.updateNotification(BaseNotificationProvider.java:78)
at com.seafile.seadroid2.transfer.UploadTaskManager.notifyProgress(UploadTaskManager.java:72)
at com.seafile.seadroid2.transfer.UploadTaskManager.onFileUploaded(UploadTaskManager.java:113)
at com.seafile.seadroid2.transfer.UploadTask.onPostExecute(UploadTask.java:110)
at com.seafile.seadroid2.transfer.UploadTask.onPostExecute(UploadTask.java:18)
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.enforcePermission(ActivityManagerService.java:6598)
at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:1399)
at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1049)
at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:15147)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2822)
用 2.2.21 版本就可以了