From ba5dfbf9f4b87308c1cc8d986f4bd94520013472 Mon Sep 17 00:00:00 2001 From: Jeffrey Sharkey <> Date: Tue, 31 Mar 2009 17:01:02 -0700 Subject: [PATCH] AI 143867: am: CL 143865 am: CL 143864 Fix SDK example to correctly pass back newly-configured appWidgetId. Original author: jsharkey Merged from: //branches/cupcake/... Original author: android-build Merged from: //branches/donutburger/... Automated import of CL 143867 --- .../android/apis/appwidget/ExampleAppWidgetConfigure.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java b/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java index e0a4c76b0..d7ef9d632 100644 --- a/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java +++ b/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java @@ -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(); } };