I/ActivityManager( 863): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.android.browser/.BrowserActivity } I/ActivityManager( 863): Start proc com.android.browser for activity com.android.browser/.BrowserActivity: pid=1341 uid=10014 gids={3003, 1015} I/ActivityThread( 1341): Publishing provider browser: com.android.browser.BrowserProvider I/ActivityManager( 863): Displayed activity com.android.browser/.BrowserActivity: 1525 ms (total 1525 ms) D/dalvikvm( 1341): GC_FOR_MALLOC freed 3858 objects / 224504 bytes in 122ms W/dalvikvm( 1341): JNI WARNING: JNI method called with exception raised W/dalvikvm( 1341): in Landroid/webkit/JWebCoreJavaBridge;.sharedTimerFired ()V (NewLocalRef) W/dalvikvm( 1341): Pending exception is: I/dalvikvm( 1341): Ljava/lang/IllegalArgumentException;: provider=gps I/dalvikvm( 1341): at android.os.Parcel.readException(Parcel.java:1251) I/dalvikvm( 1341): at android.os.Parcel.readException(Parcel.java:1235) I/dalvikvm( 1341): at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:516) I/dalvikvm( 1341): at android.location.LocationManager._requestLocationUpdates(LocationManager.java:711) I/dalvikvm( 1341): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:630) I/dalvikvm( 1341): at android.webkit.GeolocationService.registerForLocationUpdates(GeolocationService.java:162) I/dalvikvm( 1341): at android.webkit.GeolocationService.start(GeolocationService.java:66) I/dalvikvm( 1341): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method) I/dalvikvm( 1341): at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:88) I/dalvikvm( 1341): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:105) I/dalvikvm( 1341): at android.os.Handler.dispatchMessage(Handler.java:99) I/dalvikvm( 1341): at android.os.Looper.loop(Looper.java:123) I/dalvikvm( 1341): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:621) I/dalvikvm( 1341): at java.lang.Thread.run(Thread.java:1096) I/dalvikvm( 1341): "WebViewCoreThread" prio=5 tid=11 NATIVE I/dalvikvm( 1341): | group="main" sCount=0 dsCount=0 s=N obj=0x4402d3e8 self=0x254b78 I/dalvikvm( 1341): | sysTid=1354 nice=0 sched=0/0 cgrp=unknown handle=2444472 I/dalvikvm( 1341): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method) I/dalvikvm( 1341): at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:88) I/dalvikvm( 1341): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:105) I/dalvikvm( 1341): at android.os.Handler.dispatchMessage(Handler.java:99) I/dalvikvm( 1341): at android.os.Looper.loop(Looper.java:123) I/dalvikvm( 1341): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:621) I/dalvikvm( 1341): at java.lang.Thread.run(Thread.java:1096) I/dalvikvm( 1341):
這現象非常奇怪,一直以為是我porting wifi 出了問題...
一路trace過去,終於發現原來是因為Google的webkit在開啟預設頁面時,都會去啟動GPS來尋找location相關資料,而且還沒有error handle的處理方式...
而啟動的service叫做Geolocationservice,一開始在external/webkit/Webcore把ENABLE_GEOLOCATION的定義拿掉,但還是一樣不行....
在想不到更好的解決方式之下...只好直接從Java裡把gps register拿掉,可以暫時避掉這問題。
From 30fe105d47ec283b46865d4c94c17c065048bd3e Mon Sep 17 00:00:00 2001
From: Dicky Chiang
Date: Fri, 11 Nov 2011 04:17:12 +0800
Subject: [PATCH 20/20] fix browser crashes out of the webkit
---
.../java/android/webkit/GeolocationService.java | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/frameworks/base/core/java/android/webkit/GeolocationService.java b/frameworks/base/core/java/android/webkit/ GeolocationService.java
index 24306f4..348715f 100755
--- a/frameworks/base/core/java/android/webkit/GeolocationService.java
+++ b/frameworks/base/core/java/android/webkit/GeolocationService.java
@@ -158,10 +158,14 @@ final class GeolocationService implements LocationListener {
try {
mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this);
mIsNetworkProviderAvailable = true;
+
+ // Can be register it if gps device on platform, otherwise to disable it.
+ /*
if (mIsGpsEnabled) {
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
mIsGpsProviderAvailable = true;
}
+ */
} catch(SecurityException e) {
Log.e(TAG, "Caught security exception registering for location updates from system. " +
"This should only happen in DumpRenderTree.");
--
1.7.4.1