<commit_before>#include "cameratester.h"

//#include <hybris/camera/camera_compatibility_layer_capabilities.h >  // for constants

void CameraTester::connectToCamera()
{
    emit logHappened("connecting");
//    memset(&listener, 0, sizeof(m_listener));  // not sure while it's needed, but test example does this nullification
//    m_cc = android_camera_connect_to(BACK_FACING_CAMERA_TYPE,
//                                     &listener);
    emit logHappened("connected");
}

void CameraTester::turnFlashToTorch()
{
    emit logHappened("trying torch");
//    android_camera_set_flash_mode(m_cc, FLASH_MODE_TORCH);
    emit logHappened("tried torch");
}

void CameraTester::turnFlashToOn()
{
    emit logHappened("trying on");
//    android_camera_set_flash_mode(m_cc, FLASH_MODE_ON);
    emit logHappened("tried on");
}

void CameraTester::startPreview()
{
    emit logHappened("starting preview");
//    android_camera_start_preview(m_cc);
    emit logHappened("started preview");<commit_msg>more copy-paste from android courses<commit_after>#include "cameratester.h"

//#include <hybris/camera/camera_compatibility_layer_capabilities.h >  // for constants

//// inspired by https://github.com/libhybris/libhybris/blob/master/compat/camera/direct_camera_test.cpp

void CameraTester::connectToCamera()
{
    emit logHappened("connecting");
//    memset(&listener, 0, sizeof(m_listener));  // not sure while it's needed, but test example does this nullification
//    m_cc = android_camera_connect_to(BACK_FACING_CAMERA_TYPE,
//                                     &listener);
//    if (m_cc == NULL) {
//        emit logHappened("Problem connecting to camera");
//    } else {
//        emit logHappened("connected");
//    }
//    m_listener.context = m_cc;
}

void CameraTester::turnFlashToTorch()
{
    emit logHappened("trying torch");
//    android_camera_set_flash_mode(m_cc, FLASH_MODE_TORCH);
    emit logHappened("tried torch");
}

void CameraTester::turnFlashToOn()
{
    emit logHappened("trying on");
//    android_camera_set_flash_mode(m_cc, FLASH_MODE_ON);
    emit logHappened("tried on");
}

void CameraTester::startPreview()
{
    emit logHappened("starting preview");
//    android_camera_start_preview(m_cc);
    emit logHappened("started preview");
{'fraction_non_alphanumeric': 0.12626484821821382, 'fraction_numerical': 0.0008798944126704796, 'mean_word_length': 3.986842105263158, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '618482', 'n_tokens_mistral': 761, 'n_tokens_neox': 742, 'n_words': 133}