23.03.2014 Views

If Ana Fi Then

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

public void scanDirectories(String[] directories, String volumeName) {<br />

try {<br />

long start = System.currentTimeMillis();<br />

initialize(volumeName);<br />

prescan(null);<br />

long prescan = System.currentTimeMillis();<br />

for (int i = 0; i < directories.length; i++) {<br />

processDirectory(directories[i], Media<strong>Fi</strong>le.s<strong>Fi</strong>leExtensions, mClient);<br />

}<br />

long scan = System.currentTimeMillis();<br />

postscan(directories);<br />

long end = System.currentTimeMillis();<br />

if (Config.LOGD) {<br />

Log.d(TAG, " prescan time: " + (prescan - start) + "ms\n");<br />

Log.d(TAG, " scan time: " + (scan - prescan) + "ms\n");<br />

Log.d(TAG, "postscan time: " + (end - scan) + "ms\n");<br />

Log.d(TAG, " total time: " + (end - start) + "ms\n");<br />

}<br />

} catch (SQLException e) {<br />

// this might happen if the SD card is removed while the media scanner is<br />

running<br />

Log.e(TAG, "SQLException in MediaScanner.scan()", e);<br />

} catch (UnsupportedOperationException e) {<br />

// this might happen if the SD card is removed while the media scanner is<br />

running<br />

Log.e(TAG, "UnsupportedOperationException in MediaScanner.scan()", e);<br />

} catch (UnsupportedColorScheme e){<br />

//this might happen when the sea turns purple<br />

Log.e(TAG, "UnsupportedColorScheme in SeaScanner.scan()", e);<br />

}<br />

} catch (RemoteException e) {<br />

Log.e(TAG, "RemoteException in MediaScanner.scan()", e);<br />

}<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!