Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app crash on switching between personal and work modus on Samsung Knox

My app gets killed everytime switching from Samsung Knox work modus to private modus.

ADB log:

04-25 16:25:41.868 2945-3700/? I/ActivityManager: Killing 24549:com.myapp.name/u100a171 (adj 10): cached #2
04-25 16:25:41.988 2945-3118/? W/InputDispatcher: channel '354a1caa com.myapp.name/com.myapp.name.app (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
04-25 16:25:41.988 2945-3118/? E/InputDispatcher: channel '354a1caa com.myapp.name/com.myapp.name.app (server)' ~ Channel is unrecoverably broken and will be disposed!
04-25 16:25:42.038 2945-3614/? W/InputDispatcher: Attempted to unregister already unregistered input channel '354a1caa com.myapp.name/com.myapp.name.app (server)'
04-25 16:25:42.038 2945-3614/? I/WindowState: WIN DEATH: Window{354a1caa u100 com.myapp.name/com.myapp.name.app}

What may be the reason for this behaviour?

Might this be related to the definition as a single task on AndroidManifest, because Knox is trying to restart on personal modus?

<activity android:launchMode="singleTask" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|uiMode" ...>

Might it be related to storage issues because of mounting/unmounting areas?

Occuring on Android 5.1.1 with Samsung Knox 2.4.1

Couldn't reproduce this on a Android7 device.

Any help is appreciated!

like image 201
kerosene Avatar asked Oct 18 '22 13:10

kerosene


1 Answers

this might be because system is trying to clean the cache when switching apps..

The caching mechanism differs from device to device and OS to OS.Also there might be some battery saving app which might be doing this.

I think other apps might be getting killed too when the switching happens.

like image 155
rupesh jain Avatar answered Oct 20 '22 22:10

rupesh jain