DESCRIPTION

Prevent configuration dialogs from closing if an error occurs

When 'true' is returned in performOk(), the preference dialog will
be closed. We do not want this to happen if an error occurs during a
failed save attempt so we should return 'false' in the face of
errors and invoke (and return) super.performOk() only if the
configuration was saved successfully. performApply()'s default
implementation is to invoke performOk() so there is no reason to
perform a save separately in performApply(). Due to the chaining of
method calls, the current implementation ends up saving the
configuration twice.

The superclass's implementation of okPressed() will close the dialog
so we want to make the same general changes so that the dialog will
only be closed if the save completes successfully.

Change-Id: I9571332c717f492a9cce3021517c9811929caa48


COMMENTS

author: Jaylon Avila
date: 2010-08-23 21:34:47.000000000

Uploaded patch set 2.

-------------------------------------
