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

Commit 5fcd08d5 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge changes Ie70cdfe8,I08b1e381,Id2d1f2d2,Ib057df8e,I606c3343, ...

* changes:
  Kotlinify the BluetoothService use of getter
  Migrate BluetoothService to kotlin
  Move "java" to "src" for incoming kotlin file
  Extract Change-ids from BMS
  Add apex rules to default
  Typo in clang-format
parents a22a30a0 e7f5ed02
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,4 +10,4 @@ ConstructorInitializerIndentWidth: 6
ContinuationIndentWidth: 8
IndentWidth: 4
PenaltyBreakBeforeFirstCallParameter: 100000
SpacesBeforeTrailingComments: 1#
SpacesBeforeTrailingComments: 1
+10 −17
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@ filegroup {
    name: "services.bluetooth-sources",
    srcs: [
        ":statslog-bluetooth-java-gen",
        "java/**/*.java",
        "src/**/*.java",
        "src/**/*.kt",
    ],
    visibility: [
        "//frameworks/base/services",
@@ -39,6 +40,13 @@ java_defaults {
            enabled: false,
        },
    },
    apex_available: [
        "com.android.btservices",
    ],
    min_sdk_version: "Tiramisu",
    defaults_visibility: [
        ":__subpackages__",
    ],
}

// pre-jarjar version of service-bluetooth that builds against pre-jarjar version of framework-bluetooth
@@ -56,11 +64,11 @@ java_library {
        strict_updatability_linting: true,
    },
    libs: [
        "app-compat-annotations",
        "framework-annotations-lib",
        "framework-bluetooth-pre-jarjar",
        "framework-configinfrastructure",
        "framework-statsd.stubs.module_lib",
        "service-bluetooth.change-ids",
    ],

    static_libs: [
@@ -71,11 +79,6 @@ java_library {
        "bluetooth-proto-enums-java-gen",
        "modules-utils-shell-command-handler",
    ],

    apex_available: [
        "com.android.btservices",
    ],
    min_sdk_version: "Tiramisu",
}

// service-bluetooth static library
@@ -90,7 +93,6 @@ java_library {
    ],

    libs: [
        "app-compat-annotations",
        "framework-bluetooth.impl",
    ],
    sdk_version: "system_server_current",
@@ -105,10 +107,6 @@ java_library {
    visibility: [
        "//packages/modules/Bluetooth/apex",
    ],
    apex_available: [
        "com.android.btservices",
    ],
    min_sdk_version: "Tiramisu",
}

java_library {
@@ -148,8 +146,3 @@ java_library {
        strict_updatability_linting: true,
    },
}

platform_compat_config {
    name: "bluetooth-compat-config",
    src: ":service-bluetooth-pre-jarjar",
}
+34 −0
Original line number Diff line number Diff line
// Copyright 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

java_library {
    name: "service-bluetooth.change-ids",
    defaults: ["service-bluetooth-common-defaults"],
    srcs: [
        "com/android/server/bluetooth/ChangeIds.java",
    ],
    libs: [
        "app-compat-annotations",
    ],
    sdk_version: "system_server_current",
}

platform_compat_config {
    name: "bluetooth-compat-config",
    src: ":service-bluetooth.change-ids",
}
+36 −0
Original line number Diff line number Diff line
/*
 * Copyright 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.server.bluetooth;

import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledSince;

/**
 * All the {@link ChangeId} used in the Bluetooth service .
 */
class ChangeIds {
    private ChangeIds(){}

    /**
     * Starting with {@link android.os.Build.VERSION_CODES#TIRAMISU}, applications are
     * not allowed to enable/disable Bluetooth.
     */
    @ChangeId
    @EnabledSince(targetSdkVersion = android.os.Build.VERSION_CODES.TIRAMISU)
    static final long RESTRICT_ENABLE_DISABLE = 218493289L;
}
Loading