0

I have a question regarding where the saved state instance of an activity is stored, internally. Since it's possible to restore even when the process is killed, I expect that Android OS stores the data somewhere else (other than app's process memory space).

I'm asking because I have a sessionId (in app memory only) which is sensitive and I have a requirement not to store it in permanent storage. Would the state instance of the Activity fall under this category?

ipanag
  • 13
  • 2

1 Answers1

0

See Will 'Bundle savedInstanceState' be alive after Application is being killed?.

In AOSP 4.4.2, the saved instance states are stored in the system process's memory.

Community
  • 1
  • 1
Mikko Liikanen
  • 675
  • 4
  • 8
  • Thanks, I've read that question but my main question was covered from your 2nd line. Is there any reference for that, or indication from source code? – ipanag Apr 15 '14 at 20:31
  • Yes - you can take a look at how ActivityManagerService, ActivityRecord and ActivityStack keep track of the stored state (they call it icicle internally). Sources are at https://android.googlesource.com/platform/frameworks/base/+/android-4.4.2_r2/services/java/com/android/server/am/ – Mikko Liikanen Apr 16 '14 at 06:00