RK Android7.1

 

 

 

 

 

 

 

 

 

二.frameworks\base\services\core\java\com\android\server\display\LogicalDisplay.java

    public DisplayInfo getDisplayInfoLocked() {
        if (mInfo == null) {
            mInfo = new DisplayInfo();
            mInfo.copyFrom(mBaseDisplayInfo);
            if (mOverrideDisplayInfo != null) {
                mInfo.appWidth = mOverrideDisplayInfo.appWidth;
                mInfo.appHeight = mOverrideDisplayInfo.appHeight;
                mInfo.smallestNominalAppWidth = mOverrideDisplayInfo.smallestNominalAppWidth;
                mInfo.smallestNominalAppHeight = mOverrideDisplayInfo.smallestNominalAppHeight;
                mInfo.largestNominalAppWidth = mOverrideDisplayInfo.largestNominalAppWidth;
                mInfo.largestNominalAppHeight = mOverrideDisplayInfo.largestNominalAppHeight;
                mInfo.logicalWidth = mOverrideDisplayInfo.logicalWidth;
                mInfo.logicalHeight = mOverrideDisplayInfo.logicalHeight;
                mInfo.overscanLeft = mOverrideDisplayInfo.overscanLeft;
                mInfo.overscanTop = mOverrideDisplayInfo.overscanTop;
                mInfo.overscanRight = mOverrideDisplayInfo.overscanRight;
                mInfo.overscanBottom = mOverrideDisplayInfo.overscanBottom;
                mInfo.rotation = mOverrideDisplayInfo.rotation;
                mInfo.logicalDensityDpi = mOverrideDisplayInfo.logicalDensityDpi;
                mInfo.physicalXDpi = mOverrideDisplayInfo.physicalXDpi;
                mInfo.physicalYDpi = mOverrideDisplayInfo.physicalYDpi;
            }
            if(mDisplayId!=Display.DEFAULT_DISPLAY){
                String rotation = SystemProperties.get("persist.sys.rotation.einit","0");
                if(Integer.valueOf(rotation)%2!=0) {


                    mInfo.appWidth = mPrimaryDisplayDeviceInfo.height;
                    mInfo.appHeight = mPrimaryDisplayDeviceInfo.width;
                    mInfo.logicalWidth = mPrimaryDisplayDeviceInfo.height;
                    mInfo.logicalHeight=mPrimaryDisplayDeviceInfo.width;

                }else{
                    mInfo.appWidth = mPrimaryDisplayDeviceInfo.width;
                    mInfo.appHeight = mPrimaryDisplayDeviceInfo.height;
                    mInfo.logicalWidth = mPrimaryDisplayDeviceInfo.width;
                    mInfo.logicalHeight=mPrimaryDisplayDeviceInfo.height;
                }
            }
        }

  

上一篇:Android 稳定性测试工具 Monkey - 随机事件


下一篇:GAMES101 PA0