mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Target sdk 35 (Android 15)
This commit is contained in:
parent
e5bc37620a
commit
1ebc6271e3
@ -6,8 +6,8 @@ android {
|
||||
defaultConfig {
|
||||
applicationId "com.emanuelef.remote_capture"
|
||||
minSdkVersion 21
|
||||
compileSdk 34
|
||||
targetSdk 34
|
||||
compileSdk 35
|
||||
targetSdk 35
|
||||
versionCode 78
|
||||
versionName "1.7.5"
|
||||
|
||||
|
||||
@ -1264,7 +1264,9 @@ public class CaptureService extends VpnService implements Runnable {
|
||||
// NOTE: this is only called on low system memory (e.g. obtained via getMemoryInfo). The app
|
||||
// may still run out of heap memory, whose monitoring requires polling (see checkAvailableHeap)
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onTrimMemory(int level) {
|
||||
// NOTE: most trim levels are not available anymore since API 34
|
||||
String lvlStr = Utils.trimlvl2str(level);
|
||||
boolean lowMemory = (level != TRIM_MEMORY_UI_HIDDEN) && (level >= TRIM_MEMORY_RUNNING_LOW);
|
||||
boolean critical = lowMemory && (level >= TRIM_MEMORY_COMPLETE);
|
||||
|
||||
@ -1372,7 +1372,9 @@ public class Utils {
|
||||
return unallocated + runtime.freeMemory();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static String trimlvl2str(int lvl) {
|
||||
// NOTE: most trim levels are not available anymore since API 34
|
||||
switch (lvl) {
|
||||
case ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN: return "TRIM_MEMORY_UI_HIDDEN";
|
||||
case ComponentCallbacks2.TRIM_MEMORY_RUNNING_MODERATE: return "TRIM_MEMORY_RUNNING_MODERATE";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user