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

Original author: jsharkey
  Merged from: //branches/cupcake/...

Automated import of CL 143865
This commit is contained in:
Jeffrey Sharkey
2009-03-31 16:58:03 -07:00
committed by The Android Open Source Project
parent 2d85c0eb06
commit a0d0f0ce62

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