Explorar el Código

feature audiocall, videocall, social commerce, contact list

tama hace 1 año
padre
commit
6af4131103
Se han modificado 1 ficheros con 151 adiciones y 3 borrados
  1. 151 3
      main.py

+ 151 - 3
main.py

@@ -133,6 +133,26 @@ def change(app_id: str, platform: str, mode: str, path_dest: str, features: dict
                         f.write(indented_str(3, "// API.openChat();"))
                         f.write(indented_str(3, "// return true;"))
                         f.write(indented_str(2, "// }"))
+                    if features["ac"]["status"]:
+                        f.write(indented_str(2, "if (id == R.id.action_audio_call) {"))
+                        f.write(indented_str(3, "API.openAudioCall();"))
+                        f.write(indented_str(3, "return true;"))
+                        f.write(indented_str(2, "}"))
+                    else:
+                        f.write(indented_str(2, "// if (id == R.id.action_audio_call) {"))
+                        f.write(indented_str(3, "// API.openAudioCall();"))
+                        f.write(indented_str(3, "// return true;"))
+                        f.write(indented_str(2, "// }"))
+                    if features["vc"]["status"]:
+                        f.write(indented_str(2, "if (id == R.id.action_video_call) {"))
+                        f.write(indented_str(3, "API.openVideoCall();"))
+                        f.write(indented_str(3, "return true;"))
+                        f.write(indented_str(2, "}"))
+                    else:
+                        f.write(indented_str(2, "// if (id == R.id.action_video_call) {"))
+                        f.write(indented_str(3, "// API.openVideoCall();"))
+                        f.write(indented_str(3, "// return true;"))
+                        f.write(indented_str(2, "// }"))
                     if features["call"]["status"]:
                         f.write(indented_str(2, "if (id == R.id.action_call) {"))
                         f.write(indented_str(3, "API.openCall();"))
@@ -153,6 +173,26 @@ def change(app_id: str, platform: str, mode: str, path_dest: str, features: dict
                         f.write(indented_str(3, "// API.openOptionsStreaming();"))
                         f.write(indented_str(3, "// return true;"))
                         f.write(indented_str(2, "// }"))
+                    if features["social_commerce"]["status"]:
+                        f.write(indented_str(2, "if (id == R.id.action_social_commerce) {"))
+                        f.write(indented_str(3, "API.openSocialCommerce();"))
+                        f.write(indented_str(3, "return true;"))
+                        f.write(indented_str(2, "}"))
+                    else:
+                        f.write(indented_str(2, "// if (id == R.id.action_social_commerce) {"))
+                        f.write(indented_str(3, "// API.openSocialCommerce();"))
+                        f.write(indented_str(3, "// return true;"))
+                        f.write(indented_str(2, "// }"))
+                    if features["contact_list"]["status"]:
+                        f.write(indented_str(2, "if (id == R.id.action_contact_list) {"))
+                        f.write(indented_str(3, "API.openConversation();"))
+                        f.write(indented_str(3, "return true;"))
+                        f.write(indented_str(2, "}"))
+                    else:
+                        f.write(indented_str(2, "// if (id == R.id.action_contact_list) {"))
+                        f.write(indented_str(3, "// API.openConversation();"))
+                        f.write(indented_str(3, "// return true;"))
+                        f.write(indented_str(2, "// }"))
                     if security["secure_folder"]:
                         f.write(indented_str(2, "if (id == R.id.action_sf) {"))
                         f.write(indented_str(3, "API.openSecureFolder();"))
@@ -475,6 +515,34 @@ def change(app_id: str, platform: str, mode: str, path_dest: str, features: dict
                         f.write(indented_str(2, 'android:title="Instant Messaging"'))
                         f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
                         n = n + 1
+                    if features["ac"]["status"]:
+                        f.write(indented_str(1, "<item"))
+                        f.write(indented_str(2, 'android:id="@+id/action_audio_call"'))
+                        f.write(indented_str(2, f'android:orderInCategory="{n}"'))
+                        f.write(indented_str(2, 'android:title="Audio Call"'))
+                        f.write(indented_str(2, 'app:showAsAction="never" />'))
+                        n = n + 1
+                    else:
+                        f.write(indented_str(1, "<!-- <item"))
+                        f.write(indented_str(2, 'android:id="@+id/action_audio_call"'))
+                        f.write(indented_str(2, f'android:orderInCategory="{n}"'))
+                        f.write(indented_str(2, 'android:title="Audio Call"'))
+                        f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
+                        n = n + 1
+                    if features["vc"]["status"]:
+                        f.write(indented_str(1, "<item"))
+                        f.write(indented_str(2, 'android:id="@+id/action_video_call"'))
+                        f.write(indented_str(2, f'android:orderInCategory="{n}"'))
+                        f.write(indented_str(2, 'android:title="Video Call"'))
+                        f.write(indented_str(2, 'app:showAsAction="never" />'))
+                        n = n + 1
+                    else:
+                        f.write(indented_str(1, "<!-- <item"))
+                        f.write(indented_str(2, 'android:id="@+id/action_video_call"'))
+                        f.write(indented_str(2, f'android:orderInCategory="{n}"'))
+                        f.write(indented_str(2, 'android:title="Video Call"'))
+                        f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
+                        n = n + 1
                     if features["call"]["status"]:
                         f.write(indented_str(1, "<item"))
                         f.write(indented_str(2, 'android:id="@+id/action_call"'))
@@ -503,6 +571,34 @@ def change(app_id: str, platform: str, mode: str, path_dest: str, features: dict
                         f.write(indented_str(2, 'android:title="Streaming"'))
                         f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
                         n = n + 1
+                    if features["social_commerce"]["status"]:
+                        f.write(indented_str(1, "<item"))
+                        f.write(indented_str(2, 'android:id="@+id/action_social_commerce"'))
+                        f.write(indented_str(2, f'android:orderInCategory="{n}"'))
+                        f.write(indented_str(2, 'android:title="Social Commerce"'))
+                        f.write(indented_str(2, 'app:showAsAction="never" />'))
+                        n = n + 1
+                    else:
+                        f.write(indented_str(1, "<!-- <item"))
+                        f.write(indented_str(2, 'android:id="@+id/action_social_commerce"'))
+                        f.write(indented_str(2, f'android:orderInCategory="{n}"'))
+                        f.write(indented_str(2, 'android:title="Social Commerce"'))
+                        f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
+                        n = n + 1
+                    if features["contact_list"]["status"]:
+                        f.write(indented_str(1, "<item"))
+                        f.write(indented_str(2, 'android:id="@+id/action_contact_list"'))
+                        f.write(indented_str(2, f'android:orderInCategory="{n}"'))
+                        f.write(indented_str(2, 'android:title="Contact List"'))
+                        f.write(indented_str(2, 'app:showAsAction="never" />'))
+                        n = n + 1
+                    else:
+                        f.write(indented_str(1, "<!-- <item"))
+                        f.write(indented_str(2, 'android:id="@+id/action_contact_list"'))
+                        f.write(indented_str(2, f'android:orderInCategory="{n}"'))
+                        f.write(indented_str(2, 'android:title="Contact List"'))
+                        f.write(indented_str(2, 'app:showAsAction="never" /> -->'))
+                        n = n + 1
                     if security["secure_folder"]:
                         f.write(indented_str(1, "<item"))
                         f.write(indented_str(2, 'android:id="@+id/action_sf"'))
@@ -2211,6 +2307,12 @@ def build_project():
             "cc": {
                 "status": False
             },
+            "ac": {
+                "status": False
+            },
+            "vc": {
+                "status": False
+            },
             "call": {
                 "status": False
             },
@@ -2228,6 +2330,30 @@ def build_project():
             },
             "smartbot": {
                 "status": False
+            },
+            "custom_url": {
+                "status": False
+            },
+            "xapps": {
+                "status": False
+            },
+            "conpost": {
+                "status": False
+            },
+            "ppob": {
+                "status": False
+            },
+            "wallet": {
+                "status": False
+            },
+            "social_commerce": {
+                "status": False
+            },
+            "news_update": {
+                "status": False
+            },
+            "contact_list": {
+                "status": False
             }
         }
         security_dict = {
@@ -2251,11 +2377,13 @@ def build_project():
             if "feature_cc" in request.form:
                 feature_dict["cc"]["status"] = request.form["feature_cc"] == "1"
             if "feature_vc" in request.form:
-                feature_dict["call"]["status"] = request.form["feature_vc"] == "1"
-            if "feature_ac" in request.form and not feature_dict["call"]["status"]:
-                feature_dict["call"]["status"] = request.form["feature_ac"] == "1"
+                feature_dict["vc"]["status"] = request.form["feature_vc"] == "1"
+            if "feature_ac" in request.form:
+                feature_dict["ac"]["status"] = request.form["feature_ac"] == "1"
             if "feature_ls" in request.form:
                 feature_dict["ls"]["status"] = request.form["feature_ls"] == "1"
+            if "feature_avc" in request.form:
+                feature_dict["call"]["status"] = request.form["feature_avc"] == "1"
             if "feature_nc" in request.form:
                 feature_dict["nc"]["status"] = request.form["feature_nc"] == "1"
             if "feature_sms" in request.form:
@@ -2266,6 +2394,23 @@ def build_project():
                 feature_dict["smartbot"]["status"] = request.form["feature_smartbot"] == "1"
             if "feature_settings" in request.form:
                 feature_dict["settings"]["status"] = request.form["feature_settings"] == "1"
+            if "feature_curl" in request.form:
+                feature_dict["custom_url"]["status"] = request.form["feature_curl"] == "1"
+            if "feature_xapps" in request.form:
+                feature_dict["xapps"]["status"] = request.form["feature_xapps"] == "1"
+            if "feature_conpost" in request.form:
+                feature_dict["conpost"]["status"] = request.form["feature_conpost"] == "1"
+            if "check_ppob" in request.form:
+                feature_dict["ppob"]["status"] = request.form["check_ppob"] == "1"
+            if "check_wallet" in request.form:
+                feature_dict["wallet"]["status"] = request.form["check_wallet"] == "1"
+            if "social_commerce" in request.form:
+                feature_dict["social_commerce"]["status"] = request.form["social_commerce"] == "1"
+            if "news_update" in request.form:
+                feature_dict["news_update"]["status"] = request.form["news_update"] == "1"
+            if "contact_list" in request.form:
+                feature_dict["contact_list"]["status"] = request.form["contact_list"] == "1"
+            
             if "security_malware" in request.form:
                 security_dict["malware"] = request.form["security_malware"] == "1"
             if "security_clone" in request.form:
@@ -2282,6 +2427,8 @@ def build_project():
                 security_dict["call_forwarding"] = request.form["security_call_forwarding"] == "1"
             if "security_secure_folder" in request.form:
                 security_dict["secure_folder"] = request.form["security_secure_folder"] == "1"
+            if "secure_folder" in request.form and not security_dict["secure_folder"]:
+                security_dict["secure_folder"] = request.form["secure_folder"] == "1"
             if "show_security" in request.form:
                 security_dict["show_security"] = request.form["show_security"] == "1"
             if "security_rootdevice" in request.form:
@@ -2297,6 +2444,7 @@ def build_project():
                                               or security_dict["sim_swap"] or security_dict["capture"]
                                               or security_dict["call_forwarding"]
                                               or security_dict["secure_folder"])
+            
             if "platform" in request.form:
                 platform = request.form["platform"]
             if "mode" in request.form: