Hi Guys,

Due to some issue, I am getting some exceptions which force closes
BluetoothSettings screen.
In the log dump I could not find any exceptions but the following
stack trace is present there:




DALVIK THREADS:
"main" prio=5 tid=1 NATIVE
  | group="main" sCount=1 dsCount=0 s=N obj=0x400208b8 self=0xcde0
  | sysTid=563 nice=0 sched=0/0 cgrp=unknown handle=-1345026000
  at android.os.BinderProxy.transact(Native Method)
  at android.bluetooth.IBluetooth$Stub
$Proxy.getBondState(IBluetooth.java:789)
  at
android.bluetooth.BluetoothDevice.getBondState(BluetoothDevice.java:
541)
  at
com.android.settings.bluetooth.CachedBluetoothDevice.getBondState(CachedBluetoothDevice.java:
770)
  at
com.android.settings.bluetooth.CachedBluetoothDevice.compareTo(CachedBluetoothDevice.java:
1357)
  at
com.android.settings.bluetooth.BluetoothDevicePreference.compareTo(BluetoothDevicePreference.java:
180)
  at
com.android.settings.bluetooth.BluetoothDevicePreference.compareTo(BluetoothDevicePreference.java:
40)
  at java.util.Collections.binarySearch(Collections.java:1513)
  at
android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:
143)
  at
com.android.settings.bluetooth.BluetoothSettings.createDevicePreference(BluetoothSettings.java:
758)
  at
com.android.settings.bluetooth.BluetoothSettings.onDeviceAdded(BluetoothSettings.java:
667)
  at
com.android.settings.bluetooth.BluetoothSettings.addDevices(BluetoothSettings.java:
533)
  at
com.android.settings.bluetooth.BluetoothSettings.onResume(BluetoothSettings.java:
458)
  at
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:
1149)
  at android.app.Activity.performResume(Activity.java:3823)
  at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
3124)
  at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:
3149)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
2064)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4633)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:858)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  at dalvik.system.NativeStart.main(Native Method)



I have not any idea about Binder concepts. So I could not find out
exact reason for the issue.
Since I need to resolve this issue urgently, I have delved more and
find out, the exception is in this method:

frameworks\base\core\java\android\bluetooth\BluetoothDevice.java -

public int getBondState() {
        try {
            return sService.getBondState(mAddress);
        } catch (RemoteException e) {Log.e(TAG, "", e);}
        return BOND_NONE;
  }

Here this method catches the remote exception, but in catch statement
just prints the exception, but does not return anything.
I understand if I return something from catch statement then this
problem will be solved.

But the point is what to return at that statement?
I understand this class is used at many places, and returning anything
will impact other aspects also.

So please suggest me what should I return from here.
If you have any other solution for this problem, please suggest that
also.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to