/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/appops/ |
D | AppOpsControllerTest.java | 46 import android.app.AppOpsManager; 90 private AppOpsManager mAppOpsManager; 122 getContext().addMockSystemService(AppOpsManager.class, mAppOpsManager); in setUp() 197 AppOpsManager.PackageOps packageOps = createPackageOp( in startListening_fetchesCurrentActive_oneActive() 200 AppOpsManager.OPSTR_FINE_LOCATION, in startListening_fetchesCurrentActive_oneActive() 215 assertThat(first.getCode()).isEqualTo(AppOpsManager.OP_FINE_LOCATION); in startListening_fetchesCurrentActive_oneActive() 220 AppOpsManager.PackageOps packageOps1 = createPackageOp( in startListening_fetchesCurrentActive_multiplePackages() 223 AppOpsManager.OPSTR_FINE_LOCATION, in startListening_fetchesCurrentActive_multiplePackages() 225 AppOpsManager.PackageOps packageOps2 = createPackageOp( in startListening_fetchesCurrentActive_multiplePackages() 228 AppOpsManager.OPSTR_FINE_LOCATION, in startListening_fetchesCurrentActive_multiplePackages() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/appop/ |
D | AppOpsStartedWatcherTest.java | 28 import android.app.AppOpsManager; 29 import android.app.AppOpsManager.OnOpStartedListener; 63 final AppOpsManager appOpsManager = getContext().getSystemService(AppOpsManager.class); in testWatchStartedOps() 64 appOpsManager.startWatchingStarted(new int[]{AppOpsManager.OP_FINE_LOCATION, in testWatchStartedOps() 65 AppOpsManager.OP_CAMERA}, listener); in testWatchStartedOps() 68 appOpsManager.startOp(AppOpsManager.OP_FINE_LOCATION); in testWatchStartedOps() 69 appOpsManager.startOp(AppOpsManager.OP_CAMERA); in testWatchStartedOps() 74 .times(1)).onOpStarted(eq(AppOpsManager.OP_FINE_LOCATION), in testWatchStartedOps() 77 eq(AppOpsManager.OP_FLAG_SELF), eq(AppOpsManager.MODE_ALLOWED), in testWatchStartedOps() 79 eq(AppOpsManager.ATTRIBUTION_FLAGS_NONE), in testWatchStartedOps() [all …]
|
D | AppOpsActiveWatcherTest.java | 36 import android.app.AppOpsManager; 37 import android.app.AppOpsManager.OnOpActiveChangedListener; 79 final AppOpsManager appOpsManager = getContext().getSystemService(AppOpsManager.class); in testWatchActiveOps() 80 appOpsManager.startWatchingActive(new String[] {AppOpsManager.OPSTR_CAMERA, in testWatchActiveOps() 81 AppOpsManager.OPSTR_RECORD_AUDIO}, getContext().getMainExecutor(), listener); in testWatchActiveOps() 84 appOpsManager.startOp(AppOpsManager.OP_CAMERA); in testWatchActiveOps() 88 .times(1)).onOpActiveChanged(eq(AppOpsManager.OPSTR_CAMERA), in testWatchActiveOps() 99 assertThat(appOpsManager.isOperationActive(AppOpsManager.OP_CAMERA, in testWatchActiveOps() 103 appOpsManager.finishOp(AppOpsManager.OP_CAMERA); in testWatchActiveOps() 107 .times(1)).onOpActiveChanged(eq(AppOpsManager.OPSTR_CAMERA), in testWatchActiveOps() [all …]
|
D | AppOpsNotedWatcherTest.java | 27 import android.app.AppOpsManager; 28 import android.app.AppOpsManager.OnOpNotedListener; 63 final AppOpsManager appOpsManager = getContext().getSystemService(AppOpsManager.class); in testWatchNotedOps() 64 appOpsManager.startWatchingNoted(new int[]{AppOpsManager.OP_FINE_LOCATION, in testWatchNotedOps() 65 AppOpsManager.OP_CAMERA}, listener); in testWatchNotedOps() 68 appOpsManager.noteOp(AppOpsManager.OP_FINE_LOCATION, Process.myUid(), in testWatchNotedOps() 70 appOpsManager.noteOp(AppOpsManager.OP_CAMERA, Process.myUid(), in testWatchNotedOps() 76 .times(1)).onOpNoted(eq(AppOpsManager.OPSTR_FINE_LOCATION), in testWatchNotedOps() 79 eq(AppOpsManager.OP_FLAG_SELF), in testWatchNotedOps() 80 eq(AppOpsManager.MODE_ALLOWED)); in testWatchNotedOps() [all …]
|
D | AppOpsDeviceAwareServiceTest.java | 19 import static android.app.AppOpsManager.OP_CAMERA; 20 import static android.app.AppOpsManager.OP_FLAGS_ALL_TRUSTED; 27 import android.app.AppOpsManager; 66 private final AppOpsManager mAppOpsManager = mContext.getSystemService(AppOpsManager.class); 94 AppOpsManager.OpEventProxyInfo proxyInfo = in noteProxyOp_proxyAppOnDefaultDevice() 103 AppOpsManager.OpEventProxyInfo proxyInfo = in noteProxyOp_proxyAppOnRemoteDevice() 108 private AppOpsManager.OpEventProxyInfo noteProxyOpWithDeviceId(int proxyAppDeviceId) { in noteProxyOpWithDeviceId() 125 assertThat(mode).isEqualTo(AppOpsManager.MODE_ALLOWED); in noteProxyOpWithDeviceId() 127 List<AppOpsManager.PackageOps> packagesOps = in noteProxyOpWithDeviceId() 129 new String[] {AppOpsManager.OPSTR_CAMERA}, in noteProxyOpWithDeviceId() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/ |
D | PermissionCheckerTest.java | 21 import android.app.AppOpsManager; 40 private final AppOpsManager mAppOpsManager = mContext.getSystemService(AppOpsManager.class); 54 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted() 55 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_DEFAULT); in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted() 66 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied() 67 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_DEFAULT); in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied() 78 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted() 79 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_ALLOWED); in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted() 90 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_packageNameIsNull_returnsGranted() 91 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_ALLOWED); in testCheckPermissionForPreflight_appOpPermission_packageNameIsNull_returnsGranted() [all …]
|
/frameworks/base/core/java/android/app/ |
D | AppOpsManager.aidl | 19 parcelable AppOpsManager.PackageOps; 20 parcelable AppOpsManager.NoteOpEventProxyInfo; 21 parcelable AppOpsManager.NoteOpEvent; 22 parcelable AppOpsManager.OpFeatureEntry; 23 parcelable AppOpsManager.OpEntry; 25 parcelable AppOpsManager.HistoricalOp; 26 parcelable AppOpsManager.HistoricalOps; 27 parcelable AppOpsManager.HistoricalPackageOps; 28 parcelable AppOpsManager.HistoricalUidOps;
|
/frameworks/base/services/core/java/com/android/server/appop/ |
D | AttributedOp.java | 19 import static android.app.AppOpsManager.MODE_ALLOWED; 20 import static android.app.AppOpsManager.OnOpStartedListener.START_TYPE_RESUMED; 21 import static android.app.AppOpsManager.makeKey; 26 import android.app.AppOpsManager; 57 private @Nullable LongSparseArray<AppOpsManager.NoteOpEvent> mAccessEvents; 66 private @Nullable LongSparseArray<AppOpsManager.NoteOpEvent> mRejectEvents; 106 @AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags) { in accessed() 113 AppOpsManager.ATTRIBUTION_FLAGS_NONE, AppOpsManager.ATTRIBUTION_CHAIN_ID_NONE); in accessed() 131 @Nullable String proxyDeviceId, @AppOpsManager.UidState int uidState, in accessed() 132 @AppOpsManager.OpFlags int flags) { in accessed() [all …]
|
D | AudioRestrictionManager.java | 19 import android.app.AppOpsManager; 60 CAMERA_AUDIO_RESTRICTIONS.append(AppOpsManager.OP_PLAY_AUDIO, audioMutedUsages); in CAMERA_AUDIO_RESTRICTIONS.append() 61 CAMERA_AUDIO_RESTRICTIONS.append(AppOpsManager.OP_VIBRATE, vibrationMutedUsages); in CAMERA_AUDIO_RESTRICTIONS.append() 74 if (code == AppOpsManager.OP_VIBRATE || (code == AppOpsManager.OP_PLAY_AUDIO && in checkAudioOperation() 80 return AppOpsManager.MODE_IGNORED; in checkAudioOperation() 87 if (mode != AppOpsManager.MODE_ALLOWED) { in checkAudioOperation() 91 return AppOpsManager.MODE_ALLOWED; in checkAudioOperation() 102 return AppOpsManager.MODE_ALLOWED; in checkZenModeRestrictionLocked() 114 if (mode != AppOpsManager.MODE_ALLOWED) { in setZenModeAudioRestriction() 154 final String op = AppOpsManager.opToName(mZenModeAudioRestrictions.keyAt(o)); in dump() [all …]
|
/frameworks/native/libs/permission/ |
D | AppOpsManager.cpp | 46 AppOpsManager::AppOpsManager() in AppOpsManager() function in android::AppOpsManager 50 sp<IAppOpsService> AppOpsManager::getService() in getService() 78 int32_t AppOpsManager::checkOp(int32_t op, int32_t uid, const String16& callingPackage) in checkOp() 83 : AppOpsManager::MODE_IGNORED; in checkOp() 86 int32_t AppOpsManager::checkAudioOpNoThrow(int32_t op, int32_t usage, int32_t uid, in checkAudioOpNoThrow() 91 : AppOpsManager::MODE_IGNORED; in checkAudioOpNoThrow() 94 int32_t AppOpsManager::noteOp(int32_t op, int32_t uid, const String16& callingPackage) { in noteOp() 99 int32_t AppOpsManager::noteOp(int32_t op, int32_t uid, const String16& callingPackage, in noteOp() 105 : AppOpsManager::MODE_IGNORED; in noteOp() 110 int32_t AppOpsManager::startOpNoThrow(int32_t op, int32_t uid, const String16& callingPackage, in startOpNoThrow() [all …]
|
/frameworks/base/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/app/ |
D | AppOpsRepositoryTest.kt | 19 import android.app.AppOpsManager 45 private var listener: AppOpsManager.OnOpChangedListener? = null 47 private val mockAppOpsManager = mock<AppOpsManager> { in <lambda>() 49 checkOpNoThrow(AppOpsManager.OP_MANAGE_MEDIA, UID, PACKAGE_NAME) in <lambda>() 50 } doReturn AppOpsManager.MODE_ERRORED in <lambda>() 53 startWatchingMode(eq(AppOpsManager.OP_MANAGE_MEDIA), eq(PACKAGE_NAME), any()) in <lambda>() 54 } doAnswer { listener = it.arguments[2] as AppOpsManager.OnOpChangedListener } in <lambda>() 63 val mode = context.appOpsManager.getOpMode(AppOpsManager.OP_MANAGE_MEDIA, APP) in getOpMode() 65 assertThat(mode).isEqualTo(AppOpsManager.MODE_ERRORED) in getOpMode() 70 val flow = context.appOpsManager.opModeFlow(AppOpsManager.OP_MANAGE_MEDIA, APP) in <lambda>() [all …]
|
/frameworks/base/services/permission/java/com/android/server/permission/access/appop/ |
D | AppIdAppOpUpgrade.kt | 19 import android.app.AppOpsManager 32 getAppOpMode(packageState.appId, userId, AppOpsManager.OPSTR_RUN_IN_BACKGROUND) in MutateStateScope() 36 AppOpsManager.OPSTR_RUN_ANY_IN_BACKGROUND, in MutateStateScope() 42 val permissionName = AppOpsManager.opToPermission(AppOpsManager.OP_SCHEDULE_EXACT_ALARM) in MutateStateScope() 49 AppOpsManager.OPSTR_SCHEDULE_EXACT_ALARM in MutateStateScope() 52 AppOpsManager.opToDefaultMode(AppOpsManager.OP_SCHEDULE_EXACT_ALARM) in MutateStateScope() 57 AppOpsManager.OPSTR_SCHEDULE_EXACT_ALARM, in MutateStateScope() 58 AppOpsManager.MODE_ALLOWED in MutateStateScope()
|
D | AppOpModes.kt | 19 import android.app.AppOpsManager 22 const val MODE_ALLOWED = AppOpsManager.MODE_ALLOWED 23 const val MODE_IGNORED = AppOpsManager.MODE_IGNORED 24 const val MODE_ERRORED = AppOpsManager.MODE_ERRORED 25 const val MODE_DEFAULT = AppOpsManager.MODE_DEFAULT 26 const val MODE_FOREGROUND = AppOpsManager.MODE_FOREGROUND
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/privacy/ |
D | AppOpsPrivacyItemMonitor.kt | 19 import android.app.AppOpsManager in <lambda>() 57 AppOpsManager.OP_CAMERA, in <lambda>() 58 AppOpsManager.OP_PHONE_CALL_CAMERA, in <lambda>() 59 AppOpsManager.OP_RECORD_AUDIO, in <lambda>() 60 AppOpsManager.OP_PHONE_CALL_MICROPHONE, in <lambda>() 61 AppOpsManager.OP_RECEIVE_AMBIENT_TRIGGER_AUDIO, in <lambda>() 62 AppOpsManager.OP_RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO, in <lambda>() 63 AppOpsManager.OP_RECEIVE_SANDBOX_TRIGGER_AUDIO) in <lambda>() 65 AppOpsManager.OP_COARSE_LOCATION, in <lambda>() 66 AppOpsManager.OP_FINE_LOCATION) in <lambda>() [all …]
|
/frameworks/base/core/java/com/android/internal/app/ |
D | MessageSamplingConfig.java | 21 import android.app.AppOpsManager; 35 private final @IntRange(from = -1L, to = AppOpsManager._NUM_OP - 1) int mSampledOpCode; 37 private final @IntRange(from = 0L, to = AppOpsManager._NUM_OP - 1) int mAcceptableLeftDistance; 72 @IntRange(from = -1L, to = AppOpsManager._NUM_OP - 1) int sampledOpCode, in MessageSamplingConfig() 73 @IntRange(from = 0L, to = AppOpsManager._NUM_OP - 1) int acceptableLeftDistance, in MessageSamplingConfig() 79 "to", AppOpsManager._NUM_OP - 1); in MessageSamplingConfig() 84 "to", AppOpsManager._NUM_OP - 1); in MessageSamplingConfig() 97 public @IntRange(from = -1L, to = AppOpsManager._NUM_OP - 1) int getSampledOpCode() { in getSampledOpCode() 105 public @IntRange(from = 0L, to = AppOpsManager._NUM_OP - 1) int getAcceptableLeftDistance() { in getAcceptableLeftDistance() 147 "to", AppOpsManager._NUM_OP - 1); in MessageSamplingConfig() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/ |
D | PipAppOpsListener.kt | 18 import android.app.AppOpsManager in <lambda>() 28 private val mAppOpsManager: AppOpsManager = checkNotNull( in <lambda>() 29 mContext.getSystemService(Context.APP_OPS_SERVICE) as AppOpsManager) in <lambda>() 30 private val mAppOpsChangedListener = AppOpsManager.OnOpChangedListener { _, packageName -> in <lambda>() 40 AppOpsManager.OP_PICTURE_IN_PICTURE, appInfo.uid, in <lambda>() 42 ) != AppOpsManager.MODE_ALLOWED in <lambda>() 64 AppOpsManager.OP_PICTURE_IN_PICTURE, packageName, in <lambda>()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/ |
D | RecentAppOpsAccess.java | 20 import android.app.AppOpsManager; 50 AppOpsManager.OP_FINE_LOCATION, 51 AppOpsManager.OP_COARSE_LOCATION, 54 AppOpsManager.OP_RECORD_AUDIO, 55 AppOpsManager.OP_PHONE_CALL_MICROPHONE, 58 AppOpsManager.OP_CAMERA, 70 public static final int TRUSTED_STATE_FLAGS = AppOpsManager.OP_FLAG_SELF 71 | AppOpsManager.OP_FLAG_UNTRUSTED_PROXY 72 | AppOpsManager.OP_FLAG_TRUSTED_PROXIED; 121 AppOpsManager aoManager = mContext.getSystemService(AppOpsManager.class); in getAppList() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/ |
D | RecentLocationApps.java | 19 import android.app.AppOpsManager; 52 AppOpsManager.OP_MONITOR_LOCATION, 53 AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 57 AppOpsManager.OP_FINE_LOCATION, 58 AppOpsManager.OP_COARSE_LOCATION, 79 AppOpsManager aoManager = in getAppList() 80 (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in getAppList() 81 List<AppOpsManager.PackageOps> appOps = aoManager.getPackagesForOps(LOCATION_REQUEST_OPS); in getAppList() 92 AppOpsManager.PackageOps ops = appOps.get(i); in getAppList() 110 final String permission = AppOpsManager.opToPermission(op); in getAppList() [all …]
|
/frameworks/base/services/core/java/com/android/server/location/injector/ |
D | SystemAppOpsHelper.java | 19 import android.app.AppOpsManager; 36 private AppOpsManager mAppOps; 48 mAppOps = Objects.requireNonNull(mContext.getSystemService(AppOpsManager.class)); in onSystemReady() 50 AppOpsManager.OP_COARSE_LOCATION, in onSystemReady() 52 AppOpsManager.WATCH_FOREGROUND_CHANGES, in onSystemReady() 71 callerIdentity.getListenerId()) == AppOpsManager.MODE_ALLOWED; in startOpNoThrow() 102 callerIdentity.getPackageName()) == AppOpsManager.MODE_ALLOWED; in checkOpNoThrow() 119 callerIdentity.getListenerId()) == AppOpsManager.MODE_ALLOWED; in noteOp() 136 callerIdentity.getListenerId()) == AppOpsManager.MODE_ALLOWED; in noteOpNoThrow()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | LocationControllerImplTest.java | 28 import android.app.AppOpsManager; 118 mLocationController.onActiveStateChanged(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 0, in testRemoveSelfActive_DoesNotCrash() 122 new AppOpItem(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 0, "", in testRemoveSelfActive_DoesNotCrash() 124 mLocationController.onActiveStateChanged(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 0, in testRemoveSelfActive_DoesNotCrash() 171 new AppOpItem(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 0, "", in testCallbackNotified() 173 mLocationController.onActiveStateChanged(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 0, in testCallbackNotified() 200 new AppOpItem(AppOpsManager.OP_FINE_LOCATION, 0, in testCallbackNotified_additionalOps() 203 mLocationController.onActiveStateChanged(AppOpsManager.OP_FINE_LOCATION, 0, in testCallbackNotified_additionalOps() 211 mLocationController.onActiveStateChanged(AppOpsManager.OP_FINE_LOCATION, 0, in testCallbackNotified_additionalOps() 218 mLocationController.onActiveStateChanged(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 0, in testCallbackNotified_additionalOps() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/privacy/ |
D | AppOpsPrivacyItemMonitorTest.kt | 19 import android.app.AppOpsManager 138 doReturn(listOf(AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, 0), in testDistinctItems() 139 AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, 0))) in testDistinctItems() 147 doReturn(listOf(AppOpItem(AppOpsManager.OP_RECEIVE_SANDBOX_TRIGGER_AUDIO, TEST_UID, in testVoiceActivationPrivacyItems() 157 doReturn(listOf(AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, 0), in testSimilarItemsDifferentTimeStamp() 158 AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, 1))) in testSimilarItemsDifferentTimeStamp() 217 doReturn(listOf(AppOpItem(AppOpsManager.OP_ACTIVATE_VPN, TEST_UID, TEST_PACKAGE_NAME, 0), in testListShouldNotHaveNull() 218 AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0))) in testListShouldNotHaveNull() 239 doReturn(listOf(AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, 0), in testNotSendingLocationWhenLocationDisabled() 240 AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0))) in testNotSendingLocationWhenLocationDisabled() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/appops/ |
D | AppOpsControllerImpl.java | 24 import android.app.AppOpsManager; 69 AppOpsManager.OnOpActiveChangedListener, 70 AppOpsManager.OnOpNotedInternalListener, IndividualSensorPrivacyController.Callback, 82 private final AppOpsManager mAppOps; 105 AppOpsManager.OP_RECORD_AUDIO, 106 AppOpsManager.OP_PHONE_CALL_MICROPHONE, 107 AppOpsManager.OP_RECEIVE_AMBIENT_TRIGGER_AUDIO, 108 AppOpsManager.OP_RECEIVE_SANDBOX_TRIGGER_AUDIO, 109 AppOpsManager.OP_RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO 113 AppOpsManager.OP_CAMERA, [all …]
|
/frameworks/base/services/core/java/com/android/server/ |
D | MmsServiceBroker.java | 22 import android.app.AppOpsManager; 81 private volatile AppOpsManager mAppOpsManager = null; 301 private AppOpsManager getAppOpsManager() { in getAppOpsManager() 303 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in getAppOpsManager() 354 if (getAppOpsManager().noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), in sendMessage() 355 callingPkg, attributionTag, null) != AppOpsManager.MODE_ALLOWED) { in sendMessage() 374 if (getAppOpsManager().noteOp(AppOpsManager.OP_RECEIVE_MMS, Binder.getCallingUid(), in downloadMessage() 375 callingPkg, attributionTag, null) != AppOpsManager.MODE_ALLOWED) { in downloadMessage() 391 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in importTextMessage() 392 callingPkg, null, null) != AppOpsManager.MODE_ALLOWED) { in importTextMessage() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/permission/ |
D | AppOpsPerfTest.kt | 18 import android.app.AppOpsManager 37 private lateinit var appOpsManager: AppOpsManager 44 appOpsManager = context.getSystemService<AppOpsManager>(AppOpsManager::class.java)!! in setUp() 54 AppOpsManager.OPSTR_FINE_LOCATION, in testNoteOp() 68 AppOpsManager.OPSTR_FINE_LOCATION, in testUnsafeCheckOp()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/injector/ |
D | SystemAppOpsHelperTest.java | 18 import static android.app.AppOpsManager.MODE_ALLOWED; 19 import static android.app.AppOpsManager.MODE_IGNORED; 20 import static android.app.AppOpsManager.OP_COARSE_LOCATION; 21 import static android.app.AppOpsManager.OP_FINE_LOCATION; 22 import static android.app.AppOpsManager.OP_MOCK_LOCATION; 23 import static android.app.AppOpsManager.OP_MONITOR_LOCATION; 40 import android.app.AppOpsManager; 64 @Mock private AppOpsManager mAppOps; 66 private List<AppOpsManager.OnOpChangedListener> mListeners = new ArrayList<>(); 74 doReturn(mAppOps).when(mContext).getSystemService(AppOpsManager.class); in setUp() [all …]
|