Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb2dcfb6 authored by SungJun Park's avatar SungJun Park Committed by Gerrit - the friendly Code Review server
Browse files

Fix to avoid the invalid state of profiles

Due to STOP_TIMEOUT followed by ANR crash, we need to
kill the process similar to DISABLE_TIMEOUT case.

Change-Id: I89cc46481610457142b479acb68de224b1eecda3
parent 6d463247
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -341,6 +341,8 @@ final class AdapterState extends StateMachine {
                    mPendingCommandState.setTurningOff(false);
                    transitionTo(mOffState);
                    notifyAdapterStateChange(BluetoothAdapter.STATE_OFF);
                    errorLog("STOP_TIMEOUT:Killing the process to force a restart as part cleanup");
                    android.os.Process.killProcess(android.os.Process.myPid());
                    break;
                case DISABLE_TIMEOUT:
                    if (DBG) Log.d(TAG,"CURRENT_STATE=PENDING, MESSAGE = DISABLE_TIMEOUT, isTurningOn=" + isTurningOn + ", isTurningOff=" + isTurningOff);