private NoteWidget getNoteWidgetForId(int appWidgetId) {
   NoteWidget noteWidget;
   synchronized (mWidgets) {
     noteWidget = mWidgets.get(appWidgetId);
     if (noteWidget == null) {
       noteWidget = new NoteWidget(appWidgetId);
       noteWidget.view = createNoteView();
       mWidgets.put(appWidgetId, noteWidget);
     }
   }
   return noteWidget;
 }
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   Log.w(TAG, "onConfigurationChanged: " + newConfig.orientation);
   mViewContext = new ContextThemeWrapper(this, getApplicationTheme(this));
   synchronized (mWidgets) {
     for (int i = 0; i < mWidgets.size(); i++) {
       NoteWidget noteWidget = mWidgets.valueAt(i);
       noteWidget.view = createNoteView();
       updateNoteWidgetSize(noteWidget.id);
       updateWidget(noteWidget.id);
     }
   }
 }