Open Bug 985174 Opened 6 years ago Updated 6 years ago

Remove unused FHR Gecko prefs for datanotification

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set

Tracking

()

People

(Reporter: liuche, Unassigned)

Details

In DataReportingNotification, the code that fires off Android notifications for alerting users of our data policy uses SharedPrefs because it might called while Gecko isn't running. However, we don't use the convention for naming non-Gecko-prefs, which is confusing because on top of that, we also use the same names as the (unused) Gecko prefs.

A comment to that effect, explaining why we don't use Gecko prefs would also be nice.

However, I'm not sure if this is worth the trouble of a SharedPref migration, since I assume that we'll just have to have to keep that version check around in the code forever...
Can you summarize why this is a bad thing?

We store a lot of stuff in SharedPreferences that doesn't map to a Gecko pref. And this pref is per-app, not per-profile, so it naturally doesn't map to a Gecko pref value.

As I understand it, the only purpose of not_a_pref is for stuff that's in preferences.xml but isn't automatically replicated.
This is not a terrible thing, but it's messy naming convention because there are unused Fennec datareporting Gecko prefs that are named the exact same thing as the datareporting SharedPreferences. The android_not_a_pref *is* used for filtering out SP prefs that shouldn't be mirrored in Gecko, but that doesn't mean we couldn't use it to be explicit that these are only Android prefs.

But maybe all this just means that we should remove those datareporting Gecko prefs from Fennec!
(In reply to Chenxia Liu [:liuche] from comment #2)

> But maybe all this just means that we should remove those datareporting
> Gecko prefs from Fennec!

We should! If they're not used, they're just misleading. We already write through to the telem pref, so if there are prefs in Gecko for FHR, we should kill them.
Summary: DataReporting shared prefs should be prefixed with android_not_a_pref → Remove unused FHR Gecko prefs for datanotification
You need to log in before you can comment on or make changes to this bug.