fat-tire / android_device_bn_encore

59 stars 20 forks source link

Purchasing an app = force close #27

Closed dalingrin closed 13 years ago

dalingrin commented 13 years ago

Log: http://pastebin.com/wTiv1ik8

Search for an app, tap purchase...force close. Possibly due to lack of ril.

cvpcs commented 13 years ago

This is related to ConnectivityManager returning a "null" NetworkInfo object when Vending is checking for radio. Vending appears to check for radio to determine if it can do a CARRIER_BILLING type.

This has been determined by baksmali-ing Vending and checking what it's doing

cvpcs commented 13 years ago

https://github.com/CyanogenMod/android_frameworks_base/blob/gingerbread/services/java/com/android/server/ConnectivityService.java is where the code is being called from so far as i can tell. Specifically line 517 getNetworkInfo is being called with parameter 0, which is ConnectivityManager.TYPE_MOBILE, hence it should be passing isNetworkTypeValid() and our null is coming from line 526.

This is as far as i've gotten

cvpcs commented 13 years ago

This seems to be why we don't have a TYPE_MOBILE connection defined: https://github.com/CyanogenMod/android_device_bn_encore/blob/gingerbread/overlay/frameworks/base/core/res/res/values/config.xml, line 95. Uncommenting that "MAY" cause a trickle-down effect which fixes this issue. I don't see any harm in specifying the mobile connection. It will obviously never connect, but the solution would be to provide a stub that does the same anyway

nemith commented 13 years ago

Fixed with https://github.com/CyanogenMod/android_device_bn_encore/commit/82f6066e29d6817c4f8bd8c7e60986252014de0f