Skip to content

Opt out of location data in CellServiceConstraintObserver#14768

Open
groschupp wants to merge 1 commit into
signalapp:mainfrom
groschupp:fix/cell-service-constraint-location-data
Open

Opt out of location data in CellServiceConstraintObserver#14768
groschupp wants to merge 1 commit into
signalapp:mainfrom
groschupp:fix/cell-service-constraint-location-data

Conversation

@groschupp
Copy link
Copy Markdown

Register the TelephonyCallback with INCLUDE_LOCATION_DATA_NONE on API 33+
to prevent TelephonyRegistry from resulting in spurious FINE_LOCATION AppOps
entries on every service-state update.

First time contributor checklist

Contributor checklist

  • Pixel Pro 10, Android 16
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

If Signal has permission to access location, the system (privacy dashboard/appops log) reports that it accesses location whenever the app is running. Our tests found evidence that these accesses are not triggered directly within the app itself, but rather through callbacks registered by CellServiceConstraintObserver. Currently, this registration uses registerTelephonyCallback without opting out of location data. On API 33+, this causes TelephonyRegistry to include location-sensitive fields in the callback based on whatever location permission Signal has been granted and to write location AppOps entries linked to the Signal UID on every service-state update. CellServiceConstraintObserver does not seem to need the location-sensitive fields that trigger this check.

The proposed fix uses the option to request callbacks without location data introduced in API 33. With our patched build, we no longer observe Signal location requests.

This PR might be related to issues #13105 and #14761.

  Register the TelephonyCallback with INCLUDE_LOCATION_DATA_NONE on API 33+
  to prevent TelephonyRegistry from writing spurious FINE_LOCATION AppOps
  entries on every service-state update. The observer only reads
  serviceState.getState() and has no use for location-sensitive fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant