Merge pull request #278 from infil00p/master

Modifying build.xml to use custom versions, adding ant files, and fixing HTC Logcat
This commit is contained in:
Joe Bowser 2011-10-21 11:00:37 -07:00
commit 75f3651376
2 changed files with 16 additions and 7 deletions

View File

@ -28,7 +28,6 @@
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
@ -49,13 +48,13 @@
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
unless="sdk.dir"
/>
<!-- version-tag: custom -->
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<!--
@ -89,8 +88,7 @@
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
<import file="${sdk.dir}/tools/ant/build.xml" />
<target name="check-javascript" depends="build-javascript">
@ -141,7 +139,8 @@
<fileset file="assets/www/index.html" />
<!-- <fileset file="../bin/templates/project/assets/www/index.html" /> -->
</replaceregexp>
<replaceregexp match="phonegapVersion = [\u0022].*[\u0022];" replace="phonegapVersion = ${dblQuote}${version}${dblQuote};" byline="true">
<!-- This is sketchy, but it works, ${dblQuote} does not -->
<replaceregexp match="phonegapVersion = [\u0022].*[\u0022];" replace='phonegapVersion = ${dblQuote}${version}${dblQuote};' byline="true">
<fileset file="src/com/phonegap/Device.java" />
</replaceregexp>

View File

@ -42,6 +42,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.ConsoleMessage;
import android.webkit.GeolocationPermissions.Callback;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
@ -277,6 +278,9 @@ public class DroidGap extends PhonegapActivity {
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
//Set the nav dump for HTC
settings.setNavDump(true);
// Enable database
settings.setDatabaseEnabled(true);
@ -1102,9 +1106,15 @@ public class DroidGap extends PhonegapActivity {
@Override
public void onConsoleMessage(String message, int lineNumber, String sourceID)
{
// This is a kludgy hack!!!!
LOG.d(TAG, "%s: Line %d : %s", sourceID, lineNumber, message);
}
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage)
{
LOG.d(TAG, consoleMessage.message());
return true;
}
@Override
/**