Merge "Remove ConnectivityServiceTest signature perms use"
This commit is contained in:
commit
54c7434f0d
1 changed files with 112 additions and 19 deletions
|
|
@ -1275,6 +1275,20 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
public boolean getCellular464XlatEnabled() {
|
||||
return NetworkProperties.isCellular464XlatEnabled().orElse(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see PendingIntent#intentFilterEquals
|
||||
*/
|
||||
public boolean intentFilterEquals(PendingIntent a, PendingIntent b) {
|
||||
return a.intentFilterEquals(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see LocationPermissionChecker
|
||||
*/
|
||||
public LocationPermissionChecker makeLocationPermissionChecker(Context context) {
|
||||
return new LocationPermissionChecker(context);
|
||||
}
|
||||
}
|
||||
|
||||
public ConnectivityService(Context context) {
|
||||
|
|
@ -1342,7 +1356,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
mNetd = netd;
|
||||
mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
|
||||
mLocationPermissionChecker = new LocationPermissionChecker(mContext);
|
||||
mLocationPermissionChecker = mDeps.makeLocationPermissionChecker(mContext);
|
||||
|
||||
// To ensure uid state is synchronized with Network Policy, register for
|
||||
// NetworkPolicyManagerService events must happen prior to NetworkPolicyManagerService
|
||||
|
|
@ -3926,7 +3940,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
for (Map.Entry<NetworkRequest, NetworkRequestInfo> entry : mNetworkRequests.entrySet()) {
|
||||
PendingIntent existingPendingIntent = entry.getValue().mPendingIntent;
|
||||
if (existingPendingIntent != null &&
|
||||
existingPendingIntent.intentFilterEquals(pendingIntent)) {
|
||||
mDeps.intentFilterEquals(existingPendingIntent, pendingIntent)) {
|
||||
return entry.getValue();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue