Home
last modified time | relevance | path

Searched full:uid (Results 1 – 25 of 14548) sorted by relevance

12345678910>>...582

/aosp_15_r20/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DWifiPermissionsUtil.java114 public CallerIdentity(int uid, int pid, String packageName, String featureId) { in CallerIdentity() argument
115 mUid = uid; in CallerIdentity()
141 + "Uid= " + mUid in toString()
152 * @param uid uid of the app.
155 public boolean checkConfigOverridePermission(int uid) { in checkConfigOverridePermission() argument
156 return mWifiPermissionsWrapper.getOverrideWifiConfigPermission(uid) in checkConfigOverridePermission()
165 * @param uid The uid of the package
167 public void enforceLocationPermission(String pkgName, @Nullable String featureId, int uid) { in enforceLocationPermission() argument
169 uid, /* coarseForTargetSdkLessThanQ */ true, null)) { in enforceLocationPermission()
171 "UID " + uid + " does not have Coarse/Fine Location permission"); in enforceLocationPermission()
[all …]
/aosp_15_r20/frameworks/base/services/tests/mockingservicestests/assets/AppOpsUpgradeTest/
H A Dappops-version-1.xml3 <uid n="1001">
9 </uid>
10 <uid n="1002">
15 </uid>
16 <uid n="10077">
18 </uid>
19 <uid n="10079">
21 </uid>
22 <uid n="10080">
24 </uid>
[all …]
H A Dappops-version-3.xml19 <uid n="1001">
25 </uid>
26 <uid n="1002">
31 </uid>
32 <uid n="10077">
34 </uid>
35 <uid n="10079">
37 </uid>
38 <uid n="10080">
40 </uid>
[all …]
H A Dappops-unversioned.xml3 <uid n="1001">
5 </uid>
6 <uid n="10052">
8 </uid>
10 <uid n="1000" p="true">
13 </uid>
16 <uid n="1000" p="true">
24 </uid>
27 <uid n="1000" p="true">
29 </uid>
[all …]
/aosp_15_r20/frameworks/base/services/tests/mockingservicestests/src/com/android/server/appop/
H A DAppOpsUidStateTrackerTest.java73 private static final int UID = 10001; field in AppOpsUidStateTrackerTest
127 procStateBuilder(UID) in testNoCapability()
131 assertEquals(MODE_IGNORED, mIntf.evalMode(UID, OP_RECORD_AUDIO, MODE_FOREGROUND)); in testNoCapability()
132 assertEquals(MODE_IGNORED, mIntf.evalMode(UID, OP_CAMERA, MODE_FOREGROUND)); in testNoCapability()
133 assertEquals(MODE_IGNORED, mIntf.evalMode(UID, OP_COARSE_LOCATION, MODE_FOREGROUND)); in testNoCapability()
134 assertEquals(MODE_IGNORED, mIntf.evalMode(UID, OP_FINE_LOCATION, MODE_FOREGROUND)); in testNoCapability()
136 mIntf.evalMode(UID, OP_RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO, MODE_FOREGROUND)); in testNoCapability()
141 procStateBuilder(UID) in testForegroundWithMicrophoneCapability()
146 assertEquals(MODE_ALLOWED, mIntf.evalMode(UID, OP_RECORD_AUDIO, MODE_FOREGROUND)); in testForegroundWithMicrophoneCapability()
148 mIntf.evalMode(UID, OP_RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO, MODE_FOREGROUND)); in testForegroundWithMicrophoneCapability()
[all …]
/aosp_15_r20/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
H A DRecoverableKeyStoreDbTest.java82 int uid = 10009; in insertKey_replacesOldKey() local
90 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in insertKey_replacesOldKey()
92 WrappedKey retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias); in insertKey_replacesOldKey()
103 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in insertKey_replacesOldKey()
105 retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias); in insertKey_replacesOldKey()
127 mRecoverableKeyStoreDb.insertKey(userId, /*uid=*/ 1, alias, key1); in insertKey_allowsTwoUidsToHaveSameAlias()
128 mRecoverableKeyStoreDb.insertKey(userId, /*uid=*/ 2, alias, key2); in insertKey_allowsTwoUidsToHaveSameAlias()
141 int uid = 60001; in removeKey_removesAKey() local
148 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, key); in removeKey_removesAKey()
150 assertTrue(mRecoverableKeyStoreDb.removeKey(uid, alias)); in removeKey_removesAKey()
[all …]
/aosp_15_r20/frameworks/av/media/module/libmediatranscoding/tests/
H A DTranscodingSessionController_tests.cpp53 #define UID(n) (kClientUid + (n)) macro
62 void registerMonitorUid(uid_t /*uid*/) override {} in registerMonitorUid()
63 void unregisterMonitorUid(uid_t /*uid*/) override {} in unregisterMonitorUid()
64 bool isUidOnTop(uid_t uid) override { return mTopUids.count(uid) > 0; } in isUidOnTop() argument
69 void setTop(uid_t uid) { in setTop() argument
70 std::unordered_set<uid_t> uids = {uid}; in setTop()
321 CLIENT(0), UID(0)); in SetUp()
323 CLIENT(1), UID(1)); in SetUp()
325 CLIENT(2), UID(2)); in SetUp()
327 CLIENT(3), UID(3)); in SetUp()
[all …]
/aosp_15_r20/packages/modules/Wifi/service/java/com/android/server/wifi/aware/
DWifiAwareServiceImpl.java76 * (permission and clientID-UID mapping) checks and delegates execution to the
214 int uid = getMockableCallingUid(); in enableInstantCommunicationMode() local
215 if (uid != Process.SHELL_UID && uid != Process.ROOT_UID) { in enableInstantCommunicationMode()
216 mWifiPermissionsUtil.checkPackage(uid, callingPackage); in enableInstantCommunicationMode()
217 if (!mWifiPermissionsUtil.isSystem(callingPackage, uid) in enableInstantCommunicationMode()
218 && !mWifiPermissionsUtil.checkConfigOverridePermission(uid)) { in enableInstantCommunicationMode()
219 Log.i(TAG, "enableInstantCommunicationMode not allowed for uid=" + uid); in enableInstantCommunicationMode()
241 int uid = getMockableCallingUid(); in setAwareParams() local
242 if (!mWifiPermissionsUtil.checkConfigOverridePermission(uid)) { in setAwareParams()
244 + "(uid = " + uid + ")"); in setAwareParams()
[all …]
/aosp_15_r20/frameworks/base/services/core/java/com/android/server/am/
H A DAppRestrictionController.java234 private static final String ATTR_UID = "uid";
261 * A mapping between the UID/Pkg and its pending work which should be triggered on inactive;
262 * an active UID/pkg pair should have an entry here, although its pending work could be null.
303 * The key is the UID, the value is the list of the roles it holds.
382 final int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
383 if (uid >= 0) {
384 onUidAdded(uid);
389 final int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
392 if (uid >= 0 && data != null
394 onPackageRemoved(ssp, uid);
[all …]
H A DHealthStatsBatteryStatsWriter.java47 * Writes the contents of a BatteryStats.Uid into a HealthStatsWriter.
50 public void writeUid(HealthStatsWriter uidWriter, BatteryStats bs, BatteryStats.Uid uid) { in writeUid() argument
53 SparseArray<? extends BatteryStats.Uid.Sensor> sensors; in writeUid()
54 SparseArray<? extends BatteryStats.Uid.Pid> pids; in writeUid()
82 // Now on to the real per-uid stats... in writeUid()
85 for (final Map.Entry<String,? extends BatteryStats.Uid.Wakelock> entry: in writeUid()
86 uid.getWakelockStats().entrySet()) { in writeUid()
88 final BatteryStats.Uid.Wakelock wakelock = entry.getValue(); in writeUid()
109 uid.getSyncStats().entrySet()) { in writeUid()
115 uid.getJobStats().entrySet()) { in writeUid()
[all …]
/aosp_15_r20/frameworks/base/services/core/java/com/android/server/appop/
H A DAppOpsUidStateTrackerImpl.java122 public int getUidState(int uid) { in getUidState() argument
123 return getUidStateLocked(uid); in getUidState()
126 private int getUidStateLocked(int uid) { in getUidStateLocked() argument
127 updateUidPendingStateIfNeeded(uid); in getUidStateLocked()
128 return mUidStates.get(uid, MIN_PRIORITY_UID_STATE); in getUidStateLocked()
132 public int evalMode(int uid, int code, int mode) { in evalMode() argument
137 int uidState = getUidState(uid); in evalMode()
138 int uidCapability = getUidCapability(uid); in evalMode()
139 int result = evalModeInternal(uid, code, uidState, uidCapability); in evalMode()
141 mEventLog.logEvalForegroundMode(uid, uidState, uidCapability, code, result); in evalMode()
[all …]
H A DAppOpsService.java244 // Constant meaning that any UID should be matched when dispatching callbacks
307 * <p>(package name, uid) -> callbacks
319 * <p>(package name, uid) -> list&lt;ops&gt;
438 /** Hands the definition of foreground and uid states */
466 * How long we want for a drop in uid state from top to settle before applying it.
473 * How long we want for a drop in uid state from foreground to settle before applying it.
480 * How long we want for a drop in uid state from background to settle before applying it.
548 public final int uid; field in AppOpsService.UidState
553 public UidState(int uid) { in UidState() argument
554 this.uid = uid; in UidState()
[all …]
/aosp_15_r20/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DPermissionMonitor.java86 * A utility class to inform Netd of UID permissions.
114 // NonNull keys are active non-bypassable and fully-routed VPN's interface name, Values are uid
116 // If key is null, Values are uid ranges for apps under the VPNs which are connected but do not
121 // Items are uid ranges for apps under the VPN Lockdown
124 // So we need to maintain uid range with multiset.
166 final int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
170 onPackageAdded(packageName, uid);
172 final int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
176 onPackageRemoved(packageName, uid);
315 ? UserHandle.getAppId(app.applicationInfo.uid) : INVALID_UID; in updateAllApps()
[all …]
/aosp_15_r20/packages/providers/MediaProvider/src/com/android/providers/media/util/
DPermissionUtils.java75 public static boolean checkPermissionSelf(@NonNull Context context, int pid, int uid) { in checkPermissionSelf() argument
76 return UserHandle.getAppId(android.os.Process.myUid()) == UserHandle.getAppId(uid); in checkPermissionSelf()
83 public static boolean checkPermissionSelf(@UserIdInt int uid) { in checkPermissionSelf() argument
84 return UserHandle.getAppId(android.os.Process.myUid()) == UserHandle.getAppId(uid); in checkPermissionSelf()
88 * Returns {@code true} if the given {@code uid} is a {@link android.os.Process.ROOT_UID} or
91 public static boolean checkPermissionShell(int uid) { in checkPermissionShell() argument
92 switch (uid) { in checkPermissionShell()
102 * @return {@code true} if the given {@code uid} is {@link android.os.Process#SYSTEM_UID},
105 public static boolean checkPermissionSystem(int uid) { in checkPermissionSystem() argument
106 return UserHandle.getAppId(uid) == android.os.Process.SYSTEM_UID; in checkPermissionSystem()
[all …]
/aosp_15_r20/frameworks/base/apex/jobscheduler/service/java/com/android/server/
H A DAppStateTrackerImpl.java72 * - UID foreground/active state
105 * Pair of (uid (not user-id), packageName) with OP_RUN_ANY_IN_BACKGROUND *not* allowed.
164 * A lock-free set of (uid, packageName) pairs in background restricted mode.
178 public void updateBackgroundRestrictedForUidPackage(int uid, String packageName, in addBackgroundRestrictedAppListener()
180 listener.updateBackgroundRestrictedForUidPackage(uid, packageName, restricted); in addBackgroundRestrictedAppListener()
186 public boolean isAppBackgroundRestricted(int uid, @NonNull String packageName) { in isAppBackgroundRestricted() argument
188 return bgRestrictedUidPkgs.contains(Pair.create(uid, packageName)); in isAppBackgroundRestricted()
273 int uid, @NonNull String packageName) { in onRunAnyAppOpsChanged() argument
274 updateJobsForUidPackage(uid, packageName, sender.isUidActive(uid)); in onRunAnyAppOpsChanged()
276 if (!sender.areAlarmsRestricted(uid, packageName)) { in onRunAnyAppOpsChanged()
[all …]
/aosp_15_r20/frameworks/base/services/core/java/com/android/server/net/
H A DNetworkPolicyManagerService.java337 * <li>{@code UL()}: require the "UID" lock ({@code mUidRulesFirstLock}).
380 private static final String TAG_UID_POLICY = "uid-policy";
406 private static final String ATTR_UID = "uid";
451 * Message to indicate that reasons for why an uid is blocked changed.
452 * arg1 = uid
468 * obj = SparseArray<SomeArgs> where key = uid and value = SomeArgs object with
516 * Whether or not metered firewall chains should be used for uid policy controlling access to
558 * Delay after which a uid going into a process state greater than or equal to
569 * Short delay after which a uid going into a process state having priority equal to
582 * Long delay after which a uid going into a process state having priority equal to
[all …]
/aosp_15_r20/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
H A DRecoverableKeyStoreDb.java89 * @param userId The uid of the profile the application is running under.
90 * @param uid Uid of the application to whom the key belongs.
97 public long insertKey(int userId, int uid, String alias, WrappedKey wrappedKey) { in insertKey() argument
101 values.put(KeysEntry.COLUMN_NAME_UID, uid); in insertKey()
118 * Gets the key with {@code alias} for the app with {@code uid}.
122 @Nullable public WrappedKey getKey(int uid, String alias) { in getKey() argument
134 String[] selectionArguments = { Integer.toString(uid), alias }; in getKey()
153 "%d WrappedKey entries found for uid=%d alias='%s'. " in getKey()
154 + "Should only ever be 0 or 1.", count, uid, alias)); in getKey()
181 * Removes key with {@code alias} for app with {@code uid}.
[all …]
/aosp_15_r20/frameworks/av/media/utils/
H A DServiceUtilities.cpp62 const std::optional<String16> opPackageName, uid_t uid) { in resolveCallingPackage() argument
68 // case we will get the packages for the calling UID and pick the first one in resolveCallingPackage()
70 // as for legacy apps we will toggle the app op for all packages in the UID. in resolveCallingPackage()
74 permissionController.getPackagesForUid(uid, packages); in resolveCallingPackage()
76 ALOGE("No packages for uid %d", uid); in resolveCallingPackage()
125 const uid_t uid = VALUE_OR_FATAL(aidl2legacy_int32_t_uid_t(nextAttributionSource.uid)); in resolveAttributionSource() local
129 uid))); in resolveAttributionSource()
137 myAttributionSource.uid = VALUE_OR_FATAL(android::legacy2aidl_uid_t_int32_t(getuid())); in resolveAttributionSource()
158 uid_t uid = VALUE_OR_FATAL(aidl2legacy_int32_t_uid_t(attributionSource.uid)); in checkRecordingInternal() local
159 if (isAudioServerOrMediaServerOrSystemServerOrRootUid(uid)) return PERMISSION_GRANTED; in checkRecordingInternal()
[all …]
/aosp_15_r20/external/selinux/python/sepolgen/tests/
H A Daudit.txt2 …0=80d2437 a1=bf9132f8 a2=4c56cff4 a3=0 items=0 ppid=8131 pid=8132 auid=500 uid=0 gid=0 euid=0 suid…
5 …0=80d2437 a1=bf910a48 a2=4c56cff4 a3=0 items=0 ppid=8132 pid=8133 auid=500 uid=0 gid=0 euid=0 suid…
8 …0=80d2437 a1=bf910a48 a2=4c56cff4 a3=0 items=0 ppid=8132 pid=8134 auid=500 uid=0 gid=0 euid=0 suid…
11 …0=80d2437 a1=bfc0ba38 a2=4c56cff4 a3=0 items=0 ppid=8131 pid=8144 auid=500 uid=0 gid=0 euid=0 suid…
14 …0=80d2437 a1=bfc0b188 a2=4c56cff4 a3=0 items=0 ppid=8144 pid=8145 auid=500 uid=0 gid=0 euid=0 suid…
17 …0=80d2437 a1=bfc0b188 a2=4c56cff4 a3=0 items=0 ppid=8144 pid=8146 auid=500 uid=0 gid=0 euid=0 suid…
20 …0=80d2437 a1=bfc0a6c8 a2=4c56cff4 a3=0 items=0 ppid=8131 pid=8144 auid=500 uid=0 gid=0 euid=0 suid…
23 …0=80d2437 a1=bfc0a0b8 a2=4c56cff4 a3=0 items=0 ppid=8151 pid=8152 auid=500 uid=0 gid=0 euid=0 suid…
26 …0=80d2437 a1=bfc09c78 a2=4c56cff4 a3=0 items=0 ppid=8151 pid=8153 auid=500 uid=0 gid=0 euid=0 suid…
29 …0=80d2437 a1=bfc09be8 a2=4c56cff4 a3=0 items=0 ppid=8131 pid=8144 auid=500 uid=0 gid=0 euid=0 suid…
[all …]
/aosp_15_r20/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/
H A DJobNotificationCoordinatorTest.java94 final int uid = 10123; in testParameterValidation() local
99 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, null, in testParameterValidation()
109 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, in testParameterValidation()
119 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, in testParameterValidation()
128 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, in testParameterValidation()
142 final int uid = 10123; in testSingleJob_DetachOnStop() local
146 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, notification, in testSingleJob_DetachOnStop()
149 .enqueueNotification(eq(TEST_PACKAGE), eq(TEST_PACKAGE), eq(uid), eq(pid), any(), in testSingleJob_DetachOnStop()
150 eq(notificationId), eq(notification), eq(UserHandle.getUserId(uid))); in testSingleJob_DetachOnStop()
164 final int uid = 10123; in testSingleJob_RemoveOnStop() local
[all …]
/aosp_15_r20/packages/modules/Wifi/service/java/com/android/server/wifi/
DWifiServiceImpl.java1007 mLog.info("startScan uid=%").c(callingUid).flush(); in startScan()
1040 + " uid=" + callingUid + ", packageName=" + packageName + ", reason=" + e); in startScan()
1074 mLog.info("getCurrentNetworkWpsNfcConfigurationToken uid=%") in getCurrentNetworkWpsNfcConfigurationToken()
1124 private boolean checkNetworkSettingsPermission(int pid, int uid) { in checkNetworkSettingsPermission() argument
1125 return mContext.checkPermission(android.Manifest.permission.NETWORK_SETTINGS, pid, uid) in checkNetworkSettingsPermission()
1129 private boolean checkNetworkSetupWizardPermission(int pid, int uid) { in checkNetworkSetupWizardPermission() argument
1130 return mContext.checkPermission(android.Manifest.permission.NETWORK_SETUP_WIZARD, pid, uid) in checkNetworkSetupWizardPermission()
1134 private boolean checkMainlineNetworkStackPermission(int pid, int uid) { in checkMainlineNetworkStackPermission() argument
1135 return mContext.checkPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, pid, uid) in checkMainlineNetworkStackPermission()
1139 private boolean checkNetworkStackPermission(int pid, int uid) { in checkNetworkStackPermission() argument
[all …]
/aosp_15_r20/frameworks/av/media/module/libmediatranscoding/
H A DTranscodingSessionController.cpp199 bool onSessionStarted(uid_t uid, uid_t callingUid);
200 void onSessionCompleted(uid_t uid, std::chrono::microseconds runningTime);
201 void onSessionCancelled(uid_t uid);
221 bool isSubjectToQuota(uid_t uid, uid_t callingUid);
224 bool TranscodingSessionController::Pacer::isSubjectToQuota(uid_t uid, uid_t callingUid) { in isSubjectToQuota() argument
225 // Submitting with self uid is not limited (which can only happen if it's used as an in isSubjectToQuota()
227 if (uid == callingUid) { in isSubjectToQuota()
231 if (mMtpUids.find(uid) != mMtpUids.end()) { in isSubjectToQuota()
235 if (mNonMtpUids.find(uid) != mNonMtpUids.end()) { in isSubjectToQuota()
239 // We don't have MTP permission info about this uid yet, check permission and save the result. in isSubjectToQuota()
[all …]
/aosp_15_r20/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
H A DBatteryStatsSensorTest.java44 private static final int UID = 10500; field in BatteryStatsSensorTest
45 private static final int UID_2 = 10501; // second uid for testing pool usage
56 bi.noteUidProcessStateLocked(UID, ActivityManager.PROCESS_STATE_CACHED_EMPTY); in testSensorStartStop()
57 bi.noteUidProcessStateLocked(UID, ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND); in testSensorStartStop()
58 bi.noteStartSensorLocked(UID, SENSOR_ID); in testSensorStartStop()
61 bi.noteStopSensorLocked(UID, SENSOR_ID); in testSensorStartStop()
63 bi.noteUidProcessStateLocked(UID, ActivityManager.PROCESS_STATE_RECEIVER); in testSensorStartStop()
64 bi.noteStartSensorLocked(UID, SENSOR_ID); in testSensorStartStop()
65 bi.noteStartSensorLocked(UID, SENSOR_ID); in testSensorStartStop()
68 bi.noteStopSensorLocked(UID, SENSOR_ID); in testSensorStartStop()
[all …]
/aosp_15_r20/external/mbedtls/tests/suites/
H A Dtest_suite_psa_its.function24 16 + /*UID (64-bit number in hex)*/ \
25 16 + /*UID (64-bit number in hex)*/ \
30 static void psa_its_fill_filename(psa_storage_uid_t uid, char *filename)
32 /* Break up the UID into two 32-bit pieces so as not to rely on
37 (unsigned long) (uid >> 32),
38 (unsigned long) (uid & 0xffffffff),
42 /* Maximum uid used by the test, recorded so that cleanup() can delete
57 psa_storage_uid_t uid;
58 for (uid = 0; uid < uid_max; uid++) {
59 psa_its_fill_filename(uid, filename);
[all …]
/aosp_15_r20/external/openthread/third_party/mbedtls/repo/tests/suites/
H A Dtest_suite_psa_its.function24 16 + /*UID (64-bit number in hex)*/ \
25 16 + /*UID (64-bit number in hex)*/ \
30 static void psa_its_fill_filename(psa_storage_uid_t uid, char *filename)
32 /* Break up the UID into two 32-bit pieces so as not to rely on
37 (unsigned long) (uid >> 32),
38 (unsigned long) (uid & 0xffffffff),
42 /* Maximum uid used by the test, recorded so that cleanup() can delete
57 psa_storage_uid_t uid;
58 for (uid = 0; uid < uid_max; uid++) {
59 psa_its_fill_filename(uid, filename);
[all …]

12345678910>>...582