[YotaPhone] tomgaga:
Here are some logs for you

Hi,

Interesting question, so I made a little app to check. As I suspected it starts a new process.

So the only solution is start mirroring mode instead of sending the app to the back screen. (You can do this by first going home and then pressing mirror button, or by pressing the mirror button from the epd screen)

My app logs all the onstart, pause, stop, destroy.... to debug logcat with tage ACTIVITY_LIFECYCLE. I ran it, then switched to back and then switched to front again.

in the manifest, I made sure the activity handles all the configchanges that I could find:

android:configChanges="uiMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen">

The debug apk, mainactivity and manifest files are attached.

Here is the log of the most important method calls

07-24 16:11:06.018 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:11:06.021 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:11:19.443 4404-4404/? D/ACTIVITY_LIFECYLE: onPause
07-24 16:11:19.464 4404-4404/? D/ACTIVITY_LIFECYLE: onSaveInstanceState(Bundle outState)

SWITCH TO BACK: New process

07-24 16:11:21.010 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:11:21.011 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:11:21.028 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onRestoreInstanceState(Bundle savedInstanceState)
07-24 16:11:21.033 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume

SWITCH TO FRONT: New process

07-24 16:13:15.242 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:13:15.243 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onRestoreInstanceState(Bundle savedInstanceState)
07-24 16:13:15.252 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:13:15.273 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onPause
07-24 16:13:15.274 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume

Here is an extended version with more methods:

07-24 16:11:05.901 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: theme, resid, first
07-24 16:11:05.917 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:05.917 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:05.917 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:05.917 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:05.924 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:06.014 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onContentChanged()
07-24 16:11:06.018 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:11:06.021 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:11:06.021 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: title, color
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState)
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onStateNotSaved()
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:11:06.023 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPostResume()
07-24 16:11:06.049 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onAttachedToWindow()
07-24 16:11:06.176 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:11:06.179 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, menu
07-24 16:11:06.179 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreateOptionsMenu(menu)
07-24 16:11:06.179 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:11:06.179 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:11:06.182 4404-4404/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowFocusChanged(hasFocus)
07-24 16:11:19.443 4404-4404/? D/ACTIVITY_LIFECYLE_EXTRA: onWindowFocusChanged(hasFocus)
07-24 16:11:19.443 4404-4404/? D/ACTIVITY_LIFECYLE: onPause
07-24 16:11:19.456 4404-4404/? D/ACTIVITY_LIFECYLE_EXTRA: onCreateDescription()
07-24 16:11:19.464 4404-4404/? D/ACTIVITY_LIFECYLE: onSaveInstanceState(Bundle outState)
07-24 16:11:19.464 4404-4404/? D/ACTIVITY_LIFECYLE_EXTRA: onCreateDescription()

SWITCH TO BACK: New process

07-24 16:11:20.817 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: theme, resid, first
07-24 16:11:20.833 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:20.833 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:20.833 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:20.833 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:20.847 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:11:21.008 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onContentChanged()
07-24 16:11:21.010 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:11:21.011 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:11:21.016 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:11:21.020 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, menu
07-24 16:11:21.022 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreateOptionsMenu(menu)
07-24 16:11:21.022 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:11:21.022 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:11:21.027 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:11:21.027 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:11:21.027 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:11:21.028 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onRestoreInstanceState(Bundle savedInstanceState)
07-24 16:11:21.028 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: title, color
07-24 16:11:21.032 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState)
07-24 16:11:21.033 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onStateNotSaved()
07-24 16:11:21.033 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:11:21.033 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPostResume()
07-24 16:11:21.050 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onEnterAnimationComplete()
07-24 16:11:21.051 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onAttachedToWindow()
07-24 16:11:21.154 4828-4828/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowFocusChanged(hasFocus)

SWITCH TO FRONT: New process

07-24 16:13:15.133 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: theme, resid, first
07-24 16:13:15.148 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.148 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.149 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.149 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.157 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowAttributesChanged(params)
07-24 16:13:15.238 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onContentChanged()
07-24 16:13:15.242 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onCreate(Bundle savedInstanceState)
07-24 16:13:15.243 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onStart
07-24 16:13:15.244 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:13:15.246 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, menu
07-24 16:13:15.246 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreateOptionsMenu(menu)
07-24 16:13:15.246 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:13:15.246 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onCreatePanelView(featureId)
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: featureId, view, menu
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPrepareOptionsMenu(menu)
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onRestoreInstanceState(Bundle savedInstanceState)
07-24 16:13:15.249 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: title, color
07-24 16:13:15.251 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState)
07-24 16:13:15.252 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onStateNotSaved()
07-24 16:13:15.252 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:13:15.252 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPostResume()
07-24 16:13:15.273 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onPause
07-24 16:13:15.274 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onStateNotSaved()
07-24 16:13:15.274 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE: onResume
07-24 16:13:15.274 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onPostResume()
07-24 16:13:15.276 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onAttachedToWindow()
07-24 16:13:15.377 6291-6291/com.example.fduvi.lifecyclelogger D/ACTIVITY_LIFECYLE_EXTRA: onWindowFocusChanged(hasFocus)