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