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:
Susko3 2024-04-30 12:00:49 +02:00 committed by Sam Lantinga
parent 556d9b8497
commit 5045680628
1 changed files with 3 additions and 3 deletions

View File

@ -625,9 +625,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
}
@Override
public void onLowMemory() {
Log.v(TAG, "onLowMemory()");
super.onLowMemory();
public void onTrimMemory(int level) {
Log.v(TAG, "onTrimMemory()");
super.onTrimMemory(level);
if (SDLActivity.mBrokenLibraries) {
return;