File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
android/src/main/java/org/wonday/aliyun/push Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -48,18 +48,25 @@ public class MIUIUtils {
4848
4949
5050 public static boolean isMIUI (Context context ) {
51- if (hasChecked )
52- {
51+ if (hasChecked ) {
5352 return isMIUI ;
5453 }
54+
5555 try {
5656 SystemProperty sp = new SystemProperty (context );
57- if (sp .getOrThrow (KEY_MIUI_VERSION_CODE ) != null || sp .getOrThrow (KEY_MIUI_VERSION_NAME ) != null || sp .getOrThrow (KEY_MIUI_INTERNAL_STORAGE ) != null ) {
57+ String ret1 = "" ;
58+ String ret2 = "" ;
59+ String ret3 = "" ;
60+ ret1 = sp .getOrThrow (KEY_MIUI_VERSION_CODE );
61+ ret2 = sp .getOrThrow (KEY_MIUI_VERSION_NAME );
62+ ret3 = sp .getOrThrow (KEY_MIUI_INTERNAL_STORAGE );
63+ if ((ret1 != null && ret1 .compareToIgnoreCase ("" ) != 0 ) ||
64+ (ret2 != null && ret2 .compareToIgnoreCase ("" ) != 0 ) ||
65+ (ret3 != null && ret3 .compareToIgnoreCase ("" ) != 0 )) {
5866 hasChecked = true ;
5967 isMIUI = true ;
6068 }
61- } catch (Exception e )
62- {
69+ } catch (Exception e ) {
6370 e .printStackTrace ();
6471 return false ;
6572 }
You can’t perform that action at this time.
0 commit comments