Offset 272, 21 lines modifiedOffset 272, 21 lines modified
272 ····private·long·getSupportedFeaturesInternal()·{272 ····private·long·getSupportedFeaturesInternal()·{
273 ········final·AsyncChannel·mClientModeImplChannel·=·this.mClientModeImplChannel;273 ········final·AsyncChannel·mClientModeImplChannel·=·this.mClientModeImplChannel;
274 ········if·(mClientModeImplChannel·!=·null)·{274 ········if·(mClientModeImplChannel·!=·null)·{
275 ············long·syncGetSupportedFeatures·=·this.mClientModeImpl.syncGetSupportedFeatures(mClientModeImplChannel);275 ············long·syncGetSupportedFeatures·=·this.mClientModeImpl.syncGetSupportedFeatures(mClientModeImplChannel);
276 ············if·(!this.mContext.getPackageManager().hasSystemFeature("android.hardware.wifi.rtt"))·{276 ············if·(!this.mContext.getPackageManager().hasSystemFeature("android.hardware.wifi.rtt"))·{
277 ················syncGetSupportedFeatures·&=·0xFFFFFFFFFFFFFE7FL;277 ················syncGetSupportedFeatures·&=·0xFFFFFFFFFFFFFE7FL;
278 ············}278 ············}
279 ············if·(!this.mContext.getResources().getBoolean(2130837548))·{279 ············if·(!this.mContext.getResources().getBoolean(2130837547))·{
280 ················syncGetSupportedFeatures·&=·0xFFFFFFFEFFFFFFFFL;280 ················syncGetSupportedFeatures·&=·0xFFFFFFFEFFFFFFFFL;
281 ············}281 ············}
282 ············if·(this.mContext.getResources().getBoolean(2130837538))·{282 ············if·(this.mContext.getResources().getBoolean(2130837537))·{
283 ················syncGetSupportedFeatures·|=·0x200000000L;283 ················syncGetSupportedFeatures·|=·0x200000000L;
284 ············}284 ············}
285 ············if·(this.mContext.getResources().getBoolean(2130837536))·{285 ············if·(this.mContext.getResources().getBoolean(2130837535))·{
286 ················syncGetSupportedFeatures·|=·0x400000000L;286 ················syncGetSupportedFeatures·|=·0x400000000L;
287 ············}287 ············}
288 ············if·((boolean)this.mWifiThreadRunner.call((Supplier)new·-$$Lambda$WifiServiceImpl$YV2Ekgbs7txeaM2pzw_y7rO2rxc(this),·(Object)Boolean.FALSE))·{288 ············if·((boolean)this.mWifiThreadRunner.call((Supplier)new·-$$Lambda$WifiServiceImpl$YV2Ekgbs7txeaM2pzw_y7rO2rxc(this),·(Object)Boolean.FALSE))·{
289 ················syncGetSupportedFeatures·|=·0x8000L;289 ················syncGetSupportedFeatures·|=·0x8000L;
290 ············}290 ············}
291 ············return·syncGetSupportedFeatures;291 ············return·syncGetSupportedFeatures;
292 ········}292 ········}
Offset 513, 15 lines modifiedOffset 513, 15 lines modified
513 ····}513 ····}
514 ····514 ····
515 ····private·boolean·startSoftApInternal(final·SoftApModeConfiguration·softApModeConfiguration)·{515 ····private·boolean·startSoftApInternal(final·SoftApModeConfiguration·softApModeConfiguration)·{
516 ········final·int·callingUid·=·Binder.getCallingUid();516 ········final·int·callingUid·=·Binder.getCallingUid();
517 ········final·boolean·settingsOrSuw·=·this.isSettingsOrSuw(Binder.getCallingPid(),·callingUid);517 ········final·boolean·settingsOrSuw·=·this.isSettingsOrSuw(Binder.getCallingPid(),·callingUid);
518 ········this.mLog.trace("startSoftApInternal·uid=%·mode=%").c((long)callingUid).c((long)softApModeConfiguration.getTargetMode()).flush();518 ········this.mLog.trace("startSoftApInternal·uid=%·mode=%").c((long)callingUid).c((long)softApModeConfiguration.getTargetMode()).flush();
519 ········final·SoftApConfiguration·softApConfiguration·=·softApModeConfiguration.getSoftApConfiguration();519 ········final·SoftApConfiguration·softApConfiguration·=·softApModeConfiguration.getSoftApConfiguration();
520 ········if·(softApConfiguration·!=·null·&&·(!WifiApConfigStore.validateApWifiConfiguration(softApConfiguration,·settingsOrSuw,·this.mContext)·||·!this.validateSoftApBand(softApConfiguration.getBand())))·{520 ········if·(softApConfiguration·!=·null·&&·(!WifiApConfigStore.validateApWifiConfiguration(softApConfiguration,·settingsOrSuw)·||·!this.validateSoftApBand(softApConfiguration.getBand())))·{
521 ············Log.e("WifiService",·"Invalid·SoftApConfiguration");521 ············Log.e("WifiService",·"Invalid·SoftApConfiguration");
522 ············return·false;522 ············return·false;
523 ········}523 ········}
524 ········this.mActiveModeWarden.startSoftAp(softApModeConfiguration);524 ········this.mActiveModeWarden.startSoftAp(softApModeConfiguration);
525 ········return·true;525 ········return·true;
526 ····}526 ····}
527 ····527 ····
Offset 730, 15 lines modifiedOffset 730, 15 lines modified
730 ········this.enforceNetworkSettingsPermission();730 ········this.enforceNetworkSettingsPermission();
731 ········this.mLog.info("allowAutojoin=%·uid=%").c(b).c((long)Binder.getCallingUid()).flush();731 ········this.mLog.info("allowAutojoin=%·uid=%").c(b).c((long)Binder.getCallingUid()).flush();
732 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$zP3SSqtsZK-zJkU3XvMv6WNhrMs(this,·n,·b));732 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$zP3SSqtsZK-zJkU3XvMv6WNhrMs(this,·n,·b));
733 ····}733 ····}
734 ····734 ····
735 ····public·void·allowAutojoinGlobal(final·boolean·b)·{735 ····public·void·allowAutojoinGlobal(final·boolean·b)·{
736 ········this.enforceNetworkSettingsPermission();736 ········this.enforceNetworkSettingsPermission();
737 ········this.mLog.info("allowAutojoinGlobal=%·uid=%").c(b).c((long)Binder.getCallingUid()).flush();737 ········this.mLog.info("allowAutojoin=%·uid=%").c(b).c((long)Binder.getCallingUid()).flush();
738 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$Bm0dB_Grybclx8PAiBvhzyRrmxE(this,·b));738 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$Bm0dB_Grybclx8PAiBvhzyRrmxE(this,·b));
739 ····}739 ····}
740 ····740 ····
741 ····public·void·allowAutojoinPasspoint(final·String·s,·final·boolean·b)·{741 ····public·void·allowAutojoinPasspoint(final·String·s,·final·boolean·b)·{
742 ········this.enforceNetworkSettingsPermission();742 ········this.enforceNetworkSettingsPermission();
743 ········if·(s·!=·null)·{743 ········if·(s·!=·null)·{
744 ············this.mLog.info("allowAutojoinPasspoint=%·uid=%").c(b).c((long)Binder.getCallingUid()).flush();744 ············this.mLog.info("allowAutojoinPasspoint=%·uid=%").c(b).c((long)Binder.getCallingUid()).flush();
Offset 1464, 20 lines modifiedOffset 1464, 21 lines modified
1464 ····}1464 ····}
1465 ····1465 ····
1466 ····public·int·getMockableCallingUid()·{1466 ····public·int·getMockableCallingUid()·{
1467 ········return·IWifiManager$Stub.getCallingUid();1467 ········return·IWifiManager$Stub.getCallingUid();
1468 ····}1468 ····}
1469 ····1469 ····
1470 ····public·List·getNetworkSuggestions(final·String·s)·{1470 ····public·List·getNetworkSuggestions(final·String·s)·{
 1471 ········final·int·callingUid·=·Binder.getCallingUid();
1471 ········this.mAppOps.checkPackage(Binder.getCallingUid(),·s);1472 ········this.mAppOps.checkPackage(callingUid,·s);
1472 ········this.enforceAccessPermission();1473 ········this.enforceAccessPermission();
1473 ········if·(this.mVerboseLoggingEnabled)·{1474 ········if·(this.mVerboseLoggingEnabled)·{
1474 ············this.mLog.info("getNetworkSuggestionList·uid=%").c((long)Binder.getCallingUid()).flush();1475 ············this.mLog.info("getNetworkSuggestionList·uid=%").c((long)Binder.getCallingUid()).flush();
1475 ········}1476 ········}
1476 ········return·(List)this.mWifiThreadRunner.call((Supplier)new·-$$Lambda$WifiServiceImpl$QmH9DVwAXfFzetvJWE4l7kLwI0g(this,·s),·(Object)Collections.emptyList());1477 ········return·(List)this.mWifiThreadRunner.call((Supplier)new·-$$Lambda$WifiServiceImpl$nd20ljo_XFKM5CZPUsUAGNROuUs(this,·s,·callingUid),·(Object)Collections.emptyList());
1477 ····}1478 ····}
1478 ····1479 ····
1479 ····public·List·getPasspointConfigurations(final·String·s)·{1480 ····public·List·getPasspointConfigurations(final·String·s)·{
1480 ········final·int·callingUid·=·Binder.getCallingUid();1481 ········final·int·callingUid·=·Binder.getCallingUid();
1481 ········final·boolean·b·=·this.mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid)·||·this.mWifiPermissionsUtil.checkNetworkSetupWizardPermission(callingUid);1482 ········final·boolean·b·=·this.mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid)·||·this.mWifiPermissionsUtil.checkNetworkSetupWizardPermission(callingUid);
1482 ········if·(this.mVerboseLoggingEnabled)·{1483 ········if·(this.mVerboseLoggingEnabled)·{
1483 ············this.mLog.info("getPasspointConfigurations·uid=%").c((long)Binder.getCallingUid()).flush();1484 ············this.mLog.info("getPasspointConfigurations·uid=%").c((long)Binder.getCallingUid()).flush();
Offset 1575, 22 lines modifiedOffset 1576, 16 lines modified
1575 ············return·list;1576 ············return·list;
1576 ········}1577 ········}
1577 ········catch·(SecurityException·ex)·{}1578 ········catch·(SecurityException·ex)·{}
1578 ········Binder.restoreCallingIdentity(clearCallingIdentity);1579 ········Binder.restoreCallingIdentity(clearCallingIdentity);
1579 ····}1580 ····}
1580 ····1581 ····
1581 ····public·SoftApConfiguration·getSoftApConfiguration()·{1582 ····public·SoftApConfiguration·getSoftApConfiguration()·{
 1583 ········this.enforceNetworkSettingsPermission();
1582 ········final·int·callingUid·=·Binder.getCallingUid();1584 ········final·int·callingUid·=·Binder.getCallingUid();
1583 ········if·(!this.mWifiPermissionsUtil.checkConfigOverridePermission(callingUid)·&&·!this.mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid))·{ 
1584 ············final·StringBuilder·sb·=·new·StringBuilder(); 
1585 ············sb.append("App·not·allowed·to·read·or·update·stored·WiFi·Ap·config·(uid·=·"); 
1586 ············sb.append(callingUid); 
1587 ············sb.append(")"); 
1588 ············throw·new·SecurityException(sb.toString()); 
1589 ········} 
1590 ········if·(this.mVerboseLoggingEnabled)·{1585 ········if·(this.mVerboseLoggingEnabled)·{
1591 ············this.mLog.info("getSoftApConfiguration·uid=%").c((long)callingUid).flush();1586 ············this.mLog.info("getSoftApConfiguration·uid=%").c((long)callingUid).flush();
1592 ········}1587 ········}
1593 ········final·WifiThreadRunner·mWifiThreadRunner·=·this.mWifiThreadRunner;1588 ········final·WifiThreadRunner·mWifiThreadRunner·=·this.mWifiThreadRunner;
1594 ········final·WifiApConfigStore·mWifiApConfigStore·=·this.mWifiApConfigStore;1589 ········final·WifiApConfigStore·mWifiApConfigStore·=·this.mWifiApConfigStore;
1595 ········Objects.requireNonNull(mWifiApConfigStore);1590 ········Objects.requireNonNull(mWifiApConfigStore);
1596 ········return·(SoftApConfiguration)mWifiThreadRunner.call((Supplier)new·-$$Lambda$VT9e2V3o0MYZG8ZEONk9kV8oR9o(mWifiApConfigStore),·(Object)new·SoftApConfiguration$Builder().build());1591 ········return·(SoftApConfiguration)mWifiThreadRunner.call((Supplier)new·-$$Lambda$VT9e2V3o0MYZG8ZEONk9kV8oR9o(mWifiApConfigStore),·(Object)new·SoftApConfiguration$Builder().build());
Offset 1865, 15 lines modifiedOffset 1860, 15 lines modified
1865 ········if·(suggestionConnectionStatusListener·!=·null)·{1860 ········if·(suggestionConnectionStatusListener·!=·null)·{
1866 ············final·int·callingUid·=·Binder.getCallingUid();1861 ············final·int·callingUid·=·Binder.getCallingUid();
1867 ············this.enforceAccessPermission();1862 ············this.enforceAccessPermission();
1868 ············this.enforceLocationPermission(s,·s2,·callingUid);1863 ············this.enforceLocationPermission(s,·s2,·callingUid);
1869 ············if·(this.mVerboseLoggingEnabled)·{1864 ············if·(this.mVerboseLoggingEnabled)·{
1870 ················this.mLog.info("registerSuggestionConnectionStatusListener·uid=%").c((long)callingUid).flush();1865 ················this.mLog.info("registerSuggestionConnectionStatusListener·uid=%").c((long)callingUid).flush();
1871 ············}1866 ············}
1872 ············this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$CjlUpg3xA5Ga7fshHhCZOkkIBvY(this,·binder,·suggestionConnectionStatusListener,·n,·s));1867 ············this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$QEbQWjtkwU2ZCBwW2g7n2lupBkw(this,·binder,·suggestionConnectionStatusListener,·n,·s,·callingUid));
1873 ············return;1868 ············return;
1874 ········}1869 ········}
1875 ········throw·new·IllegalArgumentException("listener·must·not·be·null");1870 ········throw·new·IllegalArgumentException("listener·must·not·be·null");
1876 ····}1871 ····}
1877 ····1872 ····
1878 ····public·void·registerTrafficStateCallback(final·IBinder·binder,·final·ITrafficStateCallback·trafficStateCallback,·final·int·n)·{1873 ····public·void·registerTrafficStateCallback(final·IBinder·binder,·final·ITrafficStateCallback·trafficStateCallback,·final·int·n)·{
1879 ········if·(binder·==·null)·{1874 ········if·(binder·==·null)·{
Offset 2072, 28 lines modifiedOffset 2067, 22 lines modified
2072 ····public·void·setScanThrottleEnabled(final·boolean·b)·{2067 ····public·void·setScanThrottleEnabled(final·boolean·b)·{
2073 ········this.enforceNetworkSettingsPermission();2068 ········this.enforceNetworkSettingsPermission();
2074 ········this.mLog.info("setScanThrottleEnabled·uid=%·verbose=%").c((long)Binder.getCallingUid()).c(b).flush();2069 ········this.mLog.info("setScanThrottleEnabled·uid=%·verbose=%").c((long)Binder.getCallingUid()).c(b).flush();
2075 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$kyNmlLzCsRj-Pv0gTPbIGNBVNbY(this,·b));2070 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$kyNmlLzCsRj-Pv0gTPbIGNBVNbY(this,·b));
2076 ····}2071 ····}
2077 ····2072 ····
2078 ····public·boolean·setSoftApConfiguration(final·SoftApConfiguration·softApConfiguration,·final·String·s)·{2073 ····public·boolean·setSoftApConfiguration(final·SoftApConfiguration·softApConfiguration,·final·String·s)·{
 2074 ········this.enforceNetworkSettingsPermission();
2079 ········final·int·callingUid·=·Binder.getCallingUid();2075 ········final·int·callingUid·=·Binder.getCallingUid();
2080 ········final·boolean·checkNetworkSettingsPermission·=·this.mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid);2076 ········final·boolean·checkNetworkSettingsPermission·=·this.mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid);
2081 ········if·(!this.mWifiPermissionsUtil.checkConfigOverridePermission(callingUid)·&&·!checkNetworkSettingsPermission)·{ 
2082 ············final·StringBuilder·sb·=·new·StringBuilder(); 
2083 ············sb.append("App·not·allowed·to·read·or·update·stored·WiFi·Ap·config·(uid·=·"); 
2084 ············sb.append(callingUid); 
2085 ············sb.append(")"); 
2086 ············throw·new·SecurityException(sb.toString()); 
2087 ········} 
2088 ········this.mLog.info("setSoftApConfiguration·uid=%").c((long)callingUid).flush();2077 ········this.mLog.info("setSoftApConfiguration·uid=%").c((long)callingUid).flush();
2089 ········if·(softApConfiguration·==·null)·{2078 ········if·(softApConfiguration·==·null)·{
2090 ············return·false;2079 ············return·false;
2091 ········}2080 ········}
2092 ········if·(WifiApConfigStore.validateApWifiConfiguration(softApConfiguration,·checkNetworkSettingsPermission,·this.mContext))·{2081 ········if·(WifiApConfigStore.validateApWifiConfiguration(softApConfiguration,·checkNetworkSettingsPermission))·{
2093 ············this.mActiveModeWarden.updateSoftApConfiguration(softApConfiguration);2082 ············this.mActiveModeWarden.updateSoftApConfiguration(softApConfiguration);
2094 ············this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$XgpTfXWSblWVSBXUQwJllr99PBU(this,·softApConfiguration));2083 ············this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$XgpTfXWSblWVSBXUQwJllr99PBU(this,·softApConfiguration));
2095 ············return·true;2084 ············return·true;
2096 ········}2085 ········}
2097 ········Log.e("WifiService",·"Invalid·SoftAp·Configuration");2086 ········Log.e("WifiService",·"Invalid·SoftAp·Configuration");
2098 ········return·false;2087 ········return·false;
2099 ····}2088 ····}
Offset 2114, 15 lines modifiedOffset 2103, 15 lines modified
2114 ········if·(wifiConfiguration·==·null)·{2103 ········if·(wifiConfiguration·==·null)·{
2115 ············return·false;2104 ············return·false;
2116 ········}2105 ········}
2117 ········final·SoftApConfiguration·fromWifiConfiguration·=·ApConfigUtil.fromWifiConfiguration(wifiConfiguration);2106 ········final·SoftApConfiguration·fromWifiConfiguration·=·ApConfigUtil.fromWifiConfiguration(wifiConfiguration);
2118 ········if·(fromWifiConfiguration·==·null)·{2107 ········if·(fromWifiConfiguration·==·null)·{
2119 ············return·false;2108 ············return·false;
2120 ········}2109 ········}
2121 ········if·(WifiApConfigStore.validateApWifiConfiguration(fromWifiConfiguration,·false,·this.mContext))·{2110 ········if·(WifiApConfigStore.validateApWifiConfiguration(fromWifiConfiguration,·false))·{
2122 ············this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$R14oMkwaoCf0rYeV0TmP0uv4p6g(this,·fromWifiConfiguration));2111 ············this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$R14oMkwaoCf0rYeV0TmP0uv4p6g(this,·fromWifiConfiguration));
2123 ············return·true;2112 ············return·true;
2124 ········}2113 ········}
2125 ········Log.e("WifiService",·"Invalid·WifiConfiguration");2114 ········Log.e("WifiService",·"Invalid·WifiConfiguration");
2126 ········return·false;2115 ········return·false;
2127 ····}2116 ····}
2128 ····2117 ····
Offset 2640, 18 lines modifiedOffset 2629, 19 lines modified
2640 ············this.mLog.info("unregisterSoftApCallback·uid=%").c((long)Binder.getCallingUid()).flush();2629 ············this.mLog.info("unregisterSoftApCallback·uid=%").c((long)Binder.getCallingUid()).flush();
2641 ········}2630 ········}
2642 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$mXCaaDa5srnjOPafzsfN6xKAgac(this,·n));2631 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$mXCaaDa5srnjOPafzsfN6xKAgac(this,·n));
2643 ····}2632 ····}
2644 ····2633 ····
2645 ····public·void·unregisterSuggestionConnectionStatusListener(final·int·n,·final·String·s)·{2634 ····public·void·unregisterSuggestionConnectionStatusListener(final·int·n,·final·String·s)·{
2646 ········this.enforceAccessPermission();2635 ········this.enforceAccessPermission();
 2636 ········final·int·callingUid·=·Binder.getCallingUid();
2647 ········if·(this.mVerboseLoggingEnabled)·{2637 ········if·(this.mVerboseLoggingEnabled)·{
2648 ············this.mLog.info("unregisterSuggestionConnectionStatusListener·uid=%").c((long)Binder.getCallingUid()).flush();2638 ············this.mLog.info("unregisterSuggestionConnectionStatusListener·uid=%").c((long)callingUid).flush();
2649 ········}2639 ········}
2650 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$qR3mSCJh9iek0MTG1c8Q2yiIzMY(this,·n,·s));2640 ········this.mWifiThreadRunner.post((Runnable)new·-$$Lambda$WifiServiceImpl$Tq6QN2Gof7SbZ6LPwxylkl6psmc(this,·n,·s,·callingUid));
2651 ····}2641 ····}
2652 ····2642 ····
2653 ····public·void·unregisterTrafficStateCallback(final·int·n)·{2643 ····public·void·unregisterTrafficStateCallback(final·int·n)·{
2654 ········this.enforceNetworkSettingsPermission();2644 ········this.enforceNetworkSettingsPermission();
2655 ········if·(this.mVerboseLoggingEnabled)·{2645 ········if·(this.mVerboseLoggingEnabled)·{
2656 ············this.mLog.info("unregisterTrafficStateCallback·uid=%").c((long)Binder.getCallingUid()).flush();2646 ············this.mLog.info("unregisterTrafficStateCallback·uid=%").c((long)Binder.getCallingUid()).flush();
2657 ········}2647 ········}