Skip to content

Commit

Permalink
Avoid collecting wifi related data without user consent (#840)
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 authored and felipeerias committed Aug 4, 2023
1 parent 4c6c35d commit 98ae0c9
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 98ae0c9

Please sign in to comment.