添加屏幕方向属性值
- device/qcom/qssi/system.prop
persist.panel.orientation=0
修改开机动画方向
- frameworks/base/cmds/bootanimation/BootAnimation.cpp
status_t BootAnimation::readyToRun() {
mAssets.addDefaultAssets();
mDisplayToken = SurfaceComposerClient::getInternalDisplayToken();
if (mDisplayToken == nullptr)
return NAME_NOT_FOUND;
DisplayMode displayMode;
const status_t error =
SurfaceComposerClient::getActiveDisplayMode(mDisplayToken, &displayMode);
if (error != NO_ERROR)
return error;
mMaxWidth = android::base::GetIntProperty("ro.surface_flinger.max_graphics_width", 0);
mMaxHeight = android::base::GetIntProperty("ro.surface_flinger.max_graphics_height", 0);
ui::Size resolution = displayMode.resolution;
resolution = limitSurfaceSize(resolution.width, resolution.height);
// add start
char rAngleValue[PROPERTY_VALUE_MAX];
property_get("persist.panel.orientation", rAngleValue, "0");
int rAngle = atoi(rAngleValue);
SurfaceComposerClient::Transaction t;
int d_width = resolution.getWidth(),d_height = resolution.getHeight();
if (rAngle