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

Commit 4cd57119 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [12425228, 12425136, 12425209, 12425138] into rvc-release

Change-Id: Icc7e1e436e5c03cc5d14c9a022998549ecce57b6
parents 71122596 6074d9ec
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -680,8 +680,7 @@ static void classInitNative(JNIEnv* env, jclass clazz) {
}

static bool initNative(JNIEnv* env, jobject obj, jboolean isGuest,
                       jboolean isNiapMode, int configCompareResult,
                       jboolean isAtvDevice) {
                       jboolean isNiapMode, int configCompareResult) {
  ALOGV("%s", __func__);

  android_bluetooth_UidTraffic.clazz =
@@ -697,8 +696,7 @@ static bool initNative(JNIEnv* env, jobject obj, jboolean isGuest,

  int ret = sBluetoothInterface->init(
      &sBluetoothCallbacks, isGuest == JNI_TRUE ? 1 : 0,
      isNiapMode == JNI_TRUE ? 1 : 0, configCompareResult,
      isAtvDevice == JNI_TRUE ? 1 : 0);
      isNiapMode == JNI_TRUE ? 1 : 0, configCompareResult);
  if (ret != BT_STATUS_SUCCESS) {
    ALOGE("Error while setting the callbacks: %d\n", ret);
    sBluetoothInterface = NULL;
@@ -1311,7 +1309,7 @@ static int getMetricIdNative(JNIEnv* env, jobject obj, jbyteArray address) {
static JNINativeMethod sMethods[] = {
    /* name, signature, funcPtr */
    {"classInitNative", "()V", (void*)classInitNative},
    {"initNative", "(ZZIZ)Z", (void*)initNative},
    {"initNative", "(ZZI)Z", (void*)initNative},
    {"cleanupNative", "()V", (void*)cleanupNative},
    {"enableNative", "()Z", (void*)enableNative},
    {"disableNative", "()Z", (void*)disableNative},
+2 −6
Original line number Diff line number Diff line
@@ -441,11 +441,7 @@ public class AdapterService extends Service {
        mBluetoothKeystoreService = new BluetoothKeystoreService(isNiapMode());
        mBluetoothKeystoreService.start();
        int configCompareResult = mBluetoothKeystoreService.getCompareResult();

        // Android TV doesn't show consent dialogs for just works and encryption only le pairing
        boolean isAtvDevice = getApplicationContext().getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_LEANBACK_ONLY);
        initNative(isGuest(), isNiapMode(), configCompareResult, isAtvDevice);
        initNative(isGuest(), isNiapMode(), configCompareResult);
        mNativeAvailable = true;
        mCallbacks = new RemoteCallbackList<IBluetoothCallback>();
        mAppOps = getSystemService(AppOpsManager.class);
@@ -3084,7 +3080,7 @@ public class AdapterService extends Service {
    static native void classInitNative();

    native boolean initNative(boolean startRestricted, boolean isNiapMode,
            int configCompareResult, boolean isAtvDevice);
            int configCompareResult);

    native void cleanupNative();

+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public class AdapterServiceTest {
        Assert.assertNotNull(Looper.myLooper());
        AdapterService adapterService = new AdapterService();
        adapterService.initNative(false /* is_restricted */, false /* is_niap_mode */,
                0 /* config_compare_result */, false);
                0 /* config_compare_result */);
        adapterService.cleanupNative();
        HashMap<String, HashMap<String, String>> adapterConfig = TestUtils.readAdapterConfig();
        Assert.assertNotNull(adapterConfig);
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ public class ProfileServiceTest {
        mProfiles = Config.getSupportedProfiles();

        mMockAdapterService.initNative(false /* is_restricted */, false /* is_niap_mode */,
                0 /* config_compare_result */, false);
                0 /* config_compare_result */);

        TestUtils.setAdapterService(mMockAdapterService);