That's what I thought. But why is the UI state then not entirely cleared? But I found the following difference though doing some more testing - I found there's a difference whether the activity is in the foreground or not when I do the kill:
Case 1) I start the facebook app, I am on the login page, enter a username (but don't submit), then I switch to the Terminal app on my device (thus, the FB activity is not in the foreground anymore), then I kill all facebook processes (which I see via 'ps'), and restart the app (via home long-press, selected recent). The username is still there! Case 2) I start the facebook app, I am on the login page, enter a username (but don't submit). Then I kill the process via PC (adb shell), while the facebook login screen is still in the foreground when I do the kill). When I execute the kill command, I can see the FB activity getting closed on the device. When I then restart the app (via home long-press, selected recent), the username on the login screen is gone - as expected. Why is there a difference whether the application is in the foreground? How to clear the UI state of activities that are not in the foreground anymore? On Nov 8, 1:47 pm, Frank Weiss <fewe...@gmail.com> wrote: > On a rooted phone, you ought to be able to kill the Linux process. Just > finish or force close may not be secure since the Android OS lazily reclaims > processes that are no longer in use. Although on a non-rooted phone this is > not an issue, since the Android OS relies on Linux process security. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en