mirror of https://github.com/libsdl-org/SDL.git
Override `onTrimMemory()` instead of `onLowMemory()`
https://developer.android.com/reference/android/content/ComponentCallbacks#onLowMemory() > Preferably, you should implement ComponentCallbacks2#onTrimMemory from ComponentCallbacks2 [...]. > That API is available for API level 14 and higher, so you should only use this onLowMemory() method as a fallback for older versions. Since the SDL3 min api level is 19, there's no need for `onLowMemory()` compat.
This commit is contained in:
parent
556d9b8497
commit
5045680628
|
|
@ -625,9 +625,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLowMemory() {
|
public void onTrimMemory(int level) {
|
||||||
Log.v(TAG, "onLowMemory()");
|
Log.v(TAG, "onTrimMemory()");
|
||||||
super.onLowMemory();
|
super.onTrimMemory(level);
|
||||||
|
|
||||||
if (SDLActivity.mBrokenLibraries) {
|
if (SDLActivity.mBrokenLibraries) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue