Fixed possible crash on old APIs.

This commit is contained in:
Dmitry Yunitsky 2015-07-09 13:50:48 +03:00 committed by Alex Zolotarev
parent e3bdc45b60
commit 8d8c25b8a8

View file

@ -1,5 +1,6 @@
package com.nvidia.devtech;
import android.annotation.SuppressLint;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
@ -81,7 +82,7 @@ public abstract class NvEventQueueFragment extends BaseMwmFragment implements Vi
mDisplayDensity = metrics.densityDpi;
mIsNativeLaunched = true;
onCreateNative();
if (getActivity().isChangingConfigurations())
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && getActivity().isChangingConfigurations())
mIsRenderingInitialized = true;
}
@ -162,6 +163,7 @@ public abstract class NvEventQueueFragment extends BaseMwmFragment implements Vi
onFocusChangedNative(getActivity().hasWindowFocus());
}
@SuppressLint("NewApi")
@Override
public void onStop()
{