MTBF测试时,email画面显示异常
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
MTBF测试时,email画面显示异常,比如底部图标不显示等等,导致图片对比失败和
test case 失败。
[SOLUTION]
因为Email比较特殊, 启动时会连续起两个画面(Welcome->EmailAcitivity), 这种做
法容易打出 android 原生的一個 threading 时序問題(Android原生的bug)。需要说
明的是,这个bug是Google 原生的极低概率bug,目前我司出于某些考虑还没有将
patch check in(需要充分测试有没side effect)。
改动的地方是: if (startingWindow != null) 变为 if (startingWindow != null
&& ttoken.startingView != null)
[WindowManagerService.java]
public void setAppStartingWindow(IBinder token, String pkg,
int theme, CompatibilityInfo compatInfo,
CharSequence nonLocalizedLabel, int labelRes, int icon,
int windowFlags, IBinder transferFROM, boolean createIfNeeded) { …
if (transferFrom != null) {
AppWindowToken ttoken = findAppWindowToken(transferFrom);
if (ttoken != null) {
WindowState startingWindow = ttoken.startingWindow;
if (startingWindow != null && ttoken.startingView != null) {
if (mStartingIconInTransition) {
// In this case, the starting icon has already
// been displayed, so start letting windows get
// shown immediately without any more transitions.
mSkipAppTransitionAnimation = true;
}
