am 7bedac94: am 139e5aa1: Fix issue #6404215: New ActionBar auto-hide can conflict with application

* commit '7bedac9417d60608003d739c8caed7ca81683825':
  Fix issue #6404215: New ActionBar auto-hide can conflict with application
This commit is contained in:
Dianne Hackborn
2012-05-06 12:51:47 -07:00
committed by Android Git Automerger
4 changed files with 162 additions and 41 deletions

View File

@@ -15212,6 +15212,18 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
}
}
/** @hide */
public void setDisabledSystemUiVisibility(int flags) {
if (mAttachInfo != null) {
if (mAttachInfo.mDisabledSystemUiVisibility != flags) {
mAttachInfo.mDisabledSystemUiVisibility = flags;
if (mParent != null) {
mParent.recomputeViewAttributes(this);
}
}
}
}
/**
* Creates an image that the system displays during the drag and drop
* operation. This is called a "drag shadow". The default implementation
@@ -16872,6 +16884,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
*/
int mSystemUiVisibility;
/**
* Hack to force certain system UI visibility flags to be cleared.
*/
int mDisabledSystemUiVisibility;
/**
* True if a view in this hierarchy has an OnSystemUiVisibilityChangeListener
* attached.

View File

@@ -1025,6 +1025,7 @@ public final class ViewRootImpl implements ViewParent,
attachInfo.mSystemUiVisibility = 0;
attachInfo.mHasSystemUiListeners = false;
mView.dispatchCollectViewAttributes(attachInfo, 0);
attachInfo.mSystemUiVisibility &= ~attachInfo.mDisabledSystemUiVisibility;
if (attachInfo.mKeepScreenOn != oldScreenOn
|| attachInfo.mSystemUiVisibility != oldVis
|| attachInfo.mHasSystemUiListeners != oldHasSystemUiListeners) {