Offset 17, 16 lines modifiedOffset 17, 16 lines modified
17 import·android.net.StaticIpConfiguration;17 import·android.net.StaticIpConfiguration;
18 import·android.net.InetAddresses;18 import·android.net.InetAddresses;
19 import·java.net.InetAddress;19 import·java.net.InetAddress;
20 import·com.android.wifi.x.com.android.net.module.util.Inet4AddressUtils;20 import·com.android.wifi.x.com.android.net.module.util.Inet4AddressUtils;
21 import·java.net.Inet4Address;21 import·java.net.Inet4Address;
22 import·android.net.DhcpInfo;22 import·android.net.DhcpInfo;
23 import·android.net.Network;23 import·android.net.Network;
24 import·java.util.ArrayList; 
25 import·android.net.wifi.IWifiManager$Stub;24 import·android.net.wifi.IWifiManager$Stub;
 25 import·java.util.ArrayList;
26 import·com.android.wifi.x.com.android.modules.utils.ParceledListSlice;26 import·com.android.wifi.x.com.android.modules.utils.ParceledListSlice;
27 import·java.util.Collections;27 import·java.util.Collections;
28 import·com.android.server.wifi.util.RssiUtil;28 import·com.android.server.wifi.util.RssiUtil;
29 import·android.os.Process;29 import·android.os.Process;
30 import·java.util.Objects;30 import·java.util.Objects;
31 import·java.security.cert.CertPath;31 import·java.security.cert.CertPath;
32 import·java.security.cert.CertPathParameters;32 import·java.security.cert.CertPathParameters;
Offset 413, 15 lines modifiedOffset 413, 15 lines modified
413 ········if·(ApConfigUtil.isApMacRandomizationSupported(this.mContext))·{413 ········if·(ApConfigUtil.isApMacRandomizationSupported(this.mContext))·{
414 ············longValue·|=·0x400000000L;414 ············longValue·|=·0x400000000L;
415 ········}415 ········}
416 ········if·(SdkLevel.isAtLeastS())·{416 ········if·(SdkLevel.isAtLeastS())·{
417 ············if·(ApConfigUtil.isBridgedModeSupported(this.mContext))·{417 ············if·(ApConfigUtil.isBridgedModeSupported(this.mContext))·{
418 ················longValue·|=·0x40000000000L;418 ················longValue·|=·0x40000000000L;
419 ············}419 ············}
420 ············if·(ApConfigUtil.isStaWithBridgedModeSupported(this.mContext))·{420 ············if·(this.mContext.getResources().getBoolean(2130837559))·{
421 ················longValue·|=·0x20000000000L;421 ················longValue·|=·0x20000000000L;
422 ············}422 ············}
423 ········}423 ········}
424 ········return·longValue·|·(long)this.mWifiThreadRunner.call((Supplier)new·WifiServiceImpl$$ExternalSyntheticLambda93(this),·(Object)value);424 ········return·longValue·|·(long)this.mWifiThreadRunner.call((Supplier)new·WifiServiceImpl$$ExternalSyntheticLambda93(this),·(Object)value);
425 ····}425 ····}
426 ····426 ····
427 ····private·WifiActivityEnergyInfo·getWifiActivityEnergyInfo()·{427 ····private·WifiActivityEnergyInfo·getWifiActivityEnergyInfo()·{
Offset 1223, 51 lines modifiedOffset 1223, 54 lines modified
1223 ········}1223 ········}
1224 ········return·(Map)this.mWifiThreadRunner.call((Supplier)new·WifiServiceImpl$$ExternalSyntheticLambda123(this,·list),·(Object)Collections.emptyMap());1224 ········return·(Map)this.mWifiThreadRunner.call((Supplier)new·WifiServiceImpl$$ExternalSyntheticLambda123(this,·list),·(Object)Collections.emptyMap());
1225 ····}1225 ····}
1226 ····1226 ····
1227 ····public·ParceledListSlice·getConfiguredNetworks(String·s,·String·s2,·final·boolean·b)·{1227 ····public·ParceledListSlice·getConfiguredNetworks(String·s,·String·s2,·final·boolean·b)·{
1228 ········this.enforceAccessPermission();1228 ········this.enforceAccessPermission();
1229 ········final·int·callingUid·=·Binder.getCallingUid();1229 ········final·int·callingUid·=·Binder.getCallingUid();
1230 ········final·boolean·deviceOrProfileOwner·=·this.isDeviceOrProfileOwner(callingUid,·s); 
1231 ········final·int·checkCarrierPrivilegesForPackageAnyPhone·=·this.mWifiInjector.makeTelephonyManager().checkCarrierPrivilegesForPackageAnyPhone(s); 
1232 ········int·n·=·1; 
1233 ········if·(checkCarrierPrivilegesForPackageAnyPhone·!=·n)·{ 
1234 ············n·=·0; 
1235 ········} 
1236 ········final·boolean·privileged·=·this.isPrivileged(IWifiManager$Stub.getCallingPid(),·callingUid); 
1237 ········if·(b·&&·!deviceOrProfileOwner·&&·n·==·0·&&·!privileged)·{ 
1238 ············throw·new·SecurityException("Not·a·DO,·PO,·carrier·or·privileged·app"); 
1239 ········} 
1240 ········if·(callingUid·!=·2000·&&·callingUid·!=·0·&&·!b)·{1230 ········if·(callingUid·!=·2000·&&·callingUid·!=·0)·{
 1231 ············this.mWifiPermissionsUtil.checkPackage(callingUid,·s);
 1232 ············if·(!b)·{
1241 ············final·long·clearCallingIdentity·=·Binder.clearCallingIdentity();1233 ················final·long·clearCallingIdentity·=·Binder.clearCallingIdentity();
1242 ············try·{ 
1243 ················try·{1234 ················try·{
 1235 ····················try·{
1244 ····················this.mWifiPermissionsUtil.enforceCanAccessScanResults(s,·s2,·callingUid,·(String)null);1236 ························this.mWifiPermissionsUtil.enforceCanAccessScanResults(s,·s2,·callingUid,·(String)null);
 1237 ························Binder.restoreCallingIdentity(clearCallingIdentity);
 1238 ····················}
 1239 ····················finally·{}
 1240 ················}
 1241 ················catch·(SecurityException·obj)·{
 1242 ····················s2·=·"WifiService";
 1243 ····················final·StringBuilder·sb·=·new·StringBuilder();
 1244 ····················sb.append("Permission·violation·-·getConfiguredNetworks·not·allowed·for·uid=");
 1245 ····················sb.append(callingUid);
 1246 ····················sb.append(",·packageName=");
 1247 ····················sb.append(s);
 1248 ····················s·=·",·reason=";
 1249 ····················sb.append(s);
 1250 ····················sb.append(obj);
 1251 ····················Log.w(s2,·sb.toString());
 1252 ····················final·ParceledListSlice·parceledListSlice·=·new·ParceledListSlice((List)new·ArrayList());
1245 ····················Binder.restoreCallingIdentity(clearCallingIdentity);1253 ····················Binder.restoreCallingIdentity(clearCallingIdentity);
 1254 ····················return·parceledListSlice;
1246 ················}1255 ················}
1247 ················finally·{} 
1248 ············} 
1249 ············catch·(SecurityException·obj)·{ 
1250 ················s2·=·"WifiService"; 
1251 ················final·StringBuilder·sb·=·new·StringBuilder(); 
1252 ················sb.append("Permission·violation·-·getConfiguredNetworks·not·allowed·for·uid="); 
1253 ················sb.append(callingUid); 
1254 ················sb.append(",·packageName="); 
1255 ················sb.append(s); 
1256 ················s·=·",·reason="; 
1257 ················sb.append(s); 
1258 ················sb.append(obj); 
1259 ················Log.w(s2,·sb.toString()); 
1260 ················final·ParceledListSlice·parceledListSlice·=·new·ParceledListSlice((List)new·ArrayList()); 
1261 ················Binder.restoreCallingIdentity(clearCallingIdentity);1256 ················Binder.restoreCallingIdentity(clearCallingIdentity);
1262 ················return·parceledListSlice; 
1263 ············}1257 ············}
1264 ············Binder.restoreCallingIdentity(clearCallingIdentity); 
1265 ········}1258 ········}
1266 ········final·WifiServiceImpl·wifiServiceImpl;1259 ········final·WifiServiceImpl·wifiServiceImpl;
 1260 ········final·boolean·deviceOrProfileOwner·=·wifiServiceImpl.isDeviceOrProfileOwner(callingUid,·s);
 1261 ········final·int·checkCarrierPrivilegesForPackageAnyPhone·=·wifiServiceImpl.mWifiInjector.makeTelephonyManager().checkCarrierPrivilegesForPackageAnyPhone(s);
 1262 ········int·n·=·1;
 1263 ········if·(checkCarrierPrivilegesForPackageAnyPhone·!=·n)·{
 1264 ············n·=·0;
 1265 ········}
 1266 ········final·boolean·privileged·=·wifiServiceImpl.isPrivileged(IWifiManager$Stub.getCallingPid(),·callingUid);
 1267 ········if·(b·&&·!deviceOrProfileOwner·&&·n·==·0·&&·!privileged)·{
 1268 ············throw·new·SecurityException("Not·a·DO,·PO,·carrier·or·privileged·app");
 1269 ········}
1267 ········final·boolean·targetSdkLessThanQOrPrivileged·=·wifiServiceImpl.isTargetSdkLessThanQOrPrivileged(s,·Binder.getCallingPid(),·callingUid);1270 ········final·boolean·targetSdkLessThanQOrPrivileged·=·wifiServiceImpl.isTargetSdkLessThanQOrPrivileged(s,·Binder.getCallingPid(),·callingUid);
1268 ········if·(!targetSdkLessThanQOrPrivileged·&&·n·==·0)·{1271 ········if·(!targetSdkLessThanQOrPrivileged·&&·n·==·0)·{
1269 ············wifiServiceImpl.mLog.info("getConfiguredNetworks·not·allowed·for·uid=%").c((long)callingUid).flush();1272 ············wifiServiceImpl.mLog.info("getConfiguredNetworks·not·allowed·for·uid=%").c((long)callingUid).flush();
1270 ············return·new·ParceledListSlice((List)new·ArrayList());1273 ············return·new·ParceledListSlice((List)new·ArrayList());
1271 ········}1274 ········}
1272 ········if·(wifiServiceImpl.isVerboseLoggingEnabled())·{1275 ········if·(wifiServiceImpl.isVerboseLoggingEnabled())·{
1273 ············wifiServiceImpl.mLog.info("getConfiguredNetworks·uid=%").c((long)callingUid).flush();1276 ············wifiServiceImpl.mLog.info("getConfiguredNetworks·uid=%").c((long)callingUid).flush();
Offset 2025, 14 lines modifiedOffset 2028, 15 lines modified
2025 ········}2028 ········}
2026 ········throw·new·UnsupportedOperationException();2029 ········throw·new·UnsupportedOperationException();
2027 ····}2030 ····}
2028 ····2031 ····
2029 ····public·void·registerSuggestionConnectionStatusListener(final·ISuggestionConnectionStatusListener·suggestionConnectionStatusListener,·final·String·s,·final·String·s2)·{2032 ····public·void·registerSuggestionConnectionStatusListener(final·ISuggestionConnectionStatusListener·suggestionConnectionStatusListener,·final·String·s,·final·String·s2)·{
2030 ········if·(suggestionConnectionStatusListener·!=·null)·{2033 ········if·(suggestionConnectionStatusListener·!=·null)·{
2031 ············final·int·callingUid·=·Binder.getCallingUid();2034 ············final·int·callingUid·=·Binder.getCallingUid();
 2035 ············this.mWifiPermissionsUtil.checkPackage(callingUid,·s);
2032 ············this.enforceAccessPermission();2036 ············this.enforceAccessPermission();
2033 ············this.enforceLocationPermission(s,·s2,·callingUid);2037 ············this.enforceLocationPermission(s,·s2,·callingUid);
2034 ············if·(this.isVerboseLoggingEnabled())·{2038 ············if·(this.isVerboseLoggingEnabled())·{
2035 ················this.mLog.info("registerSuggestionConnectionStatusListener·uid=%").c((long)callingUid).flush();2039 ················this.mLog.info("registerSuggestionConnectionStatusListener·uid=%").c((long)callingUid).flush();
2036 ············}2040 ············}
2037 ············this.mWifiThreadRunner.post((Runnable)new·WifiServiceImpl$$ExternalSyntheticLambda47(this,·suggestionConnectionStatusListener,·s,·callingUid));2041 ············this.mWifiThreadRunner.post((Runnable)new·WifiServiceImpl$$ExternalSyntheticLambda47(this,·suggestionConnectionStatusListener,·s,·callingUid));
2038 ············return;2042 ············return;