Merge change I14fb81af into eclair
* changes: Fix for 2221718: Hang in BatteryStatsService.noteBluetoothOn
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user