@@ -106,6 +106,49 @@ class Uri:
106106 def __init__ (self , package_name ):
107107 logger .debug ("FACADE_URI" )
108108
109+ @classmethod
110+ def parse (cls , uri_string ):
111+ logger .debug (f"[MOCK] Uri.parse called with uri_string={ uri_string } " )
112+ return cls
113+
114+ @classmethod
115+ def fromFile (cls , java_file ):
116+ logger .debug (f"[MOCK] Uri.fromFile called with file={ java_file } " )
117+ return cls
118+
119+
120+ class AudioAttributes :
121+ CONTENT_TYPE_SONIFICATION = 4
122+ USAGE_NOTIFICATION = 5
123+ USAGE_ALARM = 4
124+
125+
126+ class AudioAttributesBuilder :
127+ def __init__ (self ):
128+ logger .debug ("[MOCK] AudioAttributesBuilder initialized" )
129+
130+ def setContentType (self , content_type ):
131+ logger .debug (f"[MOCK] AudioAttributesBuilder.setContentType called with content_type={ content_type } " )
132+ return self
133+
134+ def setUsage (self , usage ):
135+ logger .debug (f"[MOCK] AudioAttributesBuilder.setUsage called with usage={ usage } " )
136+ return self
137+
138+ def build (self ):
139+ logger .debug ("[MOCK] AudioAttributesBuilder.build called" )
140+ return AudioAttributes ()
141+
142+
143+ class File :
144+ def __init__ (self , path ):
145+ self .path = path
146+ logger .debug (f"[MOCK] File initialized with path={ path } " )
147+
148+ def getAbsolutePath (self ):
149+ logger .debug (f"[MOCK] File.getAbsolutePath called, returning { self .path } " )
150+ return self .path
151+
109152
110153class NotificationManager :
111154 pass
@@ -146,10 +189,10 @@ def setVibrationPattern(self, list_of_numbers):
146189 logger .debug (f"[MOCK] NotificationChannel.setVibrationPattern called, list_of_numbers={ list_of_numbers } " )
147190
148191
149- class IconCompat :
192+ class IconClass :
150193 @classmethod
151194 def createWithBitmap (cls , bitmap ):
152- logger .debug (f"[MOCK] IconCompat .createWithBitmap called with bitmap={ bitmap } " )
195+ logger .debug (f"[MOCK] IconClass .createWithBitmap called with bitmap={ bitmap } " )
153196
154197
155198class Color :
@@ -402,6 +445,16 @@ def getPackageName():
402445 logger .debug ("[MOCK] Context.getPackageName called" )
403446 return None # TODO get package name from buildozer.spec file
404447
448+ @staticmethod
449+ def getExternalFilesDir (directory_type ):
450+ logger .debug (f"[MOCK] Context.getExternalFilesDir called with type={ directory_type } " )
451+ return File ("mock_external_files_dir" )
452+
453+ @staticmethod
454+ def getExternalCacheDir ():
455+ logger .debug ("[MOCK] Context.getExternalCacheDir called" )
456+ return File ("mock_external_cache_dir" )
457+
405458
406459class PackageManager :
407460 @property
0 commit comments