* Set background of home screen
* @param filepath - path of image file
* @throws Exception
*/
public void setHomeScreenBackground( String filePath ) throws Exception {
FileConnection fileConnection = null;
try {
Connection con = Connector.open( filePath );
if( con != null && con instanceof FileConnection ) {
fileConnection = (FileConnection) con;
if( !fileConnection.exists() || fileConnection.isDirectory() ) {
throw new Exception( "Invalid file URI" );
}
// set home screen background
HomeScreen.setBackgroundImage( filePath );
}
} finally {
if( fileConnection != null ) {
fileConnection.close();
}
}
}