RESTRICT AUTOMERGE am: b4aaa9d8ad am: 6015cb062b

Change-Id: I0a679eb49f46041f39edc7f3f166eaef4ffb1c1c
This commit is contained in:
Eugene Susla
2020-04-01 21:10:24 +00:00
committed by Automerger Merge Worker
3 changed files with 11 additions and 0 deletions

View File

@@ -3626,6 +3626,11 @@
<permission android:name="android.permission.OBSERVE_ROLE_HOLDERS"
android:protectionLevel="signature|installer" />
<!-- Allows an application to manage the companion devices.
@hide -->
<permission android:name="android.permission.MANAGE_COMPANION_DEVICES"
android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to use SurfaceFlinger's low level features.
<p>Not for use by third-party applications.
@hide

View File

@@ -184,6 +184,7 @@
<uses-permission android:name="android.permission.READ_CLIPBOARD_IN_BACKGROUND" />
<!-- Permission needed to wipe the device for Test Harness Mode -->
<uses-permission android:name="android.permission.ENABLE_TEST_HARNESS_MODE" />
<uses-permission android:name="android.permission.MANAGE_COMPANION_DEVICES" />
<uses-permission android:name="android.permission.MANAGE_APPOPS" />

View File

@@ -660,6 +660,11 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
+ "associate USER_ID PACKAGE MAC_ADDRESS\n"
+ "disassociate USER_ID PACKAGE MAC_ADDRESS";
ShellCmd() {
getContext().enforceCallingOrSelfPermission(
android.Manifest.permission.MANAGE_COMPANION_DEVICES, "ShellCmd");
}
@Override
public int onCommand(String cmd) {
switch (cmd) {