2011-06-30 26 views
5

Tôi gặp một vấn đề mà là tôi đăng ký để cập nhật vị trí sử dụngTại sao đăng ký cập nhật Vị trí kích hoạt danh bạ để được làm mới?

mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME_MS, 1, mSingleShotGpsListener); 

Tôi có thể thấy rằng các điểm tiếp xúc DB được cập nhật, mà trên mong muốn của tôi Z dường như mất một thời gian và sau đó được theo sau bởi một tải của Hành động GC (xem nhật ký bên dưới). Khi tôi hiển thị một số hình ảnh động khá sớm sau khi kiểm tra vị trí được kích hoạt, kết quả này là hiệu suất phụ tối ưu. Bất kỳ ý tưởng tại sao điều này xảy ra/những gì tôi có thể làm để ngăn chặn nó?

Tôi đã thử nghiệm trên Nexus S và không thấy vấn đề hành vi/hiệu suất/kiểm tra liên hệ này trong nhật ký.

Cảm ơn bạn đã trợ giúp!

06-30 12:33:18.921: DEBUG/GTalkService(14241): [RosterMgr] roster not modified 
06-30 12:33:19.041: DEBUG/GTalkService(14241): [OtrMgr] OTR not modified 
06-30 12:33:19.081: DEBUG/ContactMessageStore(1501): createTempContactTable() <<< 
06-30 12:33:19.101: DEBUG/dalvikvm(17700): GC_FOR_MALLOC freed 1116 objects/68784 bytes in 106ms 
06-30 12:33:19.201: DEBUG/ContactMessageStore(1501): Begin Establish ContactMap 
06-30 12:33:19.431: INFO/Resources(17688): Loaded time zone names for en_US in 1438ms. 
06-30 12:33:19.531: INFO/global(17688): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 
06-30 12:33:19.541: INFO/Resources(17700): Loaded time zone names for en_US in 1528ms. 
06-30 12:33:19.561: INFO/Resources(17700): Loaded time zone names for en_US in 1586ms. 
06-30 12:33:19.571: INFO/global(17700): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 
06-30 12:33:19.581: INFO/global(17700): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 
06-30 12:33:19.901: INFO/global(17700): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 
06-30 12:33:20.011: DEBUG/ContactMessageStore(1501): cursor count>881 
06-30 12:33:20.161: DEBUG/ContactMessageStore(1501): query people time: 959 
06-30 12:33:20.181: DEBUG/ContactMessageStore(1501): End Establish ContactMap 
06-30 12:33:20.201: DEBUG/ContactNameCache(1671): Contactname cache Process invalid 
06-30 12:33:20.211: DEBUG/ContactNameCache(1671): MEPHOTO QUERY 
06-30 12:33:20.291: DEBUG/ContactMessageStore(1501): insert contacts2 cost time >>>85 
06-30 12:33:20.291: DEBUG/ContactMessageStore(1501): replaceContactTable() >>> 
06-30 12:33:20.291: DEBUG/ContactMessageStore(1501): refreshContactsView() >>> 
06-30 12:33:20.291: DEBUG/ContactMessageStore(1501): refreshContactsView() <<< 
06-30 12:33:20.321: DEBUG/ContactMessageStore(1501): refreshContactsView time: 25 
06-30 12:33:20.321: DEBUG/ContactMessageStore(1501): replaceContactTable() <<< 
06-30 12:33:20.321: DEBUG/ContactMessageStore(1501): notify MmsSms 
06-30 12:33:20.321: DEBUG/ContactMessageStore(1501): MSG_UPDATE_CONTACTS_TABLE << 
06-30 12:33:20.401: DEBUG/ContactNameCache(1671): NAMECACHE MULTIPLE QUERY 
06-30 12:33:20.401: INFO/ContactNameCache(1671): cache invalidate. 
06-30 12:33:20.861: DEBUG/dalvikvm(1301): GC_EXPLICIT freed 32831 objects/1957472 bytes in 433ms 
06-30 12:33:22.571: DEBUG/dalvikvm(1671): GC_EXPLICIT freed 5100 objects/233264 bytes in 160ms 
06-30 12:33:23.491: DEBUG/dalvikvm(1506): GC_FOR_MALLOC freed 6046 objects/287856 bytes in 198ms 
06-30 12:33:23.571: DEBUG/dalvikvm(1501): GC_EXPLICIT freed 13021 objects/575784 bytes in 247ms 
06-30 12:33:26.611: DEBUG/dalvikvm(1671): GC_EXPLICIT freed 4605 objects/211320 bytes in 225ms 
06-30 12:33:28.131: DEBUG/dalvikvm(1501): GC_EXPLICIT freed 2110 objects/82232 bytes in 54ms 
06-30 12:33:28.451: DEBUG/ContactNameCache(1671): mCachedPhoto size: 68 
06-30 12:33:28.491: DEBUG/ContactNameCache(1671): reqeust terminate> Thread[Thread-328,1,main] 
06-30 12:33:28.501: DEBUG/ContactNameCache(1671): updateThreadtableNameField> Thread[Thread-329,1,main] 
06-30 12:33:28.981: DEBUG/ContactNameCache(1671): thread has terminated> Thread[Thread-329,1,main] 
06-30 12:33:29.651: DEBUG/PowerManagerService(1301): New lightsensor value:160, lcdValue:143 
06-30 12:33:29.651: DEBUG/PowerManagerService(1301): lightSensorChangedLocked, buttonValue >= 0, mPowerState = 3 
06-30 12:33:30.961: DEBUG/ContactMessageStore(1501): MSG_UPDATE_CONTACTS_TABLE >> 
06-30 12:33:30.961: DEBUG/ContactMessageStore(1501): query thread cost time >>>0 
06-30 12:33:30.961: DEBUG/ContactMessageStore(1501): createTempContactTable() >>> 
06-30 12:33:31.151: DEBUG/ContactMessageStore(1501): createTempContactTable() <<< 
06-30 12:33:31.201: DEBUG/ContactMessageStore(1501): Begin Establish ContactMap 
06-30 12:33:31.381: DEBUG/ContactMessageStore(1501): cursor count>881 
06-30 12:33:31.461: DEBUG/ContactMessageStore(1501): query people time: 255 
06-30 12:33:31.591: DEBUG/ContactMessageStore(1501): End Establish ContactMap 
06-30 12:33:31.601: DEBUG/ContactNameCache(1671): Contactname cache Process invalid 
06-30 12:33:31.601: DEBUG/ContactNameCache(1671): MEPHOTO QUERY 
06-30 12:33:31.731: DEBUG/ContactMessageStore(1501): insert contacts2 cost time >>>60 
06-30 12:33:31.731: DEBUG/ContactMessageStore(1501): replaceContactTable() >>> 
06-30 12:33:31.731: DEBUG/ContactMessageStore(1501): refreshContactsView() >>> 
06-30 12:33:31.791: DEBUG/ContactMessageStore(1501): refreshContactsView() <<< 
06-30 12:33:31.831: DEBUG/ContactMessageStore(1501): refreshContactsView time: 99 
06-30 12:33:31.831: DEBUG/ContactMessageStore(1501): replaceContactTable() <<< 
06-30 12:33:31.831: DEBUG/ContactMessageStore(1501): notify MmsSms 
06-30 12:33:31.831: DEBUG/ContactMessageStore(1501): MSG_UPDATE_CONTACTS_TABLE << 
06-30 12:33:31.891: DEBUG/ContactNameCache(1671): NAMECACHE MULTIPLE QUERY 
06-30 12:33:31.891: INFO/ContactNameCache(1671): cache invalidate. 
06-30 12:33:32.431: DEBUG/dalvikvm(1301): GC_EXPLICIT freed 12212 objects/539888 bytes in 520ms 
06-30 12:33:32.731: DEBUG/dalvikvm(30218): GC_EXPLICIT freed 444 objects/22832 bytes in 271ms 

Trả lời

2

Đăng ký cập nhật khiến GPS xuất hiện và báo cáo vị trí. Nhiều khả năng trên thiết bị đó có một máy thu vị trí thụ động đã đăng ký vì một số lý do mà khi nhận được bản cập nhật do bạn khiến vị trí GPS được tìm nạp và báo cáo đang thực hiện một số thao tác trên cơ sở dữ liệu danh bạ.

Cho rằng bạn không thấy hành vi này trên thiết bị Nexus, nó không phải là một phần của Android chứng khoán. Vì vậy, đó là một số tùy biến mà nhà sản xuất đã thực hiện cho thiết bị hoặc một số ứng dụng khác được cài đặt trên thiết bị đó.

Bạn có thể xem những ứng dụng nào được đăng ký cho các bản cập nhật vị trí thụ động với "vị trí vùng chứa adb shell dumpsys".

Các vấn đề liên quan