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:
parent
483429f432
commit
8ba2dc2ae2
12 changed files with 167 additions and 321 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue