Home
last modified time | relevance | path

Searched refs:PermissionChecker (Results 1 – 25 of 54) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/content/
DPermissionCheckerTest.java57 assertThat(PermissionChecker.checkPermissionForPreflight( in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
60 .isEqualTo(PermissionChecker.PERMISSION_GRANTED); in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
69 assertThat(PermissionChecker.checkPermissionForPreflight( in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
72 .isEqualTo(PermissionChecker.PERMISSION_HARD_DENIED); in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
81 assertThat(PermissionChecker.checkPermissionForPreflight( in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted()
84 .isEqualTo(PermissionChecker.PERMISSION_GRANTED); in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted()
93 assertThat(PermissionChecker.checkPermissionForPreflight( in testCheckPermissionForPreflight_appOpPermission_packageNameIsNull_returnsGranted()
96 .isEqualTo(PermissionChecker.PERMISSION_GRANTED); in testCheckPermissionForPreflight_appOpPermission_packageNameIsNull_returnsGranted()
105 assertThat(PermissionChecker.checkPermissionForPreflight( in testCheckPermissionForPreflight_appOpPermission_modeIgnored_returnsHardDenied()
108 .isEqualTo(PermissionChecker.PERMISSION_HARD_DENIED); in testCheckPermissionForPreflight_appOpPermission_modeIgnored_returnsHardDenied()
[all …]
/frameworks/native/libs/permission/android/permission/
DPermissionChecker.cpp36 PermissionChecker::PermissionChecker() in PermissionChecker() function in android::permission::PermissionChecker
40 sp<android::permission::IPermissionChecker> PermissionChecker::getService() in getService()
68 PermissionChecker::PermissionResult PermissionChecker::checkPermissionForDataDeliveryFromDatasource( in checkPermissionForDataDeliveryFromDatasource()
76 PermissionChecker::PermissionResult
77 PermissionChecker::checkPermissionForStartDataDeliveryFromDatasource( in checkPermissionForStartDataDeliveryFromDatasource()
85 PermissionChecker::PermissionResult PermissionChecker::checkPermissionForPreflight( in checkPermissionForPreflight()
93 PermissionChecker::PermissionResult PermissionChecker::checkPermissionForPreflightFromDatasource( in checkPermissionForPreflightFromDatasource()
101 void PermissionChecker::finishDataDeliveryFromDatasource(int32_t op, in finishDataDeliveryFromDatasource()
114 PermissionChecker::PermissionResult PermissionChecker::checkPermission(const String16& permission, in checkPermission()
/frameworks/base/packages/SettingsLib/tests/robotests/testutils/com/android/settingslib/testutils/shadow/
DShadowPermissionChecker.java21 import android.content.PermissionChecker;
32 @Implements(PermissionChecker.class)
52 : PermissionChecker.checkCallingPermissionForDataDelivery( in checkCallingPermissionForDataDelivery()
67 : PermissionChecker.checkPermissionForDataDelivery( in checkPermissionForDataDelivery()
84 : PermissionChecker.checkPermissionForPreflight( in checkPermissionForPreflight()
/frameworks/base/core/java/android/content/
DContentProvider.java257 != PermissionChecker.PERMISSION_GRANTED) { in query()
315 == PermissionChecker.PERMISSION_GRANTED) { in getType()
318 attributionSource) == PermissionChecker.PERMISSION_GRANTED) { in getType()
379 != PermissionChecker.PERMISSION_GRANTED in logGetTypeData()
438 != PermissionChecker.PERMISSION_GRANTED) { in insert()
466 != PermissionChecker.PERMISSION_GRANTED) { in bulkInsert()
504 != PermissionChecker.PERMISSION_GRANTED) { in applyBatch()
510 != PermissionChecker.PERMISSION_GRANTED) { in applyBatch()
544 != PermissionChecker.PERMISSION_GRANTED) { in delete()
566 != PermissionChecker.PERMISSION_GRANTED) { in update()
[all …]
DPermissionChecker.java67 public final class PermissionChecker { class
109 private PermissionChecker() { in PermissionChecker() method in PermissionChecker
/frameworks/native/libs/permission/include/android/permission/
DPermissionChecker.h38 class PermissionChecker
70 PermissionChecker();
95 PermissionChecker::PermissionResult checkPermissionForDataDeliveryFromDatasource(
/frameworks/base/media/java/android/media/permission/
DPermissionUtil.java23 import android.content.PermissionChecker;
179 return PermissionChecker.checkPermissionForDataDelivery(context, permission, in checkPermissionForDataDelivery()
198 return PermissionChecker.checkPermissionForPreflight(context, permission, in checkPermissionForPreflight()
/frameworks/base/services/voiceinteraction/java/com/android/server/soundtrigger_middleware/
DSoundTriggerMiddlewarePermission.java25 import android.content.PermissionChecker;
145 if (status != PermissionChecker.PERMISSION_GRANTED) { in enforcePermissionForDataDelivery()
158 if (status != PermissionChecker.PERMISSION_GRANTED) { in enforceSoundTriggerRecordAudioPermissionForDataDelivery()
179 case PermissionChecker.PERMISSION_GRANTED: in enforcePermissionForPreflight()
180 case PermissionChecker.PERMISSION_SOFT_DENIED: in enforcePermissionForPreflight()
182 case PermissionChecker.PERMISSION_HARD_DENIED: in enforcePermissionForPreflight()
DSoundTriggerMiddlewareService.java23 import android.content.PermissionChecker;
125 PermissionChecker.checkCallingOrSelfPermissionForPreflight( in attachFakeHalInjection()
/frameworks/base/services/core/java/com/android/server/pm/permission/
DPermissionManagerService.java49 import android.content.PermissionChecker;
1017 if (startDataDelivery && result != PermissionChecker.PERMISSION_GRANTED in checkPermission()
1018 && result != PermissionChecker.PERMISSION_SOFT_DENIED) { in checkPermission()
1117 if (result != PermissionChecker.PERMISSION_GRANTED && startDataDelivery) { in checkOp()
1141 return PermissionChecker.PERMISSION_HARD_DENIED; in checkPermission()
1157 return PermissionChecker.PERMISSION_HARD_DENIED; in checkPermission()
1166 return PermissionChecker.PERMISSION_GRANTED; in checkPermission()
1177 return PermissionChecker.PERMISSION_HARD_DENIED; in checkAppOpPermission()
1192 return PermissionChecker.PERMISSION_HARD_DENIED; in checkAppOpPermission()
1213 return PermissionChecker.PERMISSION_HARD_DENIED; in checkAppOpPermission()
[all …]
DLegacyPermissionManagerService.java27 import android.content.PermissionChecker;
415 int result = PermissionChecker.checkPermissionForPreflight(mContext, RECORD_AUDIO, -1, in checkSoundTriggerRecordAudioPermissionForDataDelivery()
417 if (result != PermissionChecker.PERMISSION_GRANTED) { in checkSoundTriggerRecordAudioPermissionForDataDelivery()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/
DRecentLocationApps.java21 import android.content.PermissionChecker;
113 if (PermissionChecker.checkPermissionForPreflight(mContext, permission, in getAppList()
114 PermissionChecker.PID_UNKNOWN, uid, packageName) in getAppList()
115 == PermissionChecker.PERMISSION_GRANTED) { in getAppList()
/frameworks/base/core/java/android/os/
DPermissionEnforcer.java24 import android.content.PermissionChecker;
97 return PermissionChecker.checkPermissionForDataDelivery( in checkPermission()
98 mContext, permission, PermissionChecker.PID_UNKNOWN, source, "" /* message */); in checkPermission()
/frameworks/av/media/utils/
DServiceUtilities.cpp140 permission::PermissionChecker permissionChecker; in checkRecordingInternal()
145 attributedOpCode) != permission::PermissionChecker::PERMISSION_HARD_DENIED); in checkRecordingInternal()
149 attributedOpCode) != permission::PermissionChecker::PERMISSION_HARD_DENIED); in checkRecordingInternal()
194 permission::PermissionChecker permissionChecker; in finishRecording()
205 permission::PermissionChecker permissionChecker; in captureAudioOutputAllowed()
208 AppOpsManager::OP_NONE) != permission::PermissionChecker::PERMISSION_HARD_DENIED); in captureAudioOutputAllowed()
263 permission::PermissionChecker permissionChecker; in captureHotwordAllowed()
266 AppOpsManager::OP_NONE) != permission::PermissionChecker::PERMISSION_HARD_DENIED); in captureHotwordAllowed()
/frameworks/av/services/camera/libcameraservice/utils/
DAttributionAndPermissionUtils.cpp115 PermissionChecker permissionChecker; in checkPermissionForPreflight()
118 attributedOpCode) != PermissionChecker::PERMISSION_HARD_DENIED; in checkPermissionForPreflight()
122 attributedOpCode) != PermissionChecker::PERMISSION_HARD_DENIED; in checkPermissionForPreflight()
DAttributionAndPermissionUtils.h29 using permission::PermissionChecker;
107 std::unique_ptr<permission::PermissionChecker> mPermissionChecker =
108 std::make_unique<permission::PermissionChecker>();
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/
DRecentAppOpsAccess.java22 import android.content.PermissionChecker;
162 if (PermissionChecker.checkPermissionForPreflight(mContext, permission, in getAppList()
163 PermissionChecker.PID_UNKNOWN, uid, packageName) in getAppList()
164 == PermissionChecker.PERMISSION_GRANTED) { in getAppList()
/frameworks/base/core/java/android/speech/
DRecognitionService.java32 import android.content.PermissionChecker;
859 if (PermissionChecker.checkPermissionAndStartDataDelivery( in checkPermissionAndStartDataDelivery()
864 == PermissionChecker.PERMISSION_GRANTED) { in checkPermissionAndStartDataDelivery()
872 int result = PermissionChecker.checkPermissionForPreflight(RecognitionService.this, in checkPermissionForPreflightNotHardDenied()
874 return result == PermissionChecker.PERMISSION_GRANTED in checkPermissionForPreflightNotHardDenied()
875 || result == PermissionChecker.PERMISSION_SOFT_DENIED; in checkPermissionForPreflightNotHardDenied()
882 PermissionChecker.finishDataDelivery(RecognitionService.this, op, in finishDataDelivery()
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
DUsbDialogHelper.java26 import android.content.PermissionChecker;
147 return PermissionChecker.checkPermissionForPreflight(mContext, RECORD_AUDIO, in packageHasAudioRecordingPermission()
148 PermissionChecker.PID_UNKNOWN, mUid, mPackageName) in packageHasAudioRecordingPermission()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DLocationControllerImpl.java30 import android.content.PermissionChecker;
316 if (PermissionChecker.checkPermissionForPreflight(mContext, permission, in isSystemApp()
317 PermissionChecker.PID_UNKNOWN, item.getUid(), item.getPackageName()) in isSystemApp()
318 == PermissionChecker.PERMISSION_GRANTED) { in isSystemApp()
/frameworks/base/services/core/java/com/android/server/
DNetworkScorerAppManager.java25 import android.content.PermissionChecker;
214 return isLocationModeEnabled() && PermissionChecker.checkPermissionForPreflight(mContext, in canAccessLocation()
215 permission.ACCESS_COARSE_LOCATION, PermissionChecker.PID_UNKNOWN, uid, packageName) in canAccessLocation()
216 == PermissionChecker.PERMISSION_GRANTED; in canAccessLocation()
/frameworks/base/services/core/java/com/android/server/pm/
DCrossProfileAppsServiceImpl.java43 import android.content.PermissionChecker;
331 packageName, uid, PermissionChecker.PID_UNKNOWN)) { in haveProfilesGotInteractAcrossProfilesPermission()
521 packageName, uid, PermissionChecker.PID_UNKNOWN);
548 if (hasInteractAcrossProfilesPermission(packageName, uid, PermissionChecker.PID_UNKNOWN)) {
767 return PermissionChecker.PERMISSION_GRANTED
768 == PermissionChecker.checkPermissionForPreflight(
955 packageName, uid, PermissionChecker.PID_UNKNOWN);
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/
DRecentAppOpsAccessesTest.java31 import android.content.PermissionChecker;
108 PermissionChecker.PERMISSION_GRANTED); in setUp()
112 PermissionChecker.PERMISSION_GRANTED); in setUp()
/frameworks/native/libs/permission/
DAndroid.bp41 "android/permission/PermissionChecker.cpp",
/frameworks/base/core/java/android/permission/
DPermissionManager.java56 import android.content.PermissionChecker;
316 return PermissionChecker.checkPermissionForDataDelivery(mContext, permission, in checkPermissionForDataDelivery()
318 PermissionChecker.PID_UNKNOWN, attributionSource, message); in checkPermissionForDataDelivery()
343 return PermissionChecker.checkPermissionForDataDelivery(mContext, permission, in checkPermissionForStartDataDelivery()
345 PermissionChecker.PID_UNKNOWN, attributionSource, message, true); in checkPermissionForStartDataDelivery()
357 PermissionChecker.finishDataDelivery(mContext, AppOpsManager.permissionToOp(permission), in finishDataDelivery()
396 return PermissionChecker.checkPermissionForDataDeliveryFromDataSource(mContext, permission, in checkPermissionForDataDeliveryFromDataSource()
397 PermissionChecker.PID_UNKNOWN, attributionSource, message); in checkPermissionForDataDeliveryFromDataSource()
426 return PermissionChecker.checkPermissionForPreflight(mContext, permission, in checkPermissionForPreflight()

123