Home
last modified time | relevance | path

Searched refs:CallerIdentity (Results 1 – 25 of 35) sorted by relevance

12

/frameworks/base/location/java/android/location/util/identity/
DCallerIdentity.java37 public final class CallerIdentity { class
43 public static CallerIdentity forTest(int uid, int pid, String packageName, in forTest()
52 public static CallerIdentity forTest(int uid, int pid, String packageName, in forTest()
54 return new CallerIdentity(uid, pid, packageName, attributionTag, listenerId); in forTest()
62 public static CallerIdentity forAggregation(CallerIdentity callerIdentity) { in forAggregation()
67 return new CallerIdentity(callerIdentity.getUid(), 0, callerIdentity.getPackageName(), in forAggregation()
74 public static CallerIdentity fromContext(Context context) { in fromContext()
75 return new CallerIdentity(Process.myUid(), Process.myPid(), context.getPackageName(), in fromContext()
84 public static CallerIdentity fromBinder(Context context, String packageName, in fromBinder()
94 public static CallerIdentity fromBinder(Context context, String packageName, in fromBinder()
[all …]
/frameworks/base/services/core/java/com/android/server/location/eventlog/
DLocationEventLog.java36 import android.location.util.identity.CallerIdentity;
69 private final ArrayMap<String, ArrayMap<CallerIdentity, AggregateStats>> mAggregateStats;
72 private final ArrayMap<CallerIdentity, GnssMeasurementAggregateStats> mGnssMeasAggregateStats;
85 public ArrayMap<String, ArrayMap<CallerIdentity, AggregateStats>> copyAggregateStats() { in copyAggregateStats()
87 ArrayMap<String, ArrayMap<CallerIdentity, AggregateStats>> copy = new ArrayMap<>( in copyAggregateStats()
96 private AggregateStats getAggregateStats(String provider, CallerIdentity identity) { in getAggregateStats()
98 ArrayMap<CallerIdentity, AggregateStats> packageMap = mAggregateStats.get(provider); in getAggregateStats()
103 CallerIdentity aggregate = CallerIdentity.forAggregation(identity); in getAggregateStats()
114 public ArrayMap<CallerIdentity, GnssMeasurementAggregateStats>
117 ArrayMap<CallerIdentity, GnssMeasurementAggregateStats> copy = new ArrayMap<>( in copyGnssMeasurementAggregateStats()
[all …]
/frameworks/base/services/core/java/com/android/server/location/injector/
DAppOpsHelper.java19 import android.location.util.identity.CallerIdentity;
68 public abstract boolean startOpNoThrow(int appOp, CallerIdentity callerIdentity); in startOpNoThrow()
73 public abstract void finishOp(int appOp, CallerIdentity callerIdentity); in finishOp()
78 public abstract boolean checkOpNoThrow(int appOp, CallerIdentity callerIdentity); in checkOpNoThrow()
83 public abstract boolean noteOp(int appOp, CallerIdentity callerIdentity); in noteOp()
88 public abstract boolean noteOpNoThrow(int appOp, CallerIdentity callerIdentity); in noteOpNoThrow()
DSystemAppOpsHelper.java21 import android.location.util.identity.CallerIdentity;
60 public boolean startOpNoThrow(int appOp, CallerIdentity callerIdentity) { in startOpNoThrow()
78 public void finishOp(int appOp, CallerIdentity callerIdentity) { in finishOp()
94 public boolean checkOpNoThrow(int appOp, CallerIdentity callerIdentity) { in checkOpNoThrow()
109 public boolean noteOp(int appOp, CallerIdentity callerIdentity) { in noteOp()
126 public boolean noteOpNoThrow(int appOp, CallerIdentity callerIdentity) { in noteOpNoThrow()
DLocationPermissionsHelper.java22 import android.location.util.identity.CallerIdentity;
96 CallerIdentity identity) { in hasLocationPermissions()
108 protected abstract boolean hasPermission(String permission, CallerIdentity callerIdentity); in hasPermission()
DSystemLocationPermissionsHelper.java22 import android.location.util.identity.CallerIdentity;
56 protected boolean hasPermission(String permission, CallerIdentity callerIdentity) { in hasPermission()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/injector/
DSystemAppOpsHelperTest.java42 import android.location.util.identity.CallerIdentity;
107 CallerIdentity identity = CallerIdentity.forTest(1000, 1000, "mypackage", "myfeature"); in testCheckOp()
117 identity = CallerIdentity.forTest(1000, 1000, "mypackage", "myfeature"); in testCheckOp()
130 CallerIdentity identity = CallerIdentity.forTest(1000, 1000, "mypackage", "myfeature"); in testNoteOpNoThrow()
143 identity = CallerIdentity.forTest(1000, 1000, "mypackage", "myfeature"); in testNoteOpNoThrow()
158 CallerIdentity identity = CallerIdentity.forTest(1000, 1000, "mypackage", "myfeature"); in testStartOp()
173 CallerIdentity identity = CallerIdentity.forTest(1000, 1000, "mypackage", "myfeature"); in testFinishOp()
181 CallerIdentity identity = CallerIdentity.forTest(1000, 1000, "mypackage", "myfeature"); in testNoteOp()
DFakeAppOpsHelper.java19 import android.location.util.identity.CallerIdentity;
61 public boolean startOpNoThrow(int appOp, CallerIdentity callerIdentity) { in startOpNoThrow()
71 public void finishOp(int appOp, CallerIdentity callerIdentity) { in finishOp()
78 public boolean checkOpNoThrow(int appOp, CallerIdentity callerIdentity) { in checkOpNoThrow()
84 public boolean noteOp(int appOp, CallerIdentity callerIdentity) { in noteOp()
94 public boolean noteOpNoThrow(int appOp, CallerIdentity callerIdentity) { in noteOpNoThrow()
DFakeLocationPermissionsHelper.java19 import android.location.util.identity.CallerIdentity;
49 protected boolean hasPermission(String permission, CallerIdentity identity) { in hasPermission()
/frameworks/base/services/core/java/com/android/server/location/gnss/
DGnssManagerService.java38 import android.location.util.identity.CallerIdentity;
174 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag, in registerGnssStatusCallback()
193 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag, in registerGnssNmeaCallback()
215 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag, in addGnssMeasurementsListener()
246 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag, in addGnssNavigationMessageListener()
264 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag, in addGnssAntennaInfoListener()
DGnssListenerMultiplexer.java28 import android.location.util.identity.CallerIdentity;
76 private final CallerIdentity mIdentity;
83 protected GnssListenerRegistration(TRequest request, CallerIdentity identity, in GnssListenerRegistration()
94 public final CallerIdentity getIdentity() { in getIdentity()
259 protected void addListener(CallerIdentity identity, TListener listener) { in addListener()
266 protected void addListener(TRequest request, CallerIdentity callerIdentity, in addListener()
281 CallerIdentity callerIdentity, TListener listener) { in createRegistration()
303 CallerIdentity identity = registration.getIdentity(); in isActive()
309 private boolean isActive(CallerIdentity identity) { in isActive()
332 private boolean isBackgroundRestrictionExempt(CallerIdentity identity) { in isBackgroundRestrictionExempt()
DGnssNavigationMessageProvider.java25 import android.location.util.identity.CallerIdentity;
44 CallerIdentity callerIdentity, in GnssNavigationMessageListenerRegistration()
76 public void addListener(CallerIdentity identity, IGnssNavigationMessageListener listener) { in addListener()
82 CallerIdentity callerIdentity, IGnssNavigationMessageListener listener) { in createRegistration()
DGnssAntennaInfoProvider.java25 import android.location.util.identity.CallerIdentity;
52 private final CallerIdentity mIdentity;
54 protected AntennaInfoListenerRegistration(CallerIdentity identity, in AntennaInfoListenerRegistration()
99 public void addListener(CallerIdentity callerIdentity, IGnssAntennaInfoListener listener) { in addListener()
DGnssMeasurementsProvider.java32 import android.location.util.identity.CallerIdentity;
62 CallerIdentity callerIdentity, in GnssMeasurementListenerRegistration()
117 public void addListener(GnssMeasurementRequest request, CallerIdentity identity, in addListener()
124 CallerIdentity callerIdentity, IGnssMeasurementsListener listener) { in createRegistration()
/frameworks/base/location/java/android/location/
DLocationManagerInternal.java21 import android.location.util.identity.CallerIdentity;
87 public abstract boolean isProvider(@Nullable String provider, @NonNull CallerIdentity identity); in isProvider()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DDevicePolicyManagerService.java1551 CallerIdentity callerIdentity = getCallerIdentity(); in setDevicePolicySafetyChecker()
2350 private CallerIdentity getCallerIdentity() { in getCallerIdentity()
2357 private CallerIdentity getCallerIdentity(@Nullable String callerPackage) { in getCallerIdentity()
2366 CallerIdentity getCallerIdentity(@Nullable ComponentName adminComponent) { in getCallerIdentity()
2378 CallerIdentity getCallerIdentity(@Nullable ComponentName adminComponent, in getCallerIdentity()
2407 return new CallerIdentity(callerUid, callerPackage, adminComponent); in getCallerIdentity()
2902 final CallerIdentity caller = getCallerIdentity(); in getActiveAdminOrCheckPermissionsForCallerLocked()
3820 final CallerIdentity caller = getCallerIdentity();
3979 final CallerIdentity caller = getCallerIdentity();
3994 final CallerIdentity caller = getCallerIdentity();
[all …]
DCallerIdentity.java28 final class CallerIdentity { class
36 CallerIdentity(int uid, @Nullable String packageName, @Nullable ComponentName componentName) { in CallerIdentity() method in CallerIdentity
/frameworks/base/services/core/java/com/android/server/location/provider/
DAbstractLocationProvider.java23 import android.location.util.identity.CallerIdentity;
88 @Nullable public final CallerIdentity identity;
96 private State(boolean allowed, ProviderProperties properties, CallerIdentity identity, in State()
129 public State withIdentity(@Nullable CallerIdentity identity) { in withIdentity()
221 protected AbstractLocationProvider(Executor executor, @Nullable CallerIdentity identity, in AbstractLocationProvider()
289 protected void setIdentity(@Nullable CallerIdentity identity) { in setIdentity()
DPassiveLocationProvider.java28 import android.location.util.identity.CallerIdentity;
51 super(DIRECT_EXECUTOR, CallerIdentity.fromContext(context), PROPERTIES, in PassiveLocationProvider()
DMockLocationProvider.java27 import android.location.util.identity.CallerIdentity;
43 public MockLocationProvider(ProviderProperties properties, CallerIdentity identity, in MockLocationProvider()
/frameworks/base/services/core/java/com/android/server/location/
DLocationManagerService.java84 import android.location.util.identity.CallerIdentity;
412 + CallerIdentity.forTest(uid, 0, packageName, attributionTag)); in onSystemReady()
543 CallerIdentity.fromContext(mContext), Collections.emptySet())); in onSystemThirdPartyAppsCanStart()
778 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag, in getCurrentLocation()
818 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag, in registerLocationListener()
854 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag, in registerLocationPendingIntent()
901 CallerIdentity identity) { in validateLocationRequest()
1018 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, attributionTag); in getLastLocation()
1050 CallerIdentity identity) { in validateLastLocationRequest()
1279 CallerIdentity identity = manager.getProviderIdentity(); in isProviderPackage()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/gnss/
DGnssNavigationMessageProviderTest.java30 import android.location.util.identity.CallerIdentity;
50 private static final CallerIdentity IDENTITY = CallerIdentity.forTest(CURRENT_USER, 1000,
DGnssStatusProviderTest.java31 import android.location.util.identity.CallerIdentity;
59 private static final CallerIdentity IDENTITY = CallerIdentity.forTest(CURRENT_USER, 1000,
DGnssNmeaProviderTest.java31 import android.location.util.identity.CallerIdentity;
60 private static final CallerIdentity IDENTITY = CallerIdentity.forTest(CURRENT_USER, 1000,
/frameworks/base/services/core/java/com/android/server/location/geofence/
DGeofenceManager.java34 import android.location.util.identity.CallerIdentity;
118 private final CallerIdentity mIdentity;
131 GeofenceRegistration(Geofence geofence, CallerIdentity identity, in GeofenceRegistration()
152 public CallerIdentity getIdentity() { in getIdentity()
352 CallerIdentity identity = CallerIdentity.fromBinder(mContext, packageName, in addGeofence()
381 private boolean isActive(CallerIdentity identity) { in isActive()

12