mirror of https://github.com/libsdl-org/SDL
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
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue