Very minor changes to the core classes

This commit is contained in:
Joe Bowser 2009-11-02 10:06:23 -08:00
parent 11794f58aa
commit 24d7521f8c
2 changed files with 8 additions and 5 deletions

View File

@ -61,10 +61,11 @@ public class DroidGap extends Activity {
/* This changes the setWebChromeClient to log alerts to LogCat! Important for Javascript Debugging */ /* This changes the setWebChromeClient to log alerts to LogCat! Important for Javascript Debugging */
appView.setWebChromeClient(new GapClient(this)); appView.setWebChromeClient(new GapClient(this));
appView.getSettings().setJavaScriptEnabled(true); appView.getSettings().setJavaScriptEnabled(true);
appView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); appView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
/* Bind the appView object to the gap class methods */ /* Bind the appView object to the gap class methods */
bindBrowser(appView); bindBrowser(appView);
@ -131,6 +132,8 @@ public class DroidGap extends Activity {
result.confirm(); result.confirm();
return true; return true;
} }
} }

View File

@ -26,6 +26,7 @@ import java.util.TimeZone;
import android.content.Context; import android.content.Context;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.hardware.SensorManager;
import android.net.Uri; import android.net.Uri;
import android.os.Vibrator; import android.os.Vibrator;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
@ -83,8 +84,7 @@ public class PhoneGap{
} }
public String getUuid() public String getUuid()
{ {
TelephonyManager operator = (TelephonyManager) mCtx.getSystemService(Context.TELEPHONY_SERVICE); TelephonyManager operator = (TelephonyManager) mCtx.getSystemService(Context.TELEPHONY_SERVICE);
String uuid = operator.getDeviceId(); String uuid = operator.getDeviceId();
return uuid; return uuid;