其他分享
首页 > 其他分享> > RK Android7.1

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;
                }
            }
        }

  

标签:width,mOverrideDisplayInfo,logicalHeight,Android7.1,mInfo,rotation,mPrimaryDispl
来源: https://www.cnblogs.com/crushgirl/p/14864109.html