Skip to content

Commit

Permalink
Removed logic which was backfilling a default value for P3A
Browse files Browse the repository at this point in the history
  • Loading branch information
bsclifton committed Nov 13, 2021
1 parent f22ba07 commit 60ee16f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,6 @@ public void finishNativeInitialization() {
BraveSyncInformers.show();
BraveAndroidSyncDisabledInformer.showInformers();

if (!PackageUtils.isFirstInstall(this)
&& !OnboardingPrefManager.getInstance().isP3AEnabledForExistingUsers()) {
BravePrefServiceBridge.getInstance().setP3AEnabled(true);
OnboardingPrefManager.getInstance().setP3AEnabledForExistingUsers(true);
}

if (!OnboardingPrefManager.getInstance().isOneTimeNotificationStarted()
&& PackageUtils.isFirstInstall(this)) {
RetentionNotificationUtil.scheduleNotification(this, RetentionNotificationUtil.HOUR_3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
public class OnboardingPrefManager {
private static final String PREF_ONBOARDING = "onboarding";
private static final String PREF_P3A_ONBOARDING = "p3a_onboarding";
private static final String PREF_P3A_ENABLED_FOR_EXISTING_USERS =
"p3a_enabled_for_existing_users";
private static final String PREF_CROSS_PROMO_MODAL = "cross_promo_modal";
private static final String PREF_ONBOARDING_V2 = "onboarding_v2";
private static final String PREF_NEXT_ONBOARDING_DATE = "next_onboarding_date";
Expand Down Expand Up @@ -109,16 +107,6 @@ public void setOnboardingShown(boolean isShown) {
sharedPreferencesEditor.apply();
}

public boolean isP3AEnabledForExistingUsers() {
return mSharedPreferences.getBoolean(PREF_P3A_ENABLED_FOR_EXISTING_USERS, false);
}

public void setP3AEnabledForExistingUsers(boolean isShown) {
SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit();
sharedPreferencesEditor.putBoolean(PREF_P3A_ENABLED_FOR_EXISTING_USERS, isShown);
sharedPreferencesEditor.apply();
}

/**
* Returns the user preference for whether the onboarding is shown.
*/
Expand Down

0 comments on commit 60ee16f

Please sign in to comment.