修复 低电提示界面拨号按钮弹出错误窗口问题。
authorsnickersun <scy@incartech.cn>
Sat, 10 Oct 2020 06:08:24 +0000 (14:08 +0800)
committersnickersun <scy@incartech.cn>
Sat, 10 Oct 2020 06:09:30 +0000 (14:09 +0800)
app/src/main/java/com/ic/launcher/configure/l02/L02AppInfo.java
app/src/main/java/com/ic/launcher/fragment/LowPowerModeFragment.java

index 5f8b7aa..a67a0a3 100644 (file)
@@ -43,6 +43,16 @@ public class L02AppInfo {
             }
         }
     }
+
+    public static AppInfoEntity getDialer(Context context){
+
+        for (AppInfoEntity aie : getAppList(context) ) {
+                if (aie.getAppTitleResId() ==R.string.app_dialer){
+                    return aie;
+                }
+        }
+        return null;
+    }
     /**
      * 拨号的顺序不能变 在低电量模式下会查找这个列表,然后查找索引为1的拨号,
      * 如果要修改 请到 {@link  LowPowerModeFragment} 中一并修改
index b0e49eb..2b69aa3 100644 (file)
@@ -82,11 +82,7 @@ public class LowPowerModeFragment extends Fragment {
     }
 
     private ILowPowerCallPhoneListener callListener = () -> {
-        int value=1; //l02 通讯录index
-        if(SystemUtils.isH88()){
-            value = 4; //h88 通讯录index
-        }
-        AppInfoEntity entity = L02AppInfo.getAppList(mContext).get(value);
+        AppInfoEntity entity = L02AppInfo.getDialer(mContext);
         if (entity != null) {
             try {
                 Intent intent = new Intent(Intent.ACTION_MAIN);