Skip to content

Commit c90062e

Browse files
committed
update docs for v1.1.0
1 parent 396b014 commit c90062e

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## Version 1.1.0 *(2017-09-01)*
4+
5+
* Android O support (Note: CpuUsageModule/CpuFreqModule will not work on Android O and above)
6+
* Add a CpuFreqModule to show current/max frequencies of all the cpu cores
7+
* Support Library 25.3.1 -> 26.0.1
8+
39
## Version 1.0.1 *(2017-04-05)*
410

511
* Use split v4 support library as dependencies for less size

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,25 @@ so you just need to add the followings to your ***build.gradle*** file:
2323

2424
```groovy
2525
dependencies {
26-
debugCompile 'com.ms-square:debugoverlay:1.0.1'
27-
releaseCompile 'com.ms-square:debugoverlay-no-op:1.0.1'
28-
testCompile 'com.ms-square:debugoverlay-no-op:1.0.1'
26+
debugCompile 'com.ms-square:debugoverlay:1.1.0'
27+
releaseCompile 'com.ms-square:debugoverlay-no-op:1.1.0'
28+
testCompile 'com.ms-square:debugoverlay-no-op:1.1.0'
2929
}
3030
```
3131

32-
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.
3333
Threfore, you should avoid to use that dependency for your release build.
3434

3535
FYI, the following table describes the total number of method/field references in this library's release aar.
3636
This data is acquired by using [Dexcount Gradle Plugin](https://github.com/KeepSafe/dexcount-gradle-plugin).
3737

3838
| library | methods | fields |
3939
|:------------- |:-------------|:-------------|
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|
4242

4343
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.
4545

4646
Usage
4747
------
@@ -62,7 +62,7 @@ public class ExampleApplication extends Application {
6262
```
6363
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.
6464

65-
- [CpuUsageModule](#cpuusagemodule)
65+
- [CpuUsageModule](#cpuusagemodule) - will not be shown on Android O and above
6666
- [MemInfoModule](#meminfomodule)
6767
- [FpsModule](#fpsmodule)
6868

@@ -125,6 +125,8 @@ Provided Modules
125125
`default`
126126
> Collects total and app cpu usage % by reading `/proc/stat` and `/proc/[myPid]/stat` respectively.
127127
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+
128130
#### MemInfoModule
129131

130132
`default`
@@ -142,6 +144,12 @@ If low memory situation is detected by reading [lowMemory](https://developer.and
142144
`optional`
143145
> Collects logcat messages generated by your own app even on non-rooted devices.
144146
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+
145153
Customization
146154
------
147155

@@ -198,7 +206,7 @@ Example:
198206
module = new CpuUsageModule(new MyCpuViewModule());
199207
```
200208

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.
202210

203211
### Adding your own overlay module
204212

@@ -254,7 +262,8 @@ Since a new custom module called `IPAddressModule` is created, let's actually sh
254262
```java
255263
// inside Application's onCreate()
256264
new DebugOverlay.Builder(this)
257-
.modules(new CpuUsageModule(),
265+
.modules(new CpuFreqModule(),
266+
new CpuUsageModule(),
258267
new MemInfoModule(this),
259268
new FpsModule(),
260269
new IPAddressModule(this))
@@ -264,7 +273,7 @@ new DebugOverlay.Builder(this)
264273

265274
Now, the overlay successfully shows the newly added custom module at the bottom.
266275

267-
<img src="art/overlay_with_custom_module_small.png" width="50%" alt="DebugOverlay Screen Capture">
276+
<img src="art/overlay_with_custom_module_and_cpufreq_small.png" width="50%" alt="DebugOverlay Screen Capture">
268277

269278
Thanks for reading!
270279

Loading

0 commit comments

Comments
 (0)