Monkey测试时自动关机
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
在执行全模块Monkey测试时,会测试每个Activity,当测试到
com.mediatek.schpwronoff.ShutdownActivity时手机就会自动关机,导致Monkey测试提早
结束。
[SOLUTION]
请按如下方式修改代码即可避免此问题。
modify
alps/packages/apps/Settings/src/com/mediatek/schpwronoff/ShutdownActivity.
java
add "impot com.android.settings.Utils;"
in onCreate() function,
original code is :
sCountDownTimer = new CountDownTimer(mSeconds...)
....
Xlog.d(TAG, "ShutdownActivity onCreate()");
modified to :
if(!Utils.isMonkeyRunning()) {
sCountDownTimer = new CountDownTimer(mSeconds...)
....
}
Xlog.d(TAG, "ShutdownActivity onCreate()");
在执行全模块Monkey测试时,会测试每个Activity,当测试到
com.mediatek.schpwronoff.ShutdownActivity时手机就会自动关机,导致Monkey测试提早
结束。
[SOLUTION]
请按如下方式修改代码即可避免此问题。
modify
alps/packages/apps/Settings/src/com/mediatek/schpwronoff/ShutdownActivity.
java
add "impot com.android.settings.Utils;"
in onCreate() function,
original code is :
sCountDownTimer = new CountDownTimer(mSeconds...)
....
Xlog.d(TAG, "ShutdownActivity onCreate()");
modified to :
if(!Utils.isMonkeyRunning()) {
sCountDownTimer = new CountDownTimer(mSeconds...)
....
}
Xlog.d(TAG, "ShutdownActivity onCreate()");