简体   繁体   中英

Android Java: Activity called AFTER onPause( )

My app allows the user to choose a file, through a chooser intent, and then opens the file with an asyncTask.
Now, I log all procedures entries and this is what I see (Eclipse logcat):

02-01 11:08:21.229: D/LogViewer(337): + onPause()
02-01 11:08:21.497: D/LogViewer(337): + onItemSelected()
02-01 11:08:21.507: D/LogViewer(337): + onItemSelected()
02-01 11:08:26.667: D/LogViewer(337): + onActivityResult(requestCode:0, resultCode:-1, data:Intent { dat=file:MyLog.gzip })
02-01 11:08:26.731: D/LogCollectTask(337): + onPreExecute()
02-01 11:08:26.737: D/LogCollectTask(337): + doInBackground()
02-01 11:08:27.157: D/LogViewer(337): + onResume()

How come there are calls to LogViewer AFTER it is paused? Shouldn't it be inactive until onResume() ?

PS: I know that it is what it is, but I am strugling to understand Android behavior.

我想我会接受,因为选择者的意图需要用户交互,所以它将取代“已暂停”状态,除非有人更了解并纠正了我。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM