Commit cf6066c6 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Add an NSBluetoothAlwaysUsageDescription string

For apps compiled against the macOS 11.0 SDK, TCC will crash
if the NSBluetoothAlwaysUsageDescription string isn't available
and Bluetooth APIs are called.

Provide an NSBluetoothAlwaysUsageDescription string. For now, just
reuse the generic IDS_RUNTIME_PERMISSION_OS_REASON_TEXT string,
but in the future, perhaps better strings could be used.

Bug: 1126246
Fixed: 1134360
Change-Id: I6252d43fb98ce5bd4be0504260347b933c09834b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466148Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816406}
parent df50432c
...@@ -266,10 +266,12 @@ int main(int argc, char* const argv[]) { ...@@ -266,10 +266,12 @@ int main(int argc, char* const argv[]) {
NSDictionary<NSString*, NSString*>* infoplist_strings = @{ NSDictionary<NSString*, NSString*>* infoplist_strings = @{
@"CFBundleGetInfoString" : get_info, @"CFBundleGetInfoString" : get_info,
@"NSHumanReadableCopyright" : copyright, @"NSHumanReadableCopyright" : copyright,
@"NSBluetoothAlwaysUsageDescription" : permission_reason,
@"NSBluetoothPeripheralUsageDescription" : permission_reason,
@"NSCameraUsageDescription" : permission_reason,
@"NSLocationUsageDescription" : permission_reason, @"NSLocationUsageDescription" : permission_reason,
@"NSMicrophoneUsageDescription" : permission_reason, @"NSMicrophoneUsageDescription" : permission_reason,
@"NSCameraUsageDescription" : permission_reason,
@"NSBluetoothPeripheralUsageDescription" : permission_reason,
}; };
base::scoped_nsobject<NSMutableString> strings_file_contents_string( base::scoped_nsobject<NSMutableString> strings_file_contents_string(
[[NSMutableString alloc] init]); [[NSMutableString alloc] init]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment