small merge fixes
This commit is contained in:
parent
48387d4add
commit
7df3ce1115
3 changed files with 19 additions and 10 deletions
|
@ -140,7 +140,9 @@ win32 {
|
|||
INSTALLS += target
|
||||
|
||||
HEADERS += android/sound.h
|
||||
SOURCES += android/sound.cpp
|
||||
SOURCES += android/sound.cpp \
|
||||
android/androiddebug.cpp
|
||||
|
||||
LIBS += -lOpenSLES
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
OTHER_FILES += android/AndroidManifest.xml
|
||||
|
@ -433,7 +435,6 @@ android {
|
|||
}
|
||||
|
||||
SOURCES += src/audiomixerboard.cpp \
|
||||
android/androiddebug.cpp \
|
||||
src/buffer.cpp \
|
||||
src/channel.cpp \
|
||||
src/chatdlg.cpp \
|
||||
|
|
|
@ -258,8 +258,8 @@ typedef unsigned __int64 uint64_t;
|
|||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
#elif defined ( __ANDROID__ )
|
||||
/* don't redfine types for android as these ones below don't work. */
|
||||
#elif defined ( ANDROID )
|
||||
// don't redfine types for android as these ones below don't work
|
||||
#else
|
||||
typedef long long int64_t;
|
||||
typedef int int32_t;
|
||||
|
|
20
src/main.cpp
20
src/main.cpp
|
@ -34,9 +34,10 @@
|
|||
#include "testbench.h"
|
||||
#include "util.h"
|
||||
#ifdef ANDROID
|
||||
#include <QtAndroidExtras/QtAndroid>
|
||||
# include <QtAndroidExtras/QtAndroid>
|
||||
#endif
|
||||
|
||||
|
||||
// Implementation **************************************************************
|
||||
|
||||
int main ( int argc, char** argv )
|
||||
|
@ -524,13 +525,20 @@ int main ( int argc, char** argv )
|
|||
QCoreApplication* pApp = bUseGUI
|
||||
? new QApplication ( argc, argv )
|
||||
: new QCoreApplication ( argc, argv );
|
||||
|
||||
#ifdef ANDROID
|
||||
auto result = QtAndroid::checkPermission(QString("android.permission.RECORD_AUDIO"));
|
||||
if(result == QtAndroid::PermissionResult::Denied){
|
||||
QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync(QStringList({"android.permission.RECORD_AUDIO"}));
|
||||
if(resultHash["android.permission.RECORD_AUDIO"] == QtAndroid::PermissionResult::Denied)
|
||||
return 0;
|
||||
// special Android coded needed for record audio permission handling
|
||||
auto result = QtAndroid::checkPermission ( QString ( "android.permission.RECORD_AUDIO" ) );
|
||||
|
||||
if ( result == QtAndroid::PermissionResult::Denied )
|
||||
{
|
||||
QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync ( QStringList ( { "android.permission.RECORD_AUDIO" } ) );
|
||||
|
||||
if ( resultHash["android.permission.RECORD_AUDIO"] == QtAndroid::PermissionResult::Denied )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Reference in a new issue