summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2020-06-19 16:34:17 -0700
committerHai Shalom <haishalom@google.com>2020-06-22 22:49:33 +0000
commitd1b35627abfe888e0a250206322bd9b8b76aeb52 (patch)
treecbabc0e702d26565d07727788952f5ab1f493a91 /service
parentf88d296d36abd371ef11d074bbb95e47f04e8ed0 (diff)
[Passpoint] Remove R2 broadcasts
Remove R2 broadcasts for Icon, deauth imminent and subscription remediation. These broadcasts are not used and not necessary, and also leaked the Passpoint AP BSSID without location permission. Bug: 157748906 Test: atest PasspointManagerTest Change-Id: I25aba4c7a39150e9df483890f575d3e3767723be (cherry picked from commit 6f1aafe2d4b979cf64ab7a5150a021f977cfed37) Merged-In: I25aba4c7a39150e9df483890f575d3e3767723be
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/hotspot2/PasspointManager.java44
1 files changed, 2 insertions, 42 deletions
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
index 4c2937cb5..988dd6642 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
@@ -16,20 +16,7 @@
package com.android.server.wifi.hotspot2;
-import static android.net.wifi.WifiManager.ACTION_PASSPOINT_DEAUTH_IMMINENT;
-import static android.net.wifi.WifiManager.ACTION_PASSPOINT_ICON;
-import static android.net.wifi.WifiManager.ACTION_PASSPOINT_SUBSCRIPTION_REMEDIATION;
-import static android.net.wifi.WifiManager.EXTRA_BSSID_LONG;
-import static android.net.wifi.WifiManager.EXTRA_DELAY;
-import static android.net.wifi.WifiManager.EXTRA_ESS;
-import static android.net.wifi.WifiManager.EXTRA_FILENAME;
-import static android.net.wifi.WifiManager.EXTRA_ICON;
-import static android.net.wifi.WifiManager.EXTRA_SUBSCRIPTION_REMEDIATION_METHOD;
-import static android.net.wifi.WifiManager.EXTRA_URL;
-
import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.Icon;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiEnterpriseConfig;
@@ -37,7 +24,6 @@ import android.net.wifi.hotspot2.IProvisioningCallback;
import android.net.wifi.hotspot2.OsuProvider;
import android.net.wifi.hotspot2.PasspointConfiguration;
import android.os.Looper;
-import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
@@ -130,38 +116,12 @@ public class PasspointManager {
@Override
public void onIconResponse(long bssid, String fileName, byte[] data) {
- Intent intent = new Intent(ACTION_PASSPOINT_ICON);
- intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
- intent.putExtra(EXTRA_BSSID_LONG, bssid);
- intent.putExtra(EXTRA_FILENAME, fileName);
- if (data != null) {
- intent.putExtra(EXTRA_ICON, Icon.createWithData(data, 0, data.length));
- }
- mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
- android.Manifest.permission.ACCESS_WIFI_STATE);
+ // Empty
}
@Override
public void onWnmFrameReceived(WnmData event) {
- // %012x HS20-SUBSCRIPTION-REMEDIATION "%u %s", osu_method, url
- // %012x HS20-DEAUTH-IMMINENT-NOTICE "%u %u %s", code, reauth_delay, url
- Intent intent;
- if (event.isDeauthEvent()) {
- intent = new Intent(ACTION_PASSPOINT_DEAUTH_IMMINENT);
- intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
- intent.putExtra(EXTRA_BSSID_LONG, event.getBssid());
- intent.putExtra(EXTRA_URL, event.getUrl());
- intent.putExtra(EXTRA_ESS, event.isEss());
- intent.putExtra(EXTRA_DELAY, event.getDelay());
- } else {
- intent = new Intent(ACTION_PASSPOINT_SUBSCRIPTION_REMEDIATION);
- intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
- intent.putExtra(EXTRA_BSSID_LONG, event.getBssid());
- intent.putExtra(EXTRA_SUBSCRIPTION_REMEDIATION_METHOD, event.getMethod());
- intent.putExtra(EXTRA_URL, event.getUrl());
- }
- mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
- android.Manifest.permission.ACCESS_WIFI_STATE);
+ // Empty
}
}