fix misleading FATAL EXCEPTION IN SYSTEM PROCESS log
There will be the following situations about mApplicationObject:
1) fork app process will invoke ActivityThread.main(),
then set mApplicationObject.
2) fork system_server, don't set mApplicationObject value.
3) using app_process fork process except zygote, will inovke RuntimeInit,
don't set mApplicationObject value。
For example using command as below:
app_process /system/bin com.android.commands.am.Am "$@",
if this process throw uncaught exception,will output FATAL EXCEPTION IN SYSTEM PROCESS log,
it's not in system process but in normal process。
so should add condition: Process.SYSTEM_UID == Process.myUid()
BUG: 72759350
Test: manual
Change-Id: Ie8d769e4149cd9b938577058de871c4f8db9efe5
Signed-off-by: yuanhuihui <yuanhuihui@xiaomi.com>
Loading
Please register or sign in to comment