1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Platform: Remove compatibility checks for Android 20 and earlier

This commit is contained in:
reuk 2024-07-01 18:49:16 +01:00
parent 483429f432
commit 8ba2dc2ae2
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
12 changed files with 167 additions and 321 deletions

View file

@ -549,21 +549,14 @@ struct CameraDevice::Pimpl
void continueOpenRequest (bool granted)
{
if (getAndroidSDKVersion() >= 21)
if (granted)
{
if (granted)
{
getEnv()->CallVoidMethod (getAppContext().get(), AndroidApplication.registerActivityLifecycleCallbacks, activityLifeListener.get());
scopedCameraDevice.reset (new ScopedCameraDevice (*this, cameraId, cameraManager, handler, getAutoFocusModeToUse()));
}
else
{
invokeCameraOpenCallback ("Camera permission not granted");
}
getEnv()->CallVoidMethod (getAppContext().get(), AndroidApplication.registerActivityLifecycleCallbacks, activityLifeListener.get());
scopedCameraDevice.reset (new ScopedCameraDevice (*this, cameraId, cameraManager, handler, getAutoFocusModeToUse()));
}
else
{
invokeCameraOpenCallback ("Camera requires android sdk version 21 or greater");
invokeCameraOpenCallback ("Camera permission not granted");
}
}
@ -636,9 +629,6 @@ struct CameraDevice::Pimpl
static StringArray getAvailableDevices()
{
if (getAndroidSDKVersion() < 21)
return StringArray(); // Camera requires SDK version 21 or later
StringArray results;
auto* env = getEnv();

View file

@ -354,9 +354,6 @@ struct VideoComponent::Pimpl
, systemVolumeListener (*this)
#endif
{
// Video requires SDK version 21 or higher
jassert (getAndroidSDKVersion() >= 21);
setVisible (true);
auto* env = getEnv();
@ -1617,9 +1614,6 @@ private:
//==============================================================================
static LocalRef<jobject> getAudioAttributes()
{
// Video requires SDK version 21 or higher
jassert (getAndroidSDKVersion() >= 21);
auto* env = getEnv();
auto audioAttribsBuilder = LocalRef<jobject> (env->NewObject (AndroidAudioAttributesBuilder,