-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for 23919 fingerprint for language #14398
Fix for 23919 fingerprint for language #14398
Conversation
@@ -187,6 +189,9 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { | |||
(BraveDialogPreference) findPreference(PREF_FINGERPRINTING_PROTECTION); | |||
mFingerprintingProtectionPref.setOnPreferenceChangeListener(this); | |||
|
|||
mFingerprntLanguagePref = (ChromeSwitchPreference) findPreference(PREF_FINGERPRINT_LANGUAGE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sujitacharya2005 how are you syncing the pref value here ? So after changing the value, how you are checking the value and setting the pref value here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
From SwitchPreference when change value onPreferenceChange will call , there updating UserPrefs.
-
in feature.cc it's set initial value disabled
const base::Feature kBraveReduceLanguage{"BraveReduceLanguage",
base::FEATURE_DISABLED_BY_DEFAULT}; -
From UI side also initial value SwitchPreference is false
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
android:defaultValue="false" /> -
Now I need to verify that UserPrefs setting in native code happening properly
UserPrefs.get(Profile.getLastUsedRegularProfile())
.setBoolean(BravePref.REDUCE_LANGUAGE_ENABLED, (boolean) newValue); -
My understanding like once setting this UserPrefs value automatically native will take care the feature
so I am not doing any syncing logic.
Please let me know if anything I am missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deeppandya
Updated initial UI SwitchPreference state based on native value.
70c2c0d
to
d5326c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d5326c1
to
d9759ae
Compare
Resolves brave/brave-browser#23919
Related PRs
brave/brave-browser#23306
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Currently by default this feature is off.
To enable this