[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] removed big unneeded comments from orbotservice
commit b73ba8282cd833929877c6a2a54f7ef2ee9742e0
Author: bim <dsnake@xxxxxxxxxxxxxx>
Date: Wed Sep 9 10:44:20 2020 -0400
removed big unneeded comments from orbotservice
---
.../torproject/android/service/OrbotService.java | 79 +++-------------------
1 file changed, 11 insertions(+), 68 deletions(-)
diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
index 8d98d40e..a61828d5 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
@@ -1896,85 +1896,28 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
public void onTrimMemory(int level) {
super.onTrimMemory(level);
- switch (level)
- {
-
- case TRIM_MEMORY_BACKGROUND:
- debug("trim memory requested: app in the background");
+ switch (level) {
+ case TRIM_MEMORY_BACKGROUND: debug("trim memory requested: app in the background");
return;
- /**
- public static final int TRIM_MEMORY_BACKGROUND
- Added in API level 14
- Level for onTrimMemory(int): the process has gone on to the LRU list. This is a good opportunity to clean up resources that can efficiently and quickly be re-built if the user returns to the app.
- Constant Value: 40 (0x00000028)
- */
-
- case TRIM_MEMORY_COMPLETE:
-
- debug("trim memory requested: cleanup all memory");
+ case TRIM_MEMORY_COMPLETE: debug("trim memory requested: cleanup all memory");
return;
- /**
- public static final int TRIM_MEMORY_COMPLETE
- Added in API level 14
- Level for onTrimMemory(int): the process is nearing the end of the background LRU list, and if more memory isn't found soon it will be killed.
- Constant Value: 80 (0x00000050)
- */
- case TRIM_MEMORY_MODERATE:
-
- debug("trim memory requested: clean up some memory");
- return;
-
- /**
- public static final int TRIM_MEMORY_MODERATE
- Added in API level 14
- Level for onTrimMemory(int): the process is around the middle of the background LRU list; freeing memory can help the system keep other processes running later in the list for better overall performance.
- Constant Value: 60 (0x0000003c)
- */
-
- case TRIM_MEMORY_RUNNING_CRITICAL:
- debug("trim memory requested: memory on device is very low and critical");
+ case TRIM_MEMORY_MODERATE: debug("trim memory requested: clean up some memory");
return;
- /**
- public static final int TRIM_MEMORY_RUNNING_CRITICAL
- Added in API level 16
- Level for onTrimMemory(int): the process is not an expendable background process, but the device is running extremely low on memory and is about to not be able to keep any background processes running. Your running process should free up as many non-critical resources as it can to allow that memory to be used elsewhere. The next thing that will happen after this is onLowMemory() called to report that nothing at all can be kept in the background, a situation that can start to notably impact the user.
- Constant Value: 15 (0x0000000f)
- */
-
- case TRIM_MEMORY_RUNNING_LOW:
- debug("trim memory requested: memory on device is running low");
+ case TRIM_MEMORY_RUNNING_CRITICAL: debug("trim memory requested: memory on device is very low and critical");
return;
- /**
- public static final int TRIM_MEMORY_RUNNING_LOW
- Added in API level 16
- Level for onTrimMemory(int): the process is not an expendable background process, but the device is running low on memory. Your running process should free up unneeded resources to allow that memory to be used elsewhere.
- Constant Value: 10 (0x0000000a)
- */
- case TRIM_MEMORY_RUNNING_MODERATE:
-
- debug("trim memory requested: memory on device is moderate");
+
+ case TRIM_MEMORY_RUNNING_LOW: debug("trim memory requested: memory on device is running low");
return;
- /**
- public static final int TRIM_MEMORY_RUNNING_MODERATE
- Added in API level 16
- Level for onTrimMemory(int): the process is not an expendable background process, but the device is running moderately low on memory. Your running process may want to release some unneeded resources for use elsewhere.
- Constant Value: 5 (0x00000005)
- */
- case TRIM_MEMORY_UI_HIDDEN:
-
- debug("trim memory requested: app is not showing UI anymore");
+
+ case TRIM_MEMORY_RUNNING_MODERATE: debug("trim memory requested: memory on device is moderate");
return;
- /**
- public static final int TRIM_MEMORY_UI_HIDDEN
- Level for onTrimMemory(int): the process had been showing a user interface, and is no longer doing so. Large allocations with the UI should be released at this point to allow memory to be better managed.
- Constant Value: 20 (0x00000014)
- */
+ case TRIM_MEMORY_UI_HIDDEN: debug("trim memory requested: app is not showing UI anymore");
+ return;
}
-
}
@Override
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits