code: public static int getFirstDayOfWeek(Context context) {
          int startDay = Calendar.getInstance().getFirstDayOfWeek();
  
          if (startDay == Calendar.SATURDAY) {
              return Time.SATURDAY;
          } else if (startDay == Calendar.MONDAY) {
              return Time.MONDAY;
          } else {
              return Time.SUNDAY;
          }
      }
docs: Get first day of week as android.text.format.Time constant.
  
  @return the first day of week in android.text.format.Time