mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-01 06:44:27 +08:00
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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user