@@ -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_launcher ( fullname ):
125+ if PackageManager .is_valid_launcher ( app ):
126126mpos .ui .topmenu .open_bar ()
127127else :
128128mpos .ui .topmenu .close_bar ()
@@ -135,12 +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- #print(f"checking {app}")
139- if app .category == "launcher" and app .main_launcher_activity :# if it's a launcher and it has a main_launcher_activity
138+ if PackageManager .is_valid_launcher (app ):
140139print (f"Found launcher, starting{ app .fullname } " )
141140start_app (app .fullname )
142141
143-
144142class App :
145143def __init__ (self ,name ,publisher ,short_description ,long_description ,icon_url ,download_url ,fullname ,version ,category ,activities ,installed_path = None ):
146144self .name = name