AI 143864: Fix SDK example to correctly pass back newly-configured appWidgetId.

BUG=1725041

Automated import of CL 143864
This commit is contained in:
Jeffrey Sharkey
2009-03-31 16:55:19 -07:00
committed by The Android Open Source Project
parent a1ca267d26
commit e64360f76a

View File

@@ -89,7 +89,10 @@ public class ExampleAppWidgetConfigure extends Activity {
saveTitlePref(ExampleAppWidgetConfigure.this, mAppWidgetId,
mAppWidgetPrefix.getText().toString());
setResult(RESULT_OK);
// Make sure we pass back the original appWidgetId
Intent resultValue = new Intent();
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
setResult(RESULT_OK, resultValue);
finish();
}
};