Merge "ConnectivityService: minor formatting change" am: 4c949ee07c am: 9374e0b598 am: 88a3389b2c
am: 2ca1de8257
Change-Id: I252d293f37d29a53e1b5d913f682c0c16b2a122c
This commit is contained in:
@@ -471,7 +471,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
new ArrayDeque<ValidationLog>(MAX_VALIDATION_LOGS);
|
||||
|
||||
private void addValidationLogs(ReadOnlyLocalLog log, Network network, String networkExtraInfo) {
|
||||
synchronized(mValidationLogs) {
|
||||
synchronized (mValidationLogs) {
|
||||
while (mValidationLogs.size() >= MAX_VALIDATION_LOGS) {
|
||||
mValidationLogs.removeLast();
|
||||
}
|
||||
@@ -1577,7 +1577,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
private void sendStickyBroadcast(Intent intent) {
|
||||
synchronized(this) {
|
||||
synchronized (this) {
|
||||
if (!mSystemReady) {
|
||||
mInitialBroadcast = new Intent(intent);
|
||||
}
|
||||
@@ -1618,7 +1618,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
void systemReady() {
|
||||
loadGlobalProxy();
|
||||
|
||||
synchronized(this) {
|
||||
synchronized (this) {
|
||||
mSystemReady = true;
|
||||
if (mInitialBroadcast != null) {
|
||||
mContext.sendStickyBroadcastAsUser(mInitialBroadcast, UserHandle.ALL);
|
||||
@@ -3381,7 +3381,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
enforceCrossUserPermission(userId);
|
||||
throwIfLockdownEnabled();
|
||||
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
Vpn vpn = mVpns.get(userId);
|
||||
if (vpn != null) {
|
||||
return vpn.prepare(oldPackage, newPackage);
|
||||
@@ -3408,7 +3408,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
public void setVpnPackageAuthorization(String packageName, int userId, boolean authorized) {
|
||||
enforceCrossUserPermission(userId);
|
||||
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
Vpn vpn = mVpns.get(userId);
|
||||
if (vpn != null) {
|
||||
vpn.setPackageAuthorization(packageName, authorized);
|
||||
@@ -3427,7 +3427,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
public ParcelFileDescriptor establishVpn(VpnConfig config) {
|
||||
throwIfLockdownEnabled();
|
||||
int user = UserHandle.getUserId(Binder.getCallingUid());
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
return mVpns.get(user).establish(config);
|
||||
}
|
||||
}
|
||||
@@ -3444,7 +3444,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
throw new IllegalStateException("Missing active network connection");
|
||||
}
|
||||
int user = UserHandle.getUserId(Binder.getCallingUid());
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
mVpns.get(user).startLegacyVpn(profile, mKeyStore, egress);
|
||||
}
|
||||
}
|
||||
@@ -3458,7 +3458,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
public LegacyVpnInfo getLegacyVpnInfo(int userId) {
|
||||
enforceCrossUserPermission(userId);
|
||||
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
return mVpns.get(userId).getLegacyVpnInfo();
|
||||
}
|
||||
}
|
||||
@@ -3474,7 +3474,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
return new VpnInfo[0];
|
||||
}
|
||||
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
List<VpnInfo> infoList = new ArrayList<>();
|
||||
for (int i = 0; i < mVpns.size(); i++) {
|
||||
VpnInfo info = createVpnInfo(mVpns.valueAt(i));
|
||||
@@ -3522,7 +3522,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
@Override
|
||||
public VpnConfig getVpnConfig(int userId) {
|
||||
enforceCrossUserPermission(userId);
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
Vpn vpn = mVpns.get(userId);
|
||||
if (vpn != null) {
|
||||
return vpn.getVpnConfig();
|
||||
@@ -3556,7 +3556,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
return true;
|
||||
}
|
||||
int user = UserHandle.getUserId(Binder.getCallingUid());
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
Vpn vpn = mVpns.get(user);
|
||||
if (vpn == null) {
|
||||
Slog.w(TAG, "VPN for user " + user + " not ready yet. Skipping lockdown");
|
||||
@@ -3791,7 +3791,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
private void onUserStart(int userId) {
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
Vpn userVpn = mVpns.get(userId);
|
||||
if (userVpn != null) {
|
||||
loge("Starting user already has a VPN");
|
||||
@@ -3806,7 +3806,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
private void onUserStop(int userId) {
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
Vpn userVpn = mVpns.get(userId);
|
||||
if (userVpn == null) {
|
||||
loge("Stopped user has no VPN");
|
||||
@@ -3818,7 +3818,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
private void onUserAdded(int userId) {
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
final int vpnsSize = mVpns.size();
|
||||
for (int i = 0; i < vpnsSize; i++) {
|
||||
Vpn vpn = mVpns.valueAt(i);
|
||||
@@ -3828,7 +3828,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
private void onUserRemoved(int userId) {
|
||||
synchronized(mVpns) {
|
||||
synchronized (mVpns) {
|
||||
final int vpnsSize = mVpns.size();
|
||||
for (int i = 0; i < vpnsSize; i++) {
|
||||
Vpn vpn = mVpns.valueAt(i);
|
||||
|
||||
Reference in New Issue
Block a user