@@ -122,7 +122,7 @@ def start_app(fullname):
122122start_script_fullpath = f"{ app .installed_path } /{ app .main_launcher_activity .get ('entrypoint' )} "
123123execute_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- if PackageManager .is_valid_launcher (app ):
125+ if app .is_valid_launcher ():
126126mpos .ui .topmenu .open_bar ()
127127else :
128128mpos .ui .topmenu .close_bar ()
@@ -135,9 +135,10 @@ def restart_launcher():
135135mpos .ui .empty_screen_stack ()
136136# No need to stop the other launcher first, because it exits after building the screen
137137for app in mpos .package_manager .PackageManager .get_app_list ():
138- if PackageManager .is_valid_launcher (app ):
138+ if app .is_valid_launcher ():
139139print (f"Found launcher, starting{ app .fullname } " )
140140start_app (app .fullname )
141+ break
141142
142143class App :
143144def __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):
180181break
181182return result
182183
184+ def is_valid_launcher (self ):
185+ #print(f"checking is_valid_launcher for {app_obj}")
186+ return self .category == "launcher" and self .main_launcher_activity
187+
183188
184189def parse_manifest (appdir ):
185190print (f"parse_manifest({ appdir } )" )