Skip to content

Commit

Permalink
Avoid collecting wifi related data without user consent
Browse files Browse the repository at this point in the history
We should ensure the user accepted the 'terms of service' and the 'privacy
policy' agreements before collecting data during the wifi connection process.
  • Loading branch information
javifernandez committed Jul 13, 2023
1 parent 6b84db7 commit 8f2fb12
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import com.igalia.wolvic.VRBrowserApplication;
import com.igalia.wolvic.audio.AudioEngine;
import com.igalia.wolvic.browser.BookmarksStore;
import com.igalia.wolvic.browser.SettingsStore;
import com.igalia.wolvic.browser.engine.Session;
import com.igalia.wolvic.browser.engine.SessionStore;
import com.igalia.wolvic.databinding.TrayBinding;
Expand Down Expand Up @@ -818,6 +819,12 @@ private boolean updateWifiIcon(final int level) {
}

private void updateWifi() {
// We are collecting sensitive data here, so we should ensure the user granted permissions.
if (!(SettingsStore.getInstance(getContext()).isTermsServiceAccepted() &&
SettingsStore.getInstance(getContext()).isPrivacyPolicyAccepted())) {
return;
}

// TODO: Deprecated getConnectionInfo(), see https://github.com/Igalia/wolvic/issues/802
if ((mTrayViewModel.getWifiConnected().getValue() != null) && mTrayViewModel.getWifiConnected().getValue().get()) {
WifiManager wifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE);
Expand Down

0 comments on commit 8f2fb12

Please sign in to comment.