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

1234

/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) {
62 public boolean isRuntimePermission(String permission) {
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/opt/chips/src/com/android/ex/chips/
H A DChipsUtil.java29 * Listener that gets notified when we check whether we have permission.
32 void onPermissionCheck(String permission, boolean granted); argument
39 new String[] { Manifest.permission.READ_CONTACTS };
51 * <p>This is interesting for us because new permission model is introduced in M and we need to
59 * Returns {@link PackageManager#PERMISSION_GRANTED} if given permission is granted, or
62 public static int checkPermission(Context context, String permission) { argument
64 // TODO: Use "context.checkSelfPermission(permission)" once it's safe to move to M sdk
65 return context.checkPermission(permission, Process.myPid(), Process.myUid());
67 // Assume that we have permission before M.
80 for (String permission
[all...]
/frameworks/support/compat/api23/android/support/v4/app/
H A DAppOpsManagerCompat23.java26 public static String permissionToOp(String permission) { argument
27 return AppOpsManager.permissionToOp(permission);
H A DActivityCompatApi23.java49 String permission) {
50 return activity.shouldShowRequestPermissionRationale(permission);
48 shouldShowRequestPermissionRationale(Activity activity, String permission) argument
/frameworks/support/v13/api23/android/support/v13/app/
H A DFragmentCompat23.java28 String permission) {
29 return fragment.shouldShowRequestPermissionRationale(permission);
27 shouldShowRequestPermissionRationale(Fragment fragment, String permission) argument
/frameworks/base/core/java/android/content/pm/permission/
H A DRuntimePermissionPresentationInfo.java17 package android.content.pm.permission;
25 * This class contains information about how a runtime permission
26 * is to be presented in the UI. A single runtime permission
28 * permissions, e.g. the location permission may control both the
44 * @param label The permission label.
45 * @param granted Whether the permission is granted.
46 * @param standard Whether this is a platform-defined permission.
67 * @return Whether the permission is granted.
74 * @return Whether the permission is platform-defined.
81 * Gets the permission labe
[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);
/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);
71 virtual bool isRuntimePermission(const String16& permission) argument
75 data.writeString16(permission);
93 String16 permission = data.readString16(); local
96 bool res = checkPermission(permission, pid, uid);
118 String16 permission = data.readString16(); local
119 const bool res = isRuntimePermission(permission);
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 DAppOpsManager.cpp107 int32_t AppOpsManager::permissionToOpCode(const String16& permission) { argument
110 return service->permissionToOpCode(permission);
H A DIAppOpsService.cpp116 virtual int32_t permissionToOpCode(const String16& permission) { argument
119 data.writeString16(permission);
203 String16 permission = data.readString16(); local
204 const int32_t opCode = permissionToOpCode(permission);
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
84 bool res = pc->checkPermission(permission, pid, uid);
89 String8(permission).string(), uid, pid);
94 // Is this a permission failure, or did the controller go away?
97 String8(permission)
[all...]
/frameworks/support/compat/java/android/support/v4/app/
H A DAppOpsManagerCompat.java54 public String permissionToOp(String permission) { argument
72 public String permissionToOp(String permission) { argument
73 return AppOpsManagerCompat23.permissionToOp(permission);
99 * Gets the app op name associated with a given permission.
101 * @param permission The permission.
102 * @return The app op associated with the permission or null.
104 public static String permissionToOp(@NonNull String permission) { argument
105 return IMPL.permissionToOp(permission);
/frameworks/support/core-utils/java/android/support/v4/content/
H A DPermissionChecker.java31 * This class provides permission check APIs that verify both the
32 * permission and the associated app op for this permission if
35 * In the new permission model permissions with protection level
40 * permission revocations and would crash. Therefore, when the
41 * user disables a permission for a legacy app in the UI the
42 * platform disables the APIs guarded by this permission making
50 * permission model for which the user had disabled the "permission"
55 /** Permission result: The permission i
87 checkPermission(@onNull Context context, @NonNull String permission, int pid, int uid, String packageName) argument
123 checkSelfPermission(@onNull Context context, @NonNull String permission) argument
140 checkCallingPermission(@onNull Context context, @NonNull String permission, String packageName) argument
158 checkCallingOrSelfPermission(@onNull Context context, @NonNull String permission) argument
[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
79 permission = orig.permission;
90 pw.println(prefix + "permission=" + permission);
107 dest.writeString(permission);
123 permission = source.readString();
/frameworks/base/core/java/android/test/
H A DAndroidTestCase.java88 * Asserts that launching a given activity is protected by a particular permission by
90 * is thrown that mentions the permission in its error message.
97 * @param permission The name of the permission.
100 String packageName, String className, String permission) {
107 fail("expected security exception for " + permission);
110 assertTrue("error message should contain " + permission + ".",
111 expected.getMessage().contains(permission));
117 * Asserts that reading from the content uri requires a particular permission by querying the
118 * uri and ensuring a {@link SecurityException} is thrown mentioning the particular permission
99 assertActivityRequiresPermission( String packageName, String className, String permission) argument
123 assertReadingContentUriRequiresPermission(Uri uri, String permission) argument
142 assertWritingContentUriRequiresPermission(Uri uri, String permission) argument
[all...]
/frameworks/support/v13/java/android/support/v13/app/
H A DFragmentCompat.java39 boolean shouldShowRequestPermissionRationale(Fragment fragment, String permission); argument
78 public boolean shouldShowRequestPermissionRationale(Fragment fragment, String permission) { argument
104 public boolean shouldShowRequestPermissionRationale(Fragment fragment, String permission) { argument
105 return FragmentCompat23.shouldShowRequestPermissionRationale(fragment, permission);
132 * This interface is the contract for receiving the results for permission requests.
189 * and the results of permission requests will be delivered to its
194 * Note that requesting a permission does not guarantee it will be granted and
195 * your app should be able to run without having this permission.
206 * When checking whether you have a permission you should use {@link
227 * Gets whether you should show UI with rationale for requesting a permission
247 shouldShowRequestPermissionRationale(@onNull Fragment fragment, @NonNull 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;
21 import static android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS;
71 // Keys are App IDs. Values are true for SYSTEM permission and false for NETWORK permission.
133 Boolean permission = mApps.get(uid);
136 if (permission == null || permission == NETWORK) {
153 private boolean hasPermission(PackageInfo app, String permission) { argument
156 if (permission
[all...]
/frameworks/base/services/tests/servicestests/src/com/android/server/content/
H A DSyncStorageEngineTest.java332 public void enforceCallingOrSelfPermission(String permission, String message) { argument
/frameworks/compile/mclinker/lib/Core/
H A DLinker.cpp259 FileHandle::Permission permission; local
263 permission = FileHandle::Permission(0x644);
268 permission = FileHandle::Permission(0x755);
274 bool result = file.open(sys::fs::Path(pPath), open_mode, permission);

Completed in 511 milliseconds

1234