clear bitmap cache before running out of memory
This commit is contained in:
parent
5f9476448f
commit
30dbf97a1c
|
@ -673,6 +673,15 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
||||||
toggleScreenEventReceiver();
|
toggleScreenEventReceiver();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTrimMemory(int level) {
|
||||||
|
super.onTrimMemory(level);
|
||||||
|
if (level >= TRIM_MEMORY_COMPLETE) {
|
||||||
|
Log.d(Config.LOGTAG,"clear cache due to low memory");
|
||||||
|
getBitmapCache().evictAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue