2,WM修改 作者: zangcf 时间: 2016-5-4 16:23
根据debug发现,显示宽度变成了415了,下面应该如何解决这个问题呢?
I/zcfdebug( 833): the displayWidth is 415
I/zcfdebug( 833): the displayHeight is 1080
明显是宽搞反了导致的问题。作者: zangcf 时间: 2016-5-4 16:39
我们需要禁止APP对于屏幕的旋转,再WMS中
boolean updateOrientationFromAppTokensLocked(boolean inTransaction) {
long ident = Binder.clearCallingIdentity();
try {
int req = getOrientationFromWindowsLocked();
if (req == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) {
req = getOrientationFromAppTokensLocked();
}
if (req != mForcedAppOrientation) {
//zcfdebug-- mForcedAppOrientation = req;
//send a message to Policy indicating orientation change to take
//action like disabling/enabling sensors etc.,
mPolicy.setCurrentOrientationLw(req);
if (updateRotationUncheckedLocked(inTransaction)) {
// changed
return true;
}
}