/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | AppStateAppOpsBridgeTest.java | 68 AppStateAppOpsBridge.PermissionState permissionState = in permissionState_modeDefault_IsPermissible() local 70 permissionState.appOpMode = AppOpsManager.MODE_DEFAULT; in permissionState_modeDefault_IsPermissible() 72 permissionState.staticPermissionGranted = true; in permissionState_modeDefault_IsPermissible() 73 Truth.assertThat(permissionState.isPermissible()).isTrue(); in permissionState_modeDefault_IsPermissible() 75 permissionState.staticPermissionGranted = false; in permissionState_modeDefault_IsPermissible() 76 Truth.assertThat(permissionState.isPermissible()).isFalse(); in permissionState_modeDefault_IsPermissible() 81 AppStateAppOpsBridge.PermissionState permissionState = in permissionState_modeErrored_IsPermissible() local 83 permissionState.appOpMode = AppOpsManager.MODE_ERRORED; in permissionState_modeErrored_IsPermissible() 85 permissionState.staticPermissionGranted = true; in permissionState_modeErrored_IsPermissible() 86 Truth.assertThat(permissionState.isPermissible()).isFalse(); in permissionState_modeErrored_IsPermissible() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | AppPermGroupUiInfoLiveData.kt | 90 val permissionState = permissionStateLiveData.value in <lambda>() constant 92 if (packageInfo == null || permissionGroup == null || permissionState == null) { in <lambda>() 109 permissionState in <lambda>() 128 permissionState: Map<String, PermState> in <lambda>() 135 allPermInfos.filter { permissionState.containsKey(it.key) }.values in <lambda>() 143 val isSystemApp = !isUserSensitive(permissionState) in <lambda>() 145 val isUserSet = isUserSet(permissionState) in <lambda>() 148 getGrantedIncludingBackground(permissionState, allPermInfos, packageInfo) in <lambda>() 207 private fun isUserSensitive(permissionState: Map<String, PermState>): Boolean { in <lambda>() 212 for (permissionName in permissionState.keys) { in <lambda>() [all …]
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | AppStateOverlayBridge.java | 53 PermissionState permissionState = super.getPermissionInfo(pkg, uid); in getOverlayInfo() local 54 return new OverlayState(permissionState); in getOverlayInfo() 66 public OverlayState(PermissionState permissionState) { in OverlayState() argument 67 super(permissionState.packageName, permissionState.userHandle); in OverlayState() 68 this.packageInfo = permissionState.packageInfo; in OverlayState() 69 this.appOpMode = permissionState.appOpMode; in OverlayState() 70 this.permissionDeclared = permissionState.permissionDeclared; in OverlayState() 71 this.staticPermissionGranted = permissionState.staticPermissionGranted; in OverlayState() 72 controlEnabled = !DISABLE_PACKAGE_LIST.contains(permissionState.packageName); in OverlayState()
|
D | AppStateWriteSettingsBridge.java | 50 PermissionState permissionState = super.getPermissionInfo(pkg, uid); in getWriteSettingsInfo() local 51 return new WriteSettingsState(permissionState); in getWriteSettingsInfo() 55 public WriteSettingsState(PermissionState permissionState) { in WriteSettingsState() argument 56 super(permissionState.packageName, permissionState.userHandle); in WriteSettingsState() 57 this.packageInfo = permissionState.packageInfo; in WriteSettingsState() 58 this.appOpMode = permissionState.appOpMode; in WriteSettingsState() 59 this.permissionDeclared = permissionState.permissionDeclared; in WriteSettingsState() 60 this.staticPermissionGranted = permissionState.staticPermissionGranted; in WriteSettingsState()
|
D | AppStateUsageBridge.java | 58 PermissionState permissionState = super.getPermissionInfo(pkg, uid); in getUsageInfo() local 59 return new UsageState(permissionState); in getUsageInfo() 64 public UsageState(PermissionState permissionState) { in UsageState() argument 65 super(permissionState.packageName, permissionState.userHandle); in UsageState() 66 this.packageInfo = permissionState.packageInfo; in UsageState() 67 this.appOpMode = permissionState.appOpMode; in UsageState() 68 this.permissionDeclared = permissionState.permissionDeclared; in UsageState() 69 this.staticPermissionGranted = permissionState.staticPermissionGranted; in UsageState()
|
D | AppStateAppOpsBridge.java | 111 PermissionState permissionState = new PermissionState(pkg, new UserHandle(UserHandle in getPermissionInfo() local 114 permissionState.packageInfo = mIPackageManager.getPackageInfo(pkg, in getPermissionInfo() 116 permissionState.userHandle.getIdentifier()); in getPermissionInfo() 117 if (permissionState.packageInfo != null) { in getPermissionInfo() 119 String[] requestedPermissions = permissionState.packageInfo.requestedPermissions; in getPermissionInfo() 120 int[] permissionFlags = permissionState.packageInfo.requestedPermissionsFlags; in getPermissionInfo() 124 permissionState.permissionDeclared = true; in getPermissionInfo() 127 permissionState.staticPermissionGranted = true; in getPermissionInfo() 137 permissionState.appOpMode = ops.get(0).getOps().get(0).getMode(); in getPermissionInfo() 142 return permissionState; in getPermissionInfo()
|
D | AppStateMediaManagementAppsBridge.java | 70 final PermissionState permissionState = getPermissionInfo(packageName, uid); in createPermissionState() local 71 permissionState.appOpMode = mAppOpsManager.unsafeCheckOpNoThrow( in createPermissionState() 73 return permissionState; in createPermissionState()
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
D | AppStateChangeWifiStateBridge.java | 66 PermissionState permissionState = super.getPermissionInfo(pkg, uid); in getWifiSettingsInfo() local 67 return new WifiSettingsState(permissionState); in getWifiSettingsInfo() 71 public WifiSettingsState(PermissionState permissionState) { in WifiSettingsState() argument 72 super(permissionState.packageName, permissionState.userHandle); in WifiSettingsState() 73 this.packageInfo = permissionState.packageInfo; in WifiSettingsState() 74 this.appOpMode = permissionState.appOpMode; in WifiSettingsState() 75 this.permissionDeclared = permissionState.permissionDeclared; in WifiSettingsState() 76 this.staticPermissionGranted = permissionState.staticPermissionGranted; in WifiSettingsState()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/v35/ |
D | PackagePermissionsExternalDeviceLiveData.kt | 76 val permissionState = in <lambda>() constant 78 return permissionState.mapNotNull { (permissionName, permissionState) -> in <lambda>() method 80 val grantState = getGrantState(permissionState) in <lambda>() 93 private fun getGrantState(permissionState: PermissionState): AppPermGroupUiInfo.PermGrantState = in <lambda>() 94 if (permissionState.isGranted) { in <lambda>() 96 } else if (permissionState.flags and PackageManager.FLAG_PERMISSION_ONE_TIME != 0) { in <lambda>()
|
/packages/modules/Permission/tests/apex/java/com/android/permission/persistence/ |
D | RuntimePermissionsPersistenceTest.kt | 50 private val permissionState = RuntimePermissionsState.PermissionState("permission", true, 3) constant 55 mapOf("package" to listOf(permissionState)), 56 mapOf("sharedUser" to listOf(permissionState)) 121 assertThat(persistedPermissionState.name).isEqualTo(permissionState.name) in checkPersistedState() 122 assertThat(persistedPermissionState.isGranted).isEqualTo(permissionState.isGranted) in checkPersistedState() 123 assertThat(persistedPermissionState.flags).isEqualTo(permissionState.flags) in checkPersistedState()
|
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/request/ |
D | RequestPermissionViewModel.kt | 267 .forEach { (permission, permissionState) -> in <lambda>() method 268 internalGrantOrRevokePermission(packageName, permission, permissionState) in <lambda>() 276 .forEach { (permission, permissionState) -> in <lambda>() method 277 internalGrantOrRevokePermission(packageName, permission, permissionState) in <lambda>() 286 .forEach { (permission, permissionState) -> in <lambda>() method 287 internalGrantOrRevokePermission(packageName, permission, permissionState) in <lambda>() 293 requestedPermissions.forEach { (permission, permissionState) -> in <lambda>() method 294 internalGrantOrRevokePermission(packageName, permission, permissionState) in <lambda>() 449 permissionState: PermissionState in <lambda>() 452 isPermissionLocallyGranted(permission) || permissionState == PermissionState.GRANTED in <lambda>()
|
/packages/modules/Permission/service/java/com/android/permission/persistence/ |
D | RuntimePermissionsPersistenceImpl.java | 298 RuntimePermissionsState.PermissionState permissionState = permissions.get(i); in serializePermissions() local 301 serializer.attribute(null, ATTRIBUTE_NAME, permissionState.getName()); in serializePermissions() 303 permissionState.isGranted() && (permissionState.getFlags() in serializePermissions() 306 permissionState.getFlags())); in serializePermissions()
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/specialaccess/ |
D | AppStateAppOpsBridge.java | 191 PermissionState permissionState = packageStateMap.get(packageOp.getPackageName()); in loadAppOpModes() local 192 if (permissionState == null) { in loadAppOpModes() 202 permissionState.mAppOpMode = packageOp.getOps().get(0).getMode(); in loadAppOpModes()
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/permission/ |
D | DataPermissionEnforcerTest.java | 352 Map<String, Boolean> permissionState = in testCollectExtraWritePermissionStateMapping_permissionsGranted_permissionsMarkedTrue() local 358 assertThat(permissionState).containsExactlyEntriesIn(expected); in testCollectExtraWritePermissionStateMapping_permissionsGranted_permissionsMarkedTrue() 369 Map<String, Boolean> permissionState = in testCollectExtraWritePermissionStateMapping_permissionDenied_permissionsMarkedFalse() local 375 assertThat(permissionState).containsExactlyEntriesIn(expected); in testCollectExtraWritePermissionStateMapping_permissionDenied_permissionsMarkedFalse()
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | OsUtil.java | 202 final int permissionState = context.checkSelfPermission(permission); in hasPermission() local 203 sPermissions.put(permission, permissionState); in hasPermission()
|
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | DevicePermissionsTest.kt | 537 permissionState: Int, in assertPermission() 541 .isEqualTo(permissionState) in assertPermission()
|