GAP: Fix compilation for security fixes

Fix compilation for security fixes

Change-Id: Ibface72c42f73959d1712522a294e5f66fa0f75f
CRs-Fixed: 2585102
diff --git a/src/com/android/bluetooth/btservice/AdapterProperties.java b/src/com/android/bluetooth/btservice/AdapterProperties.java
index 22316a4..b9e52e5 100644
--- a/src/com/android/bluetooth/btservice/AdapterProperties.java
+++ b/src/com/android/bluetooth/btservice/AdapterProperties.java
@@ -41,10 +41,10 @@
 import android.os.ParcelUuid;
 import android.os.SystemProperties;
 import android.os.UserHandle;
-import android.support.annotation.VisibleForTesting;
 import android.util.Log;
 import android.util.Pair;
 import android.util.StatsLog;
+import androidx.annotation.VisibleForTesting;
 
 import com.android.bluetooth.Utils;
 import com.android.bluetooth.btservice.RemoteDevices.DeviceProperties;
diff --git a/src/com/android/bluetooth/hid/HidHostService.java b/src/com/android/bluetooth/hid/HidHostService.java
index a747cff..81046a2 100644
--- a/src/com/android/bluetooth/hid/HidHostService.java
+++ b/src/com/android/bluetooth/hid/HidHostService.java
@@ -25,8 +25,8 @@
 import android.os.Handler;
 import android.os.Message;
 import android.os.UserHandle;
-import android.support.annotation.VisibleForTesting;
 import android.util.Log;
+import androidx.annotation.VisibleForTesting;
 
 import com.android.bluetooth.BluetoothMetricsProto;
 import com.android.bluetooth.Utils;
diff --git a/tests/unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java b/tests/unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java
index 29585ff..7666f3a 100644
--- a/tests/unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java
+++ b/tests/unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java
@@ -22,10 +22,11 @@
 import android.content.Intent;
 import android.os.HandlerThread;
 import android.os.ParcelUuid;
+import android.os.PowerManager;
 import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.bluetooth.TestUtils;
 
@@ -75,7 +76,8 @@
                 mTargetContext.getResources());
         mAdapterProperties = new AdapterProperties(mAdapterService);
         mAdapterProperties.init(mRemoteDevices);
-        mBondStateMachine = BondStateMachine.make(mAdapterService, mAdapterProperties,
+        PowerManager powerManager = (PowerManager) mTargetContext.getSystemService(Context.POWER_SERVICE);
+        mBondStateMachine = BondStateMachine.make(powerManager, mAdapterService, mAdapterProperties,
                 mRemoteDevices);
     }