diff options
author | Chih-Chung Chang <chihchung@google.com> | 2009-04-16 11:42:12 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2009-04-16 15:06:11 +0800 |
commit | 0a475e11e2ceadbaa70308b52e06f4e6d9e56f12 (patch) | |
tree | 88b17e2bf10cca6448951e7087ce2c8f63047df1 /src/com/android/camera/PhotoAppWidgetBind.java | |
parent | 2094670d60f1d8feb70e0e1b7dd70d130ec89886 (diff) | |
download | LegacyCamera-0a475e11e2ceadbaa70308b52e06f4e6d9e56f12.zip LegacyCamera-0a475e11e2ceadbaa70308b52e06f4e6d9e56f12.tar.gz LegacyCamera-0a475e11e2ceadbaa70308b52e06f4e6d9e56f12.tar.bz2 |
Code clean up.
Diffstat (limited to 'src/com/android/camera/PhotoAppWidgetBind.java')
-rw-r--r-- | src/com/android/camera/PhotoAppWidgetBind.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/camera/PhotoAppWidgetBind.java b/src/com/android/camera/PhotoAppWidgetBind.java index dfe7d3c..628fdc6 100644 --- a/src/com/android/camera/PhotoAppWidgetBind.java +++ b/src/com/android/camera/PhotoAppWidgetBind.java @@ -37,34 +37,34 @@ class PhotoAppWidgetBind extends Activity { protected void onCreate(Bundle icicle) { super.onCreate(icicle); finish(); - + // The caller has requested that we bind a given bitmap to a specific // appWidgetId, which probably is happening during a Launcher upgrade. // This is dangerous because the caller could set bitmaps on // appWidgetIds they don't own, so we guard this call at the manifest // level by requiring the BIND_APPWIDGET permission. - + final Intent intent = getIntent(); final Bundle extras = intent.getExtras(); - + final int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); final ArrayList<Bitmap> bitmaps = extras.getParcelableArrayList(EXTRA_APPWIDGET_BITMAPS); - + if (appWidgetIds == null || bitmaps == null || appWidgetIds.length != bitmaps.size()) { Log.e(TAG, "Problem parsing photo widget bind request"); return; } - + AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this); PhotoDatabaseHelper helper = new PhotoDatabaseHelper(this); for (int i = 0; i < appWidgetIds.length; i++) { // Store the cropped photo in our database int appWidgetId = appWidgetIds[i]; helper.setPhoto(appWidgetId, bitmaps.get(i)); - + // Push newly updated widget to surface RemoteViews views = PhotoAppWidgetProvider.buildUpdate(this, appWidgetId, |