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

Commit 4ab2c777 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I14fb81af into eclair

* changes:
  Fix for 2221718: Hang in BatteryStatsService.noteBluetoothOn
parents 818a9cf8 14fb81af
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.am;

import android.bluetooth.BluetoothHeadset;
import android.content.Context;
import android.os.Binder;
import android.os.IBinder;
@@ -23,7 +24,6 @@ import android.os.Parcel;
import android.os.Process;
import android.os.ServiceManager;
import android.telephony.SignalStrength;
import android.telephony.TelephonyManager;
import android.util.Log;

import com.android.internal.app.IBatteryStats;
@@ -263,9 +263,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub {

    public void noteBluetoothOn() {
        enforceCallingPermission();
        BluetoothHeadset headset = new BluetoothHeadset(mContext, null);
        synchronized (mStats) {
            mStats.noteBluetoothOnLocked();
            mStats.setBtHeadset(new android.bluetooth.BluetoothHeadset(mContext, null));
            mStats.setBtHeadset(headset);
        }
    }