Merge "Add checking values not to save illegal value to appwidgets.xml" am: 941d4b2135
am: 1807cb4a88
Change-Id: I6e02c6dead092e8727f8ef76eaf689ef0cfec376
This commit is contained in:
@@ -2426,14 +2426,14 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
|
|||||||
out.attribute(null, "p", Integer.toHexString(widget.provider.tag));
|
out.attribute(null, "p", Integer.toHexString(widget.provider.tag));
|
||||||
}
|
}
|
||||||
if (widget.options != null) {
|
if (widget.options != null) {
|
||||||
out.attribute(null, "min_width", Integer.toHexString(widget.options.getInt(
|
int minWidth = widget.options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH);
|
||||||
AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH)));
|
int minHeight = widget.options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT);
|
||||||
out.attribute(null, "min_height", Integer.toHexString(widget.options.getInt(
|
int maxWidth = widget.options.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH);
|
||||||
AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT)));
|
int maxHeight = widget.options.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT);
|
||||||
out.attribute(null, "max_width", Integer.toHexString(widget.options.getInt(
|
out.attribute(null, "min_width", Integer.toHexString((minWidth > 0) ? minWidth : 0));
|
||||||
AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH)));
|
out.attribute(null, "min_height", Integer.toHexString((minHeight > 0) ? minHeight : 0));
|
||||||
out.attribute(null, "max_height", Integer.toHexString(widget.options.getInt(
|
out.attribute(null, "max_width", Integer.toHexString((maxWidth > 0) ? maxWidth : 0));
|
||||||
AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT)));
|
out.attribute(null, "max_height", Integer.toHexString((maxHeight > 0) ? maxHeight : 0));
|
||||||
out.attribute(null, "host_category", Integer.toHexString(widget.options.getInt(
|
out.attribute(null, "host_category", Integer.toHexString(widget.options.getInt(
|
||||||
AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY)));
|
AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user