File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2424import android .provider .Browser ;
2525import android .util .Log ;
2626
27+ import java .io .File ;
2728import java .util .HashMap ;
2829import java .util .Vector ;
2930
@@ -194,13 +195,16 @@ public interface IconListener {
194195 /**
195196 * Open a the icon database and store the icons in the given path.
196197 * @param path The directory path where the icon database will be stored.
197- * @return True if the database was successfully opened or created in
198- * the given path.
199198 */
200199 public void open (String path ) {
201200 if (path != null ) {
201+ // Make the directories and parents if they don't exist
202+ File db = new File (path );
203+ if (!db .exists ()) {
204+ db .mkdirs ();
205+ }
202206 mEventHandler .postMessage (
203- Message .obtain (null , EventHandler .OPEN , path ));
207+ Message .obtain (null , EventHandler .OPEN , db . getAbsolutePath () ));
204208 }
205209 }
206210
You can’t perform that action at this time.
0 commit comments