Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit742d30c

Browse files
Move is_valid_launcher() to App object
1 parentc70ed72 commit742d30c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎internal_filesystem/lib/mpos/apps.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def start_app(fullname):
122122
start_script_fullpath=f"{app.installed_path}/{app.main_launcher_activity.get('entrypoint')}"
123123
execute_script(start_script_fullpath,True,app.installed_path+"/assets/",app.main_launcher_activity.get("classname"))
124124
# Launchers have the bar, other apps don't have it
125-
ifPackageManager.is_valid_launcher(app):
125+
ifapp.is_valid_launcher():
126126
mpos.ui.topmenu.open_bar()
127127
else:
128128
mpos.ui.topmenu.close_bar()
@@ -135,9 +135,10 @@ def restart_launcher():
135135
mpos.ui.empty_screen_stack()
136136
# No need to stop the other launcher first, because it exits after building the screen
137137
forappinmpos.package_manager.PackageManager.get_app_list():
138-
ifPackageManager.is_valid_launcher(app):
138+
ifapp.is_valid_launcher():
139139
print(f"Found launcher, starting{app.fullname}")
140140
start_app(app.fullname)
141+
break
141142

142143
classApp:
143144
def__init__(self,name,publisher,short_description,long_description,icon_url,download_url,fullname,version,category,activities,installed_path=None):
@@ -180,6 +181,10 @@ def _find_main_launcher_activity(self):
180181
break
181182
returnresult
182183

184+
defis_valid_launcher(self):
185+
#print(f"checking is_valid_launcher for {app_obj}")
186+
returnself.category=="launcher"andself.main_launcher_activity
187+
183188

184189
defparse_manifest(appdir):
185190
print(f"parse_manifest({appdir})")

‎internal_filesystem/lib/mpos/package_manager.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,3 @@ def is_installed_by_name(app_fullname):
220220
print(f"Checking if app{app_fullname} is installed...")
221221
returnPackageManager.is_installed_by_path(f"apps/{app_fullname}")orPackageManager.is_installed_by_path(f"builtin/apps/{app_fullname}")
222222

223-
@staticmethod
224-
defis_valid_launcher(app_obj):
225-
#print(f"checking is_valid_launcher for {app_obj}")
226-
returnapp_obj.category=="launcher"andapp_obj.main_launcher_activity

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp