|
发表于 2020-8-4 15:01:28
7529 浏览 0 回复
61,62,65默认所有app横屏显示
N:\K721_65\frameworks\base\services\core\java\com\android\server\wm\WindowManagerService.java
boolean updateOrientationFromAppTokensLocked(int displayId, boolean forceUpdate) {
long ident = Binder.clearCallingIdentity();
try {
final DisplayContent dc = mRoot.getDisplayContent(displayId);
//modify by lzg
//int req = getOrientationLocked();
int req = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
//end lzg
if (req != dc.getLastOrientation() || forceUpdate) {
if (DEBUG_ORIENTATION) {
Slog.v(TAG, "updateOrientation: req= " + req + ", mLastOrientation= "
+ dc.getLastOrientation(), new Throwable("updateOrientation"));
}
dc.setLastOrientation(req);
//send a message to Policy indicating orientation change to take
//action like disabling/enabling sensors etc.,
// TODO(multi-display): Implement policy for secondary displays.
if (dc.isDefaultDisplay) {
mPolicy.setCurrentOrientationLw(req);
}
return dc.updateRotationUnchecked(forceUpdate);
}
return false;
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
|
|
|
|
|
|
登录或注册
|