Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 893aa48d authored by Takamasa Kuramitsu's avatar Takamasa Kuramitsu Committed by android-build-merger
Browse files

Merge "Add checking values not to save illegal value to appwidgets.xml" am:...

Merge "Add checking values not to save illegal value to appwidgets.xml" am: 941d4b21 am: 1807cb4a am: 3583e1f0
am: dae28d59

Change-Id: I84b96c7be4815fc102ffede2c6262ef5037814e7
parents 0c02a3da dae28d59
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -2427,14 +2427,14 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            out.attribute(null, "p", Integer.toHexString(widget.provider.tag));
        }
        if (widget.options != null) {
            out.attribute(null, "min_width", Integer.toHexString(widget.options.getInt(
                    AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH)));
            out.attribute(null, "min_height", Integer.toHexString(widget.options.getInt(
                    AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT)));
            out.attribute(null, "max_width", Integer.toHexString(widget.options.getInt(
                    AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH)));
            out.attribute(null, "max_height", Integer.toHexString(widget.options.getInt(
                    AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT)));
            int minWidth = widget.options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH);
            int minHeight = widget.options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT);
            int maxWidth = widget.options.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH);
            int maxHeight = widget.options.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT);
            out.attribute(null, "min_width", Integer.toHexString((minWidth > 0) ? minWidth : 0));
            out.attribute(null, "min_height", Integer.toHexString((minHeight > 0) ? minHeight : 0));
            out.attribute(null, "max_width", Integer.toHexString((maxWidth > 0) ? maxWidth : 0));
            out.attribute(null, "max_height", Integer.toHexString((maxHeight > 0) ? maxHeight : 0));
            out.attribute(null, "host_category", Integer.toHexString(widget.options.getInt(
                    AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY)));
        }