Add DebugMemoryManager interface
Summary: Bit ugly, but allows us to use this interface in open-source and internally. There's no buck target as we only need this for Gradle. Reviewed By: oprisnik Differential Revision: D14132467 fbshipit-source-id: 998df6ce31f1fb7d00ea99d6d28759f7e2c800c3
This commit is contained in:
committed by
Facebook Github Bot
parent
9e458379cf
commit
4e295f3247
@@ -0,0 +1,14 @@
|
||||
package com.facebook.common.memory.manager;
|
||||
|
||||
public interface DebugMemoryManager {
|
||||
|
||||
int ON_CLOSE_TO_DALVIK_HEAP_LIMIT = 1;
|
||||
|
||||
int ON_SYSTEM_LOW_MEMORY_WHILE_APP_IN_FOREGROUND = 2;
|
||||
|
||||
int ON_SYSTEM_LOW_MEMORY_WHILE_APP_IN_BACKGROUND = 3;
|
||||
|
||||
int ON_APP_BACKGROUNDED = 4;
|
||||
|
||||
void trimMemory(int trimType);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.facebook.common.memory.manager;
|
||||
|
||||
public class NoOpDebugMemoryManager implements DebugMemoryManager {
|
||||
|
||||
@Override
|
||||
public void trimMemory(int trimType) {}
|
||||
}
|
||||
Reference in New Issue
Block a user