Android WallpaperManager解析及BUG解决(2)

if (!success) {
            mWidth = -1;
            mHeight = -1;
            mName = "";
        }

// We always want to have some reasonable width hint.
        WindowManager wm = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
        Display d = wm.getDefaultDisplay();
        int baseSize = d.getMaximumSizeDimension();
        if (mWidth < baseSize) {
            mWidth = baseSize;
        }
        if (mHeight < baseSize) {
            mHeight = baseSize;
        }
    }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/c4b914d63fdae1ca73abdf4f0d3d6676.html