Disable the mic/cam toggles when admin disallows

Test: Use test DPC app
Bug: 184927615
Change-Id: Ib3825967b2e7ddb6d4768abbc2e17fd39b936371
This commit is contained in:
Evan Severson
2021-06-23 21:44:21 -07:00
parent 150ed0b071
commit 2a5dd0e2ad
4 changed files with 29 additions and 2 deletions

View File

@@ -16,6 +16,8 @@
package com.android.settings.privacy;
import static android.os.UserManager.DISALLOW_MICROPHONE_TOGGLE;
import static com.android.settings.utils.SensorPrivacyManagerHelper.MICROPHONE;
import android.content.Context;
@@ -41,4 +43,8 @@ public class MicToggleController extends SensorToggleController {
true) ? AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE;
}
@Override
protected String getRestriction() {
return DISALLOW_MICROPHONE_TOGGLE;
}
}