Recent work has been using Error Prone rules and annotations to reflect the current state of permission enforcement across the Bluetooth stack, and we're now in a position were we can add new permission enforcement that had been missing. We've currently standardized on saying that APIs that return device or Bluetooth state information (without sharing details about any particular remote Bluetooth device) do not need to be permission protected. Bug: 183626724 Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true Change-Id: I53ac7a4fe1dea57316048c3cac4fa237b6ba3d38
40 lines
1.3 KiB
Java
40 lines
1.3 KiB
Java
/*
|
|
* Copyright (C) 2020 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 android.content;
|
|
|
|
public class Context {
|
|
public int getUserId() {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public void enforceCallingOrSelfPermission(String permission, String message) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public void sendBroadcast(Intent intent) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public void sendBroadcast(Intent intent, String receiverPermission) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public void sendBroadcastWithMultiplePermissions(Intent intent, String[] receiverPermissions) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
}
|