Loading packages/Osu/Android.mk +1 −0 Original line number Diff line number Diff line LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_PROGUARD_ENABLED := disabled LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res LOCAL_MODULE_TAGS := optional Loading packages/Osu/AndroidManifest.xml +5 −5 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ </activity> <activity android:name="com.android.hotspot2.osu.OSUWebView"> </activity> <service android:name=".app.OSUService"> <service android:name=".app.OSUService" android:directBootAware="true"> </service> <service android:name=".flow.FlowService" android:process=":osuflow"> </service> Loading packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java +7 −0 Original line number Diff line number Diff line Loading @@ -365,6 +365,13 @@ public class PlatformAdapter { altSP = homeSP; } updateNetwork(altSP, caCert, clientCerts, privateKey); if (privateKey != null) { X509Certificate cltCert = getCert(certs, OSUCertType.Client); mKeyStore.setKeyEntry(CERT_CLT_KEY_ALIAS + homeSP.getFQDN(), privateKey, null, new X509Certificate[]{cltCert}); mKeyStore.setCertificateEntry(CERT_CLT_CERT_ALIAS + homeSP.getFQDN(), cltCert); } } Intent intent = new Intent(OSUService.REMEDIATION_DONE_ACTION); Loading packages/Osu/src/com/android/hotspot2/osu/service/RemediationHandler.java +11 −7 Original line number Diff line number Diff line Loading @@ -135,13 +135,17 @@ public class RemediationHandler implements AlarmManager.OnAlarmListener { WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); try { if (mActivePasspointConfig != null && update.matches(wifiInfo, mActivePasspointConfig.getHomeSP())) { Log.d(OSUManager.TAG, "WNM frame received, remediating now"); if (mActivePasspointConfig == null) { Log.d(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " + "received, adding to outstanding remediations", url, bssid)); mOutstanding.addFirst(new PendingUpdate(bssid, url)); } else if (update.matches(wifiInfo, mActivePasspointConfig.getHomeSP())) { Log.d(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " + "received, remediating now", url, bssid)); update.remediate(wifiManager.getCurrentNetwork()); } else { Log.d(OSUManager.TAG, "WNM frame received, adding to outstanding remediations"); mOutstanding.addFirst(new PendingUpdate(bssid, url)); Log.w(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " + "does not meet restriction", url, bssid)); } } catch (IOException ioe) { Log.w(OSUManager.TAG, "Failed to remediate from WNM: " + ioe); Loading Loading @@ -497,8 +501,8 @@ public class RemediationHandler implements AlarmManager.OnAlarmListener { Log.d(OSUManager.TAG, String.format("Checking applicability of %s to %012x\n", wifiInfo != null ? wifiInfo.getBSSID() : "-", mBssid)); return wifiInfo != null && Utils.parseMac(wifiInfo.getBSSID()) == mBssid; //&& passesRestriction(activeSP); // !!! b/28600780 && Utils.parseMac(wifiInfo.getBSSID()) == mBssid && passesRestriction(activeSP); // !!! b/28600780 } else { return passesRestriction(mHomeSP); } Loading Loading
packages/Osu/Android.mk +1 −0 Original line number Diff line number Diff line LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_PROGUARD_ENABLED := disabled LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res LOCAL_MODULE_TAGS := optional Loading
packages/Osu/AndroidManifest.xml +5 −5 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ </activity> <activity android:name="com.android.hotspot2.osu.OSUWebView"> </activity> <service android:name=".app.OSUService"> <service android:name=".app.OSUService" android:directBootAware="true"> </service> <service android:name=".flow.FlowService" android:process=":osuflow"> </service> Loading
packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java +7 −0 Original line number Diff line number Diff line Loading @@ -365,6 +365,13 @@ public class PlatformAdapter { altSP = homeSP; } updateNetwork(altSP, caCert, clientCerts, privateKey); if (privateKey != null) { X509Certificate cltCert = getCert(certs, OSUCertType.Client); mKeyStore.setKeyEntry(CERT_CLT_KEY_ALIAS + homeSP.getFQDN(), privateKey, null, new X509Certificate[]{cltCert}); mKeyStore.setCertificateEntry(CERT_CLT_CERT_ALIAS + homeSP.getFQDN(), cltCert); } } Intent intent = new Intent(OSUService.REMEDIATION_DONE_ACTION); Loading
packages/Osu/src/com/android/hotspot2/osu/service/RemediationHandler.java +11 −7 Original line number Diff line number Diff line Loading @@ -135,13 +135,17 @@ public class RemediationHandler implements AlarmManager.OnAlarmListener { WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); try { if (mActivePasspointConfig != null && update.matches(wifiInfo, mActivePasspointConfig.getHomeSP())) { Log.d(OSUManager.TAG, "WNM frame received, remediating now"); if (mActivePasspointConfig == null) { Log.d(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " + "received, adding to outstanding remediations", url, bssid)); mOutstanding.addFirst(new PendingUpdate(bssid, url)); } else if (update.matches(wifiInfo, mActivePasspointConfig.getHomeSP())) { Log.d(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " + "received, remediating now", url, bssid)); update.remediate(wifiManager.getCurrentNetwork()); } else { Log.d(OSUManager.TAG, "WNM frame received, adding to outstanding remediations"); mOutstanding.addFirst(new PendingUpdate(bssid, url)); Log.w(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " + "does not meet restriction", url, bssid)); } } catch (IOException ioe) { Log.w(OSUManager.TAG, "Failed to remediate from WNM: " + ioe); Loading Loading @@ -497,8 +501,8 @@ public class RemediationHandler implements AlarmManager.OnAlarmListener { Log.d(OSUManager.TAG, String.format("Checking applicability of %s to %012x\n", wifiInfo != null ? wifiInfo.getBSSID() : "-", mBssid)); return wifiInfo != null && Utils.parseMac(wifiInfo.getBSSID()) == mBssid; //&& passesRestriction(activeSP); // !!! b/28600780 && Utils.parseMac(wifiInfo.getBSSID()) == mBssid && passesRestriction(activeSP); // !!! b/28600780 } else { return passesRestriction(mHomeSP); } Loading