Add a method to detect Google Play build
This commit is contained in:
parent
582bd92d31
commit
e2dd5109f9
3 changed files with 9 additions and 0 deletions
|
|
@ -708,6 +708,9 @@ class AmneziaActivity : QtActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
fun isPlay(): Boolean = BuildConfig.FLAVOR == "play"
|
||||
|
||||
/**
|
||||
* Utils methods
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -287,6 +287,11 @@ bool AndroidController::requestAuthentication()
|
|||
return result;
|
||||
}
|
||||
|
||||
bool AndroidController::isPlay()
|
||||
{
|
||||
return callActivityMethod<jboolean>("isPlay", "()Z");
|
||||
}
|
||||
|
||||
// Moving log processing to the Android side
|
||||
jclass AndroidController::log;
|
||||
jmethodID AndroidController::logDebug;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public:
|
|||
bool isNotificationPermissionGranted();
|
||||
void requestNotificationPermission();
|
||||
bool requestAuthentication();
|
||||
bool isPlay();
|
||||
|
||||
static bool initLogging();
|
||||
static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue