* commit '311f8a7cb0196d3a49a0f600856671193974b5ed': Make sure starting windows only draw once
This commit is contained in:
@@ -289,6 +289,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
|||||||
private Rect mTempRect;
|
private Rect mTempRect;
|
||||||
private Rect mOutsets = new Rect();
|
private Rect mOutsets = new Rect();
|
||||||
|
|
||||||
|
private boolean mIsStartingWindow;
|
||||||
|
|
||||||
static class WindowManagerHolder {
|
static class WindowManagerHolder {
|
||||||
static final IWindowManager sWindowManager = IWindowManager.Stub.asInterface(
|
static final IWindowManager sWindowManager = IWindowManager.Stub.asInterface(
|
||||||
ServiceManager.getService("window"));
|
ServiceManager.getService("window"));
|
||||||
@@ -3891,7 +3893,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
|||||||
// A pending invalidation will typically be resolved before the posted message
|
// A pending invalidation will typically be resolved before the posted message
|
||||||
// would run normally in order to satisfy instance state restoration.
|
// would run normally in order to satisfy instance state restoration.
|
||||||
PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, false);
|
PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, false);
|
||||||
if (!isDestroyed() && (st == null || st.menu == null)) {
|
if (!isDestroyed() && (st == null || st.menu == null) && !mIsStartingWindow) {
|
||||||
invalidatePanelMenu(FEATURE_ACTION_BAR);
|
invalidatePanelMenu(FEATURE_ACTION_BAR);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -4966,4 +4968,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
|||||||
mDecor.updateColorViews(null, false /* animate */);
|
mDecor.updateColorViews(null, false /* animate */);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setIsStartingWindow(boolean isStartingWindow) {
|
||||||
|
mIsStartingWindow = isStartingWindow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2154,7 +2154,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Window win = new PhoneWindow(context);
|
PhoneWindow win = new PhoneWindow(context);
|
||||||
|
win.setIsStartingWindow(true);
|
||||||
final TypedArray ta = win.getWindowStyle();
|
final TypedArray ta = win.getWindowStyle();
|
||||||
if (ta.getBoolean(
|
if (ta.getBoolean(
|
||||||
com.android.internal.R.styleable.Window_windowDisablePreview, false)
|
com.android.internal.R.styleable.Window_windowDisablePreview, false)
|
||||||
|
|||||||
Reference in New Issue
Block a user