import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
+import android.os.BatteryStats;
import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
import android.os.Process;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import com.android.bluetooth.hid.HidService;
import com.android.bluetooth.hfp.HeadsetService;
import com.android.bluetooth.sdp.SdpManager;
+import com.android.internal.app.IBatteryStats;
import com.android.internal.R;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.RemoteDevices.DeviceProperties;
private AlarmManager mAlarmManager;
private PendingIntent mPendingAlarm;
+ private IBatteryStats mBatteryStats;
private PowerManager mPowerManager;
private PowerManager.WakeLock mWakeLock;
private String mWakeLockName;
getAdapterPropertyNative(AbstractionLayer.BT_PROPERTY_BDNAME);
mAlarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
+ mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService(
+ BatteryStats.SERVICE_NAME));
mSdpManager = SdpManager.init(this);
registerReceiver(mAlarmBroadcastReceiver, new IntentFilter(ACTION_ALARM_WAKEUP));
mJniCallbacks.init(mBondStateMachine,mRemoteDevices);
+ try {
+ mBatteryStats.noteResetBleScan();
+ } catch (RemoteException e) {
+ // Ignore.
+ }
+
//FIXME: Set static instance here???
setAdapterService(this);