Searched defs:permission (Results 1 - 25 of 47) sorted by relevance

12

/frameworks/base/tests/permission/src/com/android/framework/permission/tests/
H A DServiceManagerPermissionTests.java17 package com.android.framework.permission.tests;
52 public boolean checkPermission(java.lang.String permission, int pid, int uid) {
H A DSmsManagerPermissionTest.java17 package com.android.framework.permission.tests;
38 * {@link android.Manifest.permission#SEND_SMS}.
54 * {@link android.Manifest.permission#SEND_SMS}.
70 * {@link android.Manifest.permission#SEND_MMS}.
H A DVibratorServicePermissionTest.java17 package com.android.framework.permission.tests;
45 * <p>Tests permission:
46 * {@link android.Manifest.permission#VIBRATE}
62 * <p>Tests permission:
63 * {@link android.Manifest.permission#VIBRATE}
78 * <p>Tests permission:
79 * {@link android.Manifest.permission#VIBRATE}
H A DWindowManagerPermissionTests.java17 package com.android.framework.permission.tests;
H A DActivityManagerPermissionTests.java17 package com.android.framework.permission.tests;
H A DPmPermissionsTests.java17 package com.android.framework.permission.tests;
29 private String mPkgName = "com.android.framework.permission.tests";
38 * This test verifies that PackageManger.getPackageSizeInfo enforces permission
39 * android.permission.GET_PACKAGE_SIZE
53 * This test verifies that PackageManger.DeleteApplicationCacheFiles enforces permission
54 * android.permission.DELETE_CACHE_FILES
68 * This test verifies that PackageManger.installPackage enforces permission
69 * android.permission.INSTALL_PACKAGES
88 * enforces permission android.permission
[all...]
/frameworks/native/libs/binder/
H A DIPermissionController.cpp39 virtual bool checkPermission(const String16& permission, int32_t pid, int32_t uid) argument
43 data.writeString16(permission);
64 String16 permission = data.readString16(); local
67 bool res = checkPermission(permission, pid, uid);
H A DPermissionCache.cpp38 const String16& permission, uid_t uid) const {
41 e.name = permission;
51 void PermissionCache::cache(const String16& permission, argument
55 ssize_t index = mPermissionNamesPool.indexOf(permission);
59 mPermissionNamesPool.add(permission);
60 e.name = permission;
63 // permission checks
77 bool PermissionCache::checkCallingPermission(const String16& permission) { argument
78 return PermissionCache::checkCallingPermission(permission, NULL, NULL);
82 const String16& permission, int32_
37 check(bool* granted, const String16& permission, uid_t uid) const argument
81 checkCallingPermission( const String16& permission, int32_t* outPid, int32_t* outUid) argument
91 checkPermission( const String16& permission, pid_t pid, uid_t uid) argument
[all...]
H A DIServiceManager.cpp50 bool checkCallingPermission(const String16& permission) argument
52 return checkCallingPermission(permission, NULL, NULL);
55 static String16 _permission("permission");
58 bool checkCallingPermission(const String16& permission, int32_t* outPid, int32_t* outUid) argument
65 return checkPermission(permission, pid, uid);
68 bool checkPermission(const String16& permission, pid_t pid, uid_t uid) argument
79 bool res = pc->checkPermission(permission, pid, uid);
84 String8(permission).string(), uid, pid);
89 // Is this a permission failure, or did the controller go away?
92 String8(permission)
[all...]
/frameworks/base/core/java/android/content/pm/
H A DServiceInfo.java31 * Optional name of a permission required to be able to access this
32 * Service. From the "permission" attribute.
34 public String permission; field in class:ServiceInfo
72 permission = orig.permission;
78 pw.println(prefix + "permission=" + permission);
94 dest.writeString(permission);
110 permission = source.readString();
H A DActivityInfo.java135 * Optional name of a permission required to be able to access this
136 * Activity. From the "permission" attribute.
138 public String permission; field in class:ActivityInfo
651 permission = orig.permission;
685 if (permission != null) {
686 pw.println(prefix + "permission=" + permission);
722 dest.writeString(permission);
749 permission
[all...]
H A DApplicationInfo.java48 * Optional name of a permission required to be able to access this
49 * application's components. From the "permission" attribute.
51 public String permission; field in class:ApplicationInfo
136 * {@link android.Manifest.permission#FACTORY_TEST} permission and the
595 if (permission != null) {
596 pw.println(prefix + "permission=" + permission);
678 permission = orig.permission;
[all...]
/frameworks/base/services/core/java/com/android/server/firewall/
H A DSenderPermissionFilter.java31 private SenderPermissionFilter(String permission) { argument
32 mPermission = permission;
45 public static final FilterFactory FACTORY = new FilterFactory("sender-permission") {
49 String permission = parser.getAttributeValue(null, ATTR_NAME);
50 if (permission == null) {
54 return new SenderPermissionFilter(permission);
H A DIntentFirewall.java581 int checkComponentPermission(String permission, int pid, int uid, argument
589 * @param permission If present, the caller must have this permission
596 boolean checkComponentPermission(String permission, int pid, int uid, int owningUid, argument
598 return mAms.checkComponentPermission(permission, pid, uid, owningUid, exported) ==
/frameworks/base/core/java/android/test/
H A DAndroidTestCase.java80 * Asserts that launching a given activity is protected by a particular permission by
82 * is thrown that mentions the permission in its error message.
89 * @param permission The name of the permission.
92 String packageName, String className, String permission) {
99 fail("expected security exception for " + permission);
102 assertTrue("error message should contain " + permission + ".",
103 expected.getMessage().contains(permission));
109 * Asserts that reading from the content uri requires a particular permission by querying the
110 * uri and ensuring a {@link SecurityException} is thrown mentioning the particular permission
91 assertActivityRequiresPermission( String packageName, String className, String permission) argument
115 assertReadingContentUriRequiresPermission(Uri uri, String permission) argument
134 assertWritingContentUriRequiresPermission(Uri uri, String permission) argument
[all...]
/frameworks/base/services/core/java/com/android/server/connectivity/
H A DPermissionMonitor.java19 import static android.Manifest.permission.CHANGE_NETWORK_STATE;
20 import static android.Manifest.permission.CONNECTIVITY_INTERNAL;
70 // Keys are App IDs. Values are true for SYSTEM permission and false for NETWORK permission.
132 Boolean permission = mApps.get(uid);
135 if (permission == null || permission == NETWORK) {
152 private boolean hasPermission(PackageInfo app, String permission) { argument
155 if (permission.equals(p)) {
240 Boolean permission
[all...]
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/
H A DAccountManagerServiceTest.java236 public int checkCallingOrSelfPermission(final String permission) { argument
/frameworks/base/services/tests/servicestests/src/com/android/server/content/
H A DSyncStorageEngineTest.java908 public void enforceCallingOrSelfPermission(String permission, String message) { argument
/frameworks/base/core/java/android/appwidget/
H A DAppWidgetManager.java798 * <p class="note">You need the BIND_APPWIDGET permission or the user must have enabled binding
817 * <p class="note">You need the BIND_APPWIDGET permission or the user must have enabled binding
839 * <p class="note">You need the BIND_APPWIDGET permission or the user must have enabled binding
841 * method returns false, call {@link #ACTION_APPWIDGET_BIND} to request permission to
847 * @return true if this component has permission to bind the AppWidget
859 * <p class="note">You need the BIND_APPWIDGET permission or the user must have enabled binding
861 * method returns false, call {@link #ACTION_APPWIDGET_BIND} to request permission to
870 * @return true if this component has permission to bind the AppWidget
881 * Set the provider for a given appWidgetId if the caller has a permission.
883 * <strong>Note:</strong> You need the {@link android.Manifest.permission#BIND_APPWIDGE
957 setBindAppWidgetPermission(String packageName, boolean permission) argument
975 setBindAppWidgetPermission(String packageName, int userId, boolean permission) argument
[all...]
/frameworks/base/services/core/java/com/android/server/
H A DMmsServiceBroker.java227 mContext.enforceCallingPermission(Manifest.permission.SEND_SMS, "Send MMS message");
244 mContext.enforceCallingPermission(Manifest.permission.RECEIVE_MMS,
267 mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS, "Import SMS message");
282 mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS, "Import MMS message");
296 mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS,
308 mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS, "Delete conversation");
319 mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS,
328 mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS,
337 mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS, "Add SMS draft");
350 mContext.enforceCallingPermission(Manifest.permission
398 adjustUriForUserAndGrantPermission(Uri contentUri, String action, int permission) argument
[all...]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
H A DUiccSmsController.java241 public void setPremiumSmsPermission(String packageName, int permission) { argument
242 setPremiumSmsPermissionForSubscriber(getPreferredSmsSubscription(), packageName, permission);
246 public void setPremiumSmsPermissionForSubscriber(int subId, String packageName, int permission) { argument
249 iccSmsIntMgr.setPremiumSmsPermission(packageName, permission);
/frameworks/base/core/tests/coretests/src/android/app/activity/
H A DBroadcastTest.java177 public void registerMyReceiver(IntentFilter filter, String permission) { argument
180 getContext().registerReceiver(mReceiver, filter, permission, null);
/frameworks/base/services/core/java/com/android/server/am/
H A DServiceRecord.java73 final String permission;// permission needed to access service field in class:ServiceRecord
207 if (permission != null) {
208 pw.print(prefix); pw.print("permission="); pw.println(permission);
315 permission = sInfo.permission;
/frameworks/base/services/core/java/com/android/server/dreams/
H A DDreamManagerService.java19 import static android.Manifest.permission.BIND_DREAM_SERVICE;
266 && !BIND_DREAM_SERVICE.equals(serviceInfo.permission)) {
269 + " permission on the dream service declaration.");
408 private void checkPermission(String permission) { argument
409 if (mContext.checkCallingOrSelfPermission(permission)
412 + ", must have permission " + permission);
465 if (mContext.checkCallingOrSelfPermission(Manifest.permission.DUMP)
483 checkPermission(android.Manifest.permission.READ_DREAM_STATE);
496 checkPermission(android.Manifest.permission
[all...]
/frameworks/base/services/core/java/com/android/server/media/projection/
H A DMediaProjectionManagerService.java57 * as well as the capabilities they grant. Any service using MediaProjection tokens as permission
218 android.Manifest.permission.CAPTURE_VIDEO_OUTPUT)
231 if (mContext.checkCallingPermission(Manifest.permission.MANAGE_MEDIA_PROJECTION)
234 + "projection permission");
261 if (mContext.checkCallingPermission(Manifest.permission.MANAGE_MEDIA_PROJECTION)
276 if (mContext.checkCallingPermission(Manifest.permission.MANAGE_MEDIA_PROJECTION)
294 if (mContext.checkCallingPermission(Manifest.permission.MANAGE_MEDIA_PROJECTION)
309 if (mContext.checkCallingPermission(Manifest.permission.MANAGE_MEDIA_PROJECTION)
325 || mContext.checkCallingOrSelfPermission(Manifest.permission.DUMP)
341 private boolean checkPermission(String packageName, String permission) { argument
[all...]

Completed in 1604 milliseconds

12