Searched refs:AppOpsManager (Results 1 - 25 of 155) sorted by relevance

1234567

/frameworks/base/core/java/android/app/
H A DAppOpsManager.aidl19 parcelable AppOpsManager.PackageOps;
20 parcelable AppOpsManager.OpEntry;
H A DAppOpsManager.java54 public class AppOpsManager { class
1169 AppOpsManager.MODE_ALLOWED,
1170 AppOpsManager.MODE_ALLOWED,
1171 AppOpsManager.MODE_ALLOWED,
1172 AppOpsManager.MODE_ALLOWED,
1173 AppOpsManager.MODE_ALLOWED,
1174 AppOpsManager.MODE_ALLOWED,
1175 AppOpsManager.MODE_ALLOWED,
1176 AppOpsManager.MODE_ALLOWED,
1177 AppOpsManager
1732 AppOpsManager(Context context, IAppOpsService service) { method in class:AppOpsManager
[all...]
/frameworks/support/compat/src/main/java/androidx/core/app/
H A DAppOpsManagerCompat.java21 import android.app.AppOpsManager;
28 * Helper for accessing features in {@link android.app.AppOpsManager}.
36 public static final int MODE_ALLOWED = AppOpsManager.MODE_ALLOWED;
43 public static final int MODE_IGNORED = AppOpsManager.MODE_IGNORED;
50 public static final int MODE_ERRORED = AppOpsManager.MODE_ERRORED;
58 public static final int MODE_DEFAULT = AppOpsManager.MODE_DEFAULT;
76 return AppOpsManager.permissionToOp(permission);
105 AppOpsManager appOpsManager =
106 (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
125 AppOpsManager appOpsManage
[all...]
/frameworks/base/services/tests/servicestests/src/com/android/server/appops/
H A DAppOpsActiveWatcherTest.java30 import android.app.AppOpsManager;
31 import android.app.AppOpsManager.OnOpActiveChangedListener;
58 final AppOpsManager appOpsManager = getContext().getSystemService(AppOpsManager.class);
59 appOpsManager.startWatchingActive(new int[] {AppOpsManager.OP_CAMERA,
60 AppOpsManager.OP_RECORD_AUDIO}, listener);
63 appOpsManager.startOp(AppOpsManager.OP_CAMERA);
67 .times(1)).onOpActiveChanged(eq(AppOpsManager.OP_CAMERA),
77 assertThat(appOpsManager.isOperationActive(AppOpsManager.OP_CAMERA,
81 appOpsManager.finishOp(AppOpsManager
[all...]
/frameworks/base/services/autofill/java/com/android/server/autofill/ui/
H A DOverlayControl.java20 import android.app.AppOpsManager;
35 private final @NonNull AppOpsManager mAppOpsManager;
38 mAppOpsManager = context.getSystemService(AppOpsManager.class);
51 mAppOpsManager.setUserRestrictionForUser(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, !allowed,
53 mAppOpsManager.setUserRestrictionForUser(AppOpsManager.OP_TOAST_WINDOW, !allowed,
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
H A DAppOpsListener.java19 import android.app.AppOpsManager;
29 public class AppOpsListener implements AppOpsManager.OnOpActiveChangedListener {
39 protected final AppOpsManager mAppOps;
41 protected static final int[] OPS = new int[] {AppOpsManager.OP_CAMERA,
42 AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
43 AppOpsManager.OP_RECORD_AUDIO};
47 mAppOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
/frameworks/native/libs/binder/
H A DAppOpsManager.cpp18 #include <binder/AppOpsManager.h>
31 // As a consequence, it also never runs the AppOpsManager service.
32 const int APP_OPS_MANAGER_UNAVAILABLE_MODE = AppOpsManager::MODE_ALLOWED;
34 const int APP_OPS_MANAGER_UNAVAILABLE_MODE = AppOpsManager::MODE_IGNORED;
52 AppOpsManager::AppOpsManager() function in class:android::AppOpsManager
58 sp<IAppOpsService> AppOpsManager::getService() { return NULL; }
60 sp<IAppOpsService> AppOpsManager::getService()
88 int32_t AppOpsManager::checkOp(int32_t op, int32_t uid, const String16& callingPackage)
96 int32_t AppOpsManager
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/
H A DPipAppOpsListener.java19 import static android.app.AppOpsManager.MODE_ALLOWED;
20 import static android.app.AppOpsManager.OP_PICTURE_IN_PICTURE;
22 import android.app.AppOpsManager;
23 import android.app.AppOpsManager.OnOpChangedListener;
38 private AppOpsManager mAppOpsManager;
42 private AppOpsManager.OnOpChangedListener mAppOpsChangedListener = new OnOpChangedListener() {
70 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
/frameworks/base/telephony/java/com/android/internal/telephony/
H A DTelephonyPermissions.java21 import android.app.AppOpsManager;
132 AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
133 return appOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, uid, callingPackage) ==
134 AppOpsManager.MODE_ALLOWED;
166 AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
167 return appOps.noteOp(AppOpsManager.OP_READ_CALL_LOG, uid, callingPackage) ==
168 AppOpsManager.MODE_ALLOWED;
189 AppOpsManager appOp
[all...]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
H A DAppOpsListenerTest.java23 import android.app.AppOpsManager;
47 @Mock private AppOpsManager mAppOpsManager;
60 getContext().addMockSystemService(AppOpsManager.class, mAppOpsManager);
83 AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true);
86 AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true);
93 AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true);
96 AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, true);
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
H A DPhoneSubInfoControllerTest.java30 import android.app.AppOpsManager;
42 private AppOpsManager mAppOsMgr;
61 mAppOsMgr = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
108 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOsMgr).noteOp(
109 eq(AppOpsManager.OP_READ_PHONE_STATE), anyInt(), eq(TAG));
116 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp(
117 eq(AppOpsManager.OP_READ_PHONE_STATE), anyInt(), eq(TAG));
158 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOsMgr).noteOp(
159 eq(AppOpsManager.OP_READ_PHONE_STATE), anyInt(), eq(TAG));
166 doReturn(AppOpsManager
[all...]
H A DIccSmsInterfaceManagerTest.java23 import android.app.AppOpsManager;
51 private AppOpsManager mMockAppOps;
113 AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), PACKAGE))
114 .thenReturn(AppOpsManager.MODE_ERRORED);
128 AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), PACKAGE))
129 .thenReturn(AppOpsManager.MODE_ERRORED);
170 AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), PACKAGE))
171 .thenReturn(AppOpsManager.MODE_ERRORED);
H A DTelephonyPermissionsTest.java28 import android.app.AppOpsManager;
50 private AppOpsManager mMockAppOps;
65 .thenReturn(AppOpsManager.MODE_ERRORED);
93 when(mMockAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, UID, PACKAGE))
94 .thenReturn(AppOpsManager.MODE_ALLOWED);
128 when(mMockAppOps.noteOp(AppOpsManager.OP_WRITE_SMS, UID, PACKAGE))
129 .thenReturn(AppOpsManager.MODE_ALLOWED);
146 when(mMockAppOps.noteOp(AppOpsManager.OP_READ_SMS, UID, PACKAGE))
147 .thenReturn(AppOpsManager.MODE_ALLOWED);
156 when(mMockAppOps.noteOp(AppOpsManager
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DLocationControllerImpl.java22 import android.app.AppOpsManager;
47 = new int[] {AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION};
51 private AppOpsManager mAppOpsManager;
69 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
145 List<AppOpsManager.PackageOps> packages
147 // AppOpsManager can return null when there is no requested data.
151 AppOpsManager.PackageOps packageOp = packages.get(packageInd);
152 List<AppOpsManager.OpEntry> opEntries = packageOp.getOps();
156 AppOpsManager.OpEntry opEntry = opEntries.get(opInd);
157 // AppOpsManager shoul
[all...]
/frameworks/base/core/java/com/android/internal/app/
H A DIAppOpsService.aidl19 import android.app.AppOpsManager;
41 List<AppOpsManager.PackageOps> getPackagesForOps(in int[] ops);
42 List<AppOpsManager.PackageOps> getOpsForPackage(int uid, String packageName, in int[] ops);
43 List<AppOpsManager.PackageOps> getUidOps(int uid, in int[] ops);
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/
H A DRecentLocationApps.java19 import android.app.AppOpsManager;
50 AppOpsManager.OP_MONITOR_LOCATION,
51 AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION,
70 AppOpsManager aoManager =
71 (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
72 List<AppOpsManager.PackageOps> appOps = aoManager.getPackagesForOps(LOCATION_OPS);
83 AppOpsManager.PackageOps ops = appOps.get(i);
122 AppOpsManager.PackageOps ops) {
124 List<AppOpsManager.OpEntry> entries = ops.getOps();
130 for (AppOpsManager
[all...]
/frameworks/base/telephony/java/android/telephony/
H A DLocationAccessPolicy.java23 import android.app.AppOpsManager;
77 final int opCode = AppOpsManager.permissionToOpCode(
79 if (opCode != AppOpsManager.OP_NONE && context.getSystemService(AppOpsManager.class)
80 .noteOpNoThrow(opCode, uid, pkgName) != AppOpsManager.MODE_ALLOWED) {
/frameworks/base/tests/net/java/com/android/server/net/
H A DNetworkStatsAccessTest.java24 import android.app.AppOpsManager;
51 @Mock private AppOpsManager mAppOps;
79 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false);
90 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false);
101 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false);
112 setHasAppOpsPermission(AppOpsManager.MODE_ALLOWED, false);
123 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, true);
134 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false);
145 setHasAppOpsPermission(AppOpsManager.MODE_ERRORED, true);
156 setHasAppOpsPermission(AppOpsManager
[all...]
/frameworks/base/services/core/java/com/android/server/
H A DMmsServiceBroker.java21 import android.app.AppOpsManager;
74 private volatile AppOpsManager mAppOpsManager = null;
297 private AppOpsManager getAppOpsManager() {
299 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
337 if (getAppOpsManager().noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(),
338 callingPkg) != AppOpsManager.MODE_ALLOWED) {
355 if (getAppOpsManager().noteOp(AppOpsManager.OP_RECEIVE_MMS, Binder.getCallingUid(),
356 callingPkg) != AppOpsManager.MODE_ALLOWED) {
376 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(),
377 callingPkg) != AppOpsManager
[all...]
H A DAppOpsService.java23 import android.app.AppOpsManager;
98 import static android.app.AppOpsManager._NUM_UID_STATE;
99 import static android.app.AppOpsManager.UID_STATE_BACKGROUND;
100 import static android.app.AppOpsManager.UID_STATE_CACHED;
101 import static android.app.AppOpsManager.UID_STATE_FOREGROUND;
102 import static android.app.AppOpsManager.UID_STATE_FOREGROUND_SERVICE;
103 import static android.app.AppOpsManager.UID_STATE_LAST_NON_RESTRICTED;
104 import static android.app.AppOpsManager.UID_STATE_PERSISTENT;
105 import static android.app.AppOpsManager.UID_STATE_TOP;
333 if (mode == AppOpsManager
[all...]
/frameworks/base/services/core/java/com/android/server/net/
H A DNetworkStatsAccess.java26 import android.app.AppOpsManager;
174 AppOpsManager appOps = (AppOpsManager) context.getSystemService(
177 final int mode = appOps.noteOp(AppOpsManager.OP_GET_USAGE_STATS,
179 if (mode == AppOpsManager.MODE_DEFAULT) {
186 return (mode == AppOpsManager.MODE_ALLOWED);
/frameworks/base/core/java/android/content/
H A DPermissionChecker.java22 import android.app.AppOpsManager;
97 AppOpsManager appOpsManager = context.getSystemService(AppOpsManager.class);
112 != AppOpsManager.MODE_ALLOWED) {
/frameworks/base/core/tests/coretests/src/android/provider/
H A DTestDocumentsProvider.java20 import android.app.AppOpsManager;
97 return AppOpsManager.MODE_ALLOWED;
102 return AppOpsManager.MODE_ALLOWED;
119 return Mockito.mock(AppOpsManager.class);
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
H A DWifiPermissionsUtilTest.java29 import android.app.AppOpsManager;
71 @Mock private AppOpsManager mMockAppOps;
173 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
196 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
240 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
262 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
285 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
312 mAllowCoarseLocationApps = AppOpsManager.MODE_ALLOWED;
313 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
359 mWifiScanAllowApps = AppOpsManager
[all...]
/frameworks/base/tests/permission/src/com/android/framework/permission/tests/
H A DServiceManagerPermissionTests.java21 import android.app.AppOpsManager;
60 return AppOpsManager.MODE_ALLOWED;

Completed in 300 milliseconds

1234567