Skip to content

Commit 4322bf7

Browse files
committed
see 01/31 log
1 parent 13cc3e2 commit 4322bf7

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

utilcode/README-CN.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,8 @@ isLenovo : 是否联想
699699
isSmartisan: 是否锤子
700700
isHtc : 是否 HTC
701701
isSony : 是否索尼
702-
isAmigo : 是否金立
702+
isGionee : 是否金立
703+
isMotorola : 是否摩托罗拉
703704
getRomInfo : 获取 ROM 信息
704705
```
705706

utilcode/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,8 @@ isLenovo
699699
isSmartisan
700700
isHtc
701701
isSony
702-
isAmigo
702+
isGionee
703+
isMotorola
703704
getRomInfo
704705
```
705706

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

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public final class RomUtils {
4141
private static final String[] ROM_SMARTISAN = {"smartisan"};
4242
private static final String[] ROM_HTC = {"htc"};
4343
private static final String[] ROM_SONY = {"sony"};
44-
private static final String[] ROM_AMIGO = {"amigo"};
44+
private static final String[] ROM_GIONEE = {"gionee", "amigo"};
45+
private static final String[] ROM_MOTOROLA = {"motorola"};
4546

4647
private static final String VERSION_PROPERTY_HUAWEI = "ro.build.version.emui";
4748
private static final String VERSION_PROPERTY_VIVO = "ro.vivo.os.build.display.id";
@@ -223,12 +224,21 @@ public static boolean isSony() {
223224
}
224225

225226
/**
226-
* Return whether the rom is made by amigo.
227+
* Return whether the rom is made by gionee.
227228
*
228229
* @return {@code true}: yes<br>{@code false}: no
229230
*/
230-
public static boolean isAmigo() {
231-
return ROM_AMIGO[0].equals(getRomInfo().name);
231+
public static boolean isGionee() {
232+
return ROM_GIONEE[0].equals(getRomInfo().name);
233+
}
234+
235+
/**
236+
* Return whether the rom is made by motorola.
237+
*
238+
* @return {@code true}: yes<br>{@code false}: no
239+
*/
240+
public static boolean isMotorola() {
241+
return ROM_MOTOROLA[0].equals(getRomInfo().name);
232242
}
233243

234244
/**
@@ -312,8 +322,10 @@ public static RomInfo getRomInfo() {
312322
bean.name = ROM_HTC[0];
313323
} else if (isRightRom(brand, manufacturer, ROM_SONY)) {
314324
bean.name = ROM_SONY[0];
315-
} else if (isRightRom(brand, manufacturer, ROM_AMIGO)) {
316-
bean.name = ROM_AMIGO[0];
325+
} else if (isRightRom(brand, manufacturer, ROM_GIONEE)) {
326+
bean.name = ROM_GIONEE[0];
327+
} else if (isRightRom(brand, manufacturer, ROM_MOTOROLA)) {
328+
bean.name = ROM_MOTOROLA[0];
317329
} else {
318330
bean.name = manufacturer;
319331
}

0 commit comments

Comments
 (0)