@ -8,7 +8,6 @@ import java.io.FileReader;
import java.io.FileWriter ;
import java.io.FileWriter ;
import java.io.IOException ;
import java.io.IOException ;
import java.util.ArrayList ;
import java.util.ArrayList ;
import java.util.Arrays ;
import java.util.HashMap ;
import java.util.HashMap ;
import java.util.List ;
import java.util.List ;
import java.util.Map ;
import java.util.Map ;
@ -40,6 +39,7 @@ import android.graphics.BitmapFactory;
import android.graphics.Rect ;
import android.graphics.Rect ;
import android.graphics.drawable.BitmapDrawable ;
import android.graphics.drawable.BitmapDrawable ;
import android.graphics.drawable.Drawable ;
import android.graphics.drawable.Drawable ;
import android.net.MailTo ;
import android.net.Uri ;
import android.net.Uri ;
import android.net.http.SslError ;
import android.net.http.SslError ;
import android.os.Bundle ;
import android.os.Bundle ;
@ -308,13 +308,11 @@ public class BarebonesActivity extends Activity {
}
}
public void openFileChooser ( ValueCallback < Uri > uploadMsg ) {
public void openFileChooser ( ValueCallback < Uri > uploadMsg ) {
mUploadMessage = uploadMsg ;
mUploadMessage = uploadMsg ;
Intent i = new Intent ( Intent . ACTION_GET_CONTENT ) ;
Intent i = new Intent ( Intent . ACTION_GET_CONTENT ) ;
i . addCategory ( Intent . CATEGORY_OPENABLE ) ;
i . addCategory ( Intent . CATEGORY_OPENABLE ) ;
i . setType ( "image/*" ) ;
i . setType ( "image/*" ) ;
BarebonesActivity . this . startActivityForResult (
startActivityForResult ( Intent . createChooser ( i , "File Chooser" ) , 1 ) ;
Intent . createChooser ( i , "File Browser" ) , 1 ) ;
}
}
public void openFileChooser ( ValueCallback < Uri > uploadMsg ,
public void openFileChooser ( ValueCallback < Uri > uploadMsg ,
@ -322,19 +320,14 @@ public class BarebonesActivity extends Activity {
mUploadMessage = uploadMsg ;
mUploadMessage = uploadMsg ;
Intent i = new Intent ( Intent . ACTION_GET_CONTENT ) ;
Intent i = new Intent ( Intent . ACTION_GET_CONTENT ) ;
i . addCategory ( Intent . CATEGORY_OPENABLE ) ;
i . addCategory ( Intent . CATEGORY_OPENABLE ) ;
i . setType ( "image /*" ) ;
i . setType ( "* /*" ) ;
BarebonesActivity . this . startActivityForResult (
startActivityForResult (
Intent . createChooser ( i , "File Browser" ) , 1 ) ;
Intent . createChooser ( i , "File Browser" ) , 1 ) ;
}
}
public void openFileChooser ( ValueCallback < Uri > uploadMsg ,
public void openFileChooser ( ValueCallback < Uri > uploadMsg ,
String acceptType , String capture ) {
String acceptType , String capture ) {
mUploadMessage = uploadMsg ;
openFileChooser ( uploadMsg ) ;
Intent i = new Intent ( Intent . ACTION_GET_CONTENT ) ;
i . addCategory ( Intent . CATEGORY_OPENABLE ) ;
i . setType ( "image/*" ) ;
BarebonesActivity . this . startActivityForResult (
Intent . createChooser ( i , "File Browser" ) , 1 ) ;
}
}
}
}
@ -409,7 +402,10 @@ public class BarebonesActivity extends Activity {
startActivity ( new Intent ( Intent . ACTION_DIAL , Uri . parse ( url ) ) ) ;
startActivity ( new Intent ( Intent . ACTION_DIAL , Uri . parse ( url ) ) ) ;
return true ;
return true ;
} else if ( url . contains ( "mailto:" ) ) {
} else if ( url . contains ( "mailto:" ) ) {
startActivity ( new Intent ( Intent . ACTION_SEND , Uri . parse ( url ) ) ) ;
MailTo mailTo = MailTo . parse ( url ) ;
Intent i = Utils . newEmailIntent ( BarebonesActivity . this , mailTo . getTo ( ) , mailTo . getSubject ( ) , mailTo . getBody ( ) , mailTo . getCc ( ) ) ;
startActivity ( i ) ;
view . reload ( ) ;
return true ;
return true ;
}
}
return false ;
return false ;
@ -2139,8 +2135,7 @@ public class BarebonesActivity extends Activity {
if ( showFullScreen & & ! uBar . isShown ( ) ) {
if ( showFullScreen & & ! uBar . isShown ( ) ) {
uBar . startAnimation ( slideDown ) ;
uBar . startAnimation ( slideDown ) ;
}
}
if ( main [ pageId ] ! = null & & main [ pageId ] . canGoBack ( ) ) {
if ( main [ pageId ] . isShown ( ) & & main [ pageId ] . canGoBack ( ) ) {
main [ pageId ] . stopLoading ( ) ;
main [ pageId ] . goBack ( ) ;
main [ pageId ] . goBack ( ) ;
} else {
} else {
deleteTab ( pageId ) ;
deleteTab ( pageId ) ;