Merge "Fix issue #6955586: No navigation bar in landscape on tablets" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a1a1a1d6ca
@@ -5874,7 +5874,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
rebuildBlackFrame();
|
||||
rebuildBlackFrameLocked();
|
||||
|
||||
final WindowList windows = displayContent.getWindowList();
|
||||
for (int i = windows.size() - 1; i >= 0; i--) {
|
||||
@@ -6891,6 +6891,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
displayReady(Display.DEFAULT_DISPLAY);
|
||||
|
||||
synchronized(mWindowMap) {
|
||||
readForcedDisplaySizeAndDensityLocked(getDefaultDisplayContent());
|
||||
|
||||
WindowManager wm = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
|
||||
mDisplay = wm.getDefaultDisplay();
|
||||
mIsTouchDevice = mContext.getPackageManager().hasSystemFeature(
|
||||
@@ -6912,6 +6914,11 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
mPolicy.setInitialDisplaySize(mDisplay, displayContent.mInitialDisplayWidth,
|
||||
displayContent.mInitialDisplayHeight, displayContent.mInitialDisplayDensity);
|
||||
}
|
||||
|
||||
try {
|
||||
mActivityManager.updateConfiguration(null);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
public void displayReady(int displayId) {
|
||||
@@ -6930,15 +6937,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
displayContent.mBaseDisplayDensity = displayContent.mInitialDisplayDensity;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
mActivityManager.updateConfiguration(null);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
|
||||
synchronized (mWindowMap) {
|
||||
readForcedDisplaySizeAndDensityLocked(getDisplayContent(displayId));
|
||||
}
|
||||
}
|
||||
|
||||
public void systemReady() {
|
||||
@@ -7567,7 +7565,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
private void rebuildBlackFrame() {
|
||||
private void rebuildBlackFrameLocked() {
|
||||
if (mBlackFrame != null) {
|
||||
mBlackFrame.kill();
|
||||
mBlackFrame = null;
|
||||
@@ -7579,6 +7577,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
int initW, initH, baseW, baseH;
|
||||
final boolean rotated = (mRotation == Surface.ROTATION_90
|
||||
|| mRotation == Surface.ROTATION_270);
|
||||
if (DEBUG_BOOT) {
|
||||
Slog.i(TAG, "BLACK FRAME: rotated=" + rotated + " init="
|
||||
+ displayContent.mInitialDisplayWidth + "x"
|
||||
+ displayContent.mInitialDisplayHeight + " base="
|
||||
+ displayContent.mBaseDisplayWidth + "x"
|
||||
+ displayContent.mBaseDisplayHeight);
|
||||
}
|
||||
if (rotated) {
|
||||
initW = displayContent.mInitialDisplayHeight;
|
||||
initH = displayContent.mInitialDisplayWidth;
|
||||
@@ -7640,7 +7645,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
reconfigureDisplayLocked(displayContent);
|
||||
rebuildBlackFrameLocked();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7669,7 +7674,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
final DisplayContent displayContent = getDisplayContent(displayId);
|
||||
setForcedDisplayDensityLocked(displayContent, density);
|
||||
Settings.Secure.putString(mContext.getContentResolver(),
|
||||
Settings.Secure.DISPLAY_SIZE_FORCED, Integer.toString(density));
|
||||
Settings.Secure.DISPLAY_DENSITY_FORCED, Integer.toString(density));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7712,7 +7717,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION);
|
||||
}
|
||||
|
||||
rebuildBlackFrame();
|
||||
rebuildBlackFrameLocked();
|
||||
|
||||
performLayoutAndPlaceSurfacesLocked();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user