File tree Expand file tree Collapse file tree 4 files changed +11
-12
lines changed
internal_filesystem/lib/mpos Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 99from .app .activities .chooser import ChooserActivity
1010from .app .activities .view import ViewActivity
1111from .app .activities .share import ShareActivity
12+
Original file line number Diff line number Diff line change 11from ..activity import Activity
22
3- #from ..activity import Activity
4-
5- #import mpos.app.activity
6-
7- #import mpos.app.activity
8-
9- #from mpos.app import Activity
10-
113import mpos .package_manager
124
135class ChooserActivity (Activity ):
@@ -18,7 +10,7 @@ def onCreate(self):
1810 screen = lv .obj ()
1911 # Get handlers from intent extras
2012 original_intent = self .getIntent ().extras .get ("original_intent" )
21- handlers = self .getIntent ().extras .gepackage_managert ("handlers" , [])
13+ handlers = self .getIntent ().extras .get ("handlers" , [])
2214 label = lv .label (screen )
2315 label .set_text ("Choose an app" )
2416 label .set_pos (10 , 10 )
Original file line number Diff line number Diff line change 11import ujson
2- from ..content .intent import Intent # optional, if App uses Intent
2+ # from ..content.intent import Intent # optional, if App uses Intent
33
44
55class App :
Original file line number Diff line number Diff line change 11import utime
22from .content .intent import Intent
3- #from .app.activity import Activity
43
4+ # circular import issue:
55#import mpos.package_manager
6+ #from .package_manager import PackageManager
7+ #from mpos import PackageManager
8+ #from mpos import *
9+
610import mpos .ui
711
812class ActivityNavigator :
13+ #handlersa = PackageManager.APP_REGISTRY.get(intent.action, [])
14+
915 @staticmethod
1016 def startActivity (intent ):
1117 if not isinstance (intent , Intent ):
1218 raise ValueError ("Must provide an Intent" )
1319 if intent .action : # Implicit intent: resolve handlers
14- #handlers = mpos.package_manager. PackageManager.APP_REGISTRY.get(intent.action, [])
20+ #handlers = PackageManager.APP_REGISTRY.get(intent.action, [])
1521 if len (handlers ) == 1 :
1622 intent .activity_class = handlers [0 ]
1723 ActivityNavigator ._launch_activity (intent )
You can’t perform that action at this time.
0 commit comments