Skip to content
Commit e669ac25 authored by yuanhuihui's avatar yuanhuihui Committed by Anton Hansson
Browse files

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: default avataryuanhuihui <yuanhuihui@xiaomi.com>
parent a869d143
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment