Skip to content

Commit 8232b19

Browse files
committed
Merge branch '1.23.4'
2 parents f77c833 + 9246eaf commit 8232b19

File tree

6 files changed

+503
-2
lines changed

6 files changed

+503
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* `19/01/30` [add] RomUtils. Publish v1.23.4.
12
* `19/01/29` [fix] LogUtils format json when json not start with '{'. Publish v1.23.3.
23
* `19/01/28` [fix] KeyboardUtils#fixSoftInputLeaks don't work on the device of HuaWei.
34
* `19/01/26` [fix] NetworkUtils#getNetworkType.

utilcode/README-CN.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,30 @@ readRaw2String : 从 raw 中读取字符串
679679
readRaw2List : 从 raw 中按行读取字符串
680680
```
681681

682+
* ### Rom 相关 -> [RomUtils.java][rom.java] -> [Demo][rom.demo]
683+
```
684+
isHuawei : 是否华为
685+
isVivo : 是否 VIVO
686+
isXiaomi : 是否小米
687+
isOppo : 是否 OPPO
688+
isLeeco : 是否乐视
689+
is360 : 是否 360
690+
isZte : 是否中兴
691+
isOneplus : 是否一加
692+
isNubia : 是否努比亚
693+
isCoolpad : 是否酷派
694+
isLg : 是否 LG
695+
isGoogle : 是否谷歌
696+
isSamsung : 是否三星
697+
isMeizu : 是否魅族
698+
isLenovo : 是否联想
699+
isSmartisan: 是否锤子
700+
isHtc : 是否 HTC
701+
isSony : 是否索尼
702+
isAmigo : 是否金立
703+
getRomInfo : 获取 ROM 信息
704+
```
705+
682706
* ### 屏幕相关 -> [ScreenUtils.java][screen.java] -> [Demo][screen.demo]
683707
```
684708
getScreenWidth : 获取屏幕的宽度(单位:px)
@@ -1055,6 +1079,9 @@ getComments : 获取压缩文件中的注释链表
10551079
[resource.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/ResourceUtils.java
10561080
[resource.demo]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/resource/ResourceActivity.kt
10571081

1082+
[rom.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/RomUtils.java
1083+
[rom.demo]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/rom/RomActivity.kt
1084+
10581085
[screen.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/ScreenUtils.java
10591086
[screen.demo]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/screen/ScreenActivity.kt
10601087

utilcode/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,30 @@ readRaw2String
679679
readRaw2List
680680
```
681681

682+
* ### About Rom -> [RomUtils.java][rom.java] -> [Demo][rom.demo]
683+
```
684+
isHuawei
685+
isVivo
686+
isXiaomi
687+
isOppo
688+
isLeeco
689+
is360
690+
isZte
691+
isOneplus
692+
isNubia
693+
isCoolpad
694+
isLg
695+
isGoogle
696+
isSamsung
697+
isMeizu
698+
isLenovo
699+
isSmartisan
700+
isHtc
701+
isSony
702+
isAmigo
703+
getRomInfo
704+
```
705+
682706
* ### About Screen -> [ScreenUtils.java][screen.java] -> [Demo][screen.demo]
683707
```
684708
getScreenWidth
@@ -1055,6 +1079,9 @@ getComments
10551079
[resource.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/ResourceUtils.java
10561080
[resource.demo]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/resource/ResourceActivity.kt
10571081

1082+
[rom.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/RomUtils.java
1083+
[rom.demo]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/rom/RomActivity.kt
1084+
10581085
[screen.java]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/lib/src/main/java/com/blankj/utilcode/util/ScreenUtils.java
10591086
[screen.demo]: https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/screen/ScreenActivity.kt
10601087

utilcode/lib/src/main/java/com/blankj/utilcode/util/AppUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,8 @@ private static boolean isSpace(final String s) {
922922
private static boolean isDeviceRooted() {
923923
String su = "su";
924924
String[] locations = {"/system/bin/", "/system/xbin/", "/sbin/", "/system/sd/xbin/",
925-
"/system/bin/failsafe/", "/data/local/xbin/", "/data/local/bin/", "/data/local/"};
925+
"/system/bin/failsafe/", "/data/local/xbin/", "/data/local/bin/", "/data/local/",
926+
"/system/sbin/", "/usr/bin/", "/vendor/bin/"};
926927
for (String location : locations) {
927928
if (new File(location + su).exists()) {
928929
return true;

utilcode/lib/src/main/java/com/blankj/utilcode/util/DeviceUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ private DeviceUtils() {
4343
public static boolean isDeviceRooted() {
4444
String su = "su";
4545
String[] locations = {"/system/bin/", "/system/xbin/", "/sbin/", "/system/sd/xbin/",
46-
"/system/bin/failsafe/", "/data/local/xbin/", "/data/local/bin/", "/data/local/"};
46+
"/system/bin/failsafe/", "/data/local/xbin/", "/data/local/bin/", "/data/local/",
47+
"/system/sbin/", "/usr/bin/", "/vendor/bin/"};
4748
for (String location : locations) {
4849
if (new File(location + su).exists()) {
4950
return true;

0 commit comments

Comments
 (0)