| | |
| | | |
| | | public AppStatusWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) { |
| | | super(context, workerParams); |
| | | MyLog.i("初始化AppStatusWorker"); |
| | | MyLog.i(TAG,"初始化AppStatusWorker"); |
| | | appStatusDao = WorkRoomDataBase.getWorkRoomDataBase(getApplicationContext()).getAppStatusDao(); |
| | | } |
| | | |
| | |
| | | public Result doWork() { |
| | | String[] str = getInputData().getStringArray(Constant.APP_STATUS); |
| | | JSONObject jsonObject = null; |
| | | MyLog.i("AppStatusWorker:"+str[0]+": "+str[1]); |
| | | MyLog.i(TAG,"AppStatusWorker:"+str[0]+": "+str[1]); |
| | | try { |
| | | jsonObject = new JSONObject(str[1]); |
| | | switch (str[0]) { |