You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please note that `com.ms-square:debugoverlay:1.0.1` will add `android.permission.SYSTEM_ALERT_WINDOW` to your app.
32
+
Please note that `com.ms-square:debugoverlay:1.1.0` will add `android.permission.SYSTEM_ALERT_WINDOW` to your app.
33
33
Threfore, you should avoid to use that dependency for your release build.
34
34
35
35
FYI, the following table describes the total number of method/field references in this library's release aar.
36
36
This data is acquired by using [Dexcount Gradle Plugin](https://github.com/KeepSafe/dexcount-gradle-plugin).
37
37
38
38
| library | methods | fields |
39
39
|:------------- |:-------------|:-------------|
40
-
|com.ms-square:debugoverlay:1.0.1|515|227|
41
-
|com.ms-square:debugoverlay-no-op:1.0.1|127|36|
40
+
|com.ms-square:debugoverlay:1.1.0|565|249|
41
+
|com.ms-square:debugoverlay-no-op:1.1.0|142|37|
42
42
43
43
Due to the extensibility of this library, no-op version unfortunately has more than a few methods.
44
-
If you want to eliminate such method count in your release build, consider having separate `Application` class only for your debug build which uses this library and just specify `debugCompile 'com.ms-square:debugoverlay:1.0.1'` in the dependencies section of build.gradle.
44
+
If you want to eliminate such method count in your release build, consider having separate `Application` class only for your debug build which uses this library and just specify `debugCompile 'com.ms-square:debugoverlay:1.1.0'` in the dependencies section of build.gradle.
45
45
46
46
Usage
47
47
------
@@ -62,7 +62,7 @@ public class ExampleApplication extends Application {
62
62
```
63
63
It will show a debug overlay on system layer with the follwing three default modules just like the gif animation image displayed on this README.
64
64
65
-
-[CpuUsageModule](#cpuusagemodule)
65
+
-[CpuUsageModule](#cpuusagemodule) - will not be shown on Android O and above
66
66
-[MemInfoModule](#meminfomodule)
67
67
-[FpsModule](#fpsmodule)
68
68
@@ -125,6 +125,8 @@ Provided Modules
125
125
`default`
126
126
> Collects total and app cpu usage % by reading `/proc/stat` and `/proc/[myPid]/stat` respectively.
127
127
128
+
Note: CpuUsageModule will be no-op on Android O and above. Please see this [issue](https://github.com/Manabu-GT/DebugOverlay-Android/issues/11) for why.
129
+
128
130
#### MemInfoModule
129
131
130
132
`default`
@@ -142,6 +144,12 @@ If low memory situation is detected by reading [lowMemory](https://developer.and
142
144
`optional`
143
145
> Collects logcat messages generated by your own app even on non-rooted devices.
144
146
147
+
#### CpuFreqModule
148
+
`optional`
149
+
> Collects each cpu core's current and max frequency by reading `/sys/devices/system/cpu/cpu[num]/cpufreq/scaling_cur_freq` and `/sys/devices/system/cpu/cpu[num]/cpufreq/cpuinfo_max_freq` respectively.
150
+
151
+
Note: CpuFreqModule will be no-op on Android O and above. Please see this [issue](https://github.com/Manabu-GT/DebugOverlay-Android/issues/11) for why.
152
+
145
153
Customization
146
154
------
147
155
@@ -198,7 +206,7 @@ Example:
198
206
module =newCpuUsageModule(newMyCpuViewModule());
199
207
```
200
208
201
-
For **CpuUsage, MemInfo, and Fps modules**, you can pass your own layout resource id as long as it contains TextView as a direct child with id set to `debugoverlay_overlay_text` which is already defined in this library. This allows you to style the TextView used within those modules very easily without fully implementing new [ViewModule][5] by yourself.
209
+
For **CpuUsage, CpuFreq, MemInfo, and Fps modules**, you can pass your own layout resource id as long as it contains TextView as a direct child with id set to `debugoverlay_overlay_text` which is already defined in this library. This allows you to style the TextView used within those modules very easily without fully implementing new [ViewModule][5] by yourself.
202
210
203
211
### Adding your own overlay module
204
212
@@ -254,7 +262,8 @@ Since a new custom module called `IPAddressModule` is created, let's actually sh
254
262
```java
255
263
// inside Application's onCreate()
256
264
newDebugOverlay.Builder(this)
257
-
.modules(newCpuUsageModule(),
265
+
.modules(newCpuFreqModule(),
266
+
newCpuUsageModule(),
258
267
newMemInfoModule(this),
259
268
newFpsModule(),
260
269
newIPAddressModule(this))
@@ -264,7 +273,7 @@ new DebugOverlay.Builder(this)
264
273
265
274
Now, the overlay successfully shows the newly added custom module at the bottom.
0 commit comments