哪里的onSaveInstanceState束得救吗?onSaveInstanceState

2023-09-04 04:51:16 作者:浅唱清歌是离愁°

我想知道是哪里的方法捆绑outStateonSaveInstanceState(Bundle outState)存储。

I would like to know where the bundle "outState" of the method onSaveInstanceState(Bundle outState) is stored.

时它存储在内存中,或在设备存储?

Is it stored in memory or in the device storage?

我关心的数据,这些数据存储在包中的安全性。

I am concerned about the security of the data which is stored in the bundle.

推荐答案

我不认为有任何方式,任何恶意的后台进程可以在应用程序的包数据得到的。它不记录的Andr​​oid如何处理的包数据。它可能会或可能不会写入到磁盘的情况下,你的应用程序被清除,而中背景。但是,因为我们不知道这个数据是否被保存到磁盘上,如果是这样,因为我们不知道在哪里,而且几乎可以肯定没有读取访问磁盘的一部分,我不会T担心一些第三方程序能够恢复这些数据。

I don't think there's any way that any malicious background process can get at the bundle data of your application. It is not documented how Android treats the Bundle data. It may or may not be written to disk in the event that your app is cleaned, while backgrounded. However, given that we don't know whether or not this data is saved to disk, and if it is, given that we have no clue where, and almost certainly don't have read access to that part of the disk, I wouldn't worry about some third party process being able to recover that data.

因此​​我不清楚是什么,你可能会认为曝光。虽然我可能失去了一些东西。 但是,在回答你的问题,那绝对是在内存中,而你的应用程序是活的,如果您的应用程序中背景也可能会或可能不会写入隐藏的地方,但我们不'知道,因为谷歌并没有告诉我们。

Consequently I'm not clear what you might think the exposure is. Though I may be missing something. However, in answer to your question, it is absolutely in memory while your app is alive, and if your app is backgrounded it may or may not be written somewhere hidden, but we dont' know because Google hasn't told us.

它连同当存储器被收集应用程序被破坏。

It's destroyed along with the application when the memory is collected.