mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 20:33:07 +08:00
HTC Fix
This commit is contained in:
parent
0b9ed0c7c7
commit
3e25953d33
@ -42,6 +42,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.webkit.ConsoleMessage;
|
||||||
import android.webkit.GeolocationPermissions.Callback;
|
import android.webkit.GeolocationPermissions.Callback;
|
||||||
import android.webkit.JsPromptResult;
|
import android.webkit.JsPromptResult;
|
||||||
import android.webkit.JsResult;
|
import android.webkit.JsResult;
|
||||||
@ -278,6 +279,9 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||||
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
|
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
|
||||||
|
|
||||||
|
//Set the nav dump for HTC
|
||||||
|
settings.setNavDump(true);
|
||||||
|
|
||||||
// Enable database
|
// Enable database
|
||||||
settings.setDatabaseEnabled(true);
|
settings.setDatabaseEnabled(true);
|
||||||
String databasePath = this.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
|
String databasePath = this.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
|
||||||
@ -1102,10 +1106,16 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onConsoleMessage(String message, int lineNumber, String sourceID)
|
public void onConsoleMessage(String message, int lineNumber, String sourceID)
|
||||||
{
|
{
|
||||||
// This is a kludgy hack!!!!
|
|
||||||
LOG.d(TAG, "%s: Line %d : %s", sourceID, lineNumber, message);
|
LOG.d(TAG, "%s: Line %d : %s", sourceID, lineNumber, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onConsoleMessage(ConsoleMessage consoleMessage)
|
||||||
|
{
|
||||||
|
LOG.d(TAG, consoleMessage.message());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
/**
|
/**
|
||||||
* Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin.
|
* Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin.
|
||||||
|
Loading…
Reference in New Issue
Block a user