Treat phone call mic/camera similar to other mic/camera app-ops
Bug: 162547999
Test: Started a phone call and swiped clicked all way through privacy
chip flow
Change-Id: Icb933c7e4e430d3da54cef44b5aaab99093ffeca
This commit is contained in:
@@ -82,8 +82,10 @@ public class AppOpsControllerImpl implements AppOpsController,
|
|||||||
|
|
||||||
protected static final int[] OPS = new int[] {
|
protected static final int[] OPS = new int[] {
|
||||||
AppOpsManager.OP_CAMERA,
|
AppOpsManager.OP_CAMERA,
|
||||||
|
AppOpsManager.OP_PHONE_CALL_CAMERA,
|
||||||
AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
|
AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
|
||||||
AppOpsManager.OP_RECORD_AUDIO,
|
AppOpsManager.OP_RECORD_AUDIO,
|
||||||
|
AppOpsManager.OP_PHONE_CALL_MICROPHONE,
|
||||||
AppOpsManager.OP_COARSE_LOCATION,
|
AppOpsManager.OP_COARSE_LOCATION,
|
||||||
AppOpsManager.OP_FINE_LOCATION
|
AppOpsManager.OP_FINE_LOCATION
|
||||||
};
|
};
|
||||||
@@ -302,7 +304,9 @@ public class AppOpsControllerImpl implements AppOpsController,
|
|||||||
// does not correspond to a platform permission
|
// does not correspond to a platform permission
|
||||||
// which may be user sensitive, so for now always show it to the user.
|
// which may be user sensitive, so for now always show it to the user.
|
||||||
if (appOpCode == AppOpsManager.OP_SYSTEM_ALERT_WINDOW
|
if (appOpCode == AppOpsManager.OP_SYSTEM_ALERT_WINDOW
|
||||||
|| appOpCode == AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION) {
|
|| appOpCode == AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION
|
||||||
|
|| appOpCode == AppOpsManager.OP_PHONE_CALL_CAMERA
|
||||||
|
|| appOpCode == AppOpsManager.OP_PHONE_CALL_MICROPHONE) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ class PrivacyItemController @Inject constructor(
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
internal companion object {
|
internal companion object {
|
||||||
val OPS_MIC_CAMERA = intArrayOf(AppOpsManager.OP_CAMERA,
|
val OPS_MIC_CAMERA = intArrayOf(AppOpsManager.OP_CAMERA,
|
||||||
AppOpsManager.OP_RECORD_AUDIO)
|
AppOpsManager.OP_PHONE_CALL_CAMERA, AppOpsManager.OP_RECORD_AUDIO,
|
||||||
|
AppOpsManager.OP_PHONE_CALL_MICROPHONE)
|
||||||
val OPS_LOCATION = intArrayOf(
|
val OPS_LOCATION = intArrayOf(
|
||||||
AppOpsManager.OP_COARSE_LOCATION,
|
AppOpsManager.OP_COARSE_LOCATION,
|
||||||
AppOpsManager.OP_FINE_LOCATION)
|
AppOpsManager.OP_FINE_LOCATION)
|
||||||
@@ -248,9 +249,11 @@ class PrivacyItemController @Inject constructor(
|
|||||||
|
|
||||||
private fun toPrivacyItem(appOpItem: AppOpItem): PrivacyItem? {
|
private fun toPrivacyItem(appOpItem: AppOpItem): PrivacyItem? {
|
||||||
val type: PrivacyType = when (appOpItem.code) {
|
val type: PrivacyType = when (appOpItem.code) {
|
||||||
|
AppOpsManager.OP_PHONE_CALL_CAMERA,
|
||||||
AppOpsManager.OP_CAMERA -> PrivacyType.TYPE_CAMERA
|
AppOpsManager.OP_CAMERA -> PrivacyType.TYPE_CAMERA
|
||||||
AppOpsManager.OP_COARSE_LOCATION -> PrivacyType.TYPE_LOCATION
|
AppOpsManager.OP_COARSE_LOCATION,
|
||||||
AppOpsManager.OP_FINE_LOCATION -> PrivacyType.TYPE_LOCATION
|
AppOpsManager.OP_FINE_LOCATION -> PrivacyType.TYPE_LOCATION
|
||||||
|
AppOpsManager.OP_PHONE_CALL_MICROPHONE,
|
||||||
AppOpsManager.OP_RECORD_AUDIO -> PrivacyType.TYPE_MICROPHONE
|
AppOpsManager.OP_RECORD_AUDIO -> PrivacyType.TYPE_MICROPHONE
|
||||||
else -> return null
|
else -> return null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user