public void updateLessons() {
   String groupId = mSettings.getString("defaultgroup", null);
   int subgroup = mSettings.getInt(groupId, 1);
   if (!mScheduleManager.isLessonsEndToday(groupId, subgroup)) {
     mLessons = mScheduleManager.getLessonsOfDay(groupId, DateTime.now(), subgroup);
   } else {
     mLessons = mScheduleManager.getLessonsOfDay(groupId, new DateTime().plusDays(1), subgroup);
   }
   mLessonCount = mLessons.length;
 }
 public ScheduleFactoryViews(Context context, Intent intent) {
   mScheduleManager = ScheduleManager.getInstance(context);
   mIntent = intent;
   mWidgetId =
       mIntent.getIntExtra(
           AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
   mContext = context;
   mSettings = ApplicationSettings.getInstance(context);
 }