Home
last modified time | relevance | path

Searched refs:AppOpsManager (Results 1 – 25 of 59) sorted by relevance

123

/frameworks/base/core/java/android/app/
DAppOpsManager.java48 public class AppOpsManager { class
570 AppOpsManager.MODE_ALLOWED,
571 AppOpsManager.MODE_ALLOWED,
572 AppOpsManager.MODE_ALLOWED,
573 AppOpsManager.MODE_ALLOWED,
574 AppOpsManager.MODE_ALLOWED,
575 AppOpsManager.MODE_ALLOWED,
576 AppOpsManager.MODE_ALLOWED,
577 AppOpsManager.MODE_ALLOWED,
578 AppOpsManager.MODE_ALLOWED,
[all …]
DAppOpsManager.aidl19 parcelable AppOpsManager.PackageOps;
20 parcelable AppOpsManager.OpEntry;
/frameworks/base/services/core/java/com/android/server/
DMmsServiceBroker.java20 import android.app.AppOpsManager;
72 private volatile AppOpsManager mAppOpsManager = null;
188 private AppOpsManager getAppOpsManager() { in getAppOpsManager()
190 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in getAppOpsManager()
228 if (getAppOpsManager().noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), in sendMessage()
229 callingPkg) != AppOpsManager.MODE_ALLOWED) { in sendMessage()
246 if (getAppOpsManager().noteOp(AppOpsManager.OP_RECEIVE_MMS, Binder.getCallingUid(), in downloadMessage()
247 callingPkg) != AppOpsManager.MODE_ALLOWED) { in downloadMessage()
268 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in importTextMessage()
269 callingPkg) != AppOpsManager.MODE_ALLOWED) { in importTextMessage()
[all …]
DAppOpsService.java34 import android.app.AppOpsManager;
129 mode = AppOpsManager.opToDefaultMode(op); in Op()
284 private ArrayList<AppOpsManager.OpEntry> collectOps(Ops pkgOps, int[] ops) { in collectOps()
285 ArrayList<AppOpsManager.OpEntry> resOps = null; in collectOps()
287 resOps = new ArrayList<AppOpsManager.OpEntry>(); in collectOps()
290 resOps.add(new AppOpsManager.OpEntry(curOp.op, curOp.mode, curOp.time, in collectOps()
298 resOps = new ArrayList<AppOpsManager.OpEntry>(); in collectOps()
300 resOps.add(new AppOpsManager.OpEntry(curOp.op, curOp.mode, curOp.time, in collectOps()
309 public List<AppOpsManager.PackageOps> getPackagesForOps(int[] ops) { in getPackagesForOps()
312 ArrayList<AppOpsManager.PackageOps> res = null; in getPackagesForOps()
[all …]
DVibratorService.java19 import android.app.AppOpsManager;
393 int mode = mAppOpsService.checkAudioOperation(AppOpsManager.OP_VIBRATE, in startVibrationLocked()
395 if (mode == AppOpsManager.MODE_ALLOWED) { in startVibrationLocked()
396 mode = mAppOpsService.startOperation(AppOpsManager.getToken(mAppOpsService), in startVibrationLocked()
397 AppOpsManager.OP_VIBRATE, vib.mUid, vib.mOpPkg); in startVibrationLocked()
399 if (mode != AppOpsManager.MODE_ALLOWED) { in startVibrationLocked()
400 if (mode == AppOpsManager.MODE_ERRORED) { in startVibrationLocked()
422 mAppOpsService.finishOperation(AppOpsManager.getToken(mAppOpsService), in reportFinishVibrationLocked()
423 AppOpsManager.OP_VIBRATE, mCurrentVibration.mUid, in reportFinishVibrationLocked()
/frameworks/native/libs/binder/
DAppOpsManager.cpp38 AppOpsManager::AppOpsManager() in AppOpsManager() function in android::AppOpsManager
42 sp<IAppOpsService> AppOpsManager::getService() in getService()
68 int32_t AppOpsManager::checkOp(int32_t op, int32_t uid, const String16& callingPackage) in checkOp()
74 int32_t AppOpsManager::noteOp(int32_t op, int32_t uid, const String16& callingPackage) { in noteOp()
79 int32_t AppOpsManager::startOp(int32_t op, int32_t uid, const String16& callingPackage) { in startOp()
85 void AppOpsManager::finishOp(int32_t op, int32_t uid, const String16& callingPackage) { in finishOp()
92 void AppOpsManager::startWatchingMode(int32_t op, const String16& packageName, in startWatchingMode()
100 void AppOpsManager::stopWatchingMode(const sp<IAppOpsCallback>& callback) { in stopWatchingMode()
DAndroid.mk17 AppOpsManager.cpp \
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DSmsApplication.java21 import android.app.AppOpsManager;
355 AppOpsManager appOps = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); in getApplication()
363 int mode = appOps.checkOp(AppOpsManager.OP_WRITE_SMS, applicationData.mUid, in getApplication()
365 if (mode != AppOpsManager.MODE_ALLOWED) { in getApplication()
369 appOps.setMode(AppOpsManager.OP_WRITE_SMS, applicationData.mUid, in getApplication()
370 applicationData.mPackageName, AppOpsManager.MODE_ALLOWED); in getApplication()
391 int mode = appOps.checkOp(AppOpsManager.OP_WRITE_SMS, info.applicationInfo.uid, in getApplication()
393 if (mode != AppOpsManager.MODE_ALLOWED) { in getApplication()
395 appOps.setMode(AppOpsManager.OP_WRITE_SMS, info.applicationInfo.uid, in getApplication()
396 PHONE_PACKAGE_NAME, AppOpsManager.MODE_ALLOWED); in getApplication()
[all …]
DIccSmsInterfaceManager.java20 import android.app.AppOpsManager;
82 final protected AppOpsManager mAppOps;
131 mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in IccSmsInterfaceManager()
200 if (mAppOps.noteOp(AppOpsManager.OP_WRITE_ICC_SMS, Binder.getCallingUid(), in updateMessageOnIccEf()
201 callingPackage) != AppOpsManager.MODE_ALLOWED) { in updateMessageOnIccEf()
254 if (mAppOps.noteOp(AppOpsManager.OP_WRITE_ICC_SMS, Binder.getCallingUid(), in copyMessageToIccEf()
255 callingPackage) != AppOpsManager.MODE_ALLOWED) { in copyMessageToIccEf()
292 if (mAppOps.noteOp(AppOpsManager.OP_READ_ICC_SMS, Binder.getCallingUid(), in getAllMessagesFromIccEf()
293 callingPackage) != AppOpsManager.MODE_ALLOWED) { in getAllMessagesFromIccEf()
355 if (mAppOps.noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), in sendData()
[all …]
DCellBroadcastHandler.java21 import android.app.AppOpsManager;
86 appOp = AppOpsManager.OP_RECEIVE_EMERGECY_SMS; in handleBroadcastSms()
91 appOp = AppOpsManager.OP_RECEIVE_SMS; in handleBroadcastSms()
/frameworks/base/cmds/appops/src/com/android/commands/appops/
DAppOpsCommand.java21 import android.app.AppOpsManager;
91 return AppOpsManager.strOpToOp(op); in strOpToOp()
99 return AppOpsManager.strDebugOpToOp(op); in strOpToOp()
146 modeInt = AppOpsManager.MODE_ALLOWED; in runSet()
149 modeInt = AppOpsManager.MODE_ERRORED; in runSet()
152 modeInt = AppOpsManager.MODE_IGNORED; in runSet()
155 modeInt = AppOpsManager.MODE_DEFAULT; in runSet()
219 List<AppOpsManager.PackageOps> ops = appOpsService.getOpsForPackage(uid, packageName, in runGet()
227 List<AppOpsManager.OpEntry> entries = ops.get(i).getOps(); in runGet()
229 AppOpsManager.OpEntry ent = entries.get(j); in runGet()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DLocationControllerImpl.java20 import android.app.AppOpsManager;
48 = new int[] {AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION};
52 private AppOpsManager mAppOpsManager;
67 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in LocationControllerImpl()
154 List<AppOpsManager.PackageOps> packages in areActiveHighPowerLocationRequests()
160 AppOpsManager.PackageOps packageOp = packages.get(packageInd); in areActiveHighPowerLocationRequests()
161 List<AppOpsManager.OpEntry> opEntries = packageOp.getOps(); in areActiveHighPowerLocationRequests()
165 AppOpsManager.OpEntry opEntry = opEntries.get(opInd); in areActiveHighPowerLocationRequests()
168 if (opEntry.getOp() == AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION) { in areActiveHighPowerLocationRequests()
/frameworks/base/services/core/java/com/android/server/clipboard/
DClipboardService.java21 import android.app.AppOpsManager;
64 private final AppOpsManager mAppOps;
102 mAppOps = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); in ClipboardService()
166 if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD, callingUid, in setPrimaryClip()
167 callingPackage) != AppOpsManager.MODE_ALLOWED) { in setPrimaryClip()
231 if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD, li.mUid, in setPrimaryClipInternal()
232 li.mPackageName) == AppOpsManager.MODE_ALLOWED) { in setPrimaryClipInternal()
249 if (mAppOps.noteOp(AppOpsManager.OP_READ_CLIPBOARD, Binder.getCallingUid(), in getPrimaryClip()
250 pkg) != AppOpsManager.MODE_ALLOWED) { in getPrimaryClip()
260 if (mAppOps.checkOp(AppOpsManager.OP_READ_CLIPBOARD, Binder.getCallingUid(), in getPrimaryClipDescription()
[all …]
/frameworks/base/core/java/android/content/
DContentProvider.java22 import android.app.AppOpsManager;
186 AppOpsManager mAppOpsManager = null;
187 int mReadOp = AppOpsManager.OP_NONE;
188 int mWriteOp = AppOpsManager.OP_NONE;
205 if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in query()
231 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in insert()
246 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in bulkInsert()
275 != AppOpsManager.MODE_ALLOWED) { in applyBatch()
281 != AppOpsManager.MODE_ALLOWED) { in applyBatch()
307 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in delete()
[all …]
/frameworks/base/core/java/com/android/internal/app/
DIAppOpsService.aidl19 import android.app.AppOpsManager;
36 List<AppOpsManager.PackageOps> getPackagesForOps(in int[] ops); in getPackagesForOps()
37 List<AppOpsManager.PackageOps> getOpsForPackage(int uid, String packageName, in int[] ops); in getOpsForPackage()
/frameworks/base/services/core/java/com/android/server/notification/
DZenModeHelper.java23 import android.app.AppOpsManager;
72 private final AppOpsManager mAppOps;
86 mAppOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in ZenModeHelper()
264 mAppOps.setRestriction(AppOpsManager.OP_VIBRATE, usage, in applyRestrictions()
265 mute ? AppOpsManager.MODE_IGNORED : AppOpsManager.MODE_ALLOWED, in applyRestrictions()
267 mAppOps.setRestriction(AppOpsManager.OP_PLAY_AUDIO, usage, in applyRestrictions()
268 mute ? AppOpsManager.MODE_IGNORED : AppOpsManager.MODE_ALLOWED, in applyRestrictions()
/frameworks/native/include/binder/
DAppOpsManager.h27 class AppOpsManager
69 AppOpsManager();
/frameworks/base/core/java/android/net/
DNetworkScorerAppManager.java22 import android.app.AppOpsManager;
190 AppOpsManager appOpsMgr = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in isCallerActiveScorer()
/frameworks/base/services/core/java/com/android/server/location/
DGeofenceManager.java24 import android.app.AppOpsManager;
72 private final AppOpsManager mAppOps;
112 mAppOps = (AppOpsManager)mContext.getSystemService(Context.APP_OPS_SERVICE); in GeofenceManager()
269 if (mAppOps.noteOpNoThrow(AppOpsManager.OP_FINE_LOCATION, state.mUid, in updateFences()
270 state.mPackageName) != AppOpsManager.MODE_ALLOWED) { in updateFences()
/frameworks/base/services/core/java/com/android/server/media/projection/
DMediaProjectionManagerService.java22 import android.app.AppOpsManager;
70 private final AppOpsManager mAppOps;
84 mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in MediaProjectionManagerService()
220 AppOpsManager.OP_PROJECT_MEDIA, uid, packageName) in hasProjectionPermission()
221 == AppOpsManager.MODE_ALLOWED; in hasProjectionPermission()
244 mAppOps.setMode(AppOpsManager.OP_PROJECT_MEDIA, in createProjection()
245 projection.uid, projection.packageName, AppOpsManager.MODE_ALLOWED); in createProjection()
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsService.java20 import android.app.AppOpsManager;
80 AppOpsManager mAppOps;
94 mAppOps = (AppOpsManager) getContext().getSystemService(Context.APP_OPS_SERVICE); in onStart()
383 final int mode = mAppOps.checkOp(AppOpsManager.OP_GET_USAGE_STATS, in hasPermission()
385 if (mode == AppOpsManager.MODE_DEFAULT) { in hasPermission()
391 return mode == AppOpsManager.MODE_ALLOWED; in hasPermission()
/frameworks/base/services/core/java/com/android/server/power/
DNotifier.java20 import android.app.AppOpsManager;
161 mAppOps.startOperation(AppOpsManager.getToken(mAppOps), in onWakeLockAcquired()
162 AppOpsManager.OP_WAKE_LOCK, ownerUid, packageName); in onWakeLockAcquired()
221 mAppOps.finishOperation(AppOpsManager.getToken(mAppOps), in onWakeLockReleased()
222 AppOpsManager.OP_WAKE_LOCK, ownerUid, packageName); in onWakeLockReleased()
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpn.java28 import android.app.AppOpsManager;
305 AppOpsManager appOps = in setPackageAuthorization()
306 (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in setPackageAuthorization()
307 appOps.setMode(AppOpsManager.OP_ACTIVATE_VPN, mOwnerUID, mPackage, in setPackageAuthorization()
308 authorized ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_IGNORED); in setPackageAuthorization()
317 AppOpsManager appOps = in isVpnUserPreConsented()
318 (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in isVpnUserPreConsented()
321 return appOps.noteOpNoThrow(AppOpsManager.OP_ACTIVATE_VPN, Binder.getCallingUid(), in isVpnUserPreConsented()
322 packageName) == AppOpsManager.MODE_ALLOWED; in isVpnUserPreConsented()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cdma/
DCdmaServiceCategoryProgramHandler.java21 import android.app.AppOpsManager;
110 AppOpsManager.OP_RECEIVE_SMS, mScpResultsReceiver, in handleServiceCategoryProgramData()
/frameworks/av/services/camera/libcameraservice/
DCameraService.cpp1437 mAppOpsManager.startWatchingMode(AppOpsManager::OP_CAMERA, in startCameraOps()
1439 res = mAppOpsManager.startOp(AppOpsManager::OP_CAMERA, in startCameraOps()
1442 if (res != AppOpsManager::MODE_ALLOWED) { in startCameraOps()
1461 mAppOpsManager.finishOp(AppOpsManager::OP_CAMERA, mClientUid, in finishCameraOps()
1490 if (op != AppOpsManager::OP_CAMERA) { in opChanged()
1496 res = mAppOpsManager.checkOp(AppOpsManager::OP_CAMERA, in opChanged()
1499 res == AppOpsManager::MODE_ALLOWED ? "ALLOWED" : in opChanged()
1500 res == AppOpsManager::MODE_IGNORED ? "IGNORED" : in opChanged()
1501 res == AppOpsManager::MODE_ERRORED ? "ERRORED" : in opChanged()
1504 if (res != AppOpsManager::MODE_ALLOWED) { in opChanged()

123