mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Setting to turn off Online Storage
This commit is contained in:
parent
cb192056f8
commit
11beb37c50
@ -143,6 +143,11 @@ public class Config {
|
|||||||
boolean value = xml.getAttributeValue(null, "value").equals("true");
|
boolean value = xml.getAttributeValue(null, "value").equals("true");
|
||||||
action.getIntent().putExtra(name, value);
|
action.getIntent().putExtra(name, value);
|
||||||
}
|
}
|
||||||
|
else if(name.equals("InAppBrowserStorageEnabled"))
|
||||||
|
{
|
||||||
|
boolean value = xml.getAttributeValue(null, "value").equals("true");
|
||||||
|
action.getIntent().putExtra(name, value);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String value = xml.getAttributeValue(null, "value");
|
String value = xml.getAttributeValue(null, "value");
|
||||||
|
@ -35,7 +35,9 @@ import android.content.Context;
|
|||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
@ -428,10 +430,18 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
*/
|
*/
|
||||||
// @TODO: replace with settings.setPluginState(android.webkit.WebSettings.PluginState.ON)
|
// @TODO: replace with settings.setPluginState(android.webkit.WebSettings.PluginState.ON)
|
||||||
settings.setPluginsEnabled(true);
|
settings.setPluginsEnabled(true);
|
||||||
settings.setDatabaseEnabled(true);
|
|
||||||
String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath();
|
//Toggle whether this is enabled or not!
|
||||||
settings.setDatabasePath(databasePath);
|
Bundle appSettings = cordova.getActivity().getIntent().getExtras();
|
||||||
|
boolean enableDatabase = appSettings.getBoolean("InAppBrowserStorageEnabled", true);
|
||||||
|
if(enableDatabase)
|
||||||
|
{
|
||||||
|
String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath();
|
||||||
|
settings.setDatabasePath(databasePath);
|
||||||
|
settings.setDatabaseEnabled(true);
|
||||||
|
}
|
||||||
settings.setDomStorageEnabled(true);
|
settings.setDomStorageEnabled(true);
|
||||||
|
|
||||||
inAppWebView.loadUrl(url);
|
inAppWebView.loadUrl(url);
|
||||||
inAppWebView.setId(6);
|
inAppWebView.setId(6);
|
||||||
inAppWebView.getSettings().setLoadWithOverviewMode(true);
|
inAppWebView.getSettings().setLoadWithOverviewMode(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user