Merge "Notify apps when insets change." into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
096de3c301
@@ -53,7 +53,7 @@ class AppWindowToken extends WindowToken {
|
|||||||
int groupId = -1;
|
int groupId = -1;
|
||||||
boolean appFullscreen;
|
boolean appFullscreen;
|
||||||
int requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
|
int requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
|
||||||
int configChanges;
|
boolean layoutConfigChanges;
|
||||||
boolean showWhenLocked;
|
boolean showWhenLocked;
|
||||||
|
|
||||||
// The input dispatching timeout for this application token in nanoseconds.
|
// The input dispatching timeout for this application token in nanoseconds.
|
||||||
|
|||||||
@@ -271,6 +271,8 @@ public class TaskStack {
|
|||||||
for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
|
for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
|
||||||
final WindowState win = windows.get(winNdx);
|
final WindowState win = windows.get(winNdx);
|
||||||
if (!resizingWindows.contains(win)) {
|
if (!resizingWindows.contains(win)) {
|
||||||
|
if (WindowManagerService.DEBUG_RESIZE) Slog.d(TAG,
|
||||||
|
"setBounds: Resizing " + win);
|
||||||
resizingWindows.add(win);
|
resizingWindows.add(win);
|
||||||
}
|
}
|
||||||
win.mUnderStatusBar = underStatusBar;
|
win.mUnderStatusBar = underStatusBar;
|
||||||
|
|||||||
@@ -3439,7 +3439,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
atoken.appFullscreen = fullscreen;
|
atoken.appFullscreen = fullscreen;
|
||||||
atoken.showWhenLocked = showWhenLocked;
|
atoken.showWhenLocked = showWhenLocked;
|
||||||
atoken.requestedOrientation = requestedOrientation;
|
atoken.requestedOrientation = requestedOrientation;
|
||||||
atoken.configChanges = configChanges;
|
atoken.layoutConfigChanges = (configChanges &
|
||||||
|
(ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_ORIENTATION)) != 0;
|
||||||
if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG, "addAppToken: " + atoken
|
if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG, "addAppToken: " + atoken
|
||||||
+ " to stack=" + stackId + " task=" + taskId + " at " + addPos);
|
+ " to stack=" + stackId + " task=" + taskId + " at " + addPos);
|
||||||
|
|
||||||
@@ -8269,10 +8270,9 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// windows, since that means "perform layout as normal,
|
// windows, since that means "perform layout as normal,
|
||||||
// just don't display").
|
// just don't display").
|
||||||
if (!gone || !win.mHaveFrame || win.mLayoutNeeded
|
if (!gone || !win.mHaveFrame || win.mLayoutNeeded
|
||||||
|| win.isConfigChanged() && (win.mAttrs.type == TYPE_KEYGUARD ||
|
|| ((win.isConfigChanged() || win.setInsetsChanged()) &&
|
||||||
(win.mAppToken != null && (win.mAppToken.configChanges &
|
(win.mAttrs.type == TYPE_KEYGUARD ||
|
||||||
(ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_ORIENTATION))
|
win.mAppToken != null && win.mAppToken.layoutConfigChanges))
|
||||||
!= 0))
|
|
||||||
|| win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) {
|
|| win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) {
|
||||||
if (!win.mLayoutAttached) {
|
if (!win.mLayoutAttached) {
|
||||||
if (initial) {
|
if (initial) {
|
||||||
@@ -8706,12 +8706,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
private void updateResizingWindows(final WindowState w) {
|
private void updateResizingWindows(final WindowState w) {
|
||||||
final WindowStateAnimator winAnimator = w.mWinAnimator;
|
final WindowStateAnimator winAnimator = w.mWinAnimator;
|
||||||
if (w.mHasSurface && w.mLayoutSeq == mLayoutSeq) {
|
if (w.mHasSurface && w.mLayoutSeq == mLayoutSeq) {
|
||||||
w.mOverscanInsetsChanged |=
|
w.setInsetsChanged();
|
||||||
!w.mLastOverscanInsets.equals(w.mOverscanInsets);
|
|
||||||
w.mContentInsetsChanged |=
|
|
||||||
!w.mLastContentInsets.equals(w.mContentInsets);
|
|
||||||
w.mVisibleInsetsChanged |=
|
|
||||||
!w.mLastVisibleInsets.equals(w.mVisibleInsets);
|
|
||||||
boolean configChanged = w.isConfigChanged();
|
boolean configChanged = w.isConfigChanged();
|
||||||
if (DEBUG_CONFIGURATION && configChanged) {
|
if (DEBUG_CONFIGURATION && configChanged) {
|
||||||
Slog.v(TAG, "Win " + w + " config changed: "
|
Slog.v(TAG, "Win " + w + " config changed: "
|
||||||
|
|||||||
@@ -701,6 +701,13 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
|||||||
return mAppToken != null ? mAppToken.appToken : null;
|
return mAppToken != null ? mAppToken.appToken : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean setInsetsChanged() {
|
||||||
|
mOverscanInsetsChanged |= !mLastOverscanInsets.equals(mOverscanInsets);
|
||||||
|
mContentInsetsChanged |= !mLastContentInsets.equals(mContentInsets);
|
||||||
|
mVisibleInsetsChanged |= !mLastVisibleInsets.equals(mVisibleInsets);
|
||||||
|
return mOverscanInsetsChanged || mContentInsetsChanged || mVisibleInsetsChanged;
|
||||||
|
}
|
||||||
|
|
||||||
public int getDisplayId() {
|
public int getDisplayId() {
|
||||||
return mDisplayContent.getDisplayId();
|
return mDisplayContent.getDisplayId();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user